You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
108 lines
5.2 KiB
108 lines
5.2 KiB
|
2 months ago
|
<?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.mmxt.business.mapper.MmxtAdminMemberGroupMapper">
|
||
|
|
|
||
|
|
<resultMap type="com.mmxt.business.domain.MmxtAdminMemberGroup" id="AdminMemberGroupResult">
|
||
|
|
<result property="groupId" column="group_id" />
|
||
|
|
<result property="groupTitle" column="group_title" />
|
||
|
|
<result property="creditshigher" column="creditshigher" />
|
||
|
|
<result property="creditslower" column="creditslower" />
|
||
|
|
<result property="remark" column="remark" />
|
||
|
|
<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" />
|
||
|
|
<result property="delFlag" column="del_flag" />
|
||
|
|
</resultMap>
|
||
|
|
|
||
|
|
<sql id="selectAdminMemberGroupVo">
|
||
|
|
select group_id, group_title, creditshigher, creditslower, remark, status, create_by, create_time, update_by, update_time, del_flag from admin_member_group
|
||
|
|
</sql>
|
||
|
|
|
||
|
|
<select id="selectAdminMemberGroupList" parameterType="com.mmxt.business.domain.MmxtAdminMemberGroup" resultMap="AdminMemberGroupResult">
|
||
|
|
<include refid="selectAdminMemberGroupVo"/>
|
||
|
|
<where>
|
||
|
|
del_flag = 0
|
||
|
|
<if test="groupId != null "> and group_id = #{groupId}</if>
|
||
|
|
<if test="groupTitle != null and groupTitle != ''"> and group_title like concat('%', #{groupTitle}, '%')</if>
|
||
|
|
<if test="status != null "> and status = #{status}</if>
|
||
|
|
</where>
|
||
|
|
</select>
|
||
|
|
|
||
|
|
<select id="selectAdminMemberGroupById" parameterType="Integer" resultMap="AdminMemberGroupResult">
|
||
|
|
<include refid="selectAdminMemberGroupVo"/>
|
||
|
|
where group_id = #{groupId}
|
||
|
|
</select>
|
||
|
|
|
||
|
|
<select id="selectGroupIdGroupByIds" parameterType="String" resultType="String">
|
||
|
|
select group_id from admin_member_group where del_flag = 0 and group_id in
|
||
|
|
<foreach item="groupId" collection="array" open="(" separator="," close=")">
|
||
|
|
#{groupId}
|
||
|
|
</foreach>
|
||
|
|
</select>
|
||
|
|
|
||
|
|
<insert id="insertAdminMemberGroup" parameterType="com.mmxt.business.domain.MmxtAdminMemberGroup" useGeneratedKeys="true" keyProperty="groupId">
|
||
|
|
insert into admin_member_group
|
||
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||
|
|
<if test="groupTitle != null and groupTitle != ''">group_title,</if>
|
||
|
|
<if test="creditshigher != null">creditshigher,</if>
|
||
|
|
<if test="creditslower != null">creditslower,</if>
|
||
|
|
<if test="remark != null">remark,</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>
|
||
|
|
del_flag,
|
||
|
|
</trim>
|
||
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||
|
|
<if test="groupTitle != null and groupTitle != ''">#{groupTitle},</if>
|
||
|
|
<if test="creditshigher != null">#{creditshigher},</if>
|
||
|
|
<if test="creditslower != null">#{creditslower},</if>
|
||
|
|
<if test="remark != null">#{remark},</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>
|
||
|
|
0
|
||
|
|
</trim>
|
||
|
|
</insert>
|
||
|
|
|
||
|
|
<update id="updateAdminMemberGroup" parameterType="com.mmxt.business.domain.MmxtAdminMemberGroup">
|
||
|
|
update admin_member_group
|
||
|
|
<trim prefix="SET" suffixOverrides=",">
|
||
|
|
<if test="groupTitle != null and groupTitle != ''">group_title = #{groupTitle},</if>
|
||
|
|
<if test="creditshigher != null">creditshigher = #{creditshigher},</if>
|
||
|
|
<if test="creditslower != null">creditslower = #{creditslower},</if>
|
||
|
|
<if test="remark != null">remark = #{remark},</if>
|
||
|
|
<if test="status != null">status = #{status},</if>
|
||
|
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||
|
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||
|
|
</trim>
|
||
|
|
where group_id = #{groupId}
|
||
|
|
</update>
|
||
|
|
|
||
|
|
<update id="deleteAdminMemberGroupById" parameterType="Integer">
|
||
|
|
update admin_member_group set del_flag = 1 where group_id = #{groupId}
|
||
|
|
</update>
|
||
|
|
|
||
|
|
<update id="deleteAdminMemberGroupByIds" parameterType="String">
|
||
|
|
update admin_member_group set del_flag = 1 where group_id in
|
||
|
|
<foreach item="groupId" collection="array" open="(" separator="," close=")">
|
||
|
|
#{groupId}
|
||
|
|
</foreach>
|
||
|
|
</update>
|
||
|
|
|
||
|
|
<update id="batchChangeStatus" flushCache="true" parameterType="String">
|
||
|
|
update admin_member_group set status = #{status}
|
||
|
|
where group_id in
|
||
|
|
<foreach item="id" collection="id" open="(" separator="," close=")">
|
||
|
|
#{id}
|
||
|
|
</foreach>
|
||
|
|
</update>
|
||
|
|
|
||
|
|
</mapper>
|