From a32231db588eb31696ddb9e4267044a1a8a28af6 Mon Sep 17 00:00:00 2001 From: Stormeye Wu Date: Wed, 10 Apr 2019 07:01:07 +0800 Subject: [PATCH] =?UTF-8?q?[=E6=B6=88=E6=81=AF][=E6=96=B0=E5=A2=9E]:?= =?UTF-8?q?=E6=8E=88=E6=9D=83app=E8=A1=A8=E5=A2=9E=E5=8A=A0=E5=AD=97?= =?UTF-8?q?=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../iformall/domain/po/WxAuthorizerInfo.java | 6 + .../com/iformall/domain/vo/WxWeappInfo.java | 8 +- .../mapper/WxAuthorizerInfoMapper.java | 21 +- .../impl/WxCouponOrderServiceImpl.java | 8 +- .../mapper/WxAuthorizerInfoMapper.xml | 216 +++++++++--------- .../mapper/WxComponentVerifyTicketMapper.xml | 74 +++--- 6 files changed, 170 insertions(+), 163 deletions(-) diff --git a/mallinkService/src/main/java/com/iformall/domain/po/WxAuthorizerInfo.java b/mallinkService/src/main/java/com/iformall/domain/po/WxAuthorizerInfo.java index a0169610f..01a03e870 100644 --- a/mallinkService/src/main/java/com/iformall/domain/po/WxAuthorizerInfo.java +++ b/mallinkService/src/main/java/com/iformall/domain/po/WxAuthorizerInfo.java @@ -21,6 +21,10 @@ public class WxAuthorizerInfo implements Serializable { @Transient protected String sortColumns; + @io.swagger.annotations.ApiModelProperty(value="租户ID",name="tenantId") + private String tenantId; + @io.swagger.annotations.ApiModelProperty(value="1B端2C端",name="type") + private Integer type; @io.swagger.annotations.ApiModelProperty(value="授权方appid",name="authorizerAppid") private String authorizerAppid; @io.swagger.annotations.ApiModelProperty(value="授权方头像",name="headImg") @@ -75,6 +79,7 @@ public class WxAuthorizerInfo implements Serializable { public static enum Field { Id_ASC("`id` ASC"),Id_DESC("`id` DESC") + ,TenantId_ASC("`tenant_id` ASC"),TenantId_DESC("`tenant_id` DESC") ,AuthorizerAppid_ASC("`authorizer_appid` ASC"),AuthorizerAppid_DESC("`authorizer_appid` DESC") ,HeadImg_ASC("`head_img` ASC"),HeadImg_DESC("`head_img` DESC") ,Alias_ASC("`alias` ASC"),Alias_DESC("`alias` DESC") @@ -96,6 +101,7 @@ public class WxAuthorizerInfo implements Serializable { ,ReleaseTime_ASC("`release_time` ASC"),ReleaseTime_DESC("`release_time` DESC") ,OpenAppId_ASC("`open_appid` ASC"),OpenAppId_DESC("`open_appid` DESC") ,BindOpenTime_ASC("`bind_open_time` ASC"),BindOpen_DESC("`bind_open_time` DESC") + ,Type_ASC("`type` ASC"),Type_DESC("`type` DESC") ; private String value; Field(String value){ diff --git a/mallinkService/src/main/java/com/iformall/domain/vo/WxWeappInfo.java b/mallinkService/src/main/java/com/iformall/domain/vo/WxWeappInfo.java index c277b12e3..1be27ae9f 100644 --- a/mallinkService/src/main/java/com/iformall/domain/vo/WxWeappInfo.java +++ b/mallinkService/src/main/java/com/iformall/domain/vo/WxWeappInfo.java @@ -11,16 +11,14 @@ import java.util.List; @EqualsAndHashCode(callSuper = true) public class WxWeappInfo extends WxAuthorizerInfo { - @io.swagger.annotations.ApiModelProperty(value="租户ID",name="tenantId") - private String tenantId; - @io.swagger.annotations.ApiModelProperty(value="小程序类型(1-B端 2-C端 3-服务号 4-订阅号)",name="type") - private Integer type; @io.swagger.annotations.ApiModelProperty(value="小程序名称",name="name") private String name; public static enum Field { Id_ASC("ai.`id` ASC"),Id_DESC("ai.`id` DESC") + ,TenantID_ASC("ai.`tenant_id` ASC"),TenantID_DESC("ai.`tenant_id` DESC") + ,Type_ASC("ai.`type` ASC"),Type_DESC("ai.`type` DESC") ,AuthorizerAppid_ASC("ai.`authorizer_appid` ASC"),AuthorizerAppid_DESC("ai.`authorizer_appid` DESC") ,HeadImg_ASC("ai.`head_img` ASC"),HeadImg_DESC("ai.`head_img` DESC") ,Alias_ASC("ai.`alias` ASC"),Alias_DESC("ai.`alias` DESC") @@ -43,8 +41,6 @@ public class WxWeappInfo extends WxAuthorizerInfo { ,OpenAppid_ASC("ai.`open_appid` ASC"),OpenAppid_DESC("ai.`open_appid` DESC") ,BindOpenTime_ASC("ai.`bind_open_time` ASC"),BindOpenTime_DESC("ai.`bind_open_time` DESC") ,Name_ASC("a.`name` ASC"),Name_DESC("a.`name` DESC") - ,TenantID_ASC("a.`tenant_id` ASC"),TenantID_DESC("a.`tenant_id` DESC") - ,Type_ASC("a.`type` ASC"),Type_DESC("a.`type` DESC") ; private String value; Field(String value){ diff --git a/mallinkService/src/main/java/com/iformall/mapper/WxAuthorizerInfoMapper.java b/mallinkService/src/main/java/com/iformall/mapper/WxAuthorizerInfoMapper.java index 2ffbe185a..d14770682 100644 --- a/mallinkService/src/main/java/com/iformall/mapper/WxAuthorizerInfoMapper.java +++ b/mallinkService/src/main/java/com/iformall/mapper/WxAuthorizerInfoMapper.java @@ -9,25 +9,20 @@ public interface WxAuthorizerInfoMapper extends CommonMapper findList(WxAuthorizerInfo wxAuthorizerInfo); - List findWeappList(); - - List findWxMpList(); - - List findVoList(WxWeappInfo wxWeappInfo); - - WxWeappInfo findVo(WxWeappInfo wxWeappInfo); - - WxWeappInfo findMp(WxWeappInfo wxWeappInfo); + WxAuthorizerInfo findMp(WxAuthorizerInfo wxAuthorizerInfo); int updateReleaseInfo(WxAuthorizerInfo wxAuthorizerInfo); int updateRefreshToken(WxAuthorizerInfo wxAuthorizerInfo); int updateAccessToken(WxAuthorizerInfo wxAuthorizerInfo); - - - - + List findWeappList(); + + List findWxMpList(); + + List findVoList(WxWeappInfo wxWeappInfo); + + WxWeappInfo findVo(WxWeappInfo wxWeappInfo); } diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxCouponOrderServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxCouponOrderServiceImpl.java index c199d569e..486316e98 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxCouponOrderServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxCouponOrderServiceImpl.java @@ -649,10 +649,10 @@ public class WxCouponOrderServiceImpl implements WxCouponOrderService { // 可能未关注公众号, 用户可能收不到 // 8. 微信小程序-统一消息 // 获取小程序关联的服务号 - WxWeappInfo weappInfoQ = new WxWeappInfo(); - weappInfoQ.setAuthorizerAppid(user.getAppId()); - weappInfoQ.setTenantId(user.getTenantId()); - WxWeappInfo weappInfo = authorizerInfoMapper.findMp(weappInfoQ); + WxAuthorizerInfo authQ = new WxAuthorizerInfo(); + authQ.setAuthorizerAppid(user.getAppId()); + authQ.setTenantId(user.getTenantId()); + WxAuthorizerInfo weappInfo = authorizerInfoMapper.findMp(authQ); if(weappInfo != null) { AppUniformMsg appUniformMsg = new AppUniformMsg(); appUniformMsg.setMsgType(EnumMsgRecordType.SMART_APP_UNIFORM.getCode()); diff --git a/mallinkService/src/main/resources/mapper/WxAuthorizerInfoMapper.xml b/mallinkService/src/main/resources/mapper/WxAuthorizerInfoMapper.xml index 8394b673d..9f98496e0 100644 --- a/mallinkService/src/main/resources/mapper/WxAuthorizerInfoMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxAuthorizerInfoMapper.xml @@ -1,68 +1,76 @@ - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + - - - - `id`,`authorizer_appid`,`head_img`,`alias`,`qrcode_url`,`create_time`,`authorization_status`,`auth_time`, + + + + `id`,`tenant_id`,`type`,`authorizer_appid`,`head_img`,`alias`,`qrcode_url`,`create_time`,`authorization_status`,`auth_time`, `base_status`, `base_time`, `domain_status`, `domain_time`, `webdomain_status`, `webdomain_time`, `template_status`, `template_time`, `current_version`,`current_desc`,`release_time`, `open_appid`,`bind_open_time`,`refresh_token`, `access_token`,`access_token_expire` - - where 1 = 1 - - and `id` = #{id} - - - and `authorizer_appid` = #{authorizerAppid} - - - and `head_img` like concat('%', #{headImg},'%') - - - and `alias` like concat('%', #{alias},'%') - - - and `qrcode_url` like concat('%', #{qrcodeUrl},'%') - - - and `create_time` = #{createTime} - + + where 1 = 1 + + and `id` = #{id} + + + and `tenant_id` = #{tenantId} + + + and `type` = #{type} + + + and `authorizer_appid` = #{authorizerAppid} + + + and `head_img` like concat('%', #{headImg},'%') + + + and `alias` like concat('%', #{alias},'%') + + + and `qrcode_url` like concat('%', #{qrcodeUrl},'%') + + + and `create_time` = #{createTime} + and `update_time` = #{updateTime} - - and `authorization_status` = #{authorizationStatus} - + + and `authorization_status` = #{authorizationStatus} + and `auth_time` = #{authTime} @@ -94,7 +102,7 @@ and `current_version` = #{currentVersion} - and `current_desc` like concat('%', #{currentDesc},'%') + and `current_desc` like concat('%', #{currentDesc},'%') and `release_time` = #{releaseTime} @@ -105,23 +113,23 @@ and `bind_open_time` = #{bindOpenTime} - - and id in - - #{idItem} - - - order by ${sortColumns} - - - select from wx_authorizer_info - - + + - + update wx_authorizer_info set `current_version` = #{currentVersion}, `current_desc` = #{currentDesc}, `release_time` = #{releaseTime}, `update_time` = #{updateTime} where `authorizer_appid` = #{authorizerAppid} @@ -139,36 +147,44 @@ where `authorizer_appid` = #{authorizerAppid} + + - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + - ai.`id`,ai.`authorizer_appid`,ai.`head_img`,ai.`alias`,ai.`qrcode_url`,ai.`create_time`,ai.`update_time`, + ai.`id`,ai.`tenant_id`,ai.`type`,ai.`authorizer_appid`,ai.`head_img`,ai.`alias`,ai.`qrcode_url`,ai.`create_time`,ai.`update_time`, ai.`authorization_status`,ai.`auth_time`, ai.`base_status`,ai.`base_time`, ai.`domain_status`,ai.`domain_time`, @@ -176,7 +192,7 @@ ai.`template_status`,ai.`template_time`, ai.`current_version`,ai.`current_desc`,ai.`release_time`, ai.`open_appid`,ai.`bind_open_time`, - a.`tenant_id`,a.`type`,a.`name` + a.`name` @@ -187,8 +203,11 @@ and a.`name` like concat('%', #{name},'%') + + and ai.`tenant_id` = #{tenantId} + - and a.`type` = #{type} + and ai.`type` = #{type} and ai.`authorizer_appid` = #{authorizerAppid} @@ -235,7 +254,7 @@ #{idItem} - order by ${sortColumns} + order by ${sortColumns} - - diff --git a/mallinkService/src/main/resources/mapper/WxComponentVerifyTicketMapper.xml b/mallinkService/src/main/resources/mapper/WxComponentVerifyTicketMapper.xml index f25026f5d..527580cfd 100644 --- a/mallinkService/src/main/resources/mapper/WxComponentVerifyTicketMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxComponentVerifyTicketMapper.xml @@ -1,52 +1,52 @@ - - - - - - + + + + + + - - - + + + `id`,`component_appid`,`component_verify_ticket`,`create_time`,`deadline` - - where 1 = 1 - - and `id` = #{id} - - + + where 1 = 1 + + and `id` = #{id} + + and `component_appid` = #{componentAppid} - - - and `component_verify_ticket` like concat('%', #{componentVerifyTicket},'%') - - - and `create_time` = #{createTime} - - - and `deadline` = #{deadline} - - - and id in - - #{idItem} - - - order by ${sortColumns} - - - select from wx_component_verify_ticket - - + + update wx_component_verify_ticket