去除所有crm菜单按钮权限

This commit is contained in:
aikai 2024-12-03 21:44:15 +08:00
parent c26f8f723f
commit effe65d8d1
13 changed files with 106 additions and 60 deletions

View File

@ -31,7 +31,7 @@ public class CrmAchievementController {
@PostMapping("/create")
@Operation(summary = "创建业绩目标")
@PreAuthorize("@ss.hasPermission('crm:achievement:create')")
// @PreAuthorize("@ss.hasPermission('crm:achievement:create')")
public CommonResult<Boolean> createAchievement(@Valid @RequestBody DeptAchieveSaveVO createReqVO) {
achievementService.createAchievement(createReqVO);
return success(true);
@ -39,7 +39,7 @@ public class CrmAchievementController {
@PutMapping("/update")
@Operation(summary = "更新业绩目标")
@PreAuthorize("@ss.hasPermission('crm:achievement:update')")
// @PreAuthorize("@ss.hasPermission('crm:achievement:update')")
public CommonResult<Boolean> updateAchievement(@Valid @RequestBody CrmAchievementSaveReqVO updateReqVO) {
achievementService.updateAchievement(updateReqVO);
return success(true);
@ -48,7 +48,7 @@ public class CrmAchievementController {
@DeleteMapping("/delete")
@Operation(summary = "删除业绩目标")
@Parameter(name = "id", description = "编号", required = true)
@PreAuthorize("@ss.hasPermission('crm:achievement:delete')")
// @PreAuthorize("@ss.hasPermission('crm:achievement:delete')")
public CommonResult<Boolean> deleteAchievement(@RequestParam("id") Long id) {
achievementService.deleteAchievement(id);
return success(true);
@ -57,7 +57,7 @@ public class CrmAchievementController {
@GetMapping("/get")
@Operation(summary = "获得业绩目标")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('crm:achievement:query')")
// @PreAuthorize("@ss.hasPermission('crm:achievement:query')")
public CommonResult<CrmAchievementRespVO> getAchievement(@RequestParam("id") Long id) {
CrmAchievementDO achievement = achievementService.getAchievement(id);
return success(BeanUtils.toBean(achievement, CrmAchievementRespVO.class));
@ -65,7 +65,7 @@ public class CrmAchievementController {
@GetMapping("/depts")
@Operation(summary = "获得部门业绩目标")
@PreAuthorize("@ss.hasPermission('crm:achievement:query')")
// @PreAuthorize("@ss.hasPermission('crm:achievement:query')")
public CommonResult<List<DeptAchieveRespVO>> getDeptsAchievement(@RequestParam(name = "type", required = false) Integer type,
@RequestParam(name = "year", required = false) Integer year) {
List<DeptAchieveRespVO> deptAchieveRespVOS = achievementService.getDeptAchieve(type, year);
@ -74,7 +74,7 @@ public class CrmAchievementController {
@GetMapping("/page")
@Operation(summary = "获得员工业绩目标分页")
@PreAuthorize("@ss.hasPermission('crm:achievement:query')")
// @PreAuthorize("@ss.hasPermission('crm:achievement:query')")
public CommonResult<PageResult<UserAchieveRespVO>> getAchievementPage(@Valid CrmAchievementPageReqVO pageReqVO) {
return success(achievementService.getAchievementPage(pageReqVO));
}

View File

@ -33,14 +33,14 @@ public class CrmBusinessController {
@PostMapping("/create")
@Operation(summary = "创建商机")
@PreAuthorize("@ss.hasPermission('crm:business:create')")
// @PreAuthorize("@ss.hasPermission('crm:business:create')")
public CommonResult<Long> createBusiness(@Valid @RequestBody CrmBusinessSaveReqVO createReqVO) {
return success(businessService.createBusiness(createReqVO));
}
@PutMapping("/update")
@Operation(summary = "更新商机")
@PreAuthorize("@ss.hasPermission('crm:business:update')")
// @PreAuthorize("@ss.hasPermission('crm:business:update')")
public CommonResult<Boolean> updateBusiness(@Valid @RequestBody CrmBusinessSaveReqVO updateReqVO) {
businessService.updateBusiness(updateReqVO);
return success(true);
@ -49,7 +49,7 @@ public class CrmBusinessController {
@DeleteMapping("/delete")
@Operation(summary = "删除商机")
@Parameter(name = "id", description = "编号", required = true)
@PreAuthorize("@ss.hasPermission('crm:business:delete')")
// @PreAuthorize("@ss.hasPermission('crm:business:delete')")
public CommonResult<Boolean> deleteBusiness(@RequestParam("id") Long id) {
businessService.deleteBusiness(id);
return success(true);
@ -58,14 +58,14 @@ public class CrmBusinessController {
@GetMapping("/get")
@Operation(summary = "获得商机")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('crm:business:query')")
// @PreAuthorize("@ss.hasPermission('crm:business:query')")
public CommonResult<CrmBusinessRespVO> getBusiness(@RequestParam("id") Long id) {
return success(businessService.getBusiness(id));
}
@GetMapping("/page")
@Operation(summary = "获得商机分页")
@PreAuthorize("@ss.hasPermission('crm:business:query')")
// @PreAuthorize("@ss.hasPermission('crm:business:query')")
public CommonResult<PageResult<CrmBusinessRespVO>> getBusinessPage(@Valid CrmBusinessPageReqVO pageReqVO) {
return success(businessService.getBusinessPage(pageReqVO));
}
@ -76,7 +76,7 @@ public class CrmBusinessController {
@GetMapping("/business-product/list-by-business-id")
@Operation(summary = "获得商机产品关联列表")
@Parameter(name = "businessId", description = "商机id")
@PreAuthorize("@ss.hasPermission('crm:business:query')")
// @PreAuthorize("@ss.hasPermission('crm:business:query')")
public CommonResult<List<CrmBusinessProductDO>> getBusinessProductListByBusinessId(@RequestParam("businessId") Long businessId) {
return success(businessService.getBusinessProductListByBusinessId(businessId));
}

View File

@ -40,14 +40,14 @@ public class CrmCluesController {
@PostMapping("/create")
@Operation(summary = "创建线索")
@PreAuthorize("@ss.hasPermission('crm:clues:create')")
// @PreAuthorize("@ss.hasPermission('crm:clues:create')")
public CommonResult<Long> createClues(@Valid @RequestBody CrmCluesSaveReqVO createReqVO) {
return success(cluesService.createClues(createReqVO));
}
@PutMapping("/update")
@Operation(summary = "更新线索")
@PreAuthorize("@ss.hasPermission('crm:clues:update')")
// @PreAuthorize("@ss.hasPermission('crm:clues:update')")
public CommonResult<Boolean> updateClues(@Valid @RequestBody CrmCluesSaveReqVO updateReqVO) {
cluesService.updateClues(updateReqVO);
return success(true);
@ -56,7 +56,7 @@ public class CrmCluesController {
@DeleteMapping("/delete")
@Operation(summary = "删除线索")
@Parameter(name = "id", description = "编号", required = true)
@PreAuthorize("@ss.hasPermission('crm:clues:delete')")
// @PreAuthorize("@ss.hasPermission('crm:clues:delete')")
public CommonResult<Boolean> deleteClues(@RequestParam("id") Long id) {
cluesService.deleteClues(id);
return success(true);
@ -65,7 +65,7 @@ public class CrmCluesController {
@GetMapping("/get")
@Operation(summary = "获得线索")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('crm:clues:query')")
// @PreAuthorize("@ss.hasPermission('crm:clues:query')")
public CommonResult<CrmCluesRespVO> getClues(@RequestParam("id") Long id) {
CrmCluesDO clues = cluesService.getClues(id);
return success(BeanUtils.toBean(clues, CrmCluesRespVO.class));
@ -73,7 +73,7 @@ public class CrmCluesController {
@GetMapping("/page")
@Operation(summary = "获得线索分页")
@PreAuthorize("@ss.hasPermission('crm:clues:query')")
// @PreAuthorize("@ss.hasPermission('crm:clues:query')")
public CommonResult<PageResult<CrmCluesRespVO>> getCluesPage(@Valid CrmCluesPageReqVO pageReqVO) {
return success(cluesService.getCluesPage(pageReqVO));
}
@ -81,7 +81,7 @@ public class CrmCluesController {
@GetMapping("/open")
@Operation(summary = "放入线索池")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('crm:clues:query')")
// @PreAuthorize("@ss.hasPermission('crm:clues:query')")
public CommonResult<Boolean> openClues(@RequestParam("id") Long id) {
cluesService.openClues(id);
return success(true);
@ -97,7 +97,7 @@ public class CrmCluesController {
@PostMapping("/createCustomer")
@Operation(summary = "转换客户")
@PreAuthorize("@ss.hasPermission('crm:clues:create-customer')")
// @PreAuthorize("@ss.hasPermission('crm:clues:create-customer')")
public CommonResult<Boolean> createCustomer(@Valid @RequestBody CrmCustomerSaveReqVO createReqVO) {
cluesService.createCustomer(createReqVO);
return success(true);

View File

@ -30,14 +30,14 @@ public class CrmContractController {
@PostMapping("/create")
@Operation(summary = "创建合同")
@PreAuthorize("@ss.hasPermission('crm:contract:create')")
// @PreAuthorize("@ss.hasPermission('crm:contract:create')")
public CommonResult<Long> createContract(@Valid @RequestBody CrmContractSaveReqVO createReqVO) {
return success(contractService.createContract(createReqVO));
}
@PutMapping("/update")
@Operation(summary = "更新合同")
@PreAuthorize("@ss.hasPermission('crm:contract:update')")
// @PreAuthorize("@ss.hasPermission('crm:contract:update')")
public CommonResult<Boolean> updateContract(@Valid @RequestBody CrmContractSaveReqVO updateReqVO) {
contractService.updateContract(updateReqVO);
return success(true);
@ -46,7 +46,7 @@ public class CrmContractController {
@DeleteMapping("/delete")
@Operation(summary = "删除合同")
@Parameter(name = "id", description = "编号", required = true)
@PreAuthorize("@ss.hasPermission('crm:contract:delete')")
// @PreAuthorize("@ss.hasPermission('crm:contract:delete')")
public CommonResult<Boolean> deleteContract(@RequestParam("id") Long id) {
contractService.deleteContract(id);
return success(true);
@ -55,14 +55,14 @@ public class CrmContractController {
@GetMapping("/get")
@Operation(summary = "获得合同")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('crm:contract:query')")
// @PreAuthorize("@ss.hasPermission('crm:contract:query')")
public CommonResult<CrmContractRespVO> getContract(@RequestParam("id") Long id) {
return success(contractService.getContract(id));
}
@GetMapping("/page")
@Operation(summary = "获得合同分页")
@PreAuthorize("@ss.hasPermission('crm:contract:query')")
// @PreAuthorize("@ss.hasPermission('crm:contract:query')")
public CommonResult<PageResult<CrmContractRespVO>> getContractPage(@Valid CrmContractPageReqVO pageReqVO) {
return success(contractService.getContractPage(pageReqVO));
}
@ -74,7 +74,7 @@ public class CrmContractController {
@GetMapping("/contract-product/list-by-contract-id")
@Operation(summary = "获得合同产品关系列表")
@Parameter(name = "contractId", description = "合同ID")
@PreAuthorize("@ss.hasPermission('crm:contract:query')")
// @PreAuthorize("@ss.hasPermission('crm:contract:query')")
public CommonResult<List<CrmContractProductDO>> getContractProductListByContractId(@RequestParam("contractId") Long contractId) {
return success(contractService.getContractProductListByContractId(contractId));
}

View File

@ -29,14 +29,14 @@ public class CrmContractReceivablesController {
@PostMapping("/create")
@Operation(summary = "创建回款")
@PreAuthorize("@ss.hasPermission('crm:contract-receivables:create')")
// @PreAuthorize("@ss.hasPermission('crm:contract-receivables:create')")
public CommonResult<Long> createContractReceivables(@Valid @RequestBody CrmContractReceivablesSaveReqVO createReqVO) {
return success(contractReceivablesService.createContractReceivables(createReqVO));
}
@PutMapping("/update")
@Operation(summary = "更新回款")
@PreAuthorize("@ss.hasPermission('crm:contract-receivables:update')")
// @PreAuthorize("@ss.hasPermission('crm:contract-receivables:update')")
public CommonResult<Boolean> updateContractReceivables(@Valid @RequestBody CrmContractReceivablesSaveReqVO updateReqVO) {
contractReceivablesService.updateContractReceivables(updateReqVO);
return success(true);
@ -45,7 +45,7 @@ public class CrmContractReceivablesController {
@DeleteMapping("/delete")
@Operation(summary = "删除回款")
@Parameter(name = "id", description = "编号", required = true)
@PreAuthorize("@ss.hasPermission('crm:contract-receivables:delete')")
// @PreAuthorize("@ss.hasPermission('crm:contract-receivables:delete')")
public CommonResult<Boolean> deleteContractReceivables(@RequestParam("id") Long id) {
contractReceivablesService.deleteContractReceivables(id);
return success(true);
@ -54,7 +54,7 @@ public class CrmContractReceivablesController {
@GetMapping("/get")
@Operation(summary = "获得回款")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('crm:contract-receivables:query')")
// @PreAuthorize("@ss.hasPermission('crm:contract-receivables:query')")
public CommonResult<CrmContractReceivablesRespVO> getContractReceivables(@RequestParam("id") Long id) {
CrmContractReceivablesRespVO contractReceivables = contractReceivablesService.getContractReceivables(id);
return success(contractReceivables);
@ -62,7 +62,7 @@ public class CrmContractReceivablesController {
@GetMapping("/page")
@Operation(summary = "获得回款分页")
@PreAuthorize("@ss.hasPermission('crm:contract-receivables:query')")
// @PreAuthorize("@ss.hasPermission('crm:contract-receivables:query')")
public CommonResult<PageResult<CrmContractReceivablesRespVO>> getContractReceivablesPage(@Valid CrmContractReceivablesPageReqVO pageReqVO) {
PageResult<CrmContractReceivablesRespVO> pageResult = contractReceivablesService.getContractReceivablesPage(pageReqVO);
return success(pageResult);

View File

@ -38,14 +38,14 @@ public class CrmCustomerController {
@PostMapping("/create")
@Operation(summary = "创建客户")
@PreAuthorize("@ss.hasPermission('crm:customer:create')")
// @PreAuthorize("@ss.hasPermission('crm:customer:create')")
public CommonResult<Long> createCustomer(@Valid @RequestBody CrmCustomerSaveReqVO createReqVO) {
return success(customerService.createCustomer(createReqVO));
}
@PutMapping("/update")
@Operation(summary = "更新客户")
@PreAuthorize("@ss.hasPermission('crm:customer:update')")
// @PreAuthorize("@ss.hasPermission('crm:customer:update')")
public CommonResult<Boolean> updateCustomer(@Valid @RequestBody CrmCustomerSaveReqVO updateReqVO) {
customerService.updateCustomer(updateReqVO);
return success(true);
@ -54,7 +54,7 @@ public class CrmCustomerController {
@DeleteMapping("/delete")
@Operation(summary = "删除客户")
@Parameter(name = "id", description = "编号", required = true)
@PreAuthorize("@ss.hasPermission('crm:customer:delete')")
// @PreAuthorize("@ss.hasPermission('crm:customer:delete')")
public CommonResult<Boolean> deleteCustomer(@RequestParam("id") Long id) {
customerService.deleteCustomer(id);
return success(true);
@ -63,7 +63,7 @@ public class CrmCustomerController {
@GetMapping("/do-open")
@Operation(summary = "投入公海")
@Parameter(name = "id", description = "编号", required = true)
//@PreAuthorize("@ss.hasPermission('crm:customer:doopen')")
//// @PreAuthorize("@ss.hasPermission('crm:customer:doopen')")
public CommonResult<Boolean> openCustomer(@RequestParam("id") Long id) {
customerService.openCustomer(id);
return success(true);
@ -80,7 +80,7 @@ public class CrmCustomerController {
@GetMapping("/get")
@Operation(summary = "获得客户")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('crm:customer:query')")
// @PreAuthorize("@ss.hasPermission('crm:customer:query')")
public CommonResult<CrmCustomerRespVO> getCustomer(@RequestParam("id") Long id) {
CrmCustomerDO customer = customerService.getCustomer(id);
return success(BeanUtils.toBean(customer, CrmCustomerRespVO.class));
@ -88,7 +88,7 @@ public class CrmCustomerController {
@GetMapping("/page")
@Operation(summary = "获得客户分页")
@PreAuthorize("@ss.hasPermission('crm:customer:query')")
// @PreAuthorize("@ss.hasPermission('crm:customer:query')")
public CommonResult<PageResult<CrmCustomerRespVO>> getCustomerPage(@Valid CrmCustomerPageReqVO pageReqVO) {
PageResult<CrmCustomerDO> pageResult = customerService.getCustomerPage(pageReqVO);
return success(BeanUtils.toBean(pageResult, CrmCustomerRespVO.class));
@ -96,14 +96,14 @@ public class CrmCustomerController {
@GetMapping("/page2")
@Operation(summary = "获得查重客户分页")
@PreAuthorize("@ss.hasPermission('crm:customer:query')")
// @PreAuthorize("@ss.hasPermission('crm:customer:query')")
public CommonResult<PageResult<CrmCustomerRespVO>> getCustomerPage2(@Valid CrmCustomerPageReqVO pageReqVO) {
return success(customerService.getCustomerPage2(pageReqVO));
}
@GetMapping("/export-excel")
@Operation(summary = "导出客户 Excel")
@PreAuthorize("@ss.hasPermission('crm:customer:export')")
// @PreAuthorize("@ss.hasPermission('crm:customer:export')")
public void exportCustomerExcel(@Valid CrmCustomerPageReqVO pageReqVO,
HttpServletResponse response) throws IOException {
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);

View File

@ -27,14 +27,14 @@ public class CrmCustomerContactsController {
@PostMapping("/create")
@Operation(summary = "创建联系人")
@PreAuthorize("@ss.hasPermission('crm:customer-contacts:create')")
// @PreAuthorize("@ss.hasPermission('crm:customer-contacts:create')")
public CommonResult<Long> createCustomerContacts(@Valid @RequestBody CrmCustomerContactsSaveReqVO createReqVO) {
return success(customerContactsService.createCustomerContacts(createReqVO));
}
@PutMapping("/update")
@Operation(summary = "更新联系人")
@PreAuthorize("@ss.hasPermission('crm:customer-contacts:update')")
// @PreAuthorize("@ss.hasPermission('crm:customer-contacts:update')")
public CommonResult<Boolean> updateCustomerContacts(@Valid @RequestBody CrmCustomerContactsSaveReqVO updateReqVO) {
customerContactsService.updateCustomerContacts(updateReqVO);
return success(true);
@ -43,7 +43,7 @@ public class CrmCustomerContactsController {
@DeleteMapping("/delete")
@Operation(summary = "删除联系人")
@Parameter(name = "id", description = "编号", required = true)
@PreAuthorize("@ss.hasPermission('crm:customer-contacts:delete')")
// @PreAuthorize("@ss.hasPermission('crm:customer-contacts:delete')")
public CommonResult<Boolean> deleteCustomerContacts(@RequestParam("id") Long id) {
customerContactsService.deleteCustomerContacts(id);
return success(true);
@ -52,7 +52,7 @@ public class CrmCustomerContactsController {
@GetMapping("/get")
@Operation(summary = "获得联系人")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('crm:customer-contacts:query')")
// @PreAuthorize("@ss.hasPermission('crm:customer-contacts:query')")
public CommonResult<CrmCustomerContactsRespVO> getCustomerContacts(@RequestParam("id") Long id) {
CrmCustomerContactsRespVO customerContacts = customerContactsService.getCustomerContacts(id);
return success(customerContacts);
@ -60,7 +60,7 @@ public class CrmCustomerContactsController {
@GetMapping("/page")
@Operation(summary = "获得联系人分页")
@PreAuthorize("@ss.hasPermission('crm:customer-contacts:query')")
// @PreAuthorize("@ss.hasPermission('crm:customer-contacts:query')")
public CommonResult<PageResult<CrmCustomerContactsRespVO>> getCustomerContactsPage(@Valid CrmCustomerContactsPageReqVO pageReqVO) {
PageResult<CrmCustomerContactsRespVO> pageResult = customerContactsService.getCustomerContactsPage(pageReqVO);
return success(pageResult);

View File

@ -32,14 +32,14 @@ public class CrmFlowController {
@PostMapping("/create")
@Operation(summary = "创建审批流程")
@PreAuthorize("@ss.hasPermission('crm:flow:create')")
// @PreAuthorize("@ss.hasPermission('crm:flow:create')")
public CommonResult<Long> createFlow(@Valid @RequestBody CrmFlowSaveReqVO createReqVO) {
return success(flowService.createFlow(createReqVO));
}
@PutMapping("/update")
@Operation(summary = "更新审批流程")
@PreAuthorize("@ss.hasPermission('crm:flow:update')")
// @PreAuthorize("@ss.hasPermission('crm:flow:update')")
public CommonResult<Boolean> updateFlow(@Valid @RequestBody CrmFlowSaveReqVO updateReqVO) {
flowService.updateFlow(updateReqVO);
return success(true);
@ -48,7 +48,7 @@ public class CrmFlowController {
@DeleteMapping("/delete")
@Operation(summary = "删除审批流程")
@Parameter(name = "id", description = "编号", required = true)
@PreAuthorize("@ss.hasPermission('crm:flow:delete')")
// @PreAuthorize("@ss.hasPermission('crm:flow:delete')")
public CommonResult<Boolean> deleteFlow(@RequestParam("id") Long id) {
flowService.deleteFlow(id);
return success(true);
@ -57,7 +57,7 @@ public class CrmFlowController {
@GetMapping("/get")
@Operation(summary = "获得审批流程")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('crm:flow:query')")
// @PreAuthorize("@ss.hasPermission('crm:flow:query')")
public CommonResult<CrmFlowRespVO> getFlow(@RequestParam("id") Long id) {
CrmFlowDO flow = flowService.getFlow(id);
return success(BeanUtils.toBean(flow, CrmFlowRespVO.class));
@ -65,7 +65,7 @@ public class CrmFlowController {
@GetMapping("/page")
@Operation(summary = "获得审批流程分页")
@PreAuthorize("@ss.hasPermission('crm:flow:query')")
// @PreAuthorize("@ss.hasPermission('crm:flow:query')")
public CommonResult<PageResult<CrmFlowRespVO>> getFlowPage(@Valid CrmFlowPageReqVO pageReqVO) {
PageResult<CrmFlowDO> pageResult = flowService.getFlowPage(pageReqVO);
return success(BeanUtils.toBean(pageResult, CrmFlowRespVO.class));
@ -77,7 +77,7 @@ public class CrmFlowController {
@GetMapping("/flow-step/list-by-flow-id")
@Operation(summary = "获得审批步骤列表")
@Parameter(name = "flowId", description = "审批流程ID")
@PreAuthorize("@ss.hasPermission('crm:flow:query')")
// @PreAuthorize("@ss.hasPermission('crm:flow:query')")
public CommonResult<List<CrmFlowStepDO>> getFlowStepListByFlowId(@RequestParam("flowId") Long flowId) {
return success(flowService.getFlowStepListByFlowId(flowId));
}

View File

@ -32,7 +32,7 @@ public class CrmFlowLogController {
@GetMapping("/page")
@Operation(summary = "获得审核日志分页")
@PreAuthorize("@ss.hasPermission('crm:flow-log:query')")
// @PreAuthorize("@ss.hasPermission('crm:flow-log:query')")
public CommonResult<PageResult<CrmFlowLogRespVO>> getFlowLogPage(@Valid CrmFlowLogPageReqVO pageReqVO) {
PageResult<CrmFlowLogDO> pageResult = flowLogService.getFlowLogPage(pageReqVO);
return success(BeanUtils.toBean(pageResult, CrmFlowLogRespVO.class));

View File

@ -30,14 +30,14 @@ public class CrmInvoiceController {
@PostMapping("/create")
@Operation(summary = "创建发票")
@PreAuthorize("@ss.hasPermission('crm:invoice:create')")
// @PreAuthorize("@ss.hasPermission('crm:invoice:create')")
public CommonResult<Long> createInvoice(@Valid @RequestBody CrmInvoiceSaveReqVO createReqVO) {
return success(invoiceService.createInvoice(createReqVO));
}
@PutMapping("/update")
@Operation(summary = "更新发票")
@PreAuthorize("@ss.hasPermission('crm:invoice:update')")
// @PreAuthorize("@ss.hasPermission('crm:invoice:update')")
public CommonResult<Boolean> updateInvoice(@Valid @RequestBody CrmInvoiceSaveReqVO updateReqVO) {
invoiceService.updateInvoice(updateReqVO);
return success(true);
@ -46,7 +46,7 @@ public class CrmInvoiceController {
@DeleteMapping("/delete")
@Operation(summary = "删除发票")
@Parameter(name = "id", description = "编号", required = true)
@PreAuthorize("@ss.hasPermission('crm:invoice:delete')")
// @PreAuthorize("@ss.hasPermission('crm:invoice:delete')")
public CommonResult<Boolean> deleteInvoice(@RequestParam("id") Long id) {
invoiceService.deleteInvoice(id);
return success(true);
@ -55,14 +55,14 @@ public class CrmInvoiceController {
@GetMapping("/get")
@Operation(summary = "获得发票")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('crm:invoice:query')")
// @PreAuthorize("@ss.hasPermission('crm:invoice:query')")
public CommonResult<CrmInvoiceRespVO> getInvoice(@RequestParam("id") Long id) {
return success(invoiceService.getInvoice(id));
}
@GetMapping("/page")
@Operation(summary = "获得发票分页")
@PreAuthorize("@ss.hasPermission('crm:invoice:query')")
// @PreAuthorize("@ss.hasPermission('crm:invoice:query')")
public CommonResult<PageResult<CrmInvoiceRespVO>> getInvoicePage(@Valid CrmInvoicePageReqVO pageReqVO) {
PageResult<CrmInvoiceRespVO> pageResult = invoiceService.getInvoicePage(pageReqVO);
return success(pageResult);

View File

@ -31,14 +31,14 @@ public class CrmRecordController {
@PostMapping("/create")
@Operation(summary = "创建跟进记录")
@PreAuthorize("@ss.hasPermission('crm:record:create')")
// @PreAuthorize("@ss.hasPermission('crm:record:create')")
public CommonResult<Long> createRecord(@Valid @RequestBody CrmRecordSaveReqVO createReqVO) {
return success(crmRecordService.createRecord(createReqVO));
}
@PutMapping("/update")
@Operation(summary = "更新跟进记录")
@PreAuthorize("@ss.hasPermission('crm:record:update')")
// @PreAuthorize("@ss.hasPermission('crm:record:update')")
public CommonResult<Boolean> updateRecord(@Valid @RequestBody CrmRecordSaveReqVO updateReqVO) {
crmRecordService.updateRecord(updateReqVO);
return success(true);
@ -47,7 +47,7 @@ public class CrmRecordController {
@DeleteMapping("/delete")
@Operation(summary = "删除跟进记录")
@Parameter(name = "id", description = "编号", required = true)
@PreAuthorize("@ss.hasPermission('crm:record:delete')")
// @PreAuthorize("@ss.hasPermission('crm:record:delete')")
public CommonResult<Boolean> deleteRecord(@RequestParam("id") Long id) {
crmRecordService.deleteRecord(id);
return success(true);
@ -56,7 +56,7 @@ public class CrmRecordController {
@GetMapping("/get")
@Operation(summary = "获得跟进记录")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('crm:record:query')")
// @PreAuthorize("@ss.hasPermission('crm:record:query')")
public CommonResult<CrmRecordRespVO> getRecord(@RequestParam("id") Long id) {
CrmRecordDO record = crmRecordService.getRecord(id);
return success(BeanUtils.toBean(record, CrmRecordRespVO.class));
@ -64,7 +64,7 @@ public class CrmRecordController {
@GetMapping("/page")
@Operation(summary = "获得跟进记录分页")
@PreAuthorize("@ss.hasPermission('crm:record:query')")
// @PreAuthorize("@ss.hasPermission('crm:record:query')")
public CommonResult<PageResult<CrmRecordRespVO>> getRecordPage(@Valid CrmRecordPageReqVO pageReqVO) {
return success(crmRecordService.getRecordPage(pageReqVO));
}

View File

@ -0,0 +1,23 @@
--- #################### 注册中心相关配置 ####################
spring:
cloud:
nacos:
server-addr: 127.0.0.1:8848
discovery:
namespace: dev # 命名空间。这里使用 dev 开发环境
metadata:
version: 1.0.0 # 服务实例的版本号,可用于灰度发布
--- #################### 配置中心相关配置 ####################
spring:
cloud:
nacos:
# Nacos Config 配置项,对应 NacosConfigProperties 配置属性类
config:
server-addr: 127.0.0.1:8848 # Nacos 服务器地址
namespace: dev # 命名空间 dev 的ID不能直接使用 dev 名称。创建命名空间的时候需要指定ID为 dev这里使用 dev 开发环境
group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
name: ${spring.application.name} # 使用的 Nacos 配置集的 dataId默认为 spring.application.name
file-extension: yaml # 使用的 Nacos 配置集的 dataId 的文件拓展名,同时也是 Nacos 配置集的配置格式,默认为 properties

View File

@ -0,0 +1,23 @@
--- #################### 注册中心相关配置 ####################
spring:
cloud:
nacos:
server-addr: 127.0.0.1:8848
discovery:
namespace: prod # 命名空间。这里使用 dev 开发环境
metadata:
version: 1.0.0 # 服务实例的版本号,可用于灰度发布
--- #################### 配置中心相关配置 ####################
spring:
cloud:
nacos:
# Nacos Config 配置项,对应 NacosConfigProperties 配置属性类
config:
server-addr: 127.0.0.1:8848 # Nacos 服务器地址
namespace: prod # 命名空间 dev 的ID不能直接使用 dev 名称。创建命名空间的时候需要指定ID为 dev这里使用 dev 开发环境
group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
name: ${spring.application.name} # 使用的 Nacos 配置集的 dataId默认为 spring.application.name
file-extension: yaml # 使用的 Nacos 配置集的 dataId 的文件拓展名,同时也是 Nacos 配置集的配置格式,默认为 properties