Commit 021aa493e73ee540791e30a921f8a52d73b658e9

Authored by xp.Huang
2 parents f7e6ff1f a66d52d6

Merge branch '20220802' into 'master'

20220802

See merge request huang/thingsboard3.3.2!122
... ... @@ -3,6 +3,7 @@ package org.thingsboard.server.controller.yunteng;
3 3 import io.swagger.annotations.Api;
4 4 import io.swagger.annotations.ApiOperation;
5 5 import lombok.RequiredArgsConstructor;
  6 +import org.apache.commons.lang3.StringUtils;
6 7 import org.springframework.http.ResponseEntity;
7 8 import org.springframework.security.access.prepost.PreAuthorize;
8 9 import org.springframework.validation.annotation.Validated;
... ... @@ -39,6 +40,7 @@ public class YtConfigurationCenterController extends BaseController {
39 40 @RequestParam(PAGE_SIZE) int pageSize,
40 41 @RequestParam(PAGE) int page,
41 42 @RequestParam(value = "name", required = false) String name,
  43 + @RequestParam(value = "platform", required = false) String platform,
42 44 @RequestParam(value = "organizationId", required = false) String organizationId,
43 45 @RequestParam(value = ORDER_FILED, required = false) String orderBy,
44 46 @RequestParam(value = ORDER_TYPE, required = false) OrderTypeEnum orderType)
... ... @@ -49,12 +51,15 @@ public class YtConfigurationCenterController extends BaseController {
49 51 queryMap.put(PAGE, page);
50 52 queryMap.put(ORDER_FILED, orderBy);
51 53 queryMap.put("tenantId", getCurrentUser().getCurrentTenantId());
52   - if (null != name) {
  54 + if (StringUtils.isNotBlank(name)) {
53 55 queryMap.put("name", name);
54 56 }
55   - if (null != organizationId) {
  57 + if (StringUtils.isNotBlank(organizationId)) {
56 58 queryMap.put("organizationId", organizationId);
57 59 }
  60 + if (StringUtils.isNotBlank(platform)) {
  61 + queryMap.put("platform", platform);
  62 + }
58 63 if (null != orderType) {
59 64 queryMap.put(ORDER_TYPE, orderType.name());
60 65 }
... ...
... ... @@ -1151,7 +1151,7 @@ file:
1151 1151 randomFileName: ${file.storage.randomFileName}
1152 1152 account:
1153 1153 info:
1154   - emailSuffix: yunteng.com
  1154 + emailSuffix: ${ACCOUNT_EMAIL_SUFFIX:yunteng.com}
1155 1155 # emailSuffix: thingskit.com
1156 1156 defaultPassword: 123456
1157 1157 third:
... ... @@ -1159,8 +1159,8 @@ third:
1159 1159 url: https://api.weixin.qq.com
1160 1160 # appId: wxd5d018355f38262b
1161 1161 # appSecret: a07fab1d2d6c6def1fa4796535f8af30
1162   - appId: wx99c411dc3c5571ef
1163   - appSecret: 606153abd59308b20a6e41fb6c852ad2
  1162 + appId: ${WECHAT_APP_ID:wx99c411dc3c5571ef}
  1163 + appSecret: ${WECHAT_APP_SECRET:606153abd59308b20a6e41fb6c852ad2}
1164 1164 logging:
1165 1165 level:
1166 1166 org.thingsboard.server.dao.yunteng.mapper: info
... ... @@ -1169,4 +1169,4 @@ logging:
1169 1169 # log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
1170 1170 frp:
1171 1171 server:
1172   - address: http://127.0.0.1
  1172 + address: ${FRP_SERVER_ADDRESS:http://127.0.0.1}
... ...
... ... @@ -40,6 +40,9 @@
40 40 <if test="queryMap.tenantId !=null and queryMap.tenantId !=''">
41 41 AND a.tenant_id = #{queryMap.tenantId}
42 42 </if>
  43 + <if test="queryMap.platform !=null and queryMap.platform !=''">
  44 + AND a.platform = #{queryMap.platform}
  45 + </if>
43 46 <if test="queryMap.name !=null and queryMap.name !=''">
44 47 AND a.name LIKE concat('%',#{queryMap.name}::TEXT,'%')
45 48 </if>
... ...
... ... @@ -46,5 +46,6 @@
46 46 <if test="dictId !=null and dictId!=''">AND sdi.dict_id=#{dictId}</if>
47 47 <if test="dictCode !=null and dictCode!=''">AND sd.dict_code=#{dictCode}</if>
48 48 </where>
  49 + ORDER BY sort
49 50 </select>
50 51 </mapper>
... ...