|
|
|
@ -1,29 +1,51 @@
|
|
|
|
|
<?xml version="1.0" encoding="UTF-8" ?>
|
|
|
|
|
<!DOCTYPE mapper
|
|
|
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
|
|
<mapper namespace="com.ruoyi.tcZz.mapper.TcCyMapper">
|
|
|
|
|
|
|
|
|
|
<resultMap type="TcCy" id="TcCyResult">
|
|
|
|
|
<result property="id" column="id" />
|
|
|
|
|
<result property="cyName" column="cy_name" />
|
|
|
|
|
<result property="cyCount" column="cy_count" />
|
|
|
|
|
<result property="createBy" column="create_by" />
|
|
|
|
|
<result property="createTime" column="create_time" />
|
|
|
|
|
<result property="updateBy" column="update_by" />
|
|
|
|
|
<result property="updateTime" column="update_time" />
|
|
|
|
|
<result property="remark" column="remark" />
|
|
|
|
|
<result property="id" column="id"/>
|
|
|
|
|
<result property="cyName" column="cy_name"/>
|
|
|
|
|
<result property="cyCount" column="cy_count"/>
|
|
|
|
|
<result property="createBy" column="create_by"/>
|
|
|
|
|
<result property="createTime" column="create_time"/>
|
|
|
|
|
<result property="updateBy" column="update_by"/>
|
|
|
|
|
<result property="updateTime" column="update_time"/>
|
|
|
|
|
<result property="remark" column="remark"/>
|
|
|
|
|
<result property="areaId" column="area_id"/>
|
|
|
|
|
|
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
<sql id="selectTcCyVo">
|
|
|
|
|
select id, cy_name, cy_count, create_by, create_time, update_by, update_time, remark from tc_cy
|
|
|
|
|
select id,
|
|
|
|
|
area_id,
|
|
|
|
|
cy_name,
|
|
|
|
|
cy_count,
|
|
|
|
|
create_by,
|
|
|
|
|
create_time,
|
|
|
|
|
update_by,
|
|
|
|
|
update_time,
|
|
|
|
|
remark
|
|
|
|
|
from tc_cy
|
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
<select id="selectTcCyList" parameterType="TcCy" resultMap="TcCyResult">
|
|
|
|
|
<include refid="selectTcCyVo"/>
|
|
|
|
|
<where>
|
|
|
|
|
<if test="cyName != null and cyName != ''"> and cy_name like concat('%', #{cyName}, '%')</if>
|
|
|
|
|
<if test="cyCount != null "> and cy_count = #{cyCount}</if>
|
|
|
|
|
<if test="id != null ">and id = #{id}</if>
|
|
|
|
|
<if test="areaId != null ">and area_id = #{areaId}</if>
|
|
|
|
|
<if test="cyName != null and cyName != ''">and cy_name like concat('%', #{cyName}, '%')</if>
|
|
|
|
|
<if test="cyCount != null ">and cy_count = #{cyCount}</if>
|
|
|
|
|
<if test="createBy != null and createBy != ''">and create_by = #{createBy}</if>
|
|
|
|
|
<if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''">
|
|
|
|
|
and create_time between #{params.beginCreateTime} and #{params.endCreateTime}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="updateBy != null and updateBy != ''">and update_by = #{updateBy}</if>
|
|
|
|
|
<if test="params.beginUpdateTime != null and params.beginUpdateTime != '' and params.endUpdateTime != null and params.endUpdateTime != ''">
|
|
|
|
|
and update_time between #{params.beginUpdateTime} and #{params.endUpdateTime}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="remark != null and remark != ''">and remark = #{remark}</if>
|
|
|
|
|
</where>
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
@ -42,6 +64,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<if test="updateBy != null">update_by,</if>
|
|
|
|
|
<if test="updateTime != null">update_time,</if>
|
|
|
|
|
<if test="remark != null">remark,</if>
|
|
|
|
|
<if test="areaId != null">area_id,</if>
|
|
|
|
|
</trim>
|
|
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
|
<if test="cyName != null">#{cyName},</if>
|
|
|
|
@ -51,6 +74,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<if test="updateBy != null">#{updateBy},</if>
|
|
|
|
|
<if test="updateTime != null">#{updateTime},</if>
|
|
|
|
|
<if test="remark != null">#{remark},</if>
|
|
|
|
|
<if test="areaId != null">#{areaId},</if>
|
|
|
|
|
</trim>
|
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
@ -64,12 +88,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
|
|
|
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
|
|
|
|
<if test="remark != null">remark = #{remark},</if>
|
|
|
|
|
<if test="areaId != null">area_id = #{areaId},</if>
|
|
|
|
|
</trim>
|
|
|
|
|
where id = #{id}
|
|
|
|
|
</update>
|
|
|
|
|
|
|
|
|
|
<delete id="deleteTcCyById" parameterType="Long">
|
|
|
|
|
delete from tc_cy where id = #{id}
|
|
|
|
|
delete
|
|
|
|
|
from tc_cy
|
|
|
|
|
where id = #{id}
|
|
|
|
|
</delete>
|
|
|
|
|
|
|
|
|
|
<delete id="deleteTcCyByIds" parameterType="String">
|
|
|
|
|