Commit b1482c9b by 邓实川

新增联系人优化

parent 6ec23793
......@@ -479,7 +479,6 @@ public class CrmController {
crmClientDatas = getCilentFollowOvertime(empNum, orgCode, groupId, status);
else
return ResultUtil.error("查询失败");
// TODO 排序
Collections.sort(crmClientDatas, Comparator.comparing(CrmClientData::getCreateTime).reversed()); // 按时间降序排序
return ResultUtil.data(crmClientDatas, "查询成功");
}
......@@ -562,9 +561,10 @@ public class CrmController {
@PostMapping("addCilentLinkMan")
@Transactional
@ApiOperation(value = "新增/编辑客户联系人", httpMethod = "POST", notes = "接口发布说明")
public Result<Void> addCilentLinkMan(@CurrentUser UserBean userBean, CrmClientContacts crmClientContacts) {
public Result<Void> addCilentLinkMan(@CurrentUser UserBean userBean,
@RequestBody CrmClientContacts crmClientContacts) {
if (crmClientContacts.getId() == null) {
Integer num = CrmClientData.builder().build().selectById().getContactsNum();
Integer num = CrmClientData.builder().id(crmClientContacts.getCid()).build().selectById().getContactsNum();
CrmClientData.builder().id(crmClientContacts.getCid()).contactsNum(++num).build().updateById();
}
if (crmClientContacts.insertOrUpdate())
......
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