Commit f9f5383f by 邓实川

修复客户跟进 字段类型

parent 20a07dd4
......@@ -60,7 +60,7 @@ public class CrmClientFollow extends Model<CrmClientFollow> {
private Integer content;
@ApiModelProperty(value = "客户数据状态 0-无 1-潜在 2-意向 3-签约 4-合作中 5-已封档")
private String clientStatus;
private Integer clientStatus;
@ApiModelProperty(value = "联系人姓名")
private String name;
......
......@@ -591,7 +591,10 @@ public class CrmController {
if (cid == null)
return ResultUtil.error("删除失败,请传入客户id");
Integer num = CrmClientData.builder().id(cid).build().selectById().getContactsNum();
CrmClientData.builder().id(cid).contactsNum(--num).build().updateById();
if (--num < 0) {
return ResultUtil.error("删除失败,已经没有可以删的联系人了");
}
CrmClientData.builder().id(cid).contactsNum(num).build().updateById();
if (crmClientContactsMapper.deleteById(id) > 0)
return ResultUtil.success("删除成功");
return ResultUtil.error("删除失败");
......@@ -645,7 +648,8 @@ public class CrmController {
Integer orgCode = getOrgCode(userBean);
Integer empNum = getEmpNum(userBean);
CrmClientData.builder().id(crmClientFollow.getCid()).lastFollowTime(new Date()).build().updateById(); // 更新客户最近跟进时间
CrmClientData.builder().id(crmClientFollow.getCid()).clientStatus(crmClientFollow.getClientStatus())
.lastFollowTime(new Date()).build().updateById(); // 更新客户最近跟进时间
crmClientFollow.setOrgCode(orgCode);
crmClientFollow.setCreateUserName(getEmpName(orgCode, empNum));
......
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