|
@@ -3,26 +3,26 @@
|
|
<mapper namespace="com.gqy.document.mapper.DcSystemMapper">
|
|
<mapper namespace="com.gqy.document.mapper.DcSystemMapper">
|
|
|
|
|
|
<resultMap type="DcSystem" id="DcSystemResult">
|
|
<resultMap type="DcSystem" id="DcSystemResult">
|
|
- <id property="sys_id" column="sys_id" />
|
|
|
|
- <result property="sys_name" column="sys_name" />
|
|
|
|
- <result property="sys_remark" column="sys_remark" />
|
|
|
|
- <result property="sys_products" column="sys_products" />
|
|
|
|
- <result property="user_id" column="user_id" />
|
|
|
|
|
|
+ <id property="sysId" column="sys_id" />
|
|
|
|
+ <result property="sysName" column="sys_name" />
|
|
|
|
+ <result property="sysNo" column="sys_no" />
|
|
|
|
+ <result property="sysRemark" column="sys_remark" />
|
|
|
|
+ <result property="sysProducts" column="sys_products" />
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectDcSystemVo">
|
|
<sql id="selectDcSystemVo">
|
|
- select sys_id, sys_name, sys_remark, sys_products, user_id
|
|
|
|
|
|
+ select sys_id, sys_name, sys_no, sys_remark, sys_products
|
|
from dc_system
|
|
from dc_system
|
|
</sql>
|
|
</sql>
|
|
|
|
|
|
<select id="selectDcSystemList" parameterType="DcSystem" resultMap="DcSystemResult">
|
|
<select id="selectDcSystemList" parameterType="DcSystem" resultMap="DcSystemResult">
|
|
<include refid="selectDcSystemVo"/>
|
|
<include refid="selectDcSystemVo"/>
|
|
<where>
|
|
<where>
|
|
- <if test="sys_name != null and sys_name != ''">
|
|
|
|
- AND sys_name like concat('%', #{sys_name}, '%')
|
|
|
|
|
|
+ <if test="sysName != null and sysName != ''">
|
|
|
|
+ AND sys_name like concat('%', #{sysName}, '%')
|
|
</if>
|
|
</if>
|
|
- <if test="user_id != null">
|
|
|
|
- AND user_id = #{user_id}
|
|
|
|
|
|
+ <if test="sysNo != null and sysNo != ''">
|
|
|
|
+ AND sys_no = #{sysNo}
|
|
</if>
|
|
</if>
|
|
</where>
|
|
</where>
|
|
</select>
|
|
</select>
|
|
@@ -32,29 +32,31 @@
|
|
where sys_id = #{sys_id}
|
|
where sys_id = #{sys_id}
|
|
</select>
|
|
</select>
|
|
|
|
|
|
- <insert id="insertDcSystem" parameterType="DcSystem" useGeneratedKeys="true" keyProperty="sys_id">
|
|
|
|
- insert into dc_system (
|
|
|
|
- <if test="sys_name != null">sys_name,</if>
|
|
|
|
- <if test="sys_remark != null">sys_remark,</if>
|
|
|
|
- <if test="sys_products != null">sys_products,</if>
|
|
|
|
- <if test="user_id != null">user_id</if>
|
|
|
|
- )values(
|
|
|
|
- <if test="sys_name != null">#{sys_name},</if>
|
|
|
|
- <if test="sys_remark != null">#{sys_remark},</if>
|
|
|
|
- <if test="sys_products != null">#{sys_products},</if>
|
|
|
|
- <if test="user_id != null">#{user_id}</if>
|
|
|
|
- )
|
|
|
|
|
|
+ <insert id="insertDcSystem" parameterType="DcSystem" useGeneratedKeys="true" keyProperty="sysId">
|
|
|
|
+ insert into dc_system
|
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
+ <if test="sysName != null">sys_name,</if>
|
|
|
|
+ <if test="sysNo != null">sys_no,</if>
|
|
|
|
+ <if test="sysRemark != null">sys_remark,</if>
|
|
|
|
+ <if test="sysProducts != null">sys_products</if>
|
|
|
|
+ </trim>
|
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
+ <if test="sysName != null">#{sysName},</if>
|
|
|
|
+ <if test="sysNo != null">#{sysNo},</if>
|
|
|
|
+ <if test="sysRemark != null">#{sysRemark},</if>
|
|
|
|
+ <if test="sysProducts != null">#{sysProducts}</if>
|
|
|
|
+ </trim>
|
|
</insert>
|
|
</insert>
|
|
|
|
|
|
<update id="updateDcSystem" parameterType="DcSystem">
|
|
<update id="updateDcSystem" parameterType="DcSystem">
|
|
update dc_system
|
|
update dc_system
|
|
<set>
|
|
<set>
|
|
- <if test="sys_name != null">sys_name = #{sys_name},</if>
|
|
|
|
- <if test="sys_remark != null">sys_remark = #{sys_remark},</if>
|
|
|
|
- <if test="sys_products != null">sys_products = #{sys_products},</if>
|
|
|
|
- <if test="user_id != null">user_id = #{user_id},</if>
|
|
|
|
|
|
+ <if test="sysName != null">sys_name = #{sysName},</if>
|
|
|
|
+ <if test="sysNo != null">sys_no = #{sysNo},</if>
|
|
|
|
+ <if test="sysRemark != null">sys_remark = #{sysRemark},</if>
|
|
|
|
+ <if test="sysProducts != null">sys_products = #{sysProducts}</if>
|
|
</set>
|
|
</set>
|
|
- where sys_id = #{sys_id}
|
|
|
|
|
|
+ where sys_id = #{sysId}
|
|
</update>
|
|
</update>
|
|
|
|
|
|
<delete id="deleteDcSystemById" parameterType="Long">
|
|
<delete id="deleteDcSystemById" parameterType="Long">
|