| | |
| | | <result property="supUserId" column="sup_user_id"/> |
| | | <result property="supUserName" column="sup_user_name"/> |
| | | <result property="supTime" column="sup_time"/> |
| | | <result property="quiltUnitId" column="quilt_unit_id"/> |
| | | <result property="quiltUnitName" column="quilt_unit_name"/> |
| | | <result property="supStatus" column="sup_status"/> |
| | | <result property="replyTerm" column="reply_term"/> |
| | | <result property="replyContent" column="reply_content"/> |
| | |
| | | sup_user_id, |
| | | sup_user_name, |
| | | sup_time, |
| | | quilt_unit_id, |
| | | quilt_unit_name, |
| | | sup_status, |
| | | reply_term, |
| | | reply_content, |
| | |
| | | <if test="entity.supUserId != null">sup_user_id = #{entity.supUserId},</if> |
| | | <if test="entity.supUserName != null">sup_user_name = #{entity.supUserName},</if> |
| | | <if test="entity.supTime != null">sup_time = #{entity.supTime},</if> |
| | | <if test="entity.quiltUnitId != null">quilt_unit_id = #{entity.quiltUnitId},</if> |
| | | <if test="entity.quiltUnitName != null">quilt_unit_name = #{entity.quiltUnitName},</if> |
| | | <if test="entity.supStatus != null">sup_status = #{entity.supStatus},</if> |
| | | <if test="entity.replyTerm != null">reply_term = #{entity.replyTerm},</if> |
| | | <if test="entity.replyContent != null">reply_content = #{entity.replyContent},</if> |
| | |
| | | <if test="terms.supTime != null and terms.supTime !=''"> |
| | | and sup_time = #{terms.supTime} |
| | | </if> |
| | | <if test="terms.quiltUnitId != null and terms.quiltUnitId !=''"> |
| | | and quilt_unit_id = #{terms.quiltUnitId} |
| | | </if> |
| | | <if test="terms.quiltUnitName != null and terms.quiltUnitName !=''"> |
| | | and quilt_unit_name = #{terms.quiltUnitName} |
| | | </if> |
| | | <if test="terms.supStatus != null and terms.supStatus !=''"> |
| | | and sup_status = #{terms.supStatus} |
| | | </if> |
| | |
| | | </if> |
| | | <if test="terms.deleteStatus != null and terms.deleteStatus !=''"> |
| | | and delete_status = #{terms.deleteStatus} |
| | | </if> |
| | | <if test="terms.deleteStatus == null or terms.deleteStatus ==''"> |
| | | and delete_status = '0' |
| | | </if> |
| | | <if test="terms.custId != null and terms.custId !=''"> |
| | | and cust_id = #{terms.custId} |
| | |
| | | limit #{page.offset}, #{page.size} |
| | | </select> |
| | | |
| | | <!-- 根据条件统计 --> |
| | | <select id="countCaseSupervise" resultType="java.lang.Long"> |
| | | select |
| | | COUNT(1) |
| | | from |
| | | <include refid="table-name" /> |
| | | where case_id = #{caseId} |
| | | and delete_status = '0' |
| | | and sup_status = #{supStatus} |
| | | and quilt_unit_id = #{quiltUnitId} |
| | | </select> |
| | | |
| | | <!-- 根据条件分页查询 --> |
| | | <select id="pageCaseSupervise" resultMap="dataResult"> |
| | | SELECT |
| | | <include refid="column-part"/> |
| | | FROM |
| | | <include refid="table-name" /> |
| | | where case_id = #{caseId} |
| | | and delete_status = '0' |
| | | and sup_status = #{supStatus} |
| | | and quilt_unit_id = #{quiltUnitId} |
| | | <if test="page.sort != null"> |
| | | <foreach collection="page.sort" item="s" index="index" separator="," open="order by "> |
| | | isnull(${s.property}), ${s.property} ${s.direction} |
| | | </foreach> |
| | | </if> |
| | | <if test="page.sort == null"> |
| | | order by isnull(sup_time), sup_time desc |
| | | </if> |
| | | limit #{page.offset}, #{page.size} |
| | | </select> |
| | | </mapper> |