From 30da7c72b6af61f4beab0f37cb41dc94df06ef9b Mon Sep 17 00:00:00 2001 From: Stormeye Wu Date: Mon, 1 Apr 2019 09:23:02 +0800 Subject: [PATCH] =?UTF-8?q?[user=E5=90=88=E5=B9=B6][=E6=96=B0=E5=A2=9E]:?= =?UTF-8?q?=E7=AC=AC=E4=B8=89=E6=96=B9=E5=B9=B3=E5=8F=B0code=E5=90=88?= =?UTF-8?q?=E5=B9=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../iformall/domain/po/WxAuthorizerInfo.java | 6 + .../domain/po/WxComponentVerifyTicket.java | 10 +- .../com/iformall/domain/po/WxPayAccount.java | 20 ++- .../domain/po/WxWeappAuditStatus.java | 3 + .../iformall/domain/po/WxWeappCodeStatus.java | 10 +- .../domain/po/WxWeappReleaseStatus.java | 3 + .../com/iformall/mapper/WxCUserMapper.java | 2 + .../mapper/WxAuthorizerInfoMapper.xml | 52 ++++++-- .../mapper/WxComponentVerifyTicketMapper.xml | 22 +-- .../resources/mapper/WxTemplateMsgMapper.xml | 114 ++++++++-------- .../mapper/WxWeappAuditStatusMapper.xml | 126 ++++++++++-------- .../mapper/WxWeappBasicSetMapper.xml | 88 ++++++------ .../mapper/WxWeappCodeStatusMapper.xml | 121 +++++++++-------- .../resources/mapper/WxWeappExtSetMapper.xml | 92 +++++++------ .../mapper/WxWeappReleaseStatusMapper.xml | 123 +++++++++-------- 15 files changed, 437 insertions(+), 355 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 dad1ab0bd..a0169610f 100644 --- a/mallinkService/src/main/java/com/iformall/domain/po/WxAuthorizerInfo.java +++ b/mallinkService/src/main/java/com/iformall/domain/po/WxAuthorizerInfo.java @@ -63,6 +63,12 @@ public class WxAuthorizerInfo implements Serializable { private String openAppid; @io.swagger.annotations.ApiModelProperty(value="绑定开发平台时间",name="bindOpenTime") private Date bindOpenTime; + @io.swagger.annotations.ApiModelProperty(value="refresh_token",name="refreshToken") + private String refreshToken; + @io.swagger.annotations.ApiModelProperty(value="access_token",name="accessToken") + private String accessToken; + @io.swagger.annotations.ApiModelProperty(value="accessToken过期时间",name="accessTokenExpire") + private Date accessTokenExpire; diff --git a/mallinkService/src/main/java/com/iformall/domain/po/WxComponentVerifyTicket.java b/mallinkService/src/main/java/com/iformall/domain/po/WxComponentVerifyTicket.java index f31a85f7f..2f470bc74 100644 --- a/mallinkService/src/main/java/com/iformall/domain/po/WxComponentVerifyTicket.java +++ b/mallinkService/src/main/java/com/iformall/domain/po/WxComponentVerifyTicket.java @@ -20,19 +20,19 @@ public class WxComponentVerifyTicket implements Serializable { protected List ids; @Transient protected String sortColumns; - - /**微信第三方componentAppid*/ + @io.swagger.annotations.ApiModelProperty(value="微信第三方componentAppid",name="componentAppid") private String componentAppid; - /**微信第三方component_verify_ticket*/ @io.swagger.annotations.ApiModelProperty(value="微信第三方component_verify_ticket",name="componentVerifyTicket") private String componentVerifyTicket; - /**创建时间*/ @io.swagger.annotations.ApiModelProperty(value="创建时间",name="createTime") private Date createTime; - /**失效时间*/ @io.swagger.annotations.ApiModelProperty(value="失效时间",name="deadline") private Date deadline; + @io.swagger.annotations.ApiModelProperty(value="access_token",name="accessToken") + private String accessToken; + @io.swagger.annotations.ApiModelProperty(value="access_token过期时间",name="accessTokenExpire") + private Date accessTokenExpire; diff --git a/mallinkService/src/main/java/com/iformall/domain/po/WxPayAccount.java b/mallinkService/src/main/java/com/iformall/domain/po/WxPayAccount.java index 7629bffe3..47b0df4c1 100644 --- a/mallinkService/src/main/java/com/iformall/domain/po/WxPayAccount.java +++ b/mallinkService/src/main/java/com/iformall/domain/po/WxPayAccount.java @@ -48,6 +48,9 @@ public class WxPayAccount implements Serializable { /**微信服务商号*/ @io.swagger.annotations.ApiModelProperty(value="微信服务商号",name="subMchId") private String subMchId; + + @io.swagger.annotations.ApiModelProperty(value="微信服务商号",name="parentMchId") + private String parentMchId; /**支付密钥**/ @io.swagger.annotations.ApiModelProperty(value="支付密钥",name="apiKey") private String apiKey; @@ -90,7 +93,15 @@ public class WxPayAccount implements Serializable { this.subMchId = subMchId; } - public String getApiKey() { + public String getParentMchId() { + return parentMchId; + } + + public void setParentMchId(String parentMchId) { + this.parentMchId = parentMchId; + } + + public String getApiKey() { return apiKey; } public void setApiKey(String _apiKey) { @@ -111,9 +122,10 @@ public class WxPayAccount implements Serializable { public Integer getType() { return type; } - public void setType(Integer type) { - this.type = type; - } + + public void setType(Integer type) { + this.type = type; + } public Integer getShare() { return share; } diff --git a/mallinkService/src/main/java/com/iformall/domain/po/WxWeappAuditStatus.java b/mallinkService/src/main/java/com/iformall/domain/po/WxWeappAuditStatus.java index d36400456..3fab9ff8f 100644 --- a/mallinkService/src/main/java/com/iformall/domain/po/WxWeappAuditStatus.java +++ b/mallinkService/src/main/java/com/iformall/domain/po/WxWeappAuditStatus.java @@ -23,6 +23,8 @@ public class WxWeappAuditStatus implements Serializable { @Transient protected String sortColumns; + @io.swagger.annotations.ApiModelProperty(value="租户ID",name="tenantId") + private String tenantId; @io.swagger.annotations.ApiModelProperty(value="小程序ID",name="appId") private String appId; @io.swagger.annotations.ApiModelProperty(value="小程序类型(1-B端 2-C端)",name="type") @@ -43,6 +45,7 @@ public class WxWeappAuditStatus implements Serializable { public static enum Field { Id_ASC("`id` ASC"),Id_DESC("`id` DESC") + ,TenantId_ASC("`tenant_id` ASC"),TenantId_DESC("`tenant_id` DESC") ,AppId_ASC("`app_id` ASC"),AppId_DESC("`app_id` DESC") ,Type_ASC("`type` ASC"),Type_DESC("`type` DESC") ,UserVersion_ASC("`user_version` ASC"),UserVersion_DESC("`user_version` DESC") diff --git a/mallinkService/src/main/java/com/iformall/domain/po/WxWeappCodeStatus.java b/mallinkService/src/main/java/com/iformall/domain/po/WxWeappCodeStatus.java index 0ad54b1f6..86800b39c 100644 --- a/mallinkService/src/main/java/com/iformall/domain/po/WxWeappCodeStatus.java +++ b/mallinkService/src/main/java/com/iformall/domain/po/WxWeappCodeStatus.java @@ -23,29 +23,27 @@ public class WxWeappCodeStatus implements Serializable { @Transient protected String sortColumns; - /**小程序ID*/ + @io.swagger.annotations.ApiModelProperty(value="租户ID",name="tenantId") + private String tenantId; @io.swagger.annotations.ApiModelProperty(value="小程序ID",name="appId") private String appId; - /**小程序类型(1-B端 2-C端)*/ - @io.swagger.annotations.ApiModelProperty(value="小程序类型(1-B端 2-C端)",name="type") + @io.swagger.annotations.ApiModelProperty(value="小程序类型(1-B端 2-C端 3-公众服务号 4-公众订阅号)",name="type") private Integer type; - /**用户版本*/ @io.swagger.annotations.ApiModelProperty(value="用户版本",name="userVersion") private String userVersion; @io.swagger.annotations.ApiModelProperty(value="用户版本描述",name="versionDesc") private String versionDesc; - /**code提交状态*/ @io.swagger.annotations.ApiModelProperty(value="code提交状态(0:成功, 1:失败)",name="codeStatus") private Integer codeStatus; @io.swagger.annotations.ApiModelProperty(value="code提交错误码",name="codeErrCode") private String codeErrCode; - /**更新时间*/ @io.swagger.annotations.ApiModelProperty(value="code提交时间",name="codeTime") private Date codeTime; public static enum Field { Id_ASC("`id` ASC"),Id_DESC("`id` DESC") + ,TenantId_ASC("`tenant_id` ASC"),TenantId_DESC("`tenant_id` DESC") ,AppId_ASC("`app_id` ASC"),AppId_DESC("`app_id` DESC") ,Type_ASC("`type` ASC"),Type_DESC("`type` DESC") ,UserVersion_ASC("`user_version` ASC"),UserVersion_DESC("`user_version` DESC") diff --git a/mallinkService/src/main/java/com/iformall/domain/po/WxWeappReleaseStatus.java b/mallinkService/src/main/java/com/iformall/domain/po/WxWeappReleaseStatus.java index a3d5fe1ce..44a607b97 100644 --- a/mallinkService/src/main/java/com/iformall/domain/po/WxWeappReleaseStatus.java +++ b/mallinkService/src/main/java/com/iformall/domain/po/WxWeappReleaseStatus.java @@ -23,6 +23,8 @@ public class WxWeappReleaseStatus implements Serializable { @Transient protected String sortColumns; + @io.swagger.annotations.ApiModelProperty(value="租户ID",name="tenantId") + private String tenantId; @io.swagger.annotations.ApiModelProperty(value="小程序ID",name="appId") private String appId; @io.swagger.annotations.ApiModelProperty(value="小程序类型(1-B端 2-C端)",name="type") @@ -41,6 +43,7 @@ public class WxWeappReleaseStatus implements Serializable { public static enum Field { Id_ASC("`id` ASC"),Id_DESC("`id` DESC") + ,TenantId_ASC("`tenant_id` ASC"),TenantId_DESC("`tenant_id` DESC") ,AppId_ASC("`app_id` ASC"),AppId_DESC("`app_id` DESC") ,Type_ASC("`type` ASC"),Type_DESC("`type` DESC") ,UserVersion_ASC("`user_version` ASC"),UserVersion_DESC("`user_version` DESC") diff --git a/mallinkService/src/main/java/com/iformall/mapper/WxCUserMapper.java b/mallinkService/src/main/java/com/iformall/mapper/WxCUserMapper.java index 00fe3c653..ff4f07394 100644 --- a/mallinkService/src/main/java/com/iformall/mapper/WxCUserMapper.java +++ b/mallinkService/src/main/java/com/iformall/mapper/WxCUserMapper.java @@ -15,6 +15,8 @@ public interface WxCUserMapper extends CommonMapper { WxCUser findByOpenId(WxCUser record); + WxCUser findByUnionId(WxCUser record); + WxCUser findByToken(String token); long findCount(WxCUserBasicInfoDto dto); diff --git a/mallinkService/src/main/resources/mapper/WxAuthorizerInfoMapper.xml b/mallinkService/src/main/resources/mapper/WxAuthorizerInfoMapper.xml index 95ac1376b..f2c6efed2 100644 --- a/mallinkService/src/main/resources/mapper/WxAuthorizerInfoMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxAuthorizerInfoMapper.xml @@ -24,13 +24,17 @@ + + + `id`,`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` + `open_appid`,`bind_open_time`,`refresh_token`, + `access_token`,`access_token_expire` @@ -111,7 +115,9 @@ @@ -121,6 +127,18 @@ where `authorizer_appid` = #{authorizerAppid} + + update wx_authorizer_info + set `refresh_token` = #{refreshToken} + where `authorizer_appid` = #{authorizerAppid} + + + + update wx_authorizer_info + set `access_token` = #{accessToken}, `access_token_expire` = #{accessTokenExpire} + where `authorizer_appid` = #{authorizerAppid} + + @@ -144,6 +162,7 @@ + @@ -157,7 +176,7 @@ ai.`template_status`,ai.`template_time`, ai.`current_version`,ai.`current_desc`,ai.`release_time`, ai.`open_appid`,ai.`bind_open_time`, - a.`type`,a.`name` + a.`tenant_id`,a.`type`,a.`name` @@ -220,15 +239,28 @@ - - - - - - + + + + + + diff --git a/mallinkService/src/main/resources/mapper/WxComponentVerifyTicketMapper.xml b/mallinkService/src/main/resources/mapper/WxComponentVerifyTicketMapper.xml index 0d014429b..f25026f5d 100644 --- a/mallinkService/src/main/resources/mapper/WxComponentVerifyTicketMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxComponentVerifyTicketMapper.xml @@ -7,6 +7,8 @@ + + @@ -19,7 +21,7 @@ and `id` = #{id} - and `component_appid` like concat('%', #{componentAppid},'%') + and `component_appid` = #{componentAppid} and `component_verify_ticket` like concat('%', #{componentVerifyTicket},'%') @@ -40,13 +42,17 @@ - - - - - - + + + update wx_component_verify_ticket + set `access_token` = #{accessToken}, `access_token_expire` = #{accessTokenExpire} + where component_appid = #{componentAppid} + + + diff --git a/mallinkService/src/main/resources/mapper/WxTemplateMsgMapper.xml b/mallinkService/src/main/resources/mapper/WxTemplateMsgMapper.xml index 35266adc9..a41090437 100644 --- a/mallinkService/src/main/resources/mapper/WxTemplateMsgMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxTemplateMsgMapper.xml @@ -1,68 +1,60 @@ - - - - - - - - - - + + + + + + + + + + `id`,`tenant_id`,`template_id`,`type`,`create_date`,`update_date` - - where 1 = 1 - - - and `id` = #{id} - - - - - and `tenant_id` = #{tenantId} - - - - - and `template_id` like concat('%', #{templateId},'%') - - - - - and `type` = #{type} - - - - - and `create_date` = #{createDate} - - - - - and `update_date` = #{updateDate} - - - - and id in - - #{idItem} - - - order by ${sortColumns} - - - - - - - - - + + where 1 = 1 + + + and `id` = #{id} + + + + and `tenant_id` = #{tenantId} + + + + and `template_id` = #{templateId} + + + + and `type` = #{type} + + + + and `create_date` = #{createDate} + + + + and `update_date` = #{updateDate} + + + and id in + + #{idItem} + + + order by ${sortColumns} + + + + + diff --git a/mallinkService/src/main/resources/mapper/WxWeappAuditStatusMapper.xml b/mallinkService/src/main/resources/mapper/WxWeappAuditStatusMapper.xml index 5c7ad98a0..3a1787619 100644 --- a/mallinkService/src/main/resources/mapper/WxWeappAuditStatusMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxWeappAuditStatusMapper.xml @@ -1,33 +1,37 @@ - - - - - - - - - - - - - - `id`,`app_id`,`type`,`user_version`,`version_desc`, `audit_status`,`audit_err_code`,`audit_time` + + + + + + + + + + + + + + + `id`,`tenant_id`,`app_id`,`type`,`user_version`,`version_desc`, `audit_status`,`audit_err_code`,`audit_time` - - where 1 = 1 - - and `id` = #{id} - - - and `app_id` = #{appId} - - - and `type` = #{type} - + + where 1 = 1 + + and `id` = #{id} + + + and `tenant_id` = #{tenantId} + + + and `app_id` = #{appId} + + + and `type` = #{type} + and `user_version` = #{userVersion} @@ -37,32 +41,33 @@ and `audit_status` = #{auditStatus} - - and `audit_time` = #{auditTime} - - - and id in - - #{idItem} - - - order by ${sortColumns} - - - + + and `audit_time` = #{auditTime} + + + and id in + + #{idItem} + + + order by ${sortColumns} + + + - + update wx_weapp_audit_status set `user_version` = #{userVersion}, `version_desc` = #{versionDesc}, `audit_status` = #{auditStatus}, `audit_err_code` = #{auditErrCode}, `audit_time` = #{auditTime} where `app_id` = #{appId} and `type` = #{type} - select user_version as version from wx_weapp_audit_status where 1=1 @@ -76,19 +81,20 @@ - - - - - - - - - + + + + + + + + + + - c.`id`,c.`app_id`,c.`type`,c.`user_version`,`version_desc`, + c.`id`,c.`tenant_id`,c.`app_id`,c.`type`,c.`user_version`,`version_desc`, c.`audit_status`,c.`audit_err_code`,c.`audit_time`, a.`name` @@ -98,6 +104,9 @@ and c.`id` = #{id} + + and c.`tenant_id` = #{tenantId} + and c.`app_id` = #{appId} @@ -122,14 +131,15 @@ #{idItem} - order by ${sortColumns} + order by ${sortColumns} - + diff --git a/mallinkService/src/main/resources/mapper/WxWeappBasicSetMapper.xml b/mallinkService/src/main/resources/mapper/WxWeappBasicSetMapper.xml index 50b757ae1..fdaf5d380 100644 --- a/mallinkService/src/main/resources/mapper/WxWeappBasicSetMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxWeappBasicSetMapper.xml @@ -1,55 +1,53 @@ - - - - - - - - - - - - + + + + + + + + + + + + `id`,`type`,`domain_url`,`version`,`template_info`,`create_date`,`update_date` - - where 1 = 1 - - and `id` = #{id} - - - and `type` = #{type} - + + where 1 = 1 + + and `id` = #{id} + + + and `type` = #{type} + and `deploy` = #{deploy} - - and `create_date` = #{createDate} - - - and `update_date` = #{updateDate} - - - and id in - - #{idItem} - - - order by ${sortColumns} - - - - - - - - - + + and `create_date` = #{createDate} + + + and `update_date` = #{updateDate} + + + and id in + + #{idItem} + + + order by ${sortColumns} + + + + + diff --git a/mallinkService/src/main/resources/mapper/WxWeappCodeStatusMapper.xml b/mallinkService/src/main/resources/mapper/WxWeappCodeStatusMapper.xml index 6612bad85..bcd8f1f71 100644 --- a/mallinkService/src/main/resources/mapper/WxWeappCodeStatusMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxWeappCodeStatusMapper.xml @@ -1,63 +1,69 @@ - - - - - - - - - - - - - `id`,`app_id`,`type`,`user_version`,`version_desc`,`code_status`,`code_err_code`,`code_time` + + + + + + + + + + + + + + `id`,`tenant_id`,`app_id`,`type`,`user_version`,`version_desc`,`code_status`,`code_err_code`,`code_time` - - where 1 = 1 - - and `id` = #{id} - - - and `app_id` = #{appId} - - - and `type` = #{type} - + + where 1 = 1 + + and `id` = #{id} + + + and `tenant_id` = #{tenantId} + + + and `app_id` = #{appId} + + + and `type` = #{type} + and `user_version` = #{userVersion} and `code_status` = #{codeStatus} - - and `code_time` = #{codeTime} - - - and id in - - #{idItem} - - - order by ${sortColumns} - - - + + and `code_time` = #{codeTime} + + + and id in + + #{idItem} + + + order by ${sortColumns} + + + - + update wx_weapp_code_status set `user_version` = #{userVersion}, `version_desc`= #{versionDesc}, `code_status` = #{codeStatus}, `code_err_code` = #{codeErrCode}, `code_time` = #{codeTime} where `app_id` = #{appId} and `type` = #{type} - select user_version as version from wx_weapp_code_status where 1=1 @@ -68,19 +74,20 @@ - - - - - - - - - + + + + + + + + + + - c.`id`,c.`app_id`,c.`type`,c.`user_version`,c.`version_desc`,c.`code_status`,c.`code_err_code`,c.`code_time`, a.`name` + c.`id`,c.`tenant_id`,c.`app_id`,c.`type`,c.`user_version`,c.`version_desc`,c.`code_status`,c.`code_err_code`,c.`code_time`, a.`name` @@ -88,6 +95,9 @@ and c.`id` = #{id} + + and c.`tenant_id` = #{tenantId} + and c.`app_id` = #{appId} @@ -109,13 +119,14 @@ #{idItem} - order by ${sortColumns} + order by ${sortColumns} diff --git a/mallinkService/src/main/resources/mapper/WxWeappExtSetMapper.xml b/mallinkService/src/main/resources/mapper/WxWeappExtSetMapper.xml index 71de37b6a..700b10a6a 100644 --- a/mallinkService/src/main/resources/mapper/WxWeappExtSetMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxWeappExtSetMapper.xml @@ -1,54 +1,52 @@ - - - - - - - - - - - + + + + + + + + + + + `id`,`app_id`,`type`,`ext_json`,`release_json`,`create_date`,`update_date` - - where 1 = 1 - - and `id` = #{id} - - - and `app_id` = #{appId} - - - and `type` = #{type} - - - and `create_date` = #{createDate} - - - and `update_date` = #{updateDate} - - - and id in - - #{idItem} - - - order by ${sortColumns} - - - - - - - - - + + where 1 = 1 + + and `id` = #{id} + + + and `app_id` = #{appId} + + + and `type` = #{type} + + + and `create_date` = #{createDate} + + + and `update_date` = #{updateDate} + + + and id in + + #{idItem} + + + order by ${sortColumns} + + + + + diff --git a/mallinkService/src/main/resources/mapper/WxWeappReleaseStatusMapper.xml b/mallinkService/src/main/resources/mapper/WxWeappReleaseStatusMapper.xml index f615331aa..35a407192 100644 --- a/mallinkService/src/main/resources/mapper/WxWeappReleaseStatusMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxWeappReleaseStatusMapper.xml @@ -1,63 +1,69 @@ - - - - - - - - - - - - - `id`,`app_id`,`type`,`user_version`,`version_desc`,`release_status`,`release_err_code`,`release_time` + + + + + + + + + + + + + + `id`,`tenant_id`,`app_id`,`type`,`user_version`,`version_desc`,`release_status`,`release_err_code`,`release_time` - - where 1 = 1 - - and `id` = #{id} - - - and `app_id` = #{appId} - - - and `type` = #{type} - + + where 1 = 1 + + and `id` = #{id} + + + and `tenant_id` = #{tenantId} + + + and `app_id` = #{appId} + + + and `type` = #{type} + and `user_version` = #{userVersion} and `release_status` = #{releaseStatus} - - and `release_time` = #{releaseTime} - - - and id in - - #{idItem} - - - order by ${sortColumns} - - - + + and `release_time` = #{releaseTime} + + + and id in + + #{idItem} + + + order by ${sortColumns} + + + - + update wx_weapp_release_status set `user_version` = #{userVersion}, `version_desc` = #{versionDesc}, `release_status` = #{releaseStatus}, `release_err_code` = #{releaseErrCode}, `release_time` = #{releaseTime} where `app_id` = #{appId} and `type` = #{type} - select user_version as version from wx_weapp_release_status where 1 = 1 @@ -68,19 +74,20 @@ - - - - - - - - - + + + + + + + + + + - c.`id`,c.`app_id`,c.`type`,c.`user_version`,c.`version_desc`, + c.`id`,c.`tenant_id`,c.`app_id`,c.`type`,c.`user_version`,c.`version_desc`, c.`release_status`,c.`release_err_code`,c.`release_time`, a.`name` @@ -90,6 +97,9 @@ and c.`id` = #{id} + + and `tenant_id` = #{tenantId} + and c.`app_id` = #{appId} @@ -114,14 +124,15 @@ #{idItem} - order by ${sortColumns} + order by ${sortColumns} - +