|
@ -29,7 +29,7 @@ public class ZjxlCompanyCaseService extends BaseService {
|
|
|
@Autowired
|
|
|
JdbcTemplate jdbcTemplate;
|
|
|
|
|
|
public List<ZjxlCompanyCase> findById(String id, String name, Integer page, Integer pagesize){
|
|
|
public List<ZjxlCompanyCase> findById(String id, String name,String lineStatus,Integer page, Integer pagesize){
|
|
|
String sql = "select a.* from zjxl_company_case a where 1=1";
|
|
|
if (StringUtils.isNotEmpty(id)){
|
|
|
sql += " and company_id = '"+id+"'";
|
|
@ -37,13 +37,25 @@ public class ZjxlCompanyCaseService extends BaseService {
|
|
|
if (StringUtils.isNotEmpty(name)){
|
|
|
sql += " and company_name like '%"+name+"%'";
|
|
|
}
|
|
|
if (StringUtils.isNoneBlank(lineStatus)){
|
|
|
sql += " and company_is_line ='"+lineStatus+"' ";
|
|
|
}
|
|
|
sql += " order by company_sort asc,company_create_time DESC limit "+page+" , "+pagesize+"";
|
|
|
List<ZjxlCompanyCase> companyCaseList = jdbcTemplate.query(sql, new BeanPropertyRowMapper<>(ZjxlCompanyCase.class));
|
|
|
return companyCaseList;
|
|
|
}
|
|
|
|
|
|
public int allCount(){
|
|
|
String sql = "select count(*) from zjxl_company_case ";
|
|
|
public int allCount(String id, String name,String lineStatus){
|
|
|
String sql = "select count(*) from zjxl_company_case a where 1=1";
|
|
|
if (StringUtils.isNotEmpty(id)){
|
|
|
sql += " and company_id = '"+id+"'";
|
|
|
}
|
|
|
if (StringUtils.isNotEmpty(name)){
|
|
|
sql += " and company_name like '%"+name+"%'";
|
|
|
}
|
|
|
if (StringUtils.isNoneBlank(lineStatus)){
|
|
|
sql += " and company_is_line ='"+lineStatus+"' ";
|
|
|
}
|
|
|
Integer allCount = jdbcTemplate.queryForObject(sql, Integer.class);;
|
|
|
return allCount;
|
|
|
}
|