File was renamed from ycl-server/src/main/resources/mapper/zgyw/DefaultScoreMapper.xml |
| | |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ycl.platform.mapper.DefaultScoreMapper"> |
| | | |
| | | <resultMap type="com.ycl.platform.domain.entity.DefaultScore" id="DefaultScoreResult"> |
| | | |
| | | <resultMap type="com.ycl.platform.domain.entity.ContractScore" id="DefaultScoreResult"> |
| | | <result property="id" column="id" /> |
| | | <result property="publishId" column="publish_id" /> |
| | | <result property="templateId" column="template_id" /> |
| | |
| | | </resultMap> |
| | | |
| | | <sql id="selectDefaultScoreVo"> |
| | | select id, publish_id, template_id, num, score, create_user, create_user_name, update_user, update_user_name, create_time, update_time from t_default_score |
| | | select id, publish_id, template_id, num, score, create_user, create_user_name, update_user, update_user_name, create_time, update_time from t_contract_score |
| | | </sql> |
| | | |
| | | <select id="selectDefaultScoreList" resultMap="DefaultScoreResult"> |
| | | <include refid="selectDefaultScoreVo"/> |
| | | <where> |
| | | <where> |
| | | <if test="publishId != null "> and publish_id = #{publishId}</if> |
| | | <if test="templateId != null "> and template_id = #{templateId}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | |
| | | <select id="selectDefaultScoreById" resultMap="DefaultScoreResult"> |
| | | <include refid="selectDefaultScoreVo"/> |
| | | where id = #{id} |
| | | </select> |
| | | |
| | | |
| | | <insert id="insertDefaultScore" useGeneratedKeys="true" keyProperty="id"> |
| | | insert into t_default_score |
| | | insert into t_contract_score |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="publishId != null">publish_id,</if> |
| | | <if test="templateId != null">template_id,</if> |
| | |
| | | </insert> |
| | | |
| | | <update id="updateDefaultScore"> |
| | | update t_default_score |
| | | update t_contract_score |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="publishId != null">publish_id = #{publishId},</if> |
| | | <if test="templateId != null">template_id = #{templateId},</if> |
| | |
| | | </update> |
| | | |
| | | <delete id="deleteDefaultScoreById"> |
| | | delete from t_default_score where id = #{id} |
| | | delete from t_contract_score where id = #{id} |
| | | </delete> |
| | | |
| | | <delete id="deleteDefaultScoreByIds"> |
| | | delete from t_default_score where id in |
| | | delete from t_contract_score where id in |
| | | <foreach item="id" collection="array" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </delete> |
| | | </mapper> |
| | | </mapper> |