Commit 8fa8f2890b3bc7095ccf07bfe5b9866218ece768
1 parent
c234f5b5
CRM: 线索、联系人、回款、回款计划新增数据权限转移
Showing
24 changed files
with
274 additions
and
46 deletions
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/business/vo/business/CrmBusinessTransferReqVO.java
| @@ -2,16 +2,15 @@ package cn.iocoder.yudao.module.crm.controller.admin.business.vo.business; | @@ -2,16 +2,15 @@ package cn.iocoder.yudao.module.crm.controller.admin.business.vo.business; | ||
| 2 | 2 | ||
| 3 | import cn.iocoder.yudao.module.crm.enums.permission.CrmPermissionLevelEnum; | 3 | import cn.iocoder.yudao.module.crm.enums.permission.CrmPermissionLevelEnum; |
| 4 | import io.swagger.v3.oas.annotations.media.Schema; | 4 | import io.swagger.v3.oas.annotations.media.Schema; |
| 5 | -import lombok.Data; | ||
| 6 | - | ||
| 7 | import jakarta.validation.constraints.NotNull; | 5 | import jakarta.validation.constraints.NotNull; |
| 6 | +import lombok.Data; | ||
| 8 | 7 | ||
| 9 | @Schema(description = "管理后台 - 商机转移 Request VO") | 8 | @Schema(description = "管理后台 - 商机转移 Request VO") |
| 10 | @Data | 9 | @Data |
| 11 | public class CrmBusinessTransferReqVO { | 10 | public class CrmBusinessTransferReqVO { |
| 12 | 11 | ||
| 13 | @Schema(description = "商机编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "10430") | 12 | @Schema(description = "商机编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "10430") |
| 14 | - @NotNull(message = "联系人编号不能为空") | 13 | + @NotNull(message = "商机编号不能为空") |
| 15 | private Long id; | 14 | private Long id; |
| 16 | 15 | ||
| 17 | /** | 16 | /** |
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/clue/CrmClueController.java
| @@ -88,4 +88,12 @@ public class CrmClueController { | @@ -88,4 +88,12 @@ public class CrmClueController { | ||
| 88 | ExcelUtils.write(response, "线索.xls", "数据", CrmClueExcelVO.class, datas); | 88 | ExcelUtils.write(response, "线索.xls", "数据", CrmClueExcelVO.class, datas); |
| 89 | } | 89 | } |
| 90 | 90 | ||
| 91 | + @PutMapping("/transfer") | ||
| 92 | + @Operation(summary = "线索转移") | ||
| 93 | + @PreAuthorize("@ss.hasPermission('crm:clue:update')") | ||
| 94 | + public CommonResult<Boolean> transfer(@Valid @RequestBody CrmClueTransferReqVO reqVO) { | ||
| 95 | + clueService.transferClue(reqVO, getLoginUserId()); | ||
| 96 | + return success(true); | ||
| 97 | + } | ||
| 98 | + | ||
| 91 | } | 99 | } |
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/clue/vo/CrmClueTransferReqVO.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.crm.controller.admin.clue.vo; | ||
| 2 | + | ||
| 3 | +import cn.iocoder.yudao.module.crm.enums.permission.CrmPermissionLevelEnum; | ||
| 4 | +import io.swagger.v3.oas.annotations.media.Schema; | ||
| 5 | +import jakarta.validation.constraints.NotNull; | ||
| 6 | +import lombok.Data; | ||
| 7 | + | ||
| 8 | +@Schema(description = "管理后台 - 线索转移 Request VO") | ||
| 9 | +@Data | ||
| 10 | +public class CrmClueTransferReqVO { | ||
| 11 | + | ||
| 12 | + @Schema(description = "线索编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "10430") | ||
| 13 | + @NotNull(message = "线索编号不能为空") | ||
| 14 | + private Long id; | ||
| 15 | + | ||
| 16 | + /** | ||
| 17 | + * 新负责人的用户编号 | ||
| 18 | + */ | ||
| 19 | + @Schema(description = "新负责人的用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "10430") | ||
| 20 | + @NotNull(message = "新负责人的用户编号不能为空") | ||
| 21 | + private Long newOwnerUserId; | ||
| 22 | + | ||
| 23 | + /** | ||
| 24 | + * 老负责人加入团队后的权限级别。如果 null 说明移除 | ||
| 25 | + * | ||
| 26 | + * 关联 {@link CrmPermissionLevelEnum} | ||
| 27 | + */ | ||
| 28 | + @Schema(description = "老负责人加入团队后的权限级别", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") | ||
| 29 | + private Integer oldOwnerPermissionLevel; | ||
| 30 | + | ||
| 31 | +} |
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/contact/CrmContactController.java
| @@ -9,7 +9,7 @@ import cn.iocoder.yudao.framework.common.util.number.NumberUtils; | @@ -9,7 +9,7 @@ import cn.iocoder.yudao.framework.common.util.number.NumberUtils; | ||
| 9 | import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; | 9 | import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; |
| 10 | import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; | 10 | import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; |
| 11 | import cn.iocoder.yudao.module.crm.controller.admin.contact.vo.*; | 11 | import cn.iocoder.yudao.module.crm.controller.admin.contact.vo.*; |
| 12 | -import cn.iocoder.yudao.module.crm.convert.contact.ContactConvert; | 12 | +import cn.iocoder.yudao.module.crm.convert.contact.CrmContactConvert; |
| 13 | import cn.iocoder.yudao.module.crm.dal.dataobject.contact.CrmContactDO; | 13 | import cn.iocoder.yudao.module.crm.dal.dataobject.contact.CrmContactDO; |
| 14 | import cn.iocoder.yudao.module.crm.dal.dataobject.customer.CrmCustomerDO; | 14 | import cn.iocoder.yudao.module.crm.dal.dataobject.customer.CrmCustomerDO; |
| 15 | import cn.iocoder.yudao.module.crm.enums.ErrorCodeConstants; | 15 | import cn.iocoder.yudao.module.crm.enums.ErrorCodeConstants; |
| @@ -100,7 +100,7 @@ public class CrmContactController { | @@ -100,7 +100,7 @@ public class CrmContactController { | ||
| 100 | // 3. 直属上级 | 100 | // 3. 直属上级 |
| 101 | List<CrmContactDO> parentContactList = contactService.getContactList( | 101 | List<CrmContactDO> parentContactList = contactService.getContactList( |
| 102 | Collections.singletonList(contact.getParentId()), getLoginUserId()); | 102 | Collections.singletonList(contact.getParentId()), getLoginUserId()); |
| 103 | - return success(ContactConvert.INSTANCE.convert(contact, userMap, customerList, parentContactList)); | 103 | + return success(CrmContactConvert.INSTANCE.convert(contact, userMap, customerList, parentContactList)); |
| 104 | } | 104 | } |
| 105 | 105 | ||
| 106 | @GetMapping("/simple-all-list") | 106 | @GetMapping("/simple-all-list") |
| @@ -110,7 +110,7 @@ public class CrmContactController { | @@ -110,7 +110,7 @@ public class CrmContactController { | ||
| 110 | CrmContactPageReqVO pageReqVO = new CrmContactPageReqVO(); | 110 | CrmContactPageReqVO pageReqVO = new CrmContactPageReqVO(); |
| 111 | pageReqVO.setPageSize(PAGE_SIZE_NONE); | 111 | pageReqVO.setPageSize(PAGE_SIZE_NONE); |
| 112 | List<CrmContactDO> list = contactService.getContactPage(pageReqVO, getLoginUserId()).getList(); | 112 | List<CrmContactDO> list = contactService.getContactPage(pageReqVO, getLoginUserId()).getList(); |
| 113 | - return success(ContactConvert.INSTANCE.convertAllList(list)); | 113 | + return success(CrmContactConvert.INSTANCE.convertAllList(list)); |
| 114 | } | 114 | } |
| 115 | 115 | ||
| 116 | @GetMapping("/page") | 116 | @GetMapping("/page") |
| @@ -161,7 +161,15 @@ public class CrmContactController { | @@ -161,7 +161,15 @@ public class CrmContactController { | ||
| 161 | // 3. 直属上级 | 161 | // 3. 直属上级 |
| 162 | List<CrmContactDO> parentContactList = contactService.getContactList( | 162 | List<CrmContactDO> parentContactList = contactService.getContactList( |
| 163 | convertSet(contactList, CrmContactDO::getParentId), getLoginUserId()); | 163 | convertSet(contactList, CrmContactDO::getParentId), getLoginUserId()); |
| 164 | - return ContactConvert.INSTANCE.convertPage(pageResult, userMap, crmCustomerDOList, parentContactList); | 164 | + return CrmContactConvert.INSTANCE.convertPage(pageResult, userMap, crmCustomerDOList, parentContactList); |
| 165 | + } | ||
| 166 | + | ||
| 167 | + @PutMapping("/transfer") | ||
| 168 | + @Operation(summary = "联系人转移") | ||
| 169 | + @PreAuthorize("@ss.hasPermission('crm:contact:update')") | ||
| 170 | + public CommonResult<Boolean> transfer(@Valid @RequestBody CrmContactTransferReqVO reqVO) { | ||
| 171 | + contactService.transferContact(reqVO, getLoginUserId()); | ||
| 172 | + return success(true); | ||
| 165 | } | 173 | } |
| 166 | 174 | ||
| 167 | } | 175 | } |
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/contract/CrmContractController.java
| @@ -8,7 +8,7 @@ import cn.iocoder.yudao.framework.common.util.number.NumberUtils; | @@ -8,7 +8,7 @@ import cn.iocoder.yudao.framework.common.util.number.NumberUtils; | ||
| 8 | import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; | 8 | import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; |
| 9 | import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; | 9 | import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; |
| 10 | import cn.iocoder.yudao.module.crm.controller.admin.contract.vo.*; | 10 | import cn.iocoder.yudao.module.crm.controller.admin.contract.vo.*; |
| 11 | -import cn.iocoder.yudao.module.crm.convert.contract.ContractConvert; | 11 | +import cn.iocoder.yudao.module.crm.convert.contract.CrmContractConvert; |
| 12 | import cn.iocoder.yudao.module.crm.dal.dataobject.contract.CrmContractDO; | 12 | import cn.iocoder.yudao.module.crm.dal.dataobject.contract.CrmContractDO; |
| 13 | import cn.iocoder.yudao.module.crm.dal.dataobject.customer.CrmCustomerDO; | 13 | import cn.iocoder.yudao.module.crm.dal.dataobject.customer.CrmCustomerDO; |
| 14 | import cn.iocoder.yudao.module.crm.service.contract.CrmContractService; | 14 | import cn.iocoder.yudao.module.crm.service.contract.CrmContractService; |
| @@ -80,7 +80,7 @@ public class CrmContractController { | @@ -80,7 +80,7 @@ public class CrmContractController { | ||
| 80 | @PreAuthorize("@ss.hasPermission('crm:contract:query')") | 80 | @PreAuthorize("@ss.hasPermission('crm:contract:query')") |
| 81 | public CommonResult<ContractRespVO> getContract(@RequestParam("id") Long id) { | 81 | public CommonResult<ContractRespVO> getContract(@RequestParam("id") Long id) { |
| 82 | CrmContractDO contract = contractService.getContract(id); | 82 | CrmContractDO contract = contractService.getContract(id); |
| 83 | - return success(ContractConvert.INSTANCE.convert(contract)); | 83 | + return success(CrmContractConvert.INSTANCE.convert(contract)); |
| 84 | } | 84 | } |
| 85 | 85 | ||
| 86 | @GetMapping("/page") | 86 | @GetMapping("/page") |
| @@ -108,7 +108,7 @@ public class CrmContractController { | @@ -108,7 +108,7 @@ public class CrmContractController { | ||
| 108 | PageResult<CrmContractDO> pageResult = contractService.getContractPage(exportReqVO, getLoginUserId()); | 108 | PageResult<CrmContractDO> pageResult = contractService.getContractPage(exportReqVO, getLoginUserId()); |
| 109 | // 导出 Excel | 109 | // 导出 Excel |
| 110 | ExcelUtils.write(response, "合同.xls", "数据", CrmContractExcelVO.class, | 110 | ExcelUtils.write(response, "合同.xls", "数据", CrmContractExcelVO.class, |
| 111 | - ContractConvert.INSTANCE.convertList02(pageResult.getList())); | 111 | + CrmContractConvert.INSTANCE.convertList02(pageResult.getList())); |
| 112 | } | 112 | } |
| 113 | 113 | ||
| 114 | /** | 114 | /** |
| @@ -128,7 +128,7 @@ public class CrmContractController { | @@ -128,7 +128,7 @@ public class CrmContractController { | ||
| 128 | // 2. 获取创建人、负责人列表 | 128 | // 2. 获取创建人、负责人列表 |
| 129 | Map<Long, AdminUserRespDTO> userMap = adminUserApi.getUserMap(convertListByFlatMap(contactList, | 129 | Map<Long, AdminUserRespDTO> userMap = adminUserApi.getUserMap(convertListByFlatMap(contactList, |
| 130 | contact -> Stream.of(NumberUtils.parseLong(contact.getCreator()), contact.getOwnerUserId()))); | 130 | contact -> Stream.of(NumberUtils.parseLong(contact.getCreator()), contact.getOwnerUserId()))); |
| 131 | - return ContractConvert.INSTANCE.convertPage(pageResult, userMap, customerList); | 131 | + return CrmContractConvert.INSTANCE.convertPage(pageResult, userMap, customerList); |
| 132 | } | 132 | } |
| 133 | 133 | ||
| 134 | @PutMapping("/transfer") | 134 | @PutMapping("/transfer") |
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/customer/vo/CrmCustomerTransferReqVO.java
| @@ -2,16 +2,15 @@ package cn.iocoder.yudao.module.crm.controller.admin.customer.vo; | @@ -2,16 +2,15 @@ package cn.iocoder.yudao.module.crm.controller.admin.customer.vo; | ||
| 2 | 2 | ||
| 3 | import cn.iocoder.yudao.module.crm.enums.permission.CrmPermissionLevelEnum; | 3 | import cn.iocoder.yudao.module.crm.enums.permission.CrmPermissionLevelEnum; |
| 4 | import io.swagger.v3.oas.annotations.media.Schema; | 4 | import io.swagger.v3.oas.annotations.media.Schema; |
| 5 | -import lombok.Data; | ||
| 6 | - | ||
| 7 | import jakarta.validation.constraints.NotNull; | 5 | import jakarta.validation.constraints.NotNull; |
| 6 | +import lombok.Data; | ||
| 8 | 7 | ||
| 9 | @Schema(description = "管理后台 - CRM 客户转移 Request VO") | 8 | @Schema(description = "管理后台 - CRM 客户转移 Request VO") |
| 10 | @Data | 9 | @Data |
| 11 | public class CrmCustomerTransferReqVO { | 10 | public class CrmCustomerTransferReqVO { |
| 12 | 11 | ||
| 13 | @Schema(description = "客户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "10430") | 12 | @Schema(description = "客户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "10430") |
| 14 | - @NotNull(message = "联系人编号不能为空") | 13 | + @NotNull(message = "客户编号不能为空") |
| 15 | private Long id; | 14 | private Long id; |
| 16 | 15 | ||
| 17 | /** | 16 | /** |
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/receivable/CrmReceivableController.java
| @@ -7,10 +7,7 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult; | @@ -7,10 +7,7 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult; | ||
| 7 | import cn.iocoder.yudao.framework.common.util.number.NumberUtils; | 7 | import cn.iocoder.yudao.framework.common.util.number.NumberUtils; |
| 8 | import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; | 8 | import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; |
| 9 | import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; | 9 | import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; |
| 10 | -import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.receivable.CrmReceivableCreateReqVO; | ||
| 11 | -import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.receivable.CrmReceivablePageReqVO; | ||
| 12 | -import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.receivable.CrmReceivableRespVO; | ||
| 13 | -import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.receivable.CrmReceivableUpdateReqVO; | 10 | +import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.receivable.*; |
| 14 | import cn.iocoder.yudao.module.crm.convert.receivable.CrmReceivableConvert; | 11 | import cn.iocoder.yudao.module.crm.convert.receivable.CrmReceivableConvert; |
| 15 | import cn.iocoder.yudao.module.crm.dal.dataobject.contract.CrmContractDO; | 12 | import cn.iocoder.yudao.module.crm.dal.dataobject.contract.CrmContractDO; |
| 16 | import cn.iocoder.yudao.module.crm.dal.dataobject.customer.CrmCustomerDO; | 13 | import cn.iocoder.yudao.module.crm.dal.dataobject.customer.CrmCustomerDO; |
| @@ -144,4 +141,12 @@ public class CrmReceivableController { | @@ -144,4 +141,12 @@ public class CrmReceivableController { | ||
| 144 | return CrmReceivableConvert.INSTANCE.convertPage(pageResult, userMap, customerList, contractList); | 141 | return CrmReceivableConvert.INSTANCE.convertPage(pageResult, userMap, customerList, contractList); |
| 145 | } | 142 | } |
| 146 | 143 | ||
| 144 | + @PutMapping("/transfer") | ||
| 145 | + @Operation(summary = "回款转移") | ||
| 146 | + @PreAuthorize("@ss.hasPermission('crm:receivable:update')") | ||
| 147 | + public CommonResult<Boolean> transfer(@Valid @RequestBody CrmReceivableTransferReqVO reqVO) { | ||
| 148 | + receivableService.transferReceivable(reqVO, getLoginUserId()); | ||
| 149 | + return success(true); | ||
| 150 | + } | ||
| 151 | + | ||
| 147 | } | 152 | } |
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/receivable/CrmReceivablePlanController.java
| @@ -7,10 +7,7 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult; | @@ -7,10 +7,7 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult; | ||
| 7 | import cn.iocoder.yudao.framework.common.util.number.NumberUtils; | 7 | import cn.iocoder.yudao.framework.common.util.number.NumberUtils; |
| 8 | import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; | 8 | import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; |
| 9 | import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; | 9 | import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; |
| 10 | -import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.plan.CrmReceivablePlanCreateReqVO; | ||
| 11 | -import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.plan.CrmReceivablePlanPageReqVO; | ||
| 12 | -import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.plan.CrmReceivablePlanRespVO; | ||
| 13 | -import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.plan.CrmReceivablePlanUpdateReqVO; | 10 | +import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.plan.*; |
| 14 | import cn.iocoder.yudao.module.crm.convert.receivable.CrmReceivablePlanConvert; | 11 | import cn.iocoder.yudao.module.crm.convert.receivable.CrmReceivablePlanConvert; |
| 15 | import cn.iocoder.yudao.module.crm.dal.dataobject.contract.CrmContractDO; | 12 | import cn.iocoder.yudao.module.crm.dal.dataobject.contract.CrmContractDO; |
| 16 | import cn.iocoder.yudao.module.crm.dal.dataobject.customer.CrmCustomerDO; | 13 | import cn.iocoder.yudao.module.crm.dal.dataobject.customer.CrmCustomerDO; |
| @@ -151,4 +148,12 @@ public class CrmReceivablePlanController { | @@ -151,4 +148,12 @@ public class CrmReceivablePlanController { | ||
| 151 | return CrmReceivablePlanConvert.INSTANCE.convertPage(pageResult, userMap, customerList, contractList, receivableList); | 148 | return CrmReceivablePlanConvert.INSTANCE.convertPage(pageResult, userMap, customerList, contractList, receivableList); |
| 152 | } | 149 | } |
| 153 | 150 | ||
| 151 | + @PutMapping("/transfer") | ||
| 152 | + @Operation(summary = "回款计划转移") | ||
| 153 | + @PreAuthorize("@ss.hasPermission('crm:receivable-plan:update')") | ||
| 154 | + public CommonResult<Boolean> transfer(@Valid @RequestBody CrmReceivablePlanTransferReqVO reqVO) { | ||
| 155 | + receivablePlanService.transferReceivablePlan(reqVO, getLoginUserId()); | ||
| 156 | + return success(true); | ||
| 157 | + } | ||
| 158 | + | ||
| 154 | } | 159 | } |
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/receivable/vo/plan/CrmReceivablePlanTransferReqVO.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.plan; | ||
| 2 | + | ||
| 3 | +import cn.iocoder.yudao.module.crm.enums.permission.CrmPermissionLevelEnum; | ||
| 4 | +import io.swagger.v3.oas.annotations.media.Schema; | ||
| 5 | +import jakarta.validation.constraints.NotNull; | ||
| 6 | +import lombok.Data; | ||
| 7 | + | ||
| 8 | +@Schema(description = "管理后台 - CRM 回款计划转移 Request VO") | ||
| 9 | +@Data | ||
| 10 | +public class CrmReceivablePlanTransferReqVO { | ||
| 11 | + | ||
| 12 | + @Schema(description = "回款计划编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "10430") | ||
| 13 | + @NotNull(message = "回款计划编号不能为空") | ||
| 14 | + private Long id; | ||
| 15 | + | ||
| 16 | + /** | ||
| 17 | + * 新负责人的用户编号 | ||
| 18 | + */ | ||
| 19 | + @Schema(description = "新负责人的用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "10430") | ||
| 20 | + @NotNull(message = "新负责人的用户编号不能为空") | ||
| 21 | + private Long newOwnerUserId; | ||
| 22 | + | ||
| 23 | + /** | ||
| 24 | + * 老负责人加入团队后的权限级别。如果 null 说明移除 | ||
| 25 | + * | ||
| 26 | + * 关联 {@link CrmPermissionLevelEnum} | ||
| 27 | + */ | ||
| 28 | + @Schema(description = "老负责人加入团队后的权限级别", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") | ||
| 29 | + private Integer oldOwnerPermissionLevel; | ||
| 30 | + | ||
| 31 | +} |
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/receivable/vo/receivable/CrmReceivableTransferReqVO.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.receivable; | ||
| 2 | + | ||
| 3 | +import cn.iocoder.yudao.module.crm.enums.permission.CrmPermissionLevelEnum; | ||
| 4 | +import io.swagger.v3.oas.annotations.media.Schema; | ||
| 5 | +import jakarta.validation.constraints.NotNull; | ||
| 6 | +import lombok.Data; | ||
| 7 | + | ||
| 8 | +@Schema(description = "管理后台 - CRM 回款转移 Request VO") | ||
| 9 | +@Data | ||
| 10 | +public class CrmReceivableTransferReqVO { | ||
| 11 | + | ||
| 12 | + @Schema(description = "回款编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "10430") | ||
| 13 | + @NotNull(message = "回款编号不能为空") | ||
| 14 | + private Long id; | ||
| 15 | + | ||
| 16 | + /** | ||
| 17 | + * 新负责人的用户编号 | ||
| 18 | + */ | ||
| 19 | + @Schema(description = "新负责人的用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "10430") | ||
| 20 | + @NotNull(message = "新负责人的用户编号不能为空") | ||
| 21 | + private Long newOwnerUserId; | ||
| 22 | + | ||
| 23 | + /** | ||
| 24 | + * 老负责人加入团队后的权限级别。如果 null 说明移除 | ||
| 25 | + * | ||
| 26 | + * 关联 {@link CrmPermissionLevelEnum} | ||
| 27 | + */ | ||
| 28 | + @Schema(description = "老负责人加入团队后的权限级别", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") | ||
| 29 | + private Integer oldOwnerPermissionLevel; | ||
| 30 | + | ||
| 31 | +} |
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/convert/clue/CrmClueConvert.java
| 1 | package cn.iocoder.yudao.module.crm.convert.clue; | 1 | package cn.iocoder.yudao.module.crm.convert.clue; |
| 2 | 2 | ||
| 3 | -import java.util.*; | ||
| 4 | - | ||
| 5 | import cn.iocoder.yudao.framework.common.pojo.PageResult; | 3 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 6 | - | ||
| 7 | -import org.mapstruct.Mapper; | ||
| 8 | -import org.mapstruct.factory.Mappers; | ||
| 9 | import cn.iocoder.yudao.module.crm.controller.admin.clue.vo.*; | 4 | import cn.iocoder.yudao.module.crm.controller.admin.clue.vo.*; |
| 10 | import cn.iocoder.yudao.module.crm.dal.dataobject.clue.CrmClueDO; | 5 | import cn.iocoder.yudao.module.crm.dal.dataobject.clue.CrmClueDO; |
| 6 | +import cn.iocoder.yudao.module.crm.service.permission.bo.CrmPermissionTransferReqBO; | ||
| 7 | +import org.mapstruct.Mapper; | ||
| 8 | +import org.mapstruct.Mapping; | ||
| 9 | +import org.mapstruct.factory.Mappers; | ||
| 10 | + | ||
| 11 | +import java.util.List; | ||
| 11 | 12 | ||
| 12 | /** | 13 | /** |
| 13 | * 线索 Convert | 14 | * 线索 Convert |
| @@ -29,4 +30,7 @@ public interface CrmClueConvert { | @@ -29,4 +30,7 @@ public interface CrmClueConvert { | ||
| 29 | 30 | ||
| 30 | List<CrmClueExcelVO> convertList02(List<CrmClueDO> list); | 31 | List<CrmClueExcelVO> convertList02(List<CrmClueDO> list); |
| 31 | 32 | ||
| 33 | + @Mapping(target = "bizId", source = "reqVO.id") | ||
| 34 | + CrmPermissionTransferReqBO convert(CrmClueTransferReqVO reqVO, Long userId); | ||
| 35 | + | ||
| 32 | } | 36 | } |
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/convert/contact/ContactConvert.java renamed to yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/convert/contact/CrmContactConvert.java
| @@ -25,9 +25,9 @@ import static cn.iocoder.yudao.framework.common.util.collection.MapUtils.findAnd | @@ -25,9 +25,9 @@ import static cn.iocoder.yudao.framework.common.util.collection.MapUtils.findAnd | ||
| 25 | * @author 芋道源码 | 25 | * @author 芋道源码 |
| 26 | */ | 26 | */ |
| 27 | @Mapper | 27 | @Mapper |
| 28 | -public interface ContactConvert { | 28 | +public interface CrmContactConvert { |
| 29 | 29 | ||
| 30 | - ContactConvert INSTANCE = Mappers.getMapper(ContactConvert.class); | 30 | + CrmContactConvert INSTANCE = Mappers.getMapper(CrmContactConvert.class); |
| 31 | 31 | ||
| 32 | CrmContactDO convert(CrmContactCreateReqVO bean); | 32 | CrmContactDO convert(CrmContactCreateReqVO bean); |
| 33 | 33 |
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/convert/contract/ContractConvert.java renamed to yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/convert/contract/CrmContractConvert.java
| @@ -22,9 +22,9 @@ import static cn.iocoder.yudao.framework.common.util.collection.MapUtils.findAnd | @@ -22,9 +22,9 @@ import static cn.iocoder.yudao.framework.common.util.collection.MapUtils.findAnd | ||
| 22 | * @author dhb52 | 22 | * @author dhb52 |
| 23 | */ | 23 | */ |
| 24 | @Mapper | 24 | @Mapper |
| 25 | -public interface ContractConvert { | 25 | +public interface CrmContractConvert { |
| 26 | 26 | ||
| 27 | - ContractConvert INSTANCE = Mappers.getMapper(ContractConvert.class); | 27 | + CrmContractConvert INSTANCE = Mappers.getMapper(CrmContractConvert.class); |
| 28 | 28 | ||
| 29 | CrmContractDO convert(CrmContractCreateReqVO bean); | 29 | CrmContractDO convert(CrmContractCreateReqVO bean); |
| 30 | 30 |
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/convert/receivable/CrmReceivableConvert.java
| @@ -3,12 +3,15 @@ package cn.iocoder.yudao.module.crm.convert.receivable; | @@ -3,12 +3,15 @@ package cn.iocoder.yudao.module.crm.convert.receivable; | ||
| 3 | import cn.iocoder.yudao.framework.common.pojo.PageResult; | 3 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 4 | import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.receivable.CrmReceivableCreateReqVO; | 4 | import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.receivable.CrmReceivableCreateReqVO; |
| 5 | import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.receivable.CrmReceivableRespVO; | 5 | import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.receivable.CrmReceivableRespVO; |
| 6 | +import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.receivable.CrmReceivableTransferReqVO; | ||
| 6 | import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.receivable.CrmReceivableUpdateReqVO; | 7 | import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.receivable.CrmReceivableUpdateReqVO; |
| 7 | import cn.iocoder.yudao.module.crm.dal.dataobject.contract.CrmContractDO; | 8 | import cn.iocoder.yudao.module.crm.dal.dataobject.contract.CrmContractDO; |
| 8 | import cn.iocoder.yudao.module.crm.dal.dataobject.customer.CrmCustomerDO; | 9 | import cn.iocoder.yudao.module.crm.dal.dataobject.customer.CrmCustomerDO; |
| 9 | import cn.iocoder.yudao.module.crm.dal.dataobject.receivable.CrmReceivableDO; | 10 | import cn.iocoder.yudao.module.crm.dal.dataobject.receivable.CrmReceivableDO; |
| 11 | +import cn.iocoder.yudao.module.crm.service.permission.bo.CrmPermissionTransferReqBO; | ||
| 10 | import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO; | 12 | import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO; |
| 11 | import org.mapstruct.Mapper; | 13 | import org.mapstruct.Mapper; |
| 14 | +import org.mapstruct.Mapping; | ||
| 12 | import org.mapstruct.factory.Mappers; | 15 | import org.mapstruct.factory.Mappers; |
| 13 | 16 | ||
| 14 | import java.util.List; | 17 | import java.util.List; |
| @@ -58,4 +61,7 @@ public interface CrmReceivableConvert { | @@ -58,4 +61,7 @@ public interface CrmReceivableConvert { | ||
| 58 | findAndThen(userMap, Long.parseLong(receivable.getCreator()), user -> receivable.setCreatorName(user.getNickname())); | 61 | findAndThen(userMap, Long.parseLong(receivable.getCreator()), user -> receivable.setCreatorName(user.getNickname())); |
| 59 | } | 62 | } |
| 60 | 63 | ||
| 64 | + @Mapping(target = "bizId", source = "reqVO.id") | ||
| 65 | + CrmPermissionTransferReqBO convert(CrmReceivableTransferReqVO reqVO, Long userId); | ||
| 66 | + | ||
| 61 | } | 67 | } |
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/convert/receivable/CrmReceivablePlanConvert.java
| @@ -3,13 +3,16 @@ package cn.iocoder.yudao.module.crm.convert.receivable; | @@ -3,13 +3,16 @@ package cn.iocoder.yudao.module.crm.convert.receivable; | ||
| 3 | import cn.iocoder.yudao.framework.common.pojo.PageResult; | 3 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 4 | import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.plan.CrmReceivablePlanCreateReqVO; | 4 | import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.plan.CrmReceivablePlanCreateReqVO; |
| 5 | import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.plan.CrmReceivablePlanRespVO; | 5 | import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.plan.CrmReceivablePlanRespVO; |
| 6 | +import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.plan.CrmReceivablePlanTransferReqVO; | ||
| 6 | import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.plan.CrmReceivablePlanUpdateReqVO; | 7 | import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.plan.CrmReceivablePlanUpdateReqVO; |
| 7 | import cn.iocoder.yudao.module.crm.dal.dataobject.contract.CrmContractDO; | 8 | import cn.iocoder.yudao.module.crm.dal.dataobject.contract.CrmContractDO; |
| 8 | import cn.iocoder.yudao.module.crm.dal.dataobject.customer.CrmCustomerDO; | 9 | import cn.iocoder.yudao.module.crm.dal.dataobject.customer.CrmCustomerDO; |
| 9 | import cn.iocoder.yudao.module.crm.dal.dataobject.receivable.CrmReceivableDO; | 10 | import cn.iocoder.yudao.module.crm.dal.dataobject.receivable.CrmReceivableDO; |
| 10 | import cn.iocoder.yudao.module.crm.dal.dataobject.receivable.CrmReceivablePlanDO; | 11 | import cn.iocoder.yudao.module.crm.dal.dataobject.receivable.CrmReceivablePlanDO; |
| 12 | +import cn.iocoder.yudao.module.crm.service.permission.bo.CrmPermissionTransferReqBO; | ||
| 11 | import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO; | 13 | import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO; |
| 12 | import org.mapstruct.Mapper; | 14 | import org.mapstruct.Mapper; |
| 15 | +import org.mapstruct.Mapping; | ||
| 13 | import org.mapstruct.factory.Mappers; | 16 | import org.mapstruct.factory.Mappers; |
| 14 | 17 | ||
| 15 | import java.util.List; | 18 | import java.util.List; |
| @@ -63,4 +66,7 @@ public interface CrmReceivablePlanConvert { | @@ -63,4 +66,7 @@ public interface CrmReceivablePlanConvert { | ||
| 63 | findAndThen(userMap, Long.parseLong(receivablePlan.getCreator()), user -> receivablePlan.setCreatorName(user.getNickname())); | 66 | findAndThen(userMap, Long.parseLong(receivablePlan.getCreator()), user -> receivablePlan.setCreatorName(user.getNickname())); |
| 64 | } | 67 | } |
| 65 | 68 | ||
| 69 | + @Mapping(target = "bizId", source = "reqVO.id") | ||
| 70 | + CrmPermissionTransferReqBO convert(CrmReceivablePlanTransferReqVO reqVO, Long userId); | ||
| 71 | + | ||
| 66 | } | 72 | } |
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/clue/CrmClueService.java
| @@ -3,6 +3,7 @@ package cn.iocoder.yudao.module.crm.service.clue; | @@ -3,6 +3,7 @@ package cn.iocoder.yudao.module.crm.service.clue; | ||
| 3 | import cn.iocoder.yudao.framework.common.pojo.PageResult; | 3 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 4 | import cn.iocoder.yudao.module.crm.controller.admin.clue.vo.CrmClueCreateReqVO; | 4 | import cn.iocoder.yudao.module.crm.controller.admin.clue.vo.CrmClueCreateReqVO; |
| 5 | import cn.iocoder.yudao.module.crm.controller.admin.clue.vo.CrmCluePageReqVO; | 5 | import cn.iocoder.yudao.module.crm.controller.admin.clue.vo.CrmCluePageReqVO; |
| 6 | +import cn.iocoder.yudao.module.crm.controller.admin.clue.vo.CrmClueTransferReqVO; | ||
| 6 | import cn.iocoder.yudao.module.crm.controller.admin.clue.vo.CrmClueUpdateReqVO; | 7 | import cn.iocoder.yudao.module.crm.controller.admin.clue.vo.CrmClueUpdateReqVO; |
| 7 | import cn.iocoder.yudao.module.crm.dal.dataobject.clue.CrmClueDO; | 8 | import cn.iocoder.yudao.module.crm.dal.dataobject.clue.CrmClueDO; |
| 8 | import jakarta.validation.Valid; | 9 | import jakarta.validation.Valid; |
| @@ -64,4 +65,12 @@ public interface CrmClueService { | @@ -64,4 +65,12 @@ public interface CrmClueService { | ||
| 64 | */ | 65 | */ |
| 65 | PageResult<CrmClueDO> getCluePage(CrmCluePageReqVO pageReqVO, Long userId); | 66 | PageResult<CrmClueDO> getCluePage(CrmCluePageReqVO pageReqVO, Long userId); |
| 66 | 67 | ||
| 68 | + /** | ||
| 69 | + * 线索转移 | ||
| 70 | + * | ||
| 71 | + * @param reqVO 请求 | ||
| 72 | + * @param userId 用户编号 | ||
| 73 | + */ | ||
| 74 | + void transferClue(CrmClueTransferReqVO reqVO, Long userId); | ||
| 75 | + | ||
| 67 | } | 76 | } |
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/clue/CrmClueServiceImpl.java
| @@ -5,6 +5,7 @@ import cn.hutool.core.collection.ListUtil; | @@ -5,6 +5,7 @@ import cn.hutool.core.collection.ListUtil; | ||
| 5 | import cn.iocoder.yudao.framework.common.pojo.PageResult; | 5 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 6 | import cn.iocoder.yudao.module.crm.controller.admin.clue.vo.CrmClueCreateReqVO; | 6 | import cn.iocoder.yudao.module.crm.controller.admin.clue.vo.CrmClueCreateReqVO; |
| 7 | import cn.iocoder.yudao.module.crm.controller.admin.clue.vo.CrmCluePageReqVO; | 7 | import cn.iocoder.yudao.module.crm.controller.admin.clue.vo.CrmCluePageReqVO; |
| 8 | +import cn.iocoder.yudao.module.crm.controller.admin.clue.vo.CrmClueTransferReqVO; | ||
| 8 | import cn.iocoder.yudao.module.crm.controller.admin.clue.vo.CrmClueUpdateReqVO; | 9 | import cn.iocoder.yudao.module.crm.controller.admin.clue.vo.CrmClueUpdateReqVO; |
| 9 | import cn.iocoder.yudao.module.crm.convert.clue.CrmClueConvert; | 10 | import cn.iocoder.yudao.module.crm.convert.clue.CrmClueConvert; |
| 10 | import cn.iocoder.yudao.module.crm.dal.dataobject.clue.CrmClueDO; | 11 | import cn.iocoder.yudao.module.crm.dal.dataobject.clue.CrmClueDO; |
| @@ -101,4 +102,18 @@ public class CrmClueServiceImpl implements CrmClueService { | @@ -101,4 +102,18 @@ public class CrmClueServiceImpl implements CrmClueService { | ||
| 101 | return clueMapper.selectPage(pageReqVO, userId); | 102 | return clueMapper.selectPage(pageReqVO, userId); |
| 102 | } | 103 | } |
| 103 | 104 | ||
| 105 | + @Override | ||
| 106 | + public void transferClue(CrmClueTransferReqVO reqVO, Long userId) { | ||
| 107 | + // 1 校验线索是否存在 | ||
| 108 | + validateClueExists(reqVO.getId()); | ||
| 109 | + | ||
| 110 | + // 2.1 数据权限转移 | ||
| 111 | + crmPermissionService.transferPermission( | ||
| 112 | + CrmClueConvert.INSTANCE.convert(reqVO, userId).setBizType(CrmBizTypeEnum.CRM_LEADS.getType())); | ||
| 113 | + // 2.2 设置新的负责人 | ||
| 114 | + clueMapper.updateOwnerUserIdById(reqVO.getId(), reqVO.getNewOwnerUserId()); | ||
| 115 | + | ||
| 116 | + // 3. TODO 记录转移日志 | ||
| 117 | + } | ||
| 118 | + | ||
| 104 | } | 119 | } |
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/contact/CrmContactService.java
| @@ -3,6 +3,7 @@ package cn.iocoder.yudao.module.crm.service.contact; | @@ -3,6 +3,7 @@ package cn.iocoder.yudao.module.crm.service.contact; | ||
| 3 | import cn.iocoder.yudao.framework.common.pojo.PageResult; | 3 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 4 | import cn.iocoder.yudao.module.crm.controller.admin.contact.vo.CrmContactCreateReqVO; | 4 | import cn.iocoder.yudao.module.crm.controller.admin.contact.vo.CrmContactCreateReqVO; |
| 5 | import cn.iocoder.yudao.module.crm.controller.admin.contact.vo.CrmContactPageReqVO; | 5 | import cn.iocoder.yudao.module.crm.controller.admin.contact.vo.CrmContactPageReqVO; |
| 6 | +import cn.iocoder.yudao.module.crm.controller.admin.contact.vo.CrmContactTransferReqVO; | ||
| 6 | import cn.iocoder.yudao.module.crm.controller.admin.contact.vo.CrmContactUpdateReqVO; | 7 | import cn.iocoder.yudao.module.crm.controller.admin.contact.vo.CrmContactUpdateReqVO; |
| 7 | import cn.iocoder.yudao.module.crm.dal.dataobject.contact.CrmContactDO; | 8 | import cn.iocoder.yudao.module.crm.dal.dataobject.contact.CrmContactDO; |
| 8 | import cn.iocoder.yudao.module.crm.dal.dataobject.customer.CrmCustomerDO; | 9 | import cn.iocoder.yudao.module.crm.dal.dataobject.customer.CrmCustomerDO; |
| @@ -79,4 +80,12 @@ public interface CrmContactService { | @@ -79,4 +80,12 @@ public interface CrmContactService { | ||
| 79 | */ | 80 | */ |
| 80 | PageResult<CrmContactDO> getContactPageByCustomerId(CrmContactPageReqVO pageVO); | 81 | PageResult<CrmContactDO> getContactPageByCustomerId(CrmContactPageReqVO pageVO); |
| 81 | 82 | ||
| 83 | + /** | ||
| 84 | + * 联系人转移 | ||
| 85 | + * | ||
| 86 | + * @param reqVO 请求 | ||
| 87 | + * @param userId 用户编号 | ||
| 88 | + */ | ||
| 89 | + void transferContact(CrmContactTransferReqVO reqVO, Long userId); | ||
| 90 | + | ||
| 82 | } | 91 | } |
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/contact/CrmContactServiceImpl.java
| @@ -3,11 +3,8 @@ package cn.iocoder.yudao.module.crm.service.contact; | @@ -3,11 +3,8 @@ package cn.iocoder.yudao.module.crm.service.contact; | ||
| 3 | import cn.hutool.core.collection.CollUtil; | 3 | import cn.hutool.core.collection.CollUtil; |
| 4 | import cn.hutool.core.collection.ListUtil; | 4 | import cn.hutool.core.collection.ListUtil; |
| 5 | import cn.iocoder.yudao.framework.common.pojo.PageResult; | 5 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 6 | -import cn.iocoder.yudao.module.crm.controller.admin.contact.vo.CrmContactBaseVO; | ||
| 7 | -import cn.iocoder.yudao.module.crm.controller.admin.contact.vo.CrmContactCreateReqVO; | ||
| 8 | -import cn.iocoder.yudao.module.crm.controller.admin.contact.vo.CrmContactPageReqVO; | ||
| 9 | -import cn.iocoder.yudao.module.crm.controller.admin.contact.vo.CrmContactUpdateReqVO; | ||
| 10 | -import cn.iocoder.yudao.module.crm.convert.contact.ContactConvert; | 6 | +import cn.iocoder.yudao.module.crm.controller.admin.contact.vo.*; |
| 7 | +import cn.iocoder.yudao.module.crm.convert.contact.CrmContactConvert; | ||
| 11 | import cn.iocoder.yudao.module.crm.dal.dataobject.contact.CrmContactDO; | 8 | import cn.iocoder.yudao.module.crm.dal.dataobject.contact.CrmContactDO; |
| 12 | import cn.iocoder.yudao.module.crm.dal.mysql.contact.CrmContactMapper; | 9 | import cn.iocoder.yudao.module.crm.dal.mysql.contact.CrmContactMapper; |
| 13 | import cn.iocoder.yudao.module.crm.enums.common.CrmBizTypeEnum; | 10 | import cn.iocoder.yudao.module.crm.enums.common.CrmBizTypeEnum; |
| @@ -56,7 +53,7 @@ public class CrmContactServiceImpl implements CrmContactService { | @@ -56,7 +53,7 @@ public class CrmContactServiceImpl implements CrmContactService { | ||
| 56 | // 1.1 校验 | 53 | // 1.1 校验 |
| 57 | validateRelationDataExists(createReqVO); | 54 | validateRelationDataExists(createReqVO); |
| 58 | // 1.2 插入 | 55 | // 1.2 插入 |
| 59 | - CrmContactDO contact = ContactConvert.INSTANCE.convert(createReqVO); | 56 | + CrmContactDO contact = CrmContactConvert.INSTANCE.convert(createReqVO); |
| 60 | contactMapper.insert(contact); | 57 | contactMapper.insert(contact); |
| 61 | 58 | ||
| 62 | // 2. 创建数据权限 | 59 | // 2. 创建数据权限 |
| @@ -73,7 +70,7 @@ public class CrmContactServiceImpl implements CrmContactService { | @@ -73,7 +70,7 @@ public class CrmContactServiceImpl implements CrmContactService { | ||
| 73 | validateContactExists(updateReqVO.getId()); | 70 | validateContactExists(updateReqVO.getId()); |
| 74 | validateRelationDataExists(updateReqVO); | 71 | validateRelationDataExists(updateReqVO); |
| 75 | // 2. 更新 | 72 | // 2. 更新 |
| 76 | - CrmContactDO updateObj = ContactConvert.INSTANCE.convert(updateReqVO); | 73 | + CrmContactDO updateObj = CrmContactConvert.INSTANCE.convert(updateReqVO); |
| 77 | contactMapper.updateById(updateObj); | 74 | contactMapper.updateById(updateObj); |
| 78 | } | 75 | } |
| 79 | 76 | ||
| @@ -139,4 +136,18 @@ public class CrmContactServiceImpl implements CrmContactService { | @@ -139,4 +136,18 @@ public class CrmContactServiceImpl implements CrmContactService { | ||
| 139 | return contactMapper.selectPageByCustomerId(pageVO); | 136 | return contactMapper.selectPageByCustomerId(pageVO); |
| 140 | } | 137 | } |
| 141 | 138 | ||
| 139 | + @Override | ||
| 140 | + public void transferContact(CrmContactTransferReqVO reqVO, Long userId) { | ||
| 141 | + // 1 校验联系人是否存在 | ||
| 142 | + validateContactExists(reqVO.getId()); | ||
| 143 | + | ||
| 144 | + // 2.1 数据权限转移 | ||
| 145 | + crmPermissionService.transferPermission( | ||
| 146 | + CrmContactConvert.INSTANCE.convert(reqVO, userId).setBizType(CrmBizTypeEnum.CRM_CONTACT.getType())); | ||
| 147 | + // 2.2 设置新的负责人 | ||
| 148 | + contactMapper.updateOwnerUserIdById(reqVO.getId(), reqVO.getNewOwnerUserId()); | ||
| 149 | + | ||
| 150 | + // 3. TODO 记录转移日志 | ||
| 151 | + } | ||
| 152 | + | ||
| 142 | } | 153 | } |
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/contract/CrmContractServiceImpl.java
| @@ -7,7 +7,7 @@ import cn.iocoder.yudao.module.crm.controller.admin.contract.vo.CrmContractCreat | @@ -7,7 +7,7 @@ import cn.iocoder.yudao.module.crm.controller.admin.contract.vo.CrmContractCreat | ||
| 7 | import cn.iocoder.yudao.module.crm.controller.admin.contract.vo.CrmContractPageReqVO; | 7 | import cn.iocoder.yudao.module.crm.controller.admin.contract.vo.CrmContractPageReqVO; |
| 8 | import cn.iocoder.yudao.module.crm.controller.admin.contract.vo.CrmContractTransferReqVO; | 8 | import cn.iocoder.yudao.module.crm.controller.admin.contract.vo.CrmContractTransferReqVO; |
| 9 | import cn.iocoder.yudao.module.crm.controller.admin.contract.vo.CrmContractUpdateReqVO; | 9 | import cn.iocoder.yudao.module.crm.controller.admin.contract.vo.CrmContractUpdateReqVO; |
| 10 | -import cn.iocoder.yudao.module.crm.convert.contract.ContractConvert; | 10 | +import cn.iocoder.yudao.module.crm.convert.contract.CrmContractConvert; |
| 11 | import cn.iocoder.yudao.module.crm.dal.dataobject.contract.CrmContractDO; | 11 | import cn.iocoder.yudao.module.crm.dal.dataobject.contract.CrmContractDO; |
| 12 | import cn.iocoder.yudao.module.crm.dal.mysql.contract.CrmContractMapper; | 12 | import cn.iocoder.yudao.module.crm.dal.mysql.contract.CrmContractMapper; |
| 13 | import cn.iocoder.yudao.module.crm.enums.common.CrmBizTypeEnum; | 13 | import cn.iocoder.yudao.module.crm.enums.common.CrmBizTypeEnum; |
| @@ -44,7 +44,7 @@ public class CrmContractServiceImpl implements CrmContractService { | @@ -44,7 +44,7 @@ public class CrmContractServiceImpl implements CrmContractService { | ||
| 44 | @Override | 44 | @Override |
| 45 | public Long createContract(CrmContractCreateReqVO createReqVO, Long userId) { | 45 | public Long createContract(CrmContractCreateReqVO createReqVO, Long userId) { |
| 46 | // 插入 | 46 | // 插入 |
| 47 | - CrmContractDO contract = ContractConvert.INSTANCE.convert(createReqVO); | 47 | + CrmContractDO contract = CrmContractConvert.INSTANCE.convert(createReqVO); |
| 48 | contractMapper.insert(contract); | 48 | contractMapper.insert(contract); |
| 49 | 49 | ||
| 50 | // 创建数据权限 | 50 | // 创建数据权限 |
| @@ -61,7 +61,7 @@ public class CrmContractServiceImpl implements CrmContractService { | @@ -61,7 +61,7 @@ public class CrmContractServiceImpl implements CrmContractService { | ||
| 61 | // 校验存在 | 61 | // 校验存在 |
| 62 | validateContractExists(updateReqVO.getId()); | 62 | validateContractExists(updateReqVO.getId()); |
| 63 | // 更新 | 63 | // 更新 |
| 64 | - CrmContractDO updateObj = ContractConvert.INSTANCE.convert(updateReqVO); | 64 | + CrmContractDO updateObj = CrmContractConvert.INSTANCE.convert(updateReqVO); |
| 65 | contractMapper.updateById(updateObj); | 65 | contractMapper.updateById(updateObj); |
| 66 | } | 66 | } |
| 67 | 67 | ||
| @@ -118,7 +118,7 @@ public class CrmContractServiceImpl implements CrmContractService { | @@ -118,7 +118,7 @@ public class CrmContractServiceImpl implements CrmContractService { | ||
| 118 | 118 | ||
| 119 | // 2.1 数据权限转移 | 119 | // 2.1 数据权限转移 |
| 120 | crmPermissionService.transferPermission( | 120 | crmPermissionService.transferPermission( |
| 121 | - ContractConvert.INSTANCE.convert(reqVO, userId).setBizType(CrmBizTypeEnum.CRM_CONTRACT.getType())); | 121 | + CrmContractConvert.INSTANCE.convert(reqVO, userId).setBizType(CrmBizTypeEnum.CRM_CONTRACT.getType())); |
| 122 | // 2.2 设置负责人 | 122 | // 2.2 设置负责人 |
| 123 | contractMapper.updateOwnerUserIdById(reqVO.getId(), reqVO.getNewOwnerUserId()); | 123 | contractMapper.updateOwnerUserIdById(reqVO.getId(), reqVO.getNewOwnerUserId()); |
| 124 | 124 |
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/receivable/CrmReceivablePlanService.java
| @@ -3,6 +3,7 @@ package cn.iocoder.yudao.module.crm.service.receivable; | @@ -3,6 +3,7 @@ package cn.iocoder.yudao.module.crm.service.receivable; | ||
| 3 | import cn.iocoder.yudao.framework.common.pojo.PageResult; | 3 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 4 | import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.plan.CrmReceivablePlanCreateReqVO; | 4 | import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.plan.CrmReceivablePlanCreateReqVO; |
| 5 | import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.plan.CrmReceivablePlanPageReqVO; | 5 | import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.plan.CrmReceivablePlanPageReqVO; |
| 6 | +import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.plan.CrmReceivablePlanTransferReqVO; | ||
| 6 | import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.plan.CrmReceivablePlanUpdateReqVO; | 7 | import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.plan.CrmReceivablePlanUpdateReqVO; |
| 7 | import cn.iocoder.yudao.module.crm.dal.dataobject.customer.CrmCustomerDO; | 8 | import cn.iocoder.yudao.module.crm.dal.dataobject.customer.CrmCustomerDO; |
| 8 | import cn.iocoder.yudao.module.crm.dal.dataobject.receivable.CrmReceivablePlanDO; | 9 | import cn.iocoder.yudao.module.crm.dal.dataobject.receivable.CrmReceivablePlanDO; |
| @@ -77,4 +78,12 @@ public interface CrmReceivablePlanService { | @@ -77,4 +78,12 @@ public interface CrmReceivablePlanService { | ||
| 77 | */ | 78 | */ |
| 78 | PageResult<CrmReceivablePlanDO> getReceivablePlanPageByCustomerId(CrmReceivablePlanPageReqVO pageReqVO); | 79 | PageResult<CrmReceivablePlanDO> getReceivablePlanPageByCustomerId(CrmReceivablePlanPageReqVO pageReqVO); |
| 79 | 80 | ||
| 81 | + /** | ||
| 82 | + * 回款计划转移 | ||
| 83 | + * | ||
| 84 | + * @param reqVO 请求 | ||
| 85 | + * @param userId 用户编号 | ||
| 86 | + */ | ||
| 87 | + void transferReceivablePlan(CrmReceivablePlanTransferReqVO reqVO, Long userId); | ||
| 88 | + | ||
| 80 | } | 89 | } |
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/receivable/CrmReceivablePlanServiceImpl.java
| @@ -6,6 +6,7 @@ import cn.hutool.core.util.ObjectUtil; | @@ -6,6 +6,7 @@ import cn.hutool.core.util.ObjectUtil; | ||
| 6 | import cn.iocoder.yudao.framework.common.pojo.PageResult; | 6 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 7 | import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.plan.CrmReceivablePlanCreateReqVO; | 7 | import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.plan.CrmReceivablePlanCreateReqVO; |
| 8 | import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.plan.CrmReceivablePlanPageReqVO; | 8 | import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.plan.CrmReceivablePlanPageReqVO; |
| 9 | +import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.plan.CrmReceivablePlanTransferReqVO; | ||
| 9 | import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.plan.CrmReceivablePlanUpdateReqVO; | 10 | import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.plan.CrmReceivablePlanUpdateReqVO; |
| 10 | import cn.iocoder.yudao.module.crm.convert.receivable.CrmReceivablePlanConvert; | 11 | import cn.iocoder.yudao.module.crm.convert.receivable.CrmReceivablePlanConvert; |
| 11 | import cn.iocoder.yudao.module.crm.dal.dataobject.contract.CrmContractDO; | 12 | import cn.iocoder.yudao.module.crm.dal.dataobject.contract.CrmContractDO; |
| @@ -135,4 +136,18 @@ public class CrmReceivablePlanServiceImpl implements CrmReceivablePlanService { | @@ -135,4 +136,18 @@ public class CrmReceivablePlanServiceImpl implements CrmReceivablePlanService { | ||
| 135 | return receivablePlanMapper.selectPageByCustomerId(pageReqVO); | 136 | return receivablePlanMapper.selectPageByCustomerId(pageReqVO); |
| 136 | } | 137 | } |
| 137 | 138 | ||
| 139 | + @Override | ||
| 140 | + public void transferReceivablePlan(CrmReceivablePlanTransferReqVO reqVO, Long userId) { | ||
| 141 | + // 1 校验回款计划是否存在 | ||
| 142 | + validateReceivablePlanExists(reqVO.getId()); | ||
| 143 | + | ||
| 144 | + // 2.1 数据权限转移 | ||
| 145 | + crmPermissionService.transferPermission( | ||
| 146 | + CrmReceivablePlanConvert.INSTANCE.convert(reqVO, userId).setBizType(CrmBizTypeEnum.CRM_RECEIVABLE_PLAN.getType())); | ||
| 147 | + // 2.2 设置新的负责人 | ||
| 148 | + receivablePlanMapper.updateOwnerUserIdById(reqVO.getId(), reqVO.getNewOwnerUserId()); | ||
| 149 | + | ||
| 150 | + // 3. TODO 记录转移日志 | ||
| 151 | + } | ||
| 152 | + | ||
| 138 | } | 153 | } |
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/receivable/CrmReceivableService.java
| @@ -3,6 +3,7 @@ package cn.iocoder.yudao.module.crm.service.receivable; | @@ -3,6 +3,7 @@ package cn.iocoder.yudao.module.crm.service.receivable; | ||
| 3 | import cn.iocoder.yudao.framework.common.pojo.PageResult; | 3 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 4 | import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.receivable.CrmReceivableCreateReqVO; | 4 | import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.receivable.CrmReceivableCreateReqVO; |
| 5 | import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.receivable.CrmReceivablePageReqVO; | 5 | import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.receivable.CrmReceivablePageReqVO; |
| 6 | +import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.receivable.CrmReceivableTransferReqVO; | ||
| 6 | import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.receivable.CrmReceivableUpdateReqVO; | 7 | import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.receivable.CrmReceivableUpdateReqVO; |
| 7 | import cn.iocoder.yudao.module.crm.dal.dataobject.customer.CrmCustomerDO; | 8 | import cn.iocoder.yudao.module.crm.dal.dataobject.customer.CrmCustomerDO; |
| 8 | import cn.iocoder.yudao.module.crm.dal.dataobject.receivable.CrmReceivableDO; | 9 | import cn.iocoder.yudao.module.crm.dal.dataobject.receivable.CrmReceivableDO; |
| @@ -77,4 +78,12 @@ public interface CrmReceivableService { | @@ -77,4 +78,12 @@ public interface CrmReceivableService { | ||
| 77 | */ | 78 | */ |
| 78 | PageResult<CrmReceivableDO> getReceivablePageByCustomerId(CrmReceivablePageReqVO pageReqVO); | 79 | PageResult<CrmReceivableDO> getReceivablePageByCustomerId(CrmReceivablePageReqVO pageReqVO); |
| 79 | 80 | ||
| 81 | + /** | ||
| 82 | + * 回款转移 | ||
| 83 | + * | ||
| 84 | + * @param reqVO 请求 | ||
| 85 | + * @param userId 用户编号 | ||
| 86 | + */ | ||
| 87 | + void transferReceivable(CrmReceivableTransferReqVO reqVO, Long userId); | ||
| 88 | + | ||
| 80 | } | 89 | } |
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/receivable/CrmReceivableServiceImpl.java
| @@ -7,6 +7,7 @@ import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; | @@ -7,6 +7,7 @@ import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; | ||
| 7 | import cn.iocoder.yudao.framework.common.pojo.PageResult; | 7 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 8 | import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.receivable.CrmReceivableCreateReqVO; | 8 | import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.receivable.CrmReceivableCreateReqVO; |
| 9 | import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.receivable.CrmReceivablePageReqVO; | 9 | import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.receivable.CrmReceivablePageReqVO; |
| 10 | +import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.receivable.CrmReceivableTransferReqVO; | ||
| 10 | import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.receivable.CrmReceivableUpdateReqVO; | 11 | import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.receivable.CrmReceivableUpdateReqVO; |
| 11 | import cn.iocoder.yudao.module.crm.convert.receivable.CrmReceivableConvert; | 12 | import cn.iocoder.yudao.module.crm.convert.receivable.CrmReceivableConvert; |
| 12 | import cn.iocoder.yudao.module.crm.dal.dataobject.contract.CrmContractDO; | 13 | import cn.iocoder.yudao.module.crm.dal.dataobject.contract.CrmContractDO; |
| @@ -20,6 +21,7 @@ import cn.iocoder.yudao.module.crm.enums.permission.CrmPermissionLevelEnum; | @@ -20,6 +21,7 @@ import cn.iocoder.yudao.module.crm.enums.permission.CrmPermissionLevelEnum; | ||
| 20 | import cn.iocoder.yudao.module.crm.framework.core.annotations.CrmPermission; | 21 | import cn.iocoder.yudao.module.crm.framework.core.annotations.CrmPermission; |
| 21 | import cn.iocoder.yudao.module.crm.service.contract.CrmContractService; | 22 | import cn.iocoder.yudao.module.crm.service.contract.CrmContractService; |
| 22 | import cn.iocoder.yudao.module.crm.service.customer.CrmCustomerService; | 23 | import cn.iocoder.yudao.module.crm.service.customer.CrmCustomerService; |
| 24 | +import cn.iocoder.yudao.module.crm.service.permission.CrmPermissionService; | ||
| 23 | import jakarta.annotation.Resource; | 25 | import jakarta.annotation.Resource; |
| 24 | import org.springframework.stereotype.Service; | 26 | import org.springframework.stereotype.Service; |
| 25 | import org.springframework.validation.annotation.Validated; | 27 | import org.springframework.validation.annotation.Validated; |
| @@ -48,6 +50,8 @@ public class CrmReceivableServiceImpl implements CrmReceivableService { | @@ -48,6 +50,8 @@ public class CrmReceivableServiceImpl implements CrmReceivableService { | ||
| 48 | private CrmCustomerService customerService; | 50 | private CrmCustomerService customerService; |
| 49 | @Resource | 51 | @Resource |
| 50 | private CrmReceivablePlanService receivablePlanService; | 52 | private CrmReceivablePlanService receivablePlanService; |
| 53 | + @Resource | ||
| 54 | + private CrmPermissionService crmPermissionService; | ||
| 51 | 55 | ||
| 52 | // TODO @liuhongfeng:创建还款后,是不是什么时候,要更新 plan? | 56 | // TODO @liuhongfeng:创建还款后,是不是什么时候,要更新 plan? |
| 53 | @Override | 57 | @Override |
| @@ -70,22 +74,22 @@ public class CrmReceivableServiceImpl implements CrmReceivableService { | @@ -70,22 +74,22 @@ public class CrmReceivableServiceImpl implements CrmReceivableService { | ||
| 70 | // TODO @liuhongfeng:这里的括号要注意排版; | 74 | // TODO @liuhongfeng:这里的括号要注意排版; |
| 71 | private void checkReceivable(CrmReceivableDO receivable) { | 75 | private void checkReceivable(CrmReceivableDO receivable) { |
| 72 | // TODO @liuhongfeng:这个放在参数校验合适 | 76 | // TODO @liuhongfeng:这个放在参数校验合适 |
| 73 | - if(ObjectUtil.isNull(receivable.getContractId())){ | 77 | + if (ObjectUtil.isNull(receivable.getContractId())) { |
| 74 | throw exception(CONTRACT_NOT_EXISTS); | 78 | throw exception(CONTRACT_NOT_EXISTS); |
| 75 | } | 79 | } |
| 76 | 80 | ||
| 77 | CrmContractDO contract = contractService.getContract(receivable.getContractId()); | 81 | CrmContractDO contract = contractService.getContract(receivable.getContractId()); |
| 78 | - if(ObjectUtil.isNull(contract)){ | 82 | + if (ObjectUtil.isNull(contract)) { |
| 79 | throw exception(CONTRACT_NOT_EXISTS); | 83 | throw exception(CONTRACT_NOT_EXISTS); |
| 80 | } | 84 | } |
| 81 | 85 | ||
| 82 | CrmCustomerDO customer = customerService.getCustomer(receivable.getCustomerId()); | 86 | CrmCustomerDO customer = customerService.getCustomer(receivable.getCustomerId()); |
| 83 | - if(ObjectUtil.isNull(customer)){ | 87 | + if (ObjectUtil.isNull(customer)) { |
| 84 | throw exception(CUSTOMER_NOT_EXISTS); | 88 | throw exception(CUSTOMER_NOT_EXISTS); |
| 85 | } | 89 | } |
| 86 | 90 | ||
| 87 | CrmReceivablePlanDO receivablePlan = receivablePlanService.getReceivablePlan(receivable.getPlanId()); | 91 | CrmReceivablePlanDO receivablePlan = receivablePlanService.getReceivablePlan(receivable.getPlanId()); |
| 88 | - if(ObjectUtil.isNull(receivablePlan)){ | 92 | + if (ObjectUtil.isNull(receivablePlan)) { |
| 89 | throw exception(RECEIVABLE_PLAN_NOT_EXISTS); | 93 | throw exception(RECEIVABLE_PLAN_NOT_EXISTS); |
| 90 | } | 94 | } |
| 91 | 95 | ||
| @@ -140,4 +144,18 @@ public class CrmReceivableServiceImpl implements CrmReceivableService { | @@ -140,4 +144,18 @@ public class CrmReceivableServiceImpl implements CrmReceivableService { | ||
| 140 | return receivableMapper.selectPageByCustomerId(pageReqVO); | 144 | return receivableMapper.selectPageByCustomerId(pageReqVO); |
| 141 | } | 145 | } |
| 142 | 146 | ||
| 147 | + @Override | ||
| 148 | + public void transferReceivable(CrmReceivableTransferReqVO reqVO, Long userId) { | ||
| 149 | + // 1 校验回款是否存在 | ||
| 150 | + validateReceivableExists(reqVO.getId()); | ||
| 151 | + | ||
| 152 | + // 2.1 数据权限转移 | ||
| 153 | + crmPermissionService.transferPermission( | ||
| 154 | + CrmReceivableConvert.INSTANCE.convert(reqVO, userId).setBizType(CrmBizTypeEnum.CRM_RECEIVABLE.getType())); | ||
| 155 | + // 2.2 设置新的负责人 | ||
| 156 | + receivableMapper.updateOwnerUserIdById(reqVO.getId(), reqVO.getNewOwnerUserId()); | ||
| 157 | + | ||
| 158 | + // 3. TODO 记录转移日志 | ||
| 159 | + } | ||
| 160 | + | ||
| 143 | } | 161 | } |