| | |
| | | <mapper namespace="com.ycl.platform.mapper.CheckTemplateRuleMapper"> |
| | | |
| | | <resultMap type="com.ycl.platform.domain.entity.CheckTemplateRule" id="CheckTemplateRuleResult"> |
| | | <result property="id" column="id" /> |
| | | <result property="id" column="id" /> |
| | | <result property="checkTemplateId" column="check_template_id" /> |
| | | <result property="checkRuleId" column="check_rule_id" /> |
| | | <result property="weight" column="weight" /> |
| | | <result property="maxScore" column="max_score" /> |
| | | <result property="auditState" column="audit_state" /> |
| | | </resultMap> |
| | | |
| | | <sql id="selectCheckTemplateRuleVo"> |
| | | select id, check_template_id, check_rule_id, weight, max_score, audit_state from t_check_template_rule |
| | | select id, check_template_id, check_rule_id, weight from t_check_template_rule |
| | | </sql> |
| | | |
| | | <select id="selectCheckTemplateRuleList" resultMap="CheckTemplateRuleResult"> |
| | |
| | | <where> |
| | | <if test="checkTemplateId != null "> and check_template_id = #{checkTemplateId}</if> |
| | | <if test="checkRuleId != null "> and check_rule_id = #{checkRuleId}</if> |
| | | <if test="auditState != null "> and audit_state = #{auditState}</if> |
| | | </where> |
| | | </select> |
| | | |
| | |
| | | <if test="checkTemplateId != null">check_template_id,</if> |
| | | <if test="checkRuleId != null">check_rule_id,</if> |
| | | <if test="weight != null">weight,</if> |
| | | <if test="maxScore != null">max_score,</if> |
| | | <if test="auditState != null">audit_state,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="checkTemplateId != null">#{checkTemplateId},</if> |
| | | <if test="checkRuleId != null">#{checkRuleId},</if> |
| | | <if test="weight != null">#{weight},</if> |
| | | <if test="maxScore != null">#{maxScore},</if> |
| | | <if test="auditState != null">#{auditState},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | |
| | | <if test="checkTemplateId != null">check_template_id = #{checkTemplateId},</if> |
| | | <if test="checkRuleId != null">check_rule_id = #{checkRuleId},</if> |
| | | <if test="weight != null">weight = #{weight},</if> |
| | | <if test="maxScore != null">max_score = #{maxScore},</if> |
| | | <if test="auditState != null">audit_state = #{auditState},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | |
| | | #{id} |
| | | </foreach> |
| | | </delete> |
| | | |
| | | <delete id="deleteByTemplateId"> |
| | | delete from t_check_template_rule where check_template_id = #{templateId} |
| | | </delete> |
| | | <select id="selectListByTemplateId" resultType="com.ycl.platform.domain.entity.CheckTemplateRule"> |
| | | select * from t_check_template_rule where check_template_id = #{checkTemplateId} |
| | | </select> |
| | | </mapper> |