修改分组管理页面,新增羊只分组页面
This commit is contained in:
@@ -0,0 +1,61 @@
|
||||
<?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">
|
||||
<mapper namespace="com.zhyc.module.fileManagement.mapper.BasSheepGroupMappingMapper">
|
||||
|
||||
<resultMap type="BasSheepGroupMapping" id="BasSheepGroupMappingResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="sheepId" column="sheep_id" />
|
||||
<result property="groupId" column="group_id" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBasSheepGroupMappingVo">
|
||||
select id, sheep_id, group_id from bas_sheep_group_mapping
|
||||
</sql>
|
||||
|
||||
<select id="selectBasSheepGroupMappingList" parameterType="BasSheepGroupMapping" resultMap="BasSheepGroupMappingResult">
|
||||
<include refid="selectBasSheepGroupMappingVo"/>
|
||||
<where>
|
||||
<if test="sheepId != null "> and sheep_id = #{sheepId}</if>
|
||||
<if test="groupId != null "> and group_id = #{groupId}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectBasSheepGroupMappingById" parameterType="Long" resultMap="BasSheepGroupMappingResult">
|
||||
<include refid="selectBasSheepGroupMappingVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertBasSheepGroupMapping" parameterType="BasSheepGroupMapping" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into bas_sheep_group_mapping
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="sheepId != null">sheep_id,</if>
|
||||
<if test="groupId != null">group_id,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="sheepId != null">#{sheepId},</if>
|
||||
<if test="groupId != null">#{groupId},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateBasSheepGroupMapping" parameterType="BasSheepGroupMapping">
|
||||
update bas_sheep_group_mapping
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="sheepId != null">sheep_id = #{sheepId},</if>
|
||||
<if test="groupId != null">group_id = #{groupId},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteBasSheepGroupMappingById" parameterType="Long">
|
||||
delete from bas_sheep_group_mapping where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBasSheepGroupMappingByIds" parameterType="String">
|
||||
delete from bas_sheep_group_mapping where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user