Compare commits

..

No commits in common. "893e93563df981224b0879c57b58c8e78167b16d" and "30eafec0008a9f13a0260e14e76e98306b487ef3" have entirely different histories.

4 changed files with 0 additions and 31 deletions

View File

@ -29,14 +29,6 @@ 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);
}

View File

@ -4,13 +4,9 @@ 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;
@ -43,10 +39,6 @@ public class CustomerMainServiceImpl extends ServiceImpl<CustomerMainMapper, Cus
private CustomerMainMapper customerMainMapper;
@Resource
private CustomerItemService customerItemService;
@Resource
private CustomerCarService customerCarService;
@Resource
private CarMainMapper carMainMapper;
/**
* 客户管理分页列表查询
@ -110,11 +102,8 @@ 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;
}

View File

@ -1,6 +1,5 @@
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;
@ -21,7 +20,5 @@ public class CustomerMainRespVO extends CustomerMain {
private Integer carCount;
/**扩展信息*/
List<CustomerItem> itemList;
/**客户绑定车辆信息*/
List<CarMain> carList;
}

View File

@ -90,13 +90,4 @@
</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>