Commit 040f69d4 authored by 332784038@qq.com's avatar 332784038@qq.com

创建竞争对手返回值修改为返回json对象

parent 5914e66b
......@@ -20,7 +20,7 @@ public interface CustomerCompetitorService extends IService<CustomerCompetitorDO
* @param createReqVO 创建信息
* @return 编号
*/
Long createCompetitor(@Valid CustomerCompetitorCreateReqVO createReqVO);
CustomerCompetitorDO createCompetitor(@Valid CustomerCompetitorCreateReqVO createReqVO);
/**
* 更新客户竞争对手
......
......@@ -27,7 +27,7 @@ public class CustomerCompetitorServiceImpl extends AbstractService<CustomerCompe
private CustomerCompetitorMapper competitorMapper;
@Override
public Long createCompetitor(CustomerCompetitorCreateReqVO createReqVO) {
public CustomerCompetitorDO createCompetitor(CustomerCompetitorCreateReqVO createReqVO) {
// 校验存在
Long count = competitorMapper.selectCount("name", createReqVO.getName());
......@@ -39,7 +39,7 @@ public class CustomerCompetitorServiceImpl extends AbstractService<CustomerCompe
CustomerCompetitorDO competitor = CustomerCompetitorConvert.INSTANCE.convert(createReqVO);
competitorMapper.insert(competitor);
// 返回
return competitor.getId();
return competitor;
}
@Override
......
......@@ -34,7 +34,7 @@ public class CustomerCompetitorController {
@PostMapping("/create")
@ApiOperation("创建客户竞争对手")
// @PreAuthorize("@ss.hasPermission('customer:competitor:create')")
public CommonResult<Long> createCompetitor(@Valid @RequestBody CustomerCompetitorCreateReqVO createReqVO) {
public CommonResult<CustomerCompetitorDO> createCompetitor(@Valid @RequestBody CustomerCompetitorCreateReqVO createReqVO) {
return success(competitorService.createCompetitor(createReqVO));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment