Commit abdf75bb authored by Quxl's avatar Quxl

x

parent 2d0f62e6
......@@ -31,14 +31,15 @@ public class AdminUserServiceImpl implements AdminUserService {
public List<Map<String, Object>> queryGroupList(String keyword, Page page) {
SqlWhere argEdit = new SqlWhere().lk(new String[]{"ug.group_id", "ug.group_name"}, keyword);
String sql = ""
+ "SELECT "
+ "ug.group_id, "
+ "ug.group_name, "
+ "(select count(u.uid) from fc_user u where u.group_id = ug.group_id) count, "
+ "( SELECT group_concat( ugf.fun_id ) FROM fc_user_group_funs ugf WHERE ugf.group_id = ug.group_id GROUP BY ugf.group_id ) funs, "
+ "( SELECT group_concat( ugf.fun_id ) FROM fc_user_group_round ugr WHERE ugr.group_id = ug.group_id GROUP BY ugr.group_id ) rounds, "
+ "( SELECT group_concat( ugf.fun_id ) FROM fc_user_group_enroll uge WHERE uge.group_id = ug.group_id GROUP BY uge.group_id ) enrolls "
+ "FROM fc_user_group ug" + StringUtil.join(" and ", " where ", " ", " ", argEdit.getStringList()) ;
+ "SELECT " +
"ug.group_id, " +
"ug.group_name, " +
"( SELECT count( u.uid ) FROM fc_user u WHERE u.group_id = ug.group_id ) count, " +
"( SELECT group_concat( ugf.fun_id ) FROM fc_user_group_funs ugf WHERE ugf.group_id = ug.group_id GROUP BY ugf.group_id ) funs, " +
"( SELECT group_concat( ugr.review_round ) FROM fc_user_group_round ugr WHERE ugr.group_id = ug.group_id GROUP BY ugr.group_id ) rounds, " +
"( SELECT group_concat( uge.enroll_type_id ) FROM fc_user_group_enroll uge WHERE uge.group_id = ug.group_id GROUP BY uge.group_id ) enrolls " +
"FROM " +
"fc_user_group ug" + StringUtil.join(" and ", " where ", " ", " ", argEdit.getStringList()) ;
return jdbcTemplate.limit(sql, page, argEdit.getObjectList());
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment