diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/common/BaseConstants.java b/dl-module-base/src/main/java/cn/iocoder/yudao/common/BaseConstants.java index 422197ef..0ec319f4 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/common/BaseConstants.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/common/BaseConstants.java @@ -11,4 +11,6 @@ public class BaseConstants { public static final String CUS_SIGN_CUSTOMER = "customer"; /**车辆标识*/ public static final String CUS_SIGN_CAR = "car"; + /**客户信息表名称*/ + public static final String TABLE_BASE_CUSTOMER_MAIN = "base_customer_main"; } diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/controller/admin/CustomerMainController.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/controller/admin/CustomerMainController.java index 8b3b1d4d..8d2336eb 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/controller/admin/CustomerMainController.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/controller/admin/CustomerMainController.java @@ -6,6 +6,7 @@ import cn.iocoder.yudao.module.custom.service.CustomerMainService; import cn.iocoder.yudao.module.custom.vo.CustomerMainPageReqVO; import cn.iocoder.yudao.module.custom.vo.CustomerMainRespVO; import cn.iocoder.yudao.module.custom.vo.CustomerMainSaveReqVO; +import cn.iocoder.yudao.module.label.service.BusiLabelService; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import io.swagger.v3.oas.annotations.Operation; @@ -20,6 +21,7 @@ import javax.validation.Valid; import java.util.List; +import static cn.iocoder.yudao.common.BaseConstants.TABLE_BASE_CUSTOMER_MAIN; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; /** @@ -35,6 +37,8 @@ import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; public class CustomerMainController { @Resource private CustomerMainService customerMainService; + @Resource + private BusiLabelService busiLabelService; /** * 客户管理分页列表查询 @@ -153,4 +157,19 @@ public class CustomerMainController { return success(true); } + /** + * 设置标签 + * + * @param saveReqVO CustomerMainSaveReqVO + * @return cn.iocoder.yudao.framework.common.pojo.CommonResult + * @author PQZ + * @date 16:35 2024/8/6 + **/ + @PostMapping("/setLabel") + @Operation(summary = "设置标签") + public CommonResult setLabel(@Valid @RequestBody CustomerMainSaveReqVO saveReqVO) { + busiLabelService.saveBusiLable(saveReqVO.getId(), TABLE_BASE_CUSTOMER_MAIN, saveReqVO.getLabelList()); + return success(true); + } + } \ 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 1053528a..87a137b5 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 @@ -18,6 +18,8 @@ import cn.iocoder.yudao.module.custom.vo.CarMainRespVO; import cn.iocoder.yudao.module.custom.vo.CustomerMainPageReqVO; import cn.iocoder.yudao.module.custom.vo.CustomerMainRespVO; import cn.iocoder.yudao.module.custom.vo.CustomerMainSaveReqVO; +import cn.iocoder.yudao.module.label.entity.BusiLabel; +import cn.iocoder.yudao.module.label.service.BusiLabelService; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; @@ -51,6 +53,8 @@ public class CustomerMainServiceImpl extends ServiceImpl labelList = busiLabelService.listByMainId(id); + result.setLabelList(labelList); return result; } 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 4d8af54b..ae99f744 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 @@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.custom.vo; import cn.iocoder.yudao.module.custom.entity.CustomerItem; import cn.iocoder.yudao.module.custom.entity.CustomerMain; +import cn.iocoder.yudao.module.label.entity.BusiLabel; import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; @@ -23,5 +24,7 @@ public class CustomerMainRespVO extends CustomerMain { List carList; /**经办人信息集合*/ List attnList; + /**标签信息*/ + List labelList; } \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/CustomerMainSaveReqVO.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/CustomerMainSaveReqVO.java index 0cb5b069..1989cd30 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/CustomerMainSaveReqVO.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/CustomerMainSaveReqVO.java @@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.custom.vo; import cn.iocoder.yudao.module.custom.entity.CustomerItem; import cn.iocoder.yudao.module.custom.entity.CustomerMain; +import cn.iocoder.yudao.module.label.entity.BusiLabel; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; @@ -15,5 +16,7 @@ public class CustomerMainSaveReqVO extends CustomerMain { private List itemList; /**客户绑定车辆信息*/ private List carList; + /**标签信息*/ + List labelList; } \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/label/entity/BusiLabel.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/label/entity/BusiLabel.java index 091e6f60..8a4458ad 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/module/label/entity/BusiLabel.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/label/entity/BusiLabel.java @@ -49,5 +49,7 @@ public class BusiLabel extends TenantBaseDO { * 系统标识 */ private String systemCode; + /**标签库类型*/ + private String labelType; } \ No newline at end of file