客户维护:表头点击排序&判断手机号是否存在

This commit is contained in:
sk1551
2021-03-03 18:00:53 +08:00
parent b981e07d4e
commit 56f9776253
3 changed files with 77 additions and 24 deletions

View File

@ -76,7 +76,14 @@ public class ByCustomerController extends BaseController {
public AjaxResult add(@RequestBody ByCustomer byCustomer) {
byCustomer.setCreateUserid(SecurityUtils.getLoginUser().getUser().getUserId());
byCustomer.setCreateTime(new Date());
return toAjax(byCustomerService.insertByCustomer(byCustomer));
// 判断电话号码是否存在
ByCustomer byCustomer1 = new ByCustomer();
byCustomer1.setLxdh(byCustomer.getLxdh());
if (byCustomerService.selectByCustomerList(byCustomer1).size()>0) {
return AjaxResult.error("新增用户失败,此手机号码已经存在");
}else {
return toAjax(byCustomerService.insertByCustomer(byCustomer));
}
}
/**

View File

@ -141,7 +141,7 @@ public class ByCustomer extends BaseEntity {
* 消费价值
*/
@Excel(name = "消费价值")
private String xfjz;
private Long xfjz;
public void setId(Long id) {
this.id = id;
@ -295,11 +295,11 @@ public class ByCustomer extends BaseEntity {
return xfxm;
}
public void setXfjz(String xfjz) {
public void setXfjz(Long xfjz) {
this.xfjz = xfjz;
}
public String getXfjz() {
public Long getXfjz() {
return xfjz;
}