|
@@ -118,4 +118,34 @@ public class CustomerInfoController {
|
|
|
return success(infoService.getCustomerCode());
|
|
return success(infoService.getCustomerCode());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ @PutMapping("/update-open-status")
|
|
|
|
|
+ @Operation(summary = "修改用户状态")
|
|
|
|
|
+ @PreAuthorize("@ss.hasPermission('system:user:update')")
|
|
|
|
|
+ public CommonResult<Boolean> updateOpenStatus(@Valid @RequestBody CustomerInfoOpenStatusReqVO reqVO) {
|
|
|
|
|
+ infoService.updateOpenStatus(reqVO.getId(), reqVO.getStatus());
|
|
|
|
|
+ return success(true);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @GetMapping("/list")
|
|
|
|
|
+ @Operation(summary = "获得客户信息列表")
|
|
|
|
|
+ @PreAuthorize("@ss.hasPermission('customer:info:query')")
|
|
|
|
|
+ public CommonResult<List<CustomerInfoRespVO>> getInfoList(@Valid CustomerInfoPageReqVO pageReqVO) {
|
|
|
|
|
+ pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
|
|
|
|
+ List<CustomerInfoDO> pageResult = infoService.getInfoPage(pageReqVO).getList();
|
|
|
|
|
+ List<CustomerInfoRespVO> result = BeanUtils.toBean(pageResult, CustomerInfoRespVO.class);
|
|
|
|
|
+ if (result != null && result.size() > 0) {
|
|
|
|
|
+ result.forEach(respVO -> {
|
|
|
|
|
+ // 部门
|
|
|
|
|
+ if (respVO.getDeptId() != null) {
|
|
|
|
|
+ DeptRespDTO dept = deptApi.getDept(respVO.getDeptId());
|
|
|
|
|
+ respVO.setDeptName(dept.getName());
|
|
|
|
|
+ if (dept != null && StringUtils.isNotBlank(dept.getName())) {
|
|
|
|
|
+ respVO.setDeptName(dept.getName());
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ return success(result);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
}
|
|
}
|