客户维护:表头点击排序&判断手机号是否存在
This commit is contained in:
@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user