Przeglądaj źródła

add plat

master
xhxu 3 lat temu
rodzic
commit
52a2b94cff
4 zmienionych plików z 53 dodań i 2 usunięć
  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 Wyświetl plik

@@ -76,5 +76,8 @@ public class WxAuthorizerInfo extends BaseEntity {
private String accessToken;
@io.swagger.annotations.ApiModelProperty(value="accessToken过期时间",name="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 Wyświetl plik

@@ -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 Wyświetl plik

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

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

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

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

@@ -226,7 +232,7 @@
ai.`template_status`,ai.`template_time`,
ai.`privacy_setting_status`,
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`
</sql>

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


+ 1
- 0
mlWechatOpen/src/main/java/com/iformall/controller/WxWeappInfoController.java Wyświetl plik

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


Ładowanie…
Anuluj
Zapisz