分组管理页面功能修改
This commit is contained in:
@@ -0,0 +1,85 @@
|
||||
<?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.group_management.mapper.BasSheepGroupMapper">
|
||||
|
||||
<resultMap type="BasSheepGroup" id="BasSheepGroupResult">
|
||||
<result property="groupId" column="group_id" />
|
||||
<result property="parentId" column="parent_id" />
|
||||
<result property="groupName" column="group_name" />
|
||||
<result property="ancestors" column="ancestors" />
|
||||
<result property="status" column="status" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBasSheepGroupVo">
|
||||
select group_id, parent_id, group_name, ancestors, status, create_by, create_time, update_by, update_time from bas_sheep_group
|
||||
</sql>
|
||||
|
||||
<select id="selectBasSheepGroupList" parameterType="BasSheepGroup" resultMap="BasSheepGroupResult">
|
||||
<include refid="selectBasSheepGroupVo"/>
|
||||
<where>
|
||||
<if test="groupName != null and groupName != ''"> and group_name like concat('%', #{groupName}, '%')</if>
|
||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectBasSheepGroupByGroupId" parameterType="Long" resultMap="BasSheepGroupResult">
|
||||
<include refid="selectBasSheepGroupVo"/>
|
||||
where group_id = #{groupId}
|
||||
</select>
|
||||
|
||||
<insert id="insertBasSheepGroup" parameterType="BasSheepGroup" useGeneratedKeys="true" keyProperty="groupId">
|
||||
insert into bas_sheep_group
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="parentId != null">parent_id,</if>
|
||||
<if test="groupName != null and groupName != ''">group_name,</if>
|
||||
<if test="ancestors != null">ancestors,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="parentId != null">#{parentId},</if>
|
||||
<if test="groupName != null and groupName != ''">#{groupName},</if>
|
||||
<if test="ancestors != null">#{ancestors},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateBasSheepGroup" parameterType="BasSheepGroup">
|
||||
update bas_sheep_group
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="parentId != null">parent_id = #{parentId},</if>
|
||||
<if test="groupName != null and groupName != ''">group_name = #{groupName},</if>
|
||||
<if test="ancestors != null">ancestors = #{ancestors},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
</trim>
|
||||
where group_id = #{groupId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteBasSheepGroupByGroupId" parameterType="Long">
|
||||
delete from bas_sheep_group where group_id = #{groupId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBasSheepGroupByGroupIds" parameterType="String">
|
||||
delete from bas_sheep_group where group_id in
|
||||
<foreach item="groupId" collection="array" open="(" separator="," close=")">
|
||||
#{groupId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user