Selaa lähdekoodia

add plat

master
xhxu 3 vuotta sitten
vanhempi
commit
52a2b94cff
4 muutettua tiedostoa jossa 53 lisäystä ja 2 poistoa
  1. +3
    -0
      mallinkService/src/main/java/com/iformall/domain/po/WxAuthorizerInfo.java
  2. +38
    -0
      mallinkService/src/main/java/com/iformall/enums/EnumAppPlat.java
  3. +11
    -2
      mallinkService/src/main/resources/mapper/WxAuthorizerInfoMapper.xml
  4. +1
    -0
      mlWechatOpen/src/main/java/com/iformall/controller/WxWeappInfoController.java

+ 3
- 0
mallinkService/src/main/java/com/iformall/domain/po/WxAuthorizerInfo.java Näytä tiedosto

@@ -76,5 +76,8 @@ public class WxAuthorizerInfo extends BaseEntity {
private String accessToken; private String accessToken;
@io.swagger.annotations.ApiModelProperty(value="accessToken过期时间",name="accessTokenExpire") @io.swagger.annotations.ApiModelProperty(value="accessToken过期时间",name="accessTokenExpire")
private Date accessTokenExpire; private Date accessTokenExpire;

@io.swagger.annotations.ApiModelProperty(value="app平台 EnumAppPlat ",name="plat")
private Integer plat;
} }

+ 38
- 0
mallinkService/src/main/java/com/iformall/enums/EnumAppPlat.java Näytä tiedosto

@@ -0,0 +1,38 @@
package com.iformall.enums;

/**
* app平台
* @author alascor
*/
public enum EnumAppPlat {
WX(1,"微信"),ALI(2,"阿里"),TOUTIAO(3,"头条");
EnumAppPlat(Integer code, String name) {
this.code = code;
this.name = name;
}
private Integer code;
private String name;
public Integer getCode() {
return code;
}
public void setCode(Integer code) {
this.code = code;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public static EnumAppPlat getByCode(Integer code) {
for (EnumAppPlat e : EnumAppPlat.values()) {
if (e.getCode().intValue() == code.intValue()) {
return e;
}
}
return null;
}
}

+ 11
- 2
mallinkService/src/main/resources/mapper/WxAuthorizerInfoMapper.xml Näytä tiedosto

@@ -31,6 +31,8 @@
<result column="refresh_token" jdbcType="VARCHAR" property="refreshToken"/> <result column="refresh_token" jdbcType="VARCHAR" property="refreshToken"/>
<result column="access_token" jdbcType="VARCHAR" property="accessToken"/> <result column="access_token" jdbcType="VARCHAR" property="accessToken"/>
<result column="access_token_expire" jdbcType="TIMESTAMP" property="accessTokenExpire"/> <result column="access_token_expire" jdbcType="TIMESTAMP" property="accessTokenExpire"/>

<result column="plat" jdbcType="INTEGER" property="plat"/>
</resultMap> </resultMap>


<sql id="allColumns"> <sql id="allColumns">
@@ -39,7 +41,7 @@
`privacy_setting_status`, `privacy_setting_status`,
`current_version`,`current_desc`,`release_time`, `current_version`,`current_desc`,`release_time`,
`open_appid`,`bind_open_time`,`refresh_token`, `open_appid`,`bind_open_time`,`refresh_token`,
`access_token`,`access_token_expire`
`access_token`,`access_token_expire`,`plat`
</sql> </sql>


<sql id="dynamicWhereConditions"> <sql id="dynamicWhereConditions">
@@ -119,6 +121,9 @@
<if test=" null != bindOpenTime "> <if test=" null != bindOpenTime ">
and `bind_open_time` = #{bindOpenTime} and `bind_open_time` = #{bindOpenTime}
</if> </if>
<if test=" null != plat ">
and `plat` = #{plat}
</if>
<if test=" null != ids "> <if test=" null != ids ">
and id in and id in
<foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")"> <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
@@ -214,6 +219,7 @@
<result column="release_time" jdbcType="TIMESTAMP" property="releaseTime"/> <result column="release_time" jdbcType="TIMESTAMP" property="releaseTime"/>
<result column="open_appid" jdbcType="VARCHAR" property="openAppid"/> <result column="open_appid" jdbcType="VARCHAR" property="openAppid"/>
<result column="bind_open_time" jdbcType="TIMESTAMP" property="bindOpenTime"/> <result column="bind_open_time" jdbcType="TIMESTAMP" property="bindOpenTime"/>
<result column="plat" jdbcType="INTEGER" property="plat"/>
<result column="name" jdbcType="VARCHAR" property="name"/> <result column="name" jdbcType="VARCHAR" property="name"/>
</resultMap> </resultMap>


@@ -226,7 +232,7 @@
ai.`template_status`,ai.`template_time`, ai.`template_status`,ai.`template_time`,
ai.`privacy_setting_status`, ai.`privacy_setting_status`,
ai.`current_version` as `current_version`,ai.`current_desc`,ai.`release_time`, ai.`current_version` as `current_version`,ai.`current_desc`,ai.`release_time`,
ai.`open_appid`,ai.`bind_open_time`,
ai.`open_appid`,ai.`bind_open_time`,ai.`plat`,
a.`name` as `name` a.`name` as `name`
</sql> </sql>


@@ -286,6 +292,9 @@
<if test=" null != openAppid "> <if test=" null != openAppid ">
and ai.`open_appid` = #{openAppid} and ai.`open_appid` = #{openAppid}
</if> </if>
<if test=" null != plat ">
and ai.`plat` = #{plat}
</if>
<if test=" null != ids "> <if test=" null != ids ">
and ai.id in and ai.id in
<foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")"> <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">


+ 1
- 0
mlWechatOpen/src/main/java/com/iformall/controller/WxWeappInfoController.java Näytä tiedosto

@@ -98,6 +98,7 @@ public class WxWeappInfoController extends BaseController {
weappInfo.setName(null); weappInfo.setName(null);
} }
} }
weappInfo.setPlat(EnumAppPlat.WX.getCode());
weappInfo.setSortColumns(BaseEntity.SortField.TenantId_ASC,BaseEntity.SortField.Type_ASC,BaseEntity.SortField.Name_ASC); weappInfo.setSortColumns(BaseEntity.SortField.TenantId_ASC,BaseEntity.SortField.Type_ASC,BaseEntity.SortField.Name_ASC);
final PageInfo<WxWeappInfo> page = authorizerInfoService.listVoAsPage(weappInfo, pageNum, pageSize); final PageInfo<WxWeappInfo> page = authorizerInfoService.listVoAsPage(weappInfo, pageNum, pageSize);
return new ResultData(page); return new ResultData(page);


Ladataan…
Peruuta
Tallenna