1234567891011121314151617181920212223242526272829303132 |
- <?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.caimei.mapper.AuthMapper">
- <insert id="insertAuth" >
- insert into cm_brand_auth (authUserId, authParty, status, createTime, createBy)
- values (#{authUserId}, #{authParty}, #{status}, #{createTime}, #{createBy})
- </insert>
- <update id="updateAuthStatusByAuthId">
- update cm_brand_auth
- set status = #{status}
- where id = #{authId}
- </update>
- <update id="updateAuthByAuthId">
- update cm_brand_auth
- set authParty = #{authParty},
- status = #{status}
- where id = #{id}
- </update>
- <delete id="deleteAuthByAuthId">
- delete from cm_brand_auth where id = #{authId}
- </delete>
- <select id="getAuthList" resultType="com.caimei.model.vo.AuthVo">
- select id as authId, authParty, a.status, a.createTime, u.name as createBy
- from cm_brand_auth a
- left join cm_brand_auth_user u on a.createBy = u.authUserId
- where a.authUserId = #{authUserId}
- <if test="authParty != null and authParty != ''">
- and a.authParty like CONCAT('%',#{authParty},'%')
- </if>
- order by a.createTime desc
- </select>
- </mapper>
|