|
@@ -46,9 +46,10 @@ public class TbClassQueryDaoImpl implements TbClassQueryDao {
|
|
public Page<Map<String, Object>> findStudentByPage(Map<String, Object> searchParam, Pageable pageable) {
|
|
public Page<Map<String, Object>> findStudentByPage(Map<String, Object> searchParam, Pageable pageable) {
|
|
StringBuffer selSql = new StringBuffer();
|
|
StringBuffer selSql = new StringBuffer();
|
|
List<Object> queryParams = new ArrayList<Object>();
|
|
List<Object> queryParams = new ArrayList<Object>();
|
|
- selSql.append(" SELECT v.* ,c.class_name from tb_lib_vip v ");
|
|
|
|
|
|
+ selSql.append(" SELECT v.* ,c.class_name,case when v.phone is null or v.phone='' then u.mobile else v.phone end as mobile from tb_lib_vip v ");
|
|
selSql.append(" left join tb_class_student cs on v.lib_id = cs.lib_id and v.id = cs.vip_id and cs.status = 1 ");
|
|
selSql.append(" left join tb_class_student cs on v.lib_id = cs.lib_id and v.id = cs.vip_id and cs.status = 1 ");
|
|
selSql.append(" left join tb_class c on cs.class_id = c.id ");
|
|
selSql.append(" left join tb_class c on cs.class_id = c.id ");
|
|
|
|
+ selSql.append(" left join tb_user u on v.user_id = u.id ");
|
|
selSql.append(" where v.stat=1 AND v.lib_id=? ");
|
|
selSql.append(" where v.stat=1 AND v.lib_id=? ");
|
|
queryParams.add(searchParam.get("libId"));
|
|
queryParams.add(searchParam.get("libId"));
|
|
if(!"".equals(searchParam.get("name"))){
|
|
if(!"".equals(searchParam.get("name"))){
|