| @@ -37,6 +37,22 @@ public class WxAuthorizerInfo implements Serializable { | |||
| private Integer authorizationStatus; | |||
| @io.swagger.annotations.ApiModelProperty(value="授权时间",name="authTime") | |||
| private Date authTime; | |||
| @io.swagger.annotations.ApiModelProperty(value="微信基础版本设置状态,0为已设置,1为设置失败",name="baseStatus") | |||
| private Integer baseStatus; | |||
| @io.swagger.annotations.ApiModelProperty(value="微信基础版本设置时间",name="baseTime") | |||
| private Date baseTime; | |||
| @io.swagger.annotations.ApiModelProperty(value="微信服务器域名版本设置状态,0为已设置,1为设置失败",name="domainStatus") | |||
| private Integer domainStatus; | |||
| @io.swagger.annotations.ApiModelProperty(value="微信服务器域名版本设置时间",name="domainTime") | |||
| private Date domainTime; | |||
| @io.swagger.annotations.ApiModelProperty(value="微信服务器业务域名版本设置状态,0为已设置,1为设置失败",name="webdomainStatus") | |||
| private Integer webdomainStatus; | |||
| @io.swagger.annotations.ApiModelProperty(value="微信服务器业务域名版本设置时间",name="webdomainTime") | |||
| private Date webdomainTime; | |||
| @io.swagger.annotations.ApiModelProperty(value="微信小程序模板设置状态,0为已设置,1为设置失败",name="templateStatus") | |||
| private Integer templateStatus; | |||
| @io.swagger.annotations.ApiModelProperty(value="微信小程序模板设置时间",name="templateTime") | |||
| private Date templateTime; | |||
| @io.swagger.annotations.ApiModelProperty(value="当前版本",name="currentVersion") | |||
| private String currentVersion; | |||
| @io.swagger.annotations.ApiModelProperty(value="当前版本描述",name="currentDesc") | |||
| @@ -57,6 +73,14 @@ public class WxAuthorizerInfo implements Serializable { | |||
| ,UpdateTime_ASC("`update_time` ASC"),UpdateTime_DESC("`update_time` DESC") | |||
| ,AuthorizationStatus_ASC("`authorization_status` ASC"),AuthorizationStatus_DESC("`authorization_status` DESC") | |||
| ,AuthTime_ASC("`auth_time` ASC"),AuthTime_DESC("`auth_time` DESC") | |||
| ,BaseStatus_ASC("`base_status` ASC"),BaseStatus_DESC("`base_status` DESC") | |||
| ,BaseTime_ASC("`base_time` ASC"),BaseTime_DESC("`base_time` DESC") | |||
| ,DomainStatus_ASC("`domain_status` ASC"),DomainStatus_DESC("`domain_status` DESC") | |||
| ,DomainTime_ASC("`domain_time` ASC"),DomainTime_DESC("`domain_time` DESC") | |||
| ,WebDomainStatus_ASC("`webdomain_status` ASC"),WebDomainStatus_DESC("`webdomain_status` DESC") | |||
| ,WebDomainTime_ASC("`webdomain_time` ASC"),WebDomainTime_DESC("`webdomain_time` DESC") | |||
| ,TemplateStatus_ASC("`template_status` ASC"),TemplateStatus_DESC("`template_status` DESC") | |||
| ,TemplateTime_ASC("`template_time` ASC"),TemplateTime_DESC("`template_time` DESC") | |||
| ,CurrentVersion_ASC("`current_version` ASC"),CurrentVersion_DESC("`current_version` DESC") | |||
| ,CurrentDesc_ASC("`current_desc` ASC"),CurrentDesc_DESC("`current_desc` DESC") | |||
| ,ReleaseTime_ASC("`release_time` ASC"),ReleaseTime_DESC("`release_time` DESC") | |||
| @@ -11,13 +11,23 @@ | |||
| <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" /> | |||
| <result column="authorization_status" jdbcType="INTEGER" property="authorizationStatus" /> | |||
| <result column="auth_time" jdbcType="TIMESTAMP" property="authTime" /> | |||
| <result column="base_status" jdbcType="INTEGER" property="baseStatus" /> | |||
| <result column="base_time" jdbcType="TIMESTAMP" property="baseTime" /> | |||
| <result column="domain_status" jdbcType="INTEGER" property="domainStatus" /> | |||
| <result column="domain_time" jdbcType="TIMESTAMP" property="domainTime" /> | |||
| <result column="webdomain_status" jdbcType="INTEGER" property="webdomainStatus" /> | |||
| <result column="webdomain_time" jdbcType="TIMESTAMP" property="webdomainTime" /> | |||
| <result column="template_status" jdbcType="INTEGER" property="templateStatus" /> | |||
| <result column="template_time" jdbcType="TIMESTAMP" property="templateTime" /> | |||
| <result column="current_version" jdbcType="VARCHAR" property="currentVersion" /> | |||
| <result column="current_desc" jdbcType="VARCHAR" property="currentDesc" /> | |||
| <result column="release_time" jdbcType="TIMESTAMP" property="releaseTime" /> | |||
| </resultMap> | |||
| <sql id="allColumns"> | |||
| `id`,`authorizer_appid`,`head_img`,`alias`,`qrcode_url`,`create_time`,`authorization_status`,`auth_time`,`current_version`,`current_desc`,`release_time` | |||
| `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` | |||
| </sql> | |||
| <sql id="dynamicWhereConditions"> | |||
| @@ -49,6 +59,30 @@ | |||
| <if test=" null != authTime "> | |||
| and `auth_time` = #{authTime} | |||
| </if> | |||
| <if test=" null != baseStatus "> | |||
| and `base_status` = #{baseStatus} | |||
| </if> | |||
| <if test=" null != baseTime "> | |||
| and `base_time` = #{baseTime} | |||
| </if> | |||
| <if test=" null != domainStatus "> | |||
| and `domain_status` = #{domainStatus} | |||
| </if> | |||
| <if test=" null != domainTime "> | |||
| and `domain_time` = #{domainTime} | |||
| </if> | |||
| <if test=" null != webdomainStatus "> | |||
| and `webdomain_status` = #{webdomainStatus} | |||
| </if> | |||
| <if test=" null != webdomainTime "> | |||
| and `webdomain_time` = #{webdomainTime} | |||
| </if> | |||
| <if test=" null != templateStatus "> | |||
| and `template_status` = #{templateStatus} | |||
| </if> | |||
| <if test=" null != templateTime "> | |||
| and `template_time` = #{templateTime} | |||
| </if> | |||
| <if test=" null != currentVersion "> | |||
| and `current_version` = #{currentVersion} | |||
| </if> | |||
| @@ -89,6 +123,14 @@ | |||
| <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" /> | |||
| <result column="authorization_status" jdbcType="INTEGER" property="authorizationStatus" /> | |||
| <result column="auth_time" jdbcType="TIMESTAMP" property="authTime" /> | |||
| <result column="base_status" jdbcType="INTEGER" property="baseStatus" /> | |||
| <result column="base_time" jdbcType="TIMESTAMP" property="baseTime" /> | |||
| <result column="domain_status" jdbcType="INTEGER" property="domainStatus" /> | |||
| <result column="domain_time" jdbcType="TIMESTAMP" property="domainTime" /> | |||
| <result column="webdomain_status" jdbcType="INTEGER" property="webdomainStatus" /> | |||
| <result column="webdomain_time" jdbcType="TIMESTAMP" property="webdomainTime" /> | |||
| <result column="template_status" jdbcType="INTEGER" property="templateStatus" /> | |||
| <result column="template_time" jdbcType="TIMESTAMP" property="templateTime" /> | |||
| <result column="current_version" jdbcType="VARCHAR" property="currentVersion" /> | |||
| <result column="current_desc" jdbcType="VARCHAR" property="currentDesc" /> | |||
| <result column="release_time" jdbcType="TIMESTAMP" property="releaseTime" /> | |||
| @@ -99,6 +141,10 @@ | |||
| <sql id="allVColumns"> | |||
| ai.`id`,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`, | |||
| ai.`webdomain_status`,ai.`webdomain_time`, | |||
| ai.`template_status`,ai.`template_time`, | |||
| ai.`current_version`,ai.`current_desc`,ai.`release_time`, | |||
| a.`type`,a.`name` | |||
| </sql> | |||
| @@ -120,6 +166,33 @@ | |||
| <if test=" null != authorizationStatus "> | |||
| and ai.`authorization_status` = #{authorizationStatus} | |||
| </if> | |||
| <if test=" null != authTime "> | |||
| and ai.`auth_time` = #{authTime} | |||
| </if> | |||
| <if test=" null != baseStatus "> | |||
| and ai.`base_status` = #{baseStatus} | |||
| </if> | |||
| <if test=" null != baseTime "> | |||
| and ai.`base_time` = #{baseTime} | |||
| </if> | |||
| <if test=" null != domainStatus "> | |||
| and ai.`domain_status` = #{domainStatus} | |||
| </if> | |||
| <if test=" null != domainTime "> | |||
| and ai.`domain_time` = #{domainTime} | |||
| </if> | |||
| <if test=" null != webdomainStatus "> | |||
| and ai.`webdomain_status` = #{webdomainStatus} | |||
| </if> | |||
| <if test=" null != webdomainTime "> | |||
| and ai.`webdomain_time` = #{webdomainTime} | |||
| </if> | |||
| <if test=" null != templateStatus "> | |||
| and ai.`template_status` = #{templateStatus} | |||
| </if> | |||
| <if test=" null != templateTime "> | |||
| and ai.`template_time` = #{templateTime} | |||
| </if> | |||
| <if test=" null != currentVersion "> | |||
| and ai.`current_version` = #{currentVersion} | |||
| </if> | |||
| @@ -45,7 +45,7 @@ public class WechatWeappSetController { | |||
| @ApiOperation("获取小程序服务器域名") | |||
| @GetMapping("/getDomain") | |||
| public ResultData modifyDomain(String appId) { | |||
| public ResultData getDomain(String appId) { | |||
| try { | |||
| WxOpenMaService openMaService = openService.getWxOpenComponentService().getWxMaServiceByAppid(appId); | |||
| WxOpenResult openRet = openMaService.getDomain(); | |||
| @@ -53,12 +53,27 @@ public class WechatWeappSetController { | |||
| return new ResultData(openRet); | |||
| } catch (WxErrorException e) { | |||
| logger.error(e.getMessage()); | |||
| return new ResultData(Result.ERROR, e.getMessage()); | |||
| } | |||
| } | |||
| @ApiOperation("获取小程序服务器域名") | |||
| @GetMapping("/getWebDomain") | |||
| public ResultData getWebDomain(String appId) { | |||
| try { | |||
| WxOpenMaService openMaService = openService.getWxOpenComponentService().getWxMaServiceByAppid(appId); | |||
| String openRet = openMaService.getWebViewDomain(); | |||
| logger.info(openRet); | |||
| return new ResultData(openRet); | |||
| } catch (WxErrorException e) { | |||
| logger.error(e.getMessage()); | |||
| return new ResultData(Result.ERROR, e.getMessage()); | |||
| } | |||
| return new ResultData(Result.ERROR); | |||
| } | |||
| @ApiOperation(value = "设置小程序服务器域名", notes = "{\n" + | |||
| " \"action\":\"add\",\n" + | |||
| " \"action\":\"add/set/delete/get\",\n" + | |||
| " \"requestdomain\":[\"https://www.qq.com\",\"https://www.qq.com\"],\n" + | |||
| " \"wsrequestdomain\":[\"wss://www.qq.com\",\"wss://www.qq.com\"],\n" + | |||
| " \"uploaddomain\":[\"https://www.qq.com\",\"https://www.qq.com\"],\n" + | |||
| @@ -82,16 +97,16 @@ public class WechatWeappSetController { | |||
| } | |||
| @ApiOperation(value = "设置小程序业务域名", notes = "{\n" + | |||
| " \"action\":\"add\",\n" + | |||
| " \"action\":\"add/set/delete/get\",\n" + | |||
| " \"webviewdomain\":[\"https://www.qq.com\",\"https://m.qq.com\"]\n" + | |||
| " }") | |||
| @PostMapping("/setWebViewDomain") | |||
| public ResultData setWebViewDomain(String appId, String action, | |||
| @PostMapping("/modifyWebViewDomain") | |||
| public ResultData modifyWebViewDomain(String appId, String action, | |||
| List<String> urlList) { | |||
| try { | |||
| WxOpenMaService openMaService = openService.getWxOpenComponentService().getWxMaServiceByAppid(appId); | |||
| String openRet = openMaService.setWebViewDomain(action, urlList); | |||
| logger.info(openRet.toString()); | |||
| logger.info(openRet); | |||
| return new ResultData(openRet); | |||
| } catch (WxErrorException e) { | |||
| logger.error(e.getMessage()); | |||
| @@ -163,7 +163,7 @@ public class WxWeappInfoController extends BaseController { | |||
| // 设置基础版本 | |||
| openMaService.setSupportVersion(weappBasicSet.getVersion()); | |||
| // 服务器域名 | |||
| String action = "add"; | |||
| String action = "set"; | |||
| JSONObject urlObj = domainObj.getJSONObject("url"); | |||
| List<String> requestDomain = getUrlList(urlObj.getJSONArray("requestdomain")); | |||
| List<String> wsrequestDomain = getUrlList(urlObj.getJSONArray("wsrequestdomain")); | |||