diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/mapper/CustomerMainMapper.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/mapper/CustomerMainMapper.java index 2bf3f82d..c8020254 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/mapper/CustomerMainMapper.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/mapper/CustomerMainMapper.java @@ -27,4 +27,13 @@ public interface CustomerMainMapper extends BaseMapper { * @date 15:01 2024/8/1 **/ IPage selectListPage(@Param("entity") CustomerMainPageReqVO pageReqVO, Page page); + + /** + * 通过id查询客户信息 + * @author PQZ + * @date 19:34 2024/9/20 + * @param id 客户id + * @return cn.iocoder.yudao.module.custom.vo.CustomerMainRespVO + **/ + CustomerMainRespVO queryById(@Param("id") String id); } \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/impl/CustomerMainServiceImpl.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/impl/CustomerMainServiceImpl.java index 04ee762b..5ca16194 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/impl/CustomerMainServiceImpl.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/impl/CustomerMainServiceImpl.java @@ -90,7 +90,6 @@ public class CustomerMainServiceImpl extends ServiceImpl lambdaQueryWrapper = new LambdaQueryWrapper<>(); lambdaQueryWrapper.eq(BaseDO::getDeleted, 0).eq(CustomerItem::getCusId, id); List itemList = customerItemService.list(lambdaQueryWrapper); /*3、车辆信息*/ List carList = customerCarMapper.selectCarListByCusId(id); - CustomerMainRespVO result = JSONUtil.toBean(JSONUtil.parseObj(main).toJSONString(0), CustomerMainRespVO.class); result.setItemList(itemList); result.setCarList(carList); /*4、标签信息*/ diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/CustomerMainRespVO.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/CustomerMainRespVO.java index a0ebcb1e..267ff7a0 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/CustomerMainRespVO.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/CustomerMainRespVO.java @@ -7,6 +7,7 @@ import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; +import java.math.BigDecimal; import java.util.List; @Schema(description = "管理后台 - 客户管理 Response VO") @@ -30,8 +31,14 @@ public class CustomerMainRespVO extends CustomerMain { List brandAndModel; /**会员名称 */ private String levelName; - /**是否车主(0否1是)*/ private String isOwner; + /**积分余额*/ + private BigDecimal balance; + /**冻结积分*/ + private BigDecimal forzeBalance; + /**累计充值额度*/ + private BigDecimal allBalance; + } \ No newline at end of file diff --git a/dl-module-base/src/main/resources/mapper/custom/CustomerMainMapper.xml b/dl-module-base/src/main/resources/mapper/custom/CustomerMainMapper.xml index 9317ba0c..8bb4317b 100644 --- a/dl-module-base/src/main/resources/mapper/custom/CustomerMainMapper.xml +++ b/dl-module-base/src/main/resources/mapper/custom/CustomerMainMapper.xml @@ -41,7 +41,7 @@ FROM base_customer_main main LEFT JOIN base_customer_item item ON main.id = item.cus_id AND item.deleted = 0 - LEFT JOIN dl_member_level memberLevel ON main.member_level_id = memberLevel.id + LEFT JOIN dl_member_level memberLevel ON main.member_level_id = memberLevel.id main.deleted = 0 @@ -84,4 +84,41 @@ and main.type_code = '04' ORDER BY main.create_time DESC + \ No newline at end of file