客户
This commit is contained in:
@@ -148,4 +148,11 @@ public class CrmCustomerTempRest {
|
||||
List<CrmCustomerTempVo> w = crmCustomerTempService.getCustomerByOrgSid(orgSid);
|
||||
return rb.success().setData(w);
|
||||
}
|
||||
@ApiOperation("根据条件分页查询数据的列表")
|
||||
@PostMapping("/listPage1")
|
||||
public ResultBean<PagerVo<CrmCustomerTempVo>> listPage1(@RequestBody PagerQuery<CrmCustomerTempQuery> pq) {
|
||||
ResultBean rb = ResultBean.fireFail();
|
||||
PagerVo<CrmCustomerTempVo> pv = crmCustomerTempService.listPageVo1(pq);
|
||||
return rb.success().setData(pv);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,4 +72,5 @@ public class CrmCustomerTempQuery implements Query {
|
||||
@ApiModelProperty("用户sid")
|
||||
private String userSid;
|
||||
private int index;
|
||||
private String customerName;
|
||||
}
|
||||
|
||||
@@ -193,4 +193,16 @@ public class CrmCustomerTempService extends MybatisBaseService<CrmCustomerTempMa
|
||||
public List<CrmCustomerTempVo> getCustomerByOrgSid(String orgSid) {
|
||||
return baseMapper.getCustomerByOrgSid(orgSid);
|
||||
}
|
||||
public PagerVo<CrmCustomerTempVo> listPageVo1(PagerQuery<CrmCustomerTempQuery> pq) {
|
||||
CrmCustomerTempQuery query = pq.getParams();
|
||||
QueryWrapper<CrmCustomerTemp> qw = new QueryWrapper<>();
|
||||
qw.like("s.orgSidPath", query.getOrgPath());
|
||||
if(StringUtils.isNotBlank(query.getCustomerName())){
|
||||
qw.like("a.name",query.getCustomerName());
|
||||
}
|
||||
IPage<CrmCustomerTemp> page = PagerUtil.queryToPage(pq);
|
||||
IPage<CrmCustomerTempVo> pagging = baseMapper.selectPageVo(page, qw);
|
||||
PagerVo<CrmCustomerTempVo> p = PagerUtil.pageToVo(pagging, null);
|
||||
return p;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user