AuthMapper.xml 1.1 KB

12345678910111213141516171819202122232425262728
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3. <mapper namespace="com.caimei.mapper.AuthMapper">
  4. <insert id="insertAuth" ></insert>
  5. <update id="updateAuthStatusByAuthId">
  6. update cm_brand_auth
  7. set status = #{status}
  8. where id = #{authId}
  9. </update>
  10. <update id="updateAuthByAuthId">
  11. update cm_brand_auth
  12. set authParty = #{authParty},
  13. status = #{status}
  14. where id = #{authId}
  15. </update>
  16. <delete id="deleteAuthByAuthId">
  17. delete from cm_brand_auth where id = #{authId}
  18. </delete>
  19. <select id="getAuthList" resultType="com.caimei.model.vo.AuthVo">
  20. select id, authParty, a.status, a.createTime, u.name
  21. from cm_brand_auth a
  22. left join cm_brand_auth_user u on a.createBy = u.authUserId
  23. where a.authUserId = #{authUserId}
  24. <if test="authParty != null and authParty != ''">
  25. and a.authParty like CONCAT('%',#{authParty},'%')
  26. </if>
  27. </select>
  28. </mapper>