123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633 |
- <?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.cmMapper.AuthMapper">
- <insert id="insertAuth" keyColumn="id" keyProperty="id" useGeneratedKeys="true"
- parameterType="com.caimei.model.po.CmBrandAuthPo">
- insert into cm_brand_auth (authUserId, authParty, provinceId, cityId, townId, address, lng, lat,
- mobile, userMobile, linkMan, linkMobile, firstClubType, secondClubType,
- medicalLicenseImage, empNum,
- logo, customFlag, remarks, authCode, authDate, authImageLogo, authImage,
- authImageType, status, createTime, createBy, createSource, auditBy,
- auditTime, auditStatus, shopAuditBy, shopAuditTime, shopAuditStatus, checkFlag,
- delFlag)
- values (#{authUserId}, #{authParty}, #{provinceId}, #{cityId}, #{townId}, #{address}, #{lng}, #{lat},
- #{mobile}, #{userMobile}, #{linkMan}, #{linkMobile}, #{firstClubType}, #{secondClubType},
- #{medicalLicenseImage}, #{empNum},
- #{logo}, #{customFlag}, #{remarks}, #{authCode}, #{authDate}, #{authImageLogo}, #{authImage},
- #{authImageType}, #{status}, NOW(), #{createBy}, #{createSource}, #{auditBy},
- #{auditTime}, #{auditStatus}, #{shopAuditBy}, #{shopAuditTime}, #{shopAuditStatus}, #{checkFlag},
- #{delFlag})
- </insert>
- <insert id="insertBanner">
- insert into cm_brand_auth_banner (authId, banner)
- VALUES (#{authId}, #{banner})
- </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},
- provinceId = #{provinceId},
- cityId = #{cityId},
- townId = #{townId},
- address = #{address},
- lng = #{lng},
- lat = #{lat},
- mobile = #{mobile},
- userMobile = #{userMobile},
- linkMan = #{linkMan},
- linkMobile = #{linkMobile},
- firstClubType = #{firstClubType},
- secondClubType = #{secondClubType},
- medicalLicenseImage = #{medicalLicenseImage},
- empNum = #{empNum},
- logo = #{logo},
- customFlag = #{customFlag},
- remarks = #{remarks},
- authCode = #{authCode},
- authDate = #{authDate},
- authImageLogo = #{authImageLogo},
- authImage = #{authImage},
- authImageType = #{authImageType},
- status = #{status},
- auditStatus = #{auditStatus},
- shopAuditStatus = #{shopAuditStatus},
- checkFlag = #{checkFlag},
- relationId = #{relationId},
- relationName = #{relationName}
- where id = #{id}
- </update>
- <update id="updateAuthAuditStatus">
- update cm_brand_auth
- set status = #{status},
- auditStatus = #{auditStatus},
- invalidReason = #{invalidReason},
- auditBy = #{auditBy},
- auditTime = #{auditTime}
- where id = #{authId}
- </update>
- <update id="deleteAuthByAuthId">
- update cm_brand_auth
- set delFlag = 1
- where id = #{authId}
- </update>
- <update id="updateLdmLatestClubId">
- update ldm_latest_club_id
- set ldmClubId = #{ldmLatestClubId}
- where id = 1;
- </update>
- <update id="updateRemarks">
- update cm_brand_auth
- set customFlag = 1,
- remarks = #{remarks}
- where id = #{authId}
- </update>
- <update id="updateAuthShopAuditStatus">
- update cm_brand_auth
- set shopAuditStatus = #{shopAuditStatus},
- status = #{status},
- auditStatus = #{shopAuditStatus},
- shopInvalidReason = #{shopInvalidReason},
- shopAuditBy = #{shopAuditBy},
- shopAuditTime = #{shopAuditTime}
- where id = #{authId}
- </update>
- <update id="updateSendStatus">
- update cm_brand_auth
- set sendStatus = 1
- where id = #{authId}
- </update>
- <update id="updateAuthImage">
- update cm_brand_auth
- set authImage = #{authImage},
- pcAuthImage = #{pcAuthImage},
- appletsAuthImage = #{appletsAuthImage}
- where id = #{id}
- </update>
- <update id="checkAuth">
- update cm_brand_auth
- set checkFlag = 1
- where id = #{authId}
- </update>
- <update id="starAuth">
- update cm_brand_auth
- set starFlag = #{starFlag},
- <choose>
- <when test="starNum != null and starNum != ''">
- starNum=#{starNum}
- </when>
- <otherwise>
- starNum=null
- </otherwise>
- </choose>
- where id = #{authId}
- </update>
- <update id="addScanCount">
- update cm_brand_auth
- set scanCount = scanCount + 1
- where id = #{authId}
- </update>
- <delete id="deleteBanner">
- delete
- from cm_brand_auth_banner
- where authId = #{authId}
- </delete>
- <select id="getAuthList" resultType="com.caimei.model.vo.AuthVo">
- select a.id as authId, a.authUserId, authParty, cbcu2.mobile, a.status, a.auditStatus, a.shopAuditStatus,
- a.createTime,
- if(a.createSource = 1,ifnull(cu.loginAccount, cu.name),cbcu1.mobile) as createBy,ifnull(au.loginAccount,au.name)
- as auditBy,a.auditTime,a.invalidReason,
- ifnull(a.shopInvalidReason, a.invalidReason) as shopInvalidReason,
- a.sendStatus, ifnull(au1.loginAccount,au1.name) as shopAuditBy,a.shopAuditTime,
- ifnull(ap.waitAuditNum,0) as waitAuditNum,
- ifnull(bp.waitAuditNum,0) as shopWaitAuditNum,
- if(ifnull(ap.waitAuditNum,0)>0,0,1) as lowerAuditStatus,
- a.checkFlag,a.starFlag,a.scanCount,ifnull(cp.productNum,0) as productNum
- from cm_brand_auth a
- left join cm_brand_auth_user cu on a.createBy = cu.authUserId
- left join cm_brand_club_user cbcu1 on a.createBy = cbcu1.id and cbcu1.delFlag = 0
- left join cm_brand_auth_user au on a.auditBy = au.authUserId
- left join cm_brand_auth_user au1 on a.shopAuditBy = au1.authUserId
- left join cm_brand_club_user cbcu2 on a.id = cbcu2.authId and cbcu2.delFlag = 0
- left join (select r.authId,count(*) as waitAuditNum from cm_brand_auth_product p
- left join cm_brand_product_relation r on p.id = r.productId
- where auditStatus = 2 and shopAuditStatus = 1 group by r.authId) ap on a.id = ap.authId
- left join (select r.authId,count(*) as waitAuditNum from cm_brand_auth_product p
- left join cm_brand_product_relation r on p.id = r.productId
- where shopAuditStatus = 2 group by r.authId) bp on a.id = bp.authId
- left join (select r.authId,count(*) as productNum from cm_brand_auth_product p
- left join cm_brand_product_relation r on p.id = r.productId and p.shopAuditStatus = 1 group by r.authId) cp
- on a.id = cp.authId
- where a.authUserId = #{authUserId} and a.delFlag = 0
- <if test="authParty != null and authParty != ''">
- and a.authParty like CONCAT('%',#{authParty},'%')
- </if>
- <if test="status != null">
- and a.status = #{status}
- </if>
- <if test="starFlag != null">
- and a.starFlag = #{starFlag}
- </if>
- <if test="auditStatus != null">
- and a.auditStatus = #{auditStatus}
- </if>
- <if test="1 == listType or 2 == listType">
- and a.shopAuditStatus = 1
- </if>
- <if test="mobile != null and mobile != ''">
- and cbcu2.mobile like concat('%', #{mobile},'%')
- </if>
- <if test="4 == listType">
- and a.auditStatus = 1
- </if>
- <if test="shopAuditStatus != null">
- <if test="0 == shopAuditStatus">
- and (a.shopAuditStatus = 2 or (a.shopAuditStatus = 1 and ifnull(bp.waitAuditNum,0) > 0))
- </if>
- <if test="1 == shopAuditStatus">
- and (a.shopAuditStatus = 0 or (a.shopAuditStatus = 1 and ifnull(bp.waitAuditNum,0) = 0))
- </if>
- </if>
- <if test="sendStatus != null">
- <if test="0 == sendStatus">
- and a.sendStatus != 1
- </if>
- <if test="1 == sendStatus">
- and a.sendStatus = 1
- </if>
- </if>
- <if test="lowerAuditStatus != null">
- <if test="0 == lowerAuditStatus">
- and ifnull(ap.waitAuditNum,0) > 0
- </if>
- <if test="1 == lowerAuditStatus">
- and ifnull(ap.waitAuditNum,0) = 0
- </if>
- </if>
- <choose>
- <when test="listType == 2">
- order by (case a.auditStatus when 2 then 2 when 0 then 1 else 0 end) desc,waitAuditNum desc,
- a.createTime desc
- </when>
- <when test="listType == 3">
- order by (case a.shopAuditStatus when 2 then 2 when 0 then 1 else 0 end) desc,shopWaitAuditNum desc,
- a.createTime desc
- </when>
- <otherwise>
- order by a.createTime desc, a.id desc
- </otherwise>
- </choose>
- </select>
- <select id="getAuthListAll" resultType="com.caimei.model.vo.AuthVo">
- select DISTINCT a.id as authId, a.authUserId, authParty, cbcu2.mobile, a.status, a.auditStatus, a.shopAuditStatus,
- a.createTime,
- if(a.createSource = 1,ifnull(cu.loginAccount, cu.name),cbcu1.mobile) as createBy,ifnull(au.loginAccount,au.name)
- as auditBy,a.auditTime,a.invalidReason,
- ifnull(a.shopInvalidReason, a.invalidReason) as shopInvalidReason,
- a.sendStatus, ifnull(au1.loginAccount,au1.name) as shopAuditBy,a.shopAuditTime,
- ifnull(ap.waitAuditNum,0) as waitAuditNum,
- ifnull(bp.waitAuditNum,0) as shopWaitAuditNum,
- if(ifnull(ap.waitAuditNum,0)>0,0,1) as lowerAuditStatus,
- a.checkFlag,a.starFlag,a.scanCount,ifnull(cp.productNum,0) as productNum,
- a.starNum,a.relationId,a.relationName
- from cm_brand_auth a
- left join cm_brand_auth_user cu on a.createBy = cu.authUserId
- left join cm_brand_club_user cbcu1 on a.createBy = cbcu1.id and cbcu1.delFlag = 0
- left join cm_brand_auth_user au on a.auditBy = au.authUserId
- left join cm_brand_auth_user au1 on a.shopAuditBy = au1.authUserId
- left join cm_brand_club_user cbcu2 on a.id = cbcu2.authId and cbcu2.delFlag = 0
- left join (select r.authId,p.name,p.snCode,count(*) as waitAuditNum from cm_brand_auth_product p
- left join cm_brand_product_relation r on p.id = r.productId
- where auditStatus = 2 and shopAuditStatus = 1 group by r.authId) ap on a.id = ap.authId
- left join (select r.authId,count(*) as waitAuditNum from cm_brand_auth_product p
- left join cm_brand_product_relation r on p.id = r.productId
- where shopAuditStatus = 2 group by r.authId) bp on a.id = bp.authId
- left join (select r.authId,count(*) as productNum from cm_brand_auth_product p
- left join cm_brand_product_relation r on p.id = r.productId and p.shopAuditStatus = 1 group by r.authId) cp
- on a.id = cp.authId
- LEFT JOIN (SELECT
- r.authId,
- if(p.name IS NULL,t.name,p.name) as productName,
- p.snCode
- FROM
- cm_brand_auth_product p
- LEFT JOIN cm_brand_product_relation r ON p.id = r.productId
- LEFT JOIN cm_brand_auth aw on aw.id=r.authId
- LEFT JOIN cm_brand_product_type t on p.productTypeId = t.id and t.delFlag = 0
- where p.shopAuditStatus=1
- ) dp on a.id = dp.authId
- where a.authUserId = #{authUserId} and a.delFlag = 0
- <if test="authParty != null and authParty != ''">
- and a.authParty like CONCAT('%',#{authParty},'%')
- </if>
- <if test="status != null">
- and a.status = #{status}
- </if>
- <if test="starFlag != null">
- and a.starFlag = #{starFlag}
- </if>
- <if test="auditStatus != null">
- and a.auditStatus = #{auditStatus}
- </if>
- <if test="name != null and name != ''">
- and dp.productName = #{name}
- </if>
- <if test="snCode != null and snCode != ''">
- and dp.snCode = #{snCode}
- </if>
- <if test="1 == listType or 2 == listType">
- and a.shopAuditStatus = 1
- </if>
- <if test="mobile != null and mobile != ''">
- and cbcu2.mobile like concat('%', #{mobile},'%')
- </if>
- <if test="4 == listType">
- and a.auditStatus = 1
- </if>
- <if test="shopAuditStatus != null">
- <if test="0 == shopAuditStatus">
- and (a.shopAuditStatus = 2 or (a.shopAuditStatus = 1 and ifnull(bp.waitAuditNum,0) > 0))
- </if>
- <if test="1 == shopAuditStatus">
- and (a.shopAuditStatus = 0 or (a.shopAuditStatus = 1 and ifnull(bp.waitAuditNum,0) = 0))
- </if>
- </if>
- <if test="sendStatus != null">
- <if test="0 == sendStatus">
- and a.sendStatus != 1
- </if>
- <if test="1 == sendStatus">
- and a.sendStatus = 1
- </if>
- </if>
- <if test="lowerAuditStatus != null">
- <if test="0 == lowerAuditStatus">
- and ifnull(ap.waitAuditNum,0) > 0
- </if>
- <if test="1 == lowerAuditStatus">
- and ifnull(ap.waitAuditNum,0) = 0
- </if>
- </if>
- <choose>
- <when test="listType == 2">
- order by (case a.auditStatus when 2 then 2 when 0 then 1 else 0 end) desc,waitAuditNum desc,
- a.createTime desc
- </when>
- <when test="listType == 3">
- order by (case a.shopAuditStatus when 2 then 2 when 0 then 1 else 0 end) desc,shopWaitAuditNum desc,
- a.createTime desc
- </when>
- <otherwise>
- order by a.starNum is null, a.starNum*1,a.createTime desc, a.id desc
- </otherwise>
- </choose>
- </select>
- <select id="getProductWaitAuditNum" resultType="java.lang.Integer">
- select count(*)
- from cm_brand_auth_product p
- left join cm_brand_product_relation r on p.id = r.productId
- where r.authId = #{authId}
- and p.auditStatus = 2
- </select>
- <select id="getClubStatus" resultType="java.lang.Integer">
- select status
- from cm_brand_auth
- where id = #{authId}
- </select>
- <select id="getAuthIdByAuthParty" resultType="java.lang.Integer">
- select id
- from cm_brand_auth
- where authParty = #{authParty}
- and authUserId = #{authUserId}
- and delFlag = 0
- </select>
- <select id="getAuthPartyList" resultType="com.caimei.model.vo.AuthFormVo">
- select authParty,
- concat(ifnull(p.name, ''), '/', ifnull(c.name, ''), '/', ifnull(t.name, '')) as area,
- address,
- concat(lng, ',', lat) as lngAndLat,
- mobile,
- authCode,
- authDate,
- empNum,
- if(customFlag = 1, remarks, '') as remarks
- from cm_brand_auth a
- left join province p on a.provinceId = p.provinceID
- left join city c on a.cityId = c.cityID
- left join town t on a.townId = t.townID
- where a.delFlag = 0
- and find_in_set(a.id, #{authIds})
- order by createTime desc
- </select>
- <select id="getBannerList" resultType="java.lang.String">
- select banner
- from cm_brand_auth_banner
- where authId = #{authId}
- </select>
- <select id="getLdmData" resultType="com.caimei.model.po.LdmDataPo">
- select name as authParty,
- if(status = 1, 1, 0) as status,
- if(status = 1, 1, 0) as auditStatus,
- tel as mobile,
- addr as address,
- pic1,
- pic2,
- pic3,
- pic4,
- pic5,
- du as lngAndLat,
- if(deleted_at is null, 0, 1) as delFlag,
- regId1,
- regId2,
- regId3
- from nissan_ht_alcohol;
- </select>
- <select id="getProvinceId" resultType="java.lang.Integer">
- select provinceID
- from province
- where name like
- concat(#{provinceName}, '%') limit 1;
- </select>
- <select id="getCityId" resultType="java.lang.Integer">
- select cityID
- from city
- where name like
- concat(#{cityName}, '%') limit 1;
- </select>
- <select id="getTownId" resultType="java.lang.Integer">
- select townID
- from town
- where name like
- concat(#{townName}, '%') limit 1;
- </select>
- <select id="getLdmLatestClubId" resultType="java.lang.Integer">
- select ldmClubId
- from ldm_latest_club_id
- where id = 1;
- </select>
- <select id="getCityIdByTownId" resultType="java.lang.Integer">
- select cityID
- from town
- where townID = #{townId}
- </select>
- <select id="getProvinceName" resultType="java.lang.String">
- select name
- from nissan_base_region1
- where code = #{regId1}
- and level = 0 limit 1
- </select>
- <select id="getCityName" resultType="java.lang.String">
- select name
- from nissan_base_region1
- where code = #{regId1}
- and level = 1 limit 1
- </select>
- <select id="getTownName" resultType="java.lang.String">
- select name
- from nissan_base_region1
- where code = #{regId1}
- and level = 2 limit 1
- </select>
- <select id="getTownList" resultType="com.caimei.model.po.TownPo">
- select townID as townId, cityID as cityId
- from town
- where name like
- concat(#{townName}, '%');
- </select>
- <select id="getProvinceIdByCityId" resultType="java.lang.Integer">
- select provinceID
- from city
- where cityID = #{cityId}
- </select>
- <select id="getAuthBaseInfo" resultType="com.caimei.model.vo.AuthFormVo">
- select a.id as authId, authParty, auditStatus, shopAuditStatus,if(u.id is null,0,1) as bindStatus
- from cm_brand_auth a
- left join cm_brand_club_user u on a.id = u.authId and u.delFlag = 0
- <where>
- a.delFlag = 0
- <if test="authUserId != null">
- and a.authUserId = #{authUserId}
- </if>
- <if test="authId != null">
- and a.id = #{authId}
- </if>
- </where>
- </select>
- <select id="getAuthById" resultType="com.caimei.model.vo.AuthVo">
- select id as authId,
- a.authUserId,
- authParty,
- a.status,
- a.auditStatus,
- a.createTime,
- cu.name as createBy,
- ifnull(au.loginAccount, au.name) as auditBy,
- a.auditTime,
- a.invalidReason
- from cm_brand_auth a
- left join cm_brand_auth_user cu on a.createBy = cu.authUserId
- left join cm_brand_auth_user au on a.auditBy = au.authUserId
- where a.delFlag = 0
- and a.id = #{authId}
- </select>
- <select id="getAuthFormById" resultType="com.caimei.model.vo.AuthFormVo">
- select id as authId,
- authParty,
- authUserId,
- a.provinceId,
- a.cityId,
- a.townId,
- concat(ifnull(p.name, ''), '/', ifnull(c.name, ''), '/', ifnull(t.name, '')) as area,
- address,
- lng,
- lat,
- mobile,
- userMobile,
- linkMan,
- linkMobile,
- firstClubType,
- secondClubType,
- medicalLicenseImage,
- empNum,
- logo,
- customFlag,
- remarks,
- authCode,
- authDate,
- authImageLogo,
- authImage,
- authImageType,
- status,
- auditStatus,
- relationId,
- relationName,
- if(shopAuditStatus = 0, shopInvalidReason, invalidReason) as invalidReason
- from cm_brand_auth a
- left join province p on a.provinceId = p.provinceID
- left join city c on a.cityId = c.cityID
- left join town t on a.townId = t.townID
- where id = #{authId}
- and a.delFlag = 0
- </select>
- <select id="getTownNames" resultType="java.lang.String">
- select name
- from town
- </select>
- <select id="getProvinceNames" resultType="java.lang.String">
- SELECT NAME
- FROM province
- </select>
- <select id="getCityNames" resultType="java.lang.String">
- select name from city
- <if test="ProvinceId !=null">
- where provinceID = #{ProvinceId}
- </if>
- </select>
- <select id="getCityIdByProvinceId" resultType="java.lang.Integer">
- select cityId from city
- where name like concat(#{cityName},'%')
- <if test="provinceId !=null">
- and provinceID = #{provinceId}
- </if>
- limit 1
- </select>
- <select id="getProvinceNameById" resultType="java.lang.String">
- select name
- from province
- where provinceID = #{provinceId}
- </select>
- <select id="getCityNameByCityId" resultType="java.lang.String">
- select name
- from city
- where cityID = #{cityId}
- </select>
- <select id="getTownNameById" resultType="java.lang.String">
- select name
- from town
- where townID = #{townId}
- </select>
- <select id="getAuthByNameAndAddress" resultType="com.caimei.model.vo.AuthVo">
- select id as authId
- from cm_brand_auth
- where authParty like concat('%', #{authParty}, '%')
- and address like concat('%', #{address}, '%')
- and delFlag = 0
- </select>
- <select id="getAdminUserId" resultType="java.lang.Integer">
- select authUserId
- from cm_brand_auth_user
- where userIdentity = 1 limit 1
- </select>
- <select id="getAuthTemplate" resultType="com.caimei.model.vo.TemplateVo">
- select at.id as templateId, templateImage, qrPosition, qrSize
- from cm_brand_auth_template at
- left join cm_brand_auth a on at.authUserId = a.authUserId and a.delFlag = 0
- where at.status = 1
- <if test="templateType == 1">
- and at.authFlag = 1
- </if>
- <if test="templateType == 2">
- and at.productFlag = 1
- </if>
- <if test="authId != null">
- and a.id = #{authId}
- </if>
- <if test="authUserId != null">
- and at.authUserId = #{authUserId}
- </if>
- limit 1
- </select>
- <select id="getAllAuth" resultType="com.caimei.model.po.CmBrandAuthPo">
- select id, authUserId, authImageType, authCode, authDate, authImageLogo
- from cm_brand_auth
- where authUserId = #{authUserId}
- and delFlag = 0
- </select>
- <select id="getAuthIdList" resultType="com.caimei.model.vo.AuthFormVo">
- select id as authId,authParty from cm_brand_auth where
- id in
- <foreach collection="relationIdList" open="(" separator="," close=")" item="reId">
- #{reId,jdbcType=VARCHAR}
- </foreach>
- </select>
- <select id="getRelationgInfo" resultType="com.caimei.model.vo.AuthFormVo">
- select relationId, relationName
- from cm_brand_auth
- where authUserId = #{authUserId}
- and id = #{authId}
- and delFlag = 0
- </select>
- <select id="getClubBindAuth" resultType="com.caimei.model.vo.AuthFormVo">
- select au.id as authId,au.authParty
- from cm_brand_auth au
- where au.id not in (
- select cu.authId
- from cm_brand_auth a
- left join cm_brand_club_user cu on cu.authId = a.id
- where cu.authUserId = #{authUserId}
- and cu.delFlag = 0
- and (a.id is null || a.delFlag = 0))
- and au.delFlag = 0 and au.authUserId = #{authUserId}
- </select>
- <select id="getRelationgList" resultType="com.caimei.model.vo.ProductFormVo">
- select DISTINCT r.authId as relationId
- from cm_brand_product_relation r
- LEFT JOIN cm_brand_auth_product a on r.productId = a.id
- where snCode =#{snCode}
- </select>
- </mapper>
|