Merge branch 'master' of http://122.51.230.86:3000/dianliang/lanan-system
This commit is contained in:
commit
caa9e5308d
@ -29,6 +29,14 @@ public interface CarMainMapper extends BaseMapper<CarMain> {
|
||||
*/
|
||||
IPage<CarMainRespVO> findPage(Page<CarMain> page, @Param("dto") CarMainReqVO pageReqVO);
|
||||
|
||||
/**
|
||||
* 通过客户id查询车辆信息
|
||||
* @author PQZ
|
||||
* @date 15:19 2024/8/3
|
||||
* @param cusId 客户id
|
||||
* @return java.util.List<cn.iocoder.yudao.module.custom.entity.CarMain>
|
||||
**/
|
||||
List<CarMain> selectListByCusId( @Param("cusId") String cusId);
|
||||
List<CarMain> isDataKeyValueRepeat(@Param("dto") CarMain carMain);
|
||||
|
||||
}
|
@ -4,9 +4,13 @@ import cn.hutool.json.JSONUtil;
|
||||
import cn.iocoder.yudao.framework.common.exception.ServiceException;
|
||||
import cn.iocoder.yudao.framework.common.exception.enums.GlobalErrorCodeConstants;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
import cn.iocoder.yudao.module.custom.entity.CarMain;
|
||||
import cn.iocoder.yudao.module.custom.entity.CustomerItem;
|
||||
import cn.iocoder.yudao.module.custom.entity.CustomerMain;
|
||||
import cn.iocoder.yudao.module.custom.mapper.CarMainMapper;
|
||||
import cn.iocoder.yudao.module.custom.mapper.CustomerMainMapper;
|
||||
import cn.iocoder.yudao.module.custom.service.CarMainService;
|
||||
import cn.iocoder.yudao.module.custom.service.CustomerCarService;
|
||||
import cn.iocoder.yudao.module.custom.service.CustomerItemService;
|
||||
import cn.iocoder.yudao.module.custom.service.CustomerMainService;
|
||||
import cn.iocoder.yudao.module.custom.vo.CustomerMainPageReqVO;
|
||||
@ -39,6 +43,10 @@ public class CustomerMainServiceImpl extends ServiceImpl<CustomerMainMapper, Cus
|
||||
private CustomerMainMapper customerMainMapper;
|
||||
@Resource
|
||||
private CustomerItemService customerItemService;
|
||||
@Resource
|
||||
private CustomerCarService customerCarService;
|
||||
@Resource
|
||||
private CarMainMapper carMainMapper;
|
||||
|
||||
/**
|
||||
* 客户管理分页列表查询
|
||||
@ -102,8 +110,11 @@ public class CustomerMainServiceImpl extends ServiceImpl<CustomerMainMapper, Cus
|
||||
LambdaQueryWrapper<CustomerItem> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.eq(BaseDO::getDeleted, 0).eq(CustomerItem::getCusId, id);
|
||||
List<CustomerItem> itemList = customerItemService.list(lambdaQueryWrapper);
|
||||
/*3、车辆信息*/
|
||||
List<CarMain> carList = carMainMapper.selectListByCusId(id);
|
||||
CustomerMainRespVO result = JSONUtil.toBean(JSONUtil.parseObj(main).toJSONString(0), CustomerMainRespVO.class);
|
||||
result.setItemList(itemList);
|
||||
result.setCarList(carList);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
package cn.iocoder.yudao.module.custom.vo;
|
||||
|
||||
import cn.iocoder.yudao.module.custom.entity.CarMain;
|
||||
import cn.iocoder.yudao.module.custom.entity.CustomerItem;
|
||||
import cn.iocoder.yudao.module.custom.entity.CustomerMain;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
@ -20,5 +21,7 @@ public class CustomerMainRespVO extends CustomerMain {
|
||||
private Integer carCount;
|
||||
/**扩展信息*/
|
||||
List<CustomerItem> itemList;
|
||||
/**客户绑定车辆信息*/
|
||||
List<CarMain> carList;
|
||||
|
||||
}
|
@ -90,4 +90,13 @@
|
||||
</if>
|
||||
|
||||
</select>
|
||||
<select id="selectListByCusId" resultType="cn.iocoder.yudao.module.custom.entity.CarMain">
|
||||
SELECT
|
||||
<include refid="column"></include>
|
||||
FROM
|
||||
`base_car_main`
|
||||
WHERE
|
||||
id IN ( SELECT car_id FROM base_customer_car WHERE cus_id = #{cusId} AND deleted = 0 )
|
||||
AND deleted = 0
|
||||
</select>
|
||||
</mapper>
|
Loading…
Reference in New Issue
Block a user