This commit is contained in:
2024-10-30 15:43:11 +08:00
parent d4fed92631
commit 3de5434308
3 changed files with 20 additions and 0 deletions

View File

@@ -148,4 +148,11 @@ public class CrmCustomerTempRest {
List<CrmCustomerTempVo> w = crmCustomerTempService.getCustomerByOrgSid(orgSid); List<CrmCustomerTempVo> w = crmCustomerTempService.getCustomerByOrgSid(orgSid);
return rb.success().setData(w); 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);
}
} }

View File

@@ -72,4 +72,5 @@ public class CrmCustomerTempQuery implements Query {
@ApiModelProperty("用户sid") @ApiModelProperty("用户sid")
private String userSid; private String userSid;
private int index; private int index;
private String customerName;
} }

View File

@@ -193,4 +193,16 @@ public class CrmCustomerTempService extends MybatisBaseService<CrmCustomerTempMa
public List<CrmCustomerTempVo> getCustomerByOrgSid(String orgSid) { public List<CrmCustomerTempVo> getCustomerByOrgSid(String orgSid) {
return baseMapper.getCustomerByOrgSid(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;
}
} }