大屏接口调整、维护地区(area)字段
parent
0efe7b0fc3
commit
3b0eb0bb97
|
|
@ -276,30 +276,32 @@ public class LargeScreenController extends BaseController {
|
||||||
LambdaQueryWrapper<BizCustomerRouteShop> queryWrapper1 = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<BizCustomerRouteShop> queryWrapper1 = new LambdaQueryWrapper<>();
|
||||||
queryWrapper1.eq(BizCustomerRouteShop::getRouteId,bizCustomerRoute.getId());
|
queryWrapper1.eq(BizCustomerRouteShop::getRouteId,bizCustomerRoute.getId());
|
||||||
List<BizCustomerRouteShop> bizCustomerRouteShops = bizCustomerRouteShopMapper.selectList(queryWrapper1);
|
List<BizCustomerRouteShop> bizCustomerRouteShops = bizCustomerRouteShopMapper.selectList(queryWrapper1);
|
||||||
List<Long> shopIdList = bizCustomerRouteShops.stream().map(BizCustomerRouteShop::getShopId).collect(Collectors.toList());
|
if (bizCustomerRouteShops.size() != 0){
|
||||||
LambdaQueryWrapper<BizCustomerShop> queryWrapper2 = new LambdaQueryWrapper<>();
|
List<Long> shopIdList = bizCustomerRouteShops.stream().map(BizCustomerRouteShop::getShopId).collect(Collectors.toList());
|
||||||
queryWrapper2.in(BizCustomerShop::getId,shopIdList);
|
LambdaQueryWrapper<BizCustomerShop> queryWrapper2 = new LambdaQueryWrapper<>();
|
||||||
List<BizCustomerShop> bizCustomerShops = bizCustomerShopMapper.selectList(queryWrapper2);
|
queryWrapper2.in(BizCustomerShop::getId,shopIdList);
|
||||||
for (BizCustomerShop bizCustomerShop : bizCustomerShops) {
|
List<BizCustomerShop> bizCustomerShops = bizCustomerShopMapper.selectList(queryWrapper2);
|
||||||
LambdaQueryWrapper<BizCustomerShopState> queryWrapper3 = new LambdaQueryWrapper<>();
|
for (BizCustomerShop bizCustomerShop : bizCustomerShops) {
|
||||||
queryWrapper3.eq(BizCustomerShopState::getShopId,bizCustomerShop.getId());
|
LambdaQueryWrapper<BizCustomerShopState> queryWrapper3 = new LambdaQueryWrapper<>();
|
||||||
BizCustomerShopState bizCustomerShopState = bizCustomerShopStateMapper.selectOne(queryWrapper3);
|
queryWrapper3.eq(BizCustomerShopState::getShopId,bizCustomerShop.getId());
|
||||||
if (bizCustomerShopState != null){
|
BizCustomerShopState bizCustomerShopState = bizCustomerShopStateMapper.selectOne(queryWrapper3);
|
||||||
bizCustomerShop.setIsFinish(bizCustomerShopState.getIsFinish());
|
if (bizCustomerShopState != null){
|
||||||
LambdaQueryWrapper<BizOrder> queryWrapper4 = new LambdaQueryWrapper<>();
|
bizCustomerShop.setIsFinish(bizCustomerShopState.getIsFinish());
|
||||||
queryWrapper4.eq(BizOrder::getOrderSn,bizCustomerShopState.getCurrentOrder());
|
LambdaQueryWrapper<BizOrder> queryWrapper4 = new LambdaQueryWrapper<>();
|
||||||
BizOrder bizOrder = bizOrderMapper.selectOne(queryWrapper4);
|
queryWrapper4.eq(BizOrder::getOrderSn,bizCustomerShopState.getCurrentOrder());
|
||||||
if (bizOrder != null){
|
BizOrder bizOrder = bizOrderMapper.selectOne(queryWrapper4);
|
||||||
bizCustomerShop.setCurrentOrder(bizOrder.getOrderSn());
|
if (bizOrder != null){
|
||||||
bizCustomerShop.setCarNo(bizOrder.getCarNo());
|
bizCustomerShop.setCurrentOrder(bizOrder.getOrderSn());
|
||||||
bizCustomerShop.setDriveName(bizOrder.getDriverName());
|
bizCustomerShop.setCarNo(bizOrder.getCarNo());
|
||||||
bizCustomerShop.setCopilotName(bizOrder.getCopilotName());
|
bizCustomerShop.setDriveName(bizOrder.getDriverName());
|
||||||
bizCustomerShop.setStartTime(bizOrder.getStartTime());
|
bizCustomerShop.setCopilotName(bizOrder.getCopilotName());
|
||||||
bizCustomerShop.setArriveImg(bizOrder.getArriveImg());
|
bizCustomerShop.setStartTime(bizOrder.getStartTime());
|
||||||
|
bizCustomerShop.setArriveImg(bizOrder.getArriveImg());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
bizCustomerRoute.setShopList(bizCustomerShops);
|
||||||
}
|
}
|
||||||
bizCustomerRoute.setShopList(bizCustomerShops);
|
|
||||||
largeScreenEntity.setBizCustomerRoute(bizCustomerRoute);
|
largeScreenEntity.setBizCustomerRoute(bizCustomerRoute);
|
||||||
return AjaxResult.success(largeScreenEntity);
|
return AjaxResult.success(largeScreenEntity);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,29 @@
|
||||||
|
package com.cpxt.web.controller.biz;
|
||||||
|
|
||||||
|
import com.cpxt.biz.service.SysAreaService;
|
||||||
|
import com.cpxt.common.core.controller.BaseController;
|
||||||
|
import com.cpxt.common.core.domain.AjaxResult;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 地区controller
|
||||||
|
* @author Luo.J
|
||||||
|
* @date 2024-1-16
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/system/area")
|
||||||
|
public class SysAreaController extends BaseController
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private SysAreaService sysAreaService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取车辆详细信息
|
||||||
|
*/
|
||||||
|
@GetMapping("/getByParentId")
|
||||||
|
public AjaxResult getInfo(@RequestParam String parentId)
|
||||||
|
{
|
||||||
|
return success(sysAreaService.selectByParentId(parentId));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -3,6 +3,10 @@ package com.cpxt.web.controller.system;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
|
import com.cpxt.biz.domain.BizCustomer;
|
||||||
|
import com.cpxt.biz.domain.BizDriver;
|
||||||
|
import com.cpxt.biz.mapper.BizCustomerMapper;
|
||||||
|
import com.cpxt.biz.mapper.BizDriverMapper;
|
||||||
import com.cpxt.common.annotation.Anonymous;
|
import com.cpxt.common.annotation.Anonymous;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
|
@ -41,6 +45,12 @@ public class SysLoginController
|
||||||
@Autowired
|
@Autowired
|
||||||
private TokenService tokenService;
|
private TokenService tokenService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private BizDriverMapper bizDriverMapper;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private BizCustomerMapper bizCustomerMapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 登录方法
|
* 登录方法
|
||||||
*
|
*
|
||||||
|
|
@ -85,6 +95,15 @@ public class SysLoginController
|
||||||
{
|
{
|
||||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||||
SysUser user = loginUser.getUser();
|
SysUser user = loginUser.getUser();
|
||||||
|
if (user.getUserType().equals("1")){ // 司机
|
||||||
|
BizDriver bizDriver = bizDriverMapper.selectByUserId(user.getUserId());
|
||||||
|
user.setLinkId(bizDriver.getId());
|
||||||
|
}else if (user.getUserType().equals("2")){ // 客户
|
||||||
|
BizCustomer bizCustomer = bizCustomerMapper.selectByName(user.getNickName());
|
||||||
|
user.setLinkId(bizCustomer.getId());
|
||||||
|
}else {
|
||||||
|
user.setLinkId(user.getUserId());
|
||||||
|
}
|
||||||
// 角色集合
|
// 角色集合
|
||||||
Set<String> roles = permissionService.getRolePermission(user);
|
Set<String> roles = permissionService.getRolePermission(user);
|
||||||
// 权限集合
|
// 权限集合
|
||||||
|
|
|
||||||
|
|
@ -93,6 +93,16 @@ public class SysUser extends BaseEntity
|
||||||
/** 角色ID */
|
/** 角色ID */
|
||||||
private Long roleId;
|
private Long roleId;
|
||||||
|
|
||||||
|
public Long getLinkId() {
|
||||||
|
return linkId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLinkId(Long linkId) {
|
||||||
|
this.linkId = linkId;
|
||||||
|
}
|
||||||
|
|
||||||
|
private Long linkId;
|
||||||
|
|
||||||
public SysUser()
|
public SysUser()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -121,7 +121,8 @@ public class BizCustomerShop
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private Integer isFinish;
|
private Integer isFinish;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String areaFullName;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ package com.cpxt.biz.domain;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
|
@ -76,4 +77,7 @@ public class BizCustomerWarehouse
|
||||||
|
|
||||||
/** 备注 */
|
/** 备注 */
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String areaFullName;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,115 @@
|
||||||
|
package com.cpxt.biz.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 从统计局上抓取的数据,导入到当前表
|
||||||
|
* @TableName sys_area
|
||||||
|
*/
|
||||||
|
@TableName(value ="sys_area")
|
||||||
|
@Data
|
||||||
|
public class SysArea implements Serializable {
|
||||||
|
/**
|
||||||
|
* 地址编码
|
||||||
|
*/
|
||||||
|
@TableId
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 地区名称
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 地区全称
|
||||||
|
*/
|
||||||
|
private String fullName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private String parentId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 首字母
|
||||||
|
*/
|
||||||
|
private String spell;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类型:1是省会,2直辖市,3港澳台,4其它
|
||||||
|
*/
|
||||||
|
private Integer areaType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 同级下排序
|
||||||
|
*/
|
||||||
|
private Integer orderNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 0全国、1省、2市区、3郊县、4街道、5居委会
|
||||||
|
*/
|
||||||
|
private Integer areaLevel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 城乡分类代码
|
||||||
|
*/
|
||||||
|
private String villageType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所属国家名
|
||||||
|
*/
|
||||||
|
private String nation;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所属省名称
|
||||||
|
*/
|
||||||
|
private String province;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所属市名称
|
||||||
|
*/
|
||||||
|
private String city;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所属区县名称
|
||||||
|
*/
|
||||||
|
private String county;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所属街道名称
|
||||||
|
*/
|
||||||
|
private String town;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 经度
|
||||||
|
*/
|
||||||
|
private String lng;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 纬度
|
||||||
|
*/
|
||||||
|
private String lat;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 来源地图,百度1,高德2
|
||||||
|
*/
|
||||||
|
private Integer mapType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否有下级
|
||||||
|
*/
|
||||||
|
private String isHaveChild;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,20 @@
|
||||||
|
package com.cpxt.biz.mapper;
|
||||||
|
|
||||||
|
import com.cpxt.biz.domain.SysArea;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author LuoJian
|
||||||
|
* @description 针对表【sys_area(从统计局上抓取的数据,导入到当前表)】的数据库操作Mapper
|
||||||
|
* @createDate 2025-01-16 14:22:17
|
||||||
|
* @Entity com.cpxt.biz.domain.SysArea
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface SysAreaMapper extends BaseMapper<SysArea> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
package com.cpxt.biz.service;
|
||||||
|
|
||||||
|
import com.cpxt.biz.domain.SysArea;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author LuoJian
|
||||||
|
* @description 针对表【sys_area(从统计局上抓取的数据,导入到当前表)】的数据库操作Service
|
||||||
|
* @createDate 2025-01-16 14:22:17
|
||||||
|
*/
|
||||||
|
public interface SysAreaService extends IService<SysArea> {
|
||||||
|
|
||||||
|
List<SysArea> selectByParentId(String parentId);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -53,6 +53,9 @@ public class BizCarStateServiceImpl implements IBizCarStateService
|
||||||
if (ObjectUtil.isNotEmpty(bizCarState.getCarNo())){
|
if (ObjectUtil.isNotEmpty(bizCarState.getCarNo())){
|
||||||
queryWrapper.eq(BizCarState::getCarNo, bizCarState.getCarNo());
|
queryWrapper.eq(BizCarState::getCarNo, bizCarState.getCarNo());
|
||||||
}
|
}
|
||||||
|
if (ObjectUtil.isNotEmpty(bizCarState.getCarId()) && bizCarState.getCarId() != 0){
|
||||||
|
queryWrapper.eq(BizCarState::getCarId, bizCarState.getCarId());
|
||||||
|
}
|
||||||
return queryWrapper;
|
return queryWrapper;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,8 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.cpxt.biz.domain.BizCustomerRoute;
|
import com.cpxt.biz.domain.BizCustomerRoute;
|
||||||
|
import com.cpxt.biz.domain.SysArea;
|
||||||
|
import com.cpxt.biz.mapper.SysAreaMapper;
|
||||||
import com.cpxt.common.utils.DateUtils;
|
import com.cpxt.common.utils.DateUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
@ -27,6 +29,9 @@ public class BizCustomerShopServiceImpl implements IBizCustomerShopService
|
||||||
@Autowired
|
@Autowired
|
||||||
private BizCustomerShopMapper bizCustomerShopMapper;
|
private BizCustomerShopMapper bizCustomerShopMapper;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private SysAreaMapper sysAreaMapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询门店
|
* 查询门店
|
||||||
*
|
*
|
||||||
|
|
@ -36,7 +41,14 @@ public class BizCustomerShopServiceImpl implements IBizCustomerShopService
|
||||||
@Override
|
@Override
|
||||||
public BizCustomerShop selectBizCustomerShopById(Long id)
|
public BizCustomerShop selectBizCustomerShopById(Long id)
|
||||||
{
|
{
|
||||||
return bizCustomerShopMapper.selectById(id);
|
BizCustomerShop bizCustomerShop = bizCustomerShopMapper.selectById(id);
|
||||||
|
if (ObjectUtil.isNotEmpty(bizCustomerShop.getArea())){
|
||||||
|
SysArea sysArea = sysAreaMapper.selectById(bizCustomerShop.getArea());
|
||||||
|
if (sysArea != null){
|
||||||
|
bizCustomerShop.setAreaFullName(sysArea.getFullName());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return bizCustomerShop;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,8 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.cpxt.biz.domain.BizCustomerUser;
|
import com.cpxt.biz.domain.BizCustomerUser;
|
||||||
|
import com.cpxt.biz.domain.SysArea;
|
||||||
|
import com.cpxt.biz.mapper.SysAreaMapper;
|
||||||
import com.cpxt.common.utils.DateUtils;
|
import com.cpxt.common.utils.DateUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
@ -27,6 +29,9 @@ public class BizCustomerWarehouseServiceImpl implements IBizCustomerWarehouseSer
|
||||||
@Autowired
|
@Autowired
|
||||||
private BizCustomerWarehouseMapper bizCustomerWarehouseMapper;
|
private BizCustomerWarehouseMapper bizCustomerWarehouseMapper;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private SysAreaMapper sysAreaMapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询仓库
|
* 查询仓库
|
||||||
*
|
*
|
||||||
|
|
@ -36,7 +41,14 @@ public class BizCustomerWarehouseServiceImpl implements IBizCustomerWarehouseSer
|
||||||
@Override
|
@Override
|
||||||
public BizCustomerWarehouse selectBizCustomerWarehouseById(Long id)
|
public BizCustomerWarehouse selectBizCustomerWarehouseById(Long id)
|
||||||
{
|
{
|
||||||
return bizCustomerWarehouseMapper.selectById(id);
|
BizCustomerWarehouse bizCustomerWarehouse = bizCustomerWarehouseMapper.selectById(id);
|
||||||
|
if (ObjectUtil.isNotEmpty(bizCustomerWarehouse.getArea())){
|
||||||
|
SysArea sysArea = sysAreaMapper.selectById(bizCustomerWarehouse.getArea());
|
||||||
|
if (sysArea != null){
|
||||||
|
bizCustomerWarehouse.setAreaFullName(sysArea.getFullName());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return bizCustomerWarehouse;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -389,6 +389,10 @@ public class BizOrderServiceImpl implements IBizOrderService {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int updateBizOrder(BizOrder bizOrder) {
|
public int updateBizOrder(BizOrder bizOrder) {
|
||||||
|
BizOrder order = bizOrderMapper.selectById(bizOrder.getId());
|
||||||
|
if (bizOrder.getIsCancel() == 1 && order.getCancelTime() == null){
|
||||||
|
bizOrder.setCancelTime(new Date());
|
||||||
|
}
|
||||||
return bizOrderMapper.updateById(bizOrder);
|
return bizOrderMapper.updateById(bizOrder);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,35 @@
|
||||||
|
package com.cpxt.biz.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.cpxt.biz.domain.SysArea;
|
||||||
|
import com.cpxt.biz.service.SysAreaService;
|
||||||
|
import com.cpxt.biz.mapper.SysAreaMapper;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author LuoJian
|
||||||
|
* @description 针对表【sys_area(从统计局上抓取的数据,导入到当前表)】的数据库操作Service实现
|
||||||
|
* @createDate 2025-01-16 14:22:17
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class SysAreaServiceImpl extends ServiceImpl<SysAreaMapper, SysArea>
|
||||||
|
implements SysAreaService{
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private SysAreaMapper sysAreaMapper;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<SysArea> selectByParentId(String parentId) {
|
||||||
|
LambdaQueryWrapper<SysArea> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
queryWrapper.eq(SysArea::getParentId,parentId);
|
||||||
|
return sysAreaMapper.selectList(queryWrapper);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Loading…
Reference in New Issue