<select id="selectByAdminProjectIds" resultMap="ProjectUserResultMap">SELECT
c.project_id,c.project_name, c.deletion_state_code,
GROUP_CONCAT(a.id)user_id,GROUP_CONCAT(a.username) username
FROM
mon_project_info c
LEFTJOIN
mon_rel_prj_usr b
ON c.project_id=b.project_id and b.deletion_state_code ='0'LEFTJOIN
mon_user_account a
ON b.user_id=a.id and a.is_enabled='0'<where><if test="projectName != null and projectName != ''">and c.project_name like concat('%',#{projectName},'%') </if>and c.deletion_state_code ='0'</where>GROUPBY c.project_id,c.project_name
orderby c.project_id desc</select>
serviceImpl文件
String insertSql ="insert into "+ tableName +" ( "+ fieldName +" ) values ( "+ valueStrings +" ) ";String updateSql ="update "+ tableName +" set "+ updateStrings +" where "+ key +" = "+ keyValue;String checkSql ="select count(1) from "+ tableName +" where "+ key +" = "+ keyValue ;