|
@@ -5,11 +5,11 @@
|
|
insert into cm_brand_auth (authUserId, authParty, provinceId, cityId, townId, address, lng, lat,
|
|
insert into cm_brand_auth (authUserId, authParty, provinceId, cityId, townId, address, lng, lat,
|
|
mobile, userMobile, firstClubType, secondClubType, medicalLicenseImage, empNum,
|
|
mobile, userMobile, firstClubType, secondClubType, medicalLicenseImage, empNum,
|
|
logo, customFlag, remarks, status, createTime, createBy, createSource, auditBy,
|
|
logo, customFlag, remarks, status, createTime, createBy, createSource, auditBy,
|
|
- auditTime, auditStatus, shopAuditBy, shopAuditTime, shopAuditStatus, delFlag)
|
|
|
|
|
|
+ auditTime, auditStatus, shopAuditBy, shopAuditTime, shopAuditStatus, checkFlag, delFlag)
|
|
values (#{authUserId}, #{authParty}, #{provinceId}, #{cityId}, #{townId}, #{address}, #{lng}, #{lat},
|
|
values (#{authUserId}, #{authParty}, #{provinceId}, #{cityId}, #{townId}, #{address}, #{lng}, #{lat},
|
|
#{mobile}, #{userMobile}, #{firstClubType}, #{secondClubType}, #{medicalLicenseImage}, #{empNum},
|
|
#{mobile}, #{userMobile}, #{firstClubType}, #{secondClubType}, #{medicalLicenseImage}, #{empNum},
|
|
#{logo}, #{customFlag}, #{remarks}, #{status}, NOW(), #{createBy}, #{createSource}, #{auditBy},
|
|
#{logo}, #{customFlag}, #{remarks}, #{status}, NOW(), #{createBy}, #{createSource}, #{auditBy},
|
|
- #{auditTime}, #{auditStatus}, #{shopAuditBy}, #{shopAuditTime}, #{shopAuditStatus}, #{delFlag});
|
|
|
|
|
|
+ #{auditTime}, #{auditStatus}, #{shopAuditBy}, #{shopAuditTime}, #{shopAuditStatus}, #{checkFlag}, #{delFlag});
|
|
</insert>
|
|
</insert>
|
|
<insert id="insertBanner">
|
|
<insert id="insertBanner">
|
|
insert into cm_brand_auth_banner (authId, banner)
|
|
insert into cm_brand_auth_banner (authId, banner)
|
|
@@ -40,7 +40,8 @@
|
|
remarks = #{remarks},
|
|
remarks = #{remarks},
|
|
status = #{status},
|
|
status = #{status},
|
|
auditStatus = #{auditStatus},
|
|
auditStatus = #{auditStatus},
|
|
- shopAuditStatus = #{shopAuditStatus}
|
|
|
|
|
|
+ shopAuditStatus = #{shopAuditStatus},
|
|
|
|
+ checkFlag = #{checkFlag}
|
|
where id = #{id}
|
|
where id = #{id}
|
|
</update>
|
|
</update>
|
|
<update id="updateAuthAuditStatus">
|
|
<update id="updateAuthAuditStatus">
|
|
@@ -79,26 +80,33 @@
|
|
set sendStatus = 1
|
|
set sendStatus = 1
|
|
where id = #{authId}
|
|
where id = #{authId}
|
|
</update>
|
|
</update>
|
|
|
|
+ <update id="checkAuth">
|
|
|
|
+ update cm_brand_auth
|
|
|
|
+ set checkFlag = 1
|
|
|
|
+ where id = #{authId}
|
|
|
|
+ </update>
|
|
<delete id="deleteBanner">
|
|
<delete id="deleteBanner">
|
|
delete from cm_brand_auth_banner where authId = #{authId}
|
|
delete from cm_brand_auth_banner where authId = #{authId}
|
|
</delete>
|
|
</delete>
|
|
<select id="getAuthList" resultType="com.caimei.model.vo.AuthVo">
|
|
<select id="getAuthList" resultType="com.caimei.model.vo.AuthVo">
|
|
select a.id as authId, authParty, cbcu2.mobile, a.status, a.auditStatus, a.shopAuditStatus, a.createTime,
|
|
select a.id as authId, authParty, cbcu2.mobile, a.status, a.auditStatus, a.shopAuditStatus, a.createTime,
|
|
- if(a.createSource = 1,cu.name,cbcu1.mobile) as createBy,au.name as auditBy,a.auditTime,a.invalidReason,
|
|
|
|
- a.sendStatus, 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
|
|
|
|
|
|
+ if(a.createSource = 1,cu.name,cbcu1.mobile) as createBy,au.name as auditBy,a.auditTime,a.invalidReason,
|
|
|
|
+ a.sendStatus, 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
|
|
from cm_brand_auth a
|
|
from cm_brand_auth a
|
|
left join cm_brand_auth_user cu on a.createBy = cu.authUserId
|
|
left join cm_brand_auth_user cu on a.createBy = cu.authUserId
|
|
left join cm_brand_club_user cbcu1 on a.createBy = cbcu1.id
|
|
left join cm_brand_club_user cbcu1 on a.createBy = cbcu1.id
|
|
left join cm_brand_auth_user au on a.auditBy = au.authUserId
|
|
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_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 cm_brand_club_user cbcu2 on a.id = cbcu2.authId and cbcu2.delFlag = 0
|
|
- left join (select authId,count(*) as waitAuditNum from cm_brand_auth_product where auditStatus = 2 and shopAuditStatus = 1 group by
|
|
|
|
- authId) ap on a.id = ap.authId
|
|
|
|
|
|
+ left join (select authId,count(*) as waitAuditNum from cm_brand_auth_product where auditStatus = 2 and
|
|
|
|
+ shopAuditStatus = 1 group by
|
|
|
|
+ authId) ap on a.id = ap.authId
|
|
left join (select authId,count(*) as waitAuditNum from cm_brand_auth_product where shopAuditStatus = 2 group by
|
|
left join (select authId,count(*) as waitAuditNum from cm_brand_auth_product where shopAuditStatus = 2 group by
|
|
- authId) bp on a.id = bp.authId
|
|
|
|
|
|
+ authId) bp on a.id = bp.authId
|
|
where a.authUserId = #{authUserId} and a.delFlag = 0
|
|
where a.authUserId = #{authUserId} and a.delFlag = 0
|
|
<if test="authParty != null and authParty != ''">
|
|
<if test="authParty != null and authParty != ''">
|
|
and a.authParty like CONCAT('%',#{authParty},'%')
|
|
and a.authParty like CONCAT('%',#{authParty},'%')
|