From cbe6c31c167d8018a8a31e07d61154c33a657b2f Mon Sep 17 00:00:00 2001 From: zhangqinbin <181961702@qq.com> Date: Thu, 8 Apr 2021 09:14:33 +0800 Subject: [PATCH 01/24] =?UTF-8?q?=E6=97=B6=E9=97=B4=E6=88=B3=E6=9C=8D?= =?UTF-8?q?=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/application-local.yml | 8 ++++---- src/main/resources/application-test.yml | 8 ++++---- src/main/resources/application-uat.yml | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/main/resources/application-local.yml b/src/main/resources/application-local.yml index 4c0be9d..63a3334 100644 --- a/src/main/resources/application-local.yml +++ b/src/main/resources/application-local.yml @@ -34,10 +34,10 @@ spring: ds0: type: com.alibaba.druid.pool.DruidDataSource driver-class-name: com.mysql.cj.jdbc.Driver - username: root - password: root - jdbc-url: jdbc:mysql://10.242.37.148:3033/ebtp_mall_extend?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true - url: jdbc:mysql://10.242.37.148:3033/ebtp_mall_extend?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true + username: mall + password: unicom + jdbc-url: jdbc:mysql://10.125.160.26:3306/ebtp_mall_extend?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true + url: jdbc:mysql://10.125.160.26:3306/ebtp_mall_extend?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true filters: stat,wall,log4j maxActive: 20 initialSize: 1 diff --git a/src/main/resources/application-test.yml b/src/main/resources/application-test.yml index d34e52a..ca20abb 100644 --- a/src/main/resources/application-test.yml +++ b/src/main/resources/application-test.yml @@ -42,10 +42,10 @@ spring: ds0: type: com.alibaba.druid.pool.DruidDataSource driver-class-name: com.mysql.cj.jdbc.Driver - username: root - password: root - jdbc-url: jdbc:mysql://10.242.37.148:3033/ebtp_mall_extend?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true - url: jdbc:mysql://10.242.37.148:3033/ebtp_mall_extend?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true + username: mall + password: unicom + jdbc-url: jdbc:mysql://10.125.160.26:3306/ebtp_mall_extend?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true + url: jdbc:mysql://10.125.160.26:3306/ebtp_mall_extend?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true filters: stat,wall,log4j maxActive: 20 initialSize: 1 diff --git a/src/main/resources/application-uat.yml b/src/main/resources/application-uat.yml index d30ec4b..ed339c2 100644 --- a/src/main/resources/application-uat.yml +++ b/src/main/resources/application-uat.yml @@ -40,10 +40,10 @@ spring: ds0: type: com.alibaba.druid.pool.DruidDataSource driver-class-name: com.mysql.cj.jdbc.Driver - username: root - password: root - jdbc-url: jdbc:mysql://10.242.31.158:3033/ebtp_mall_extend?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true - url: jdbc:mysql://10.242.31.158:3033/ebtp_mall_extend?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true + username: mall + password: unicom + jdbc-url: jdbc:mysql://10.125.160.30:3306/ebtp_mall_extend?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true + url: jdbc:mysql://10.125.160.30:3306/ebtp_mall_extend?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true filters: stat,wall,log4j maxActive: 20 initialSize: 1 From b70fc58282bc2f4f9dfc07d5fa6939e93ab0423d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E8=8A=B9=E5=BD=AC?= Date: Thu, 8 Apr 2021 09:16:41 +0800 Subject: [PATCH 02/24] Update application.yml --- src/main/resources/application.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index fc3033b..f2b90d5 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -1,3 +1,3 @@ spring: profiles: - active: pro \ No newline at end of file + active: uat \ No newline at end of file From 9524e2942bdbdd1988246ff5090d3b7de6404c24 Mon Sep 17 00:00:00 2001 From: zhangyx <1254353766@qq.com> Date: Thu, 8 Apr 2021 09:40:02 +0800 Subject: [PATCH 03/24] =?UTF-8?q?=E8=BF=94=E5=9B=9E=E6=B5=81=E5=8A=A0Conte?= =?UTF-8?q?nt-Length?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/BizBidClientVersionServiceImpl.java | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/templatewarehouse/sevice/impl/BizBidClientVersionServiceImpl.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/templatewarehouse/sevice/impl/BizBidClientVersionServiceImpl.java index 727c1f3..74bc426 100644 --- a/src/main/java/com/chinaunicom/mall/ebtp/extend/templatewarehouse/sevice/impl/BizBidClientVersionServiceImpl.java +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/templatewarehouse/sevice/impl/BizBidClientVersionServiceImpl.java @@ -60,11 +60,15 @@ public class BizBidClientVersionServiceImpl extends BaseServiceImpl optionalBytes = modelConvertor.toByteArray(objectInfo); -// log.info("文档中心文件下载返回数据转为byte[]数据:"+ new String(optionalBytes.get())); + String data = map.get("data").toString(); + Map mapdata = (Map) JSON.parse(data); + String sysStorageVO = mapdata.get("sysStorageVO").toString(); + Map mapsysStorageVO = (Map) JSON.parse(sysStorageVO); + log.info("文档中心文件下载返回文件大小数据:"+ mapsysStorageVO.get("fileSize")); ServletOutputStream outputStream = response.getOutputStream(); -// response.setContentType("application/octet-stream;charset=utf-8"); response.setHeader("Content-Disposition","attachment;filename="+ URLEncoder.encode("AutoUpdater.xml", "utf-8")); if(optionalBytes.isPresent()){ + response.setHeader("Content-Length",mapsysStorageVO.get("fileSize").toString()); outputStream.write(optionalBytes.get()); } outputStream.flush(); @@ -79,11 +83,15 @@ public class BizBidClientVersionServiceImpl extends BaseServiceImpl optionalBytes = modelConvertor.toByteArray(objectInfo); -// log.info("文档中心s文件下载返回数据转为byte[]数据:"+ optionalBytes.get()); + String data = map.get("data").toString(); + Map mapdata = (Map) JSON.parse(data); + String sysStorageVO = mapdata.get("sysStorageVO").toString(); + Map mapsysStorageVO = (Map) JSON.parse(sysStorageVO); + log.info("文档中心s文件下载返回文件大小数据:"+ mapsysStorageVO.get("fileSize")); ServletOutputStream outputStream = response.getOutputStream(); -// response.setContentType("application/octet-stream;charset=utf-8"); response.setHeader("Content-Disposition","attachment;filename="+ URLEncoder.encode("ebtp-ca.zip", "utf-8")); if(optionalBytes.isPresent()){ + response.setHeader("Content-Length",mapsysStorageVO.get("fileSize").toString()); outputStream.write(optionalBytes.get()); } outputStream.flush(); From 969ebec653514924925957330c797a5d4d949d60 Mon Sep 17 00:00:00 2001 From: zhangqinbin <181961702@qq.com> Date: Thu, 8 Apr 2021 15:35:45 +0800 Subject: [PATCH 04/24] =?UTF-8?q?=E6=97=B6=E9=97=B4=E6=88=B3=E6=9C=8D?= =?UTF-8?q?=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ebtp/extend/timeService/tsa/TtsAgent.java | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/timeService/tsa/TtsAgent.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/timeService/tsa/TtsAgent.java index 62e02b5..90e0de4 100644 --- a/src/main/java/com/chinaunicom/mall/ebtp/extend/timeService/tsa/TtsAgent.java +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/timeService/tsa/TtsAgent.java @@ -1,5 +1,11 @@ package com.chinaunicom.mall.ebtp.extend.timeService.tsa; +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.time.LocalDateTime; +import java.time.format.DateTimeFormatter; +import java.util.Date; + /** * CA 时间戳服务接口 * @@ -60,6 +66,10 @@ public interface TtsAgent { public class TtsParseResult { // 时间 private String timestamp; + // 时间 + private Date datestamp; + // 时间 + private LocalDateTime localDateTimestamp; // hash 值 private String hash; @@ -67,11 +77,19 @@ public interface TtsAgent { // 签名证书 private String cert; - public TtsParseResult(String timestamp, String hash, String cert) { + public TtsParseResult(String timestamp, String hash, String cert){ super(); this.timestamp = timestamp; this.hash = hash; this.cert = cert; + DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); + this.localDateTimestamp =LocalDateTime.parse(timestamp,dtf); + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + try { + this.datestamp = sdf.parse(timestamp); + } catch (ParseException e) { + e.printStackTrace(); + } } public String getTimestamp() { From 068628c2145757138103b508577ef8a99ba90262 Mon Sep 17 00:00:00 2001 From: zhangqinbin <181961702@qq.com> Date: Thu, 8 Apr 2021 15:45:48 +0800 Subject: [PATCH 05/24] =?UTF-8?q?=E6=97=B6=E9=97=B4=E6=88=B3=E6=9C=8D?= =?UTF-8?q?=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../timeService/TimeServiceConstant.java | 21 ++++++++++++++----- .../controller/TimeServiceController.java | 4 ++-- .../ebtp/extend/timeService/tsa/TtsAgent.java | 18 ++++++++++++++++ 3 files changed, 36 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/timeService/TimeServiceConstant.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/timeService/TimeServiceConstant.java index 3f300f2..bfd086d 100644 --- a/src/main/java/com/chinaunicom/mall/ebtp/extend/timeService/TimeServiceConstant.java +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/timeService/TimeServiceConstant.java @@ -64,7 +64,21 @@ public class TimeServiceConstant { * @param timestamp 时间戳加密原文 * @return 时间戳对象 */ - public TSAVerifyResult verifyTimeStamp(String timestamp){ + public TtsAgent.TtsParseResult verifyTimeStamp2(String timestamp){ + try{ + log.info("timestamp -->"+timestamp); + TSAVerifyResult verifyResult = this.verifyTimeStamp(timestamp); + String time = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(verifyResult.getSignedTime()); + TtsAgent.TtsParseResult ttsParseResult = new TtsAgent.TtsParseResult(time, HelperUtil.bytesToHexString(verifyResult.getData()), + verifyResult.getSignerSubject()); + return ttsParseResult; + }catch (Exception e){ + log.error("解析时间戳", e); + } + return null; + } + + private TSAVerifyResult verifyTimeStamp(String timestamp){ try{ log.info("timestamp -->"+timestamp); TSAVerifyResult verifyResult = client.verifyTimeStamp(Base64.decodeBase64(timestamp)); @@ -83,10 +97,7 @@ public class TimeServiceConstant { public TtsAgent.TtsParseResult getServiceTimeObj(String data){ try{ String timestamp = this.signTimeStamp(data); - TSAVerifyResult verifyResult = this.verifyTimeStamp(timestamp); - String time = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(verifyResult.getSignedTime()); - TtsAgent.TtsParseResult ttsParseResult = new TtsAgent.TtsParseResult(time, HelperUtil.bytesToHexString(verifyResult.getData()), - verifyResult.getSignerSubject()); + TtsAgent.TtsParseResult ttsParseResult = this.verifyTimeStamp2(timestamp); return ttsParseResult; }catch (Exception e){ log.error("获取时间戳异常", e); diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/timeService/controller/TimeServiceController.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/timeService/controller/TimeServiceController.java index d2e8503..98dace0 100644 --- a/src/main/java/com/chinaunicom/mall/ebtp/extend/timeService/controller/TimeServiceController.java +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/timeService/controller/TimeServiceController.java @@ -40,9 +40,9 @@ public class TimeServiceController { */ @ApiOperation("解析时间戳加密原文") @GetMapping(value = "/verifyTimeStamp") - public BaseResponse verifyTimeStamp(@ApiParam(value = "时间戳加密原文", required = true) @RequestBody String timestamp) { + public BaseResponse verifyTimeStamp(@ApiParam(value = "时间戳加密原文", required = true) @RequestBody String timestamp) { TimeServiceConstant constant = new TimeServiceConstant(); - return BaseResponse.success(constant.verifyTimeStamp(timestamp)); + return BaseResponse.success(constant.verifyTimeStamp2(timestamp)); } /** diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/timeService/tsa/TtsAgent.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/timeService/tsa/TtsAgent.java index 90e0de4..a7248ff 100644 --- a/src/main/java/com/chinaunicom/mall/ebtp/extend/timeService/tsa/TtsAgent.java +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/timeService/tsa/TtsAgent.java @@ -115,5 +115,23 @@ public interface TtsAgent { public void setCert(String cert) { this.cert = cert; } + + public LocalDateTime getLocalDateTimestamp() { + return localDateTimestamp; + } + + public TtsParseResult setLocalDateTimestamp(LocalDateTime localDateTimestamp) { + this.localDateTimestamp = localDateTimestamp; + return this; + } + + public Date getDatestamp() { + return datestamp; + } + + public TtsParseResult setDatestamp(Date datestamp) { + this.datestamp = datestamp; + return this; + } } } \ No newline at end of file From a7f8afb2e5d3ec29bc2e4365efe037d0c0236526 Mon Sep 17 00:00:00 2001 From: zhangqinbin <181961702@qq.com> Date: Thu, 8 Apr 2021 15:50:20 +0800 Subject: [PATCH 06/24] =?UTF-8?q?=E6=97=B6=E9=97=B4=E6=88=B3=E6=9C=8D?= =?UTF-8?q?=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ebtp/extend/timeService/tsa/TtsAgent.java | 30 ------------------- 1 file changed, 30 deletions(-) diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/timeService/tsa/TtsAgent.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/timeService/tsa/TtsAgent.java index a7248ff..b4b6e1c 100644 --- a/src/main/java/com/chinaunicom/mall/ebtp/extend/timeService/tsa/TtsAgent.java +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/timeService/tsa/TtsAgent.java @@ -66,10 +66,6 @@ public interface TtsAgent { public class TtsParseResult { // 时间 private String timestamp; - // 时间 - private Date datestamp; - // 时间 - private LocalDateTime localDateTimestamp; // hash 值 private String hash; @@ -82,14 +78,6 @@ public interface TtsAgent { this.timestamp = timestamp; this.hash = hash; this.cert = cert; - DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); - this.localDateTimestamp =LocalDateTime.parse(timestamp,dtf); - SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); - try { - this.datestamp = sdf.parse(timestamp); - } catch (ParseException e) { - e.printStackTrace(); - } } public String getTimestamp() { @@ -115,23 +103,5 @@ public interface TtsAgent { public void setCert(String cert) { this.cert = cert; } - - public LocalDateTime getLocalDateTimestamp() { - return localDateTimestamp; - } - - public TtsParseResult setLocalDateTimestamp(LocalDateTime localDateTimestamp) { - this.localDateTimestamp = localDateTimestamp; - return this; - } - - public Date getDatestamp() { - return datestamp; - } - - public TtsParseResult setDatestamp(Date datestamp) { - this.datestamp = datestamp; - return this; - } } } \ No newline at end of file From 2fa4497eeb7a56eb24c901603b702171d4a1c43b Mon Sep 17 00:00:00 2001 From: zhangqinbin <181961702@qq.com> Date: Fri, 9 Apr 2021 09:15:55 +0800 Subject: [PATCH 07/24] =?UTF-8?q?=E6=97=B6=E9=97=B4=E6=88=B3=E6=9C=8D?= =?UTF-8?q?=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mall/ebtp/extend/timeService/TimeServiceConstant.java | 3 ++- .../mall/ebtp/extend/timeService/tsa/SystemTime.java | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/timeService/TimeServiceConstant.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/timeService/TimeServiceConstant.java index bfd086d..d88c289 100644 --- a/src/main/java/com/chinaunicom/mall/ebtp/extend/timeService/TimeServiceConstant.java +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/timeService/TimeServiceConstant.java @@ -156,7 +156,8 @@ public class TimeServiceConstant { .setDate(date.getDate()) .setHour(date.getHours()) .setMinute(date.getMinutes()) - .setSecond(date.getSeconds()); + .setSecond(date.getSeconds()) + .setTimestamp(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(date)); return systemTime; }catch (Exception e){ log.error("获取时间戳异常", e); diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/timeService/tsa/SystemTime.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/timeService/tsa/SystemTime.java index 8915664..1683127 100644 --- a/src/main/java/com/chinaunicom/mall/ebtp/extend/timeService/tsa/SystemTime.java +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/timeService/tsa/SystemTime.java @@ -11,8 +11,10 @@ import lombok.experimental.Accessors; @Data @Accessors(chain = true) public class SystemTime { - - + /** + * 时间 + */ + private String timestamp; /** * 年 */ From 7c6a759bccb662dc8b34dc3e3cbedee3c69315da Mon Sep 17 00:00:00 2001 From: ajaxfan <909938737@qq.com> Date: Fri, 9 Apr 2021 09:17:52 +0800 Subject: [PATCH 08/24] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E6=9D=83=E9=99=90?= =?UTF-8?q?=E6=8E=A7=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/AuthorizeController.java | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 src/main/java/com/chinaunicom/mall/ebtp/extend/bizmessage/controller/AuthorizeController.java diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/bizmessage/controller/AuthorizeController.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/bizmessage/controller/AuthorizeController.java new file mode 100644 index 0000000..eaac104 --- /dev/null +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/bizmessage/controller/AuthorizeController.java @@ -0,0 +1,36 @@ +package com.chinaunicom.mall.ebtp.extend.bizmessage.controller; + +import java.security.Principal; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpStatus; +import org.springframework.security.core.Authentication; +import org.springframework.security.core.context.SecurityContextHolder; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseStatus; +import org.springframework.web.bind.annotation.RestController; + +import com.chinaunicom.mall.ebtp.common.base.entity.BaseCacheUser; +import com.chinaunicom.mall.ebtp.common.base.service.IBaseCacheUserService; + +@RestController +@RequestMapping("v1") +public class AuthorizeController { + + private @Autowired IBaseCacheUserService service; + + @GetMapping("user") + @ResponseStatus(code = HttpStatus.OK) + public Object user(Principal principal) { + BaseCacheUser cacheUser = service.getCacheUser(); + Authentication auth = SecurityContextHolder.getContext().getAuthentication(); + + System.out.println(auth.getName()); + System.out.println(auth.getAuthorities()); + System.out.println(principal); + + return cacheUser; + } + +} From 42288fc004dcb2c535731c08cfab5ab653dce8b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9F=A9=E6=9B=A6=E9=94=90?= Date: Sat, 10 Apr 2021 11:09:10 +0800 Subject: [PATCH 09/24] Update config-gz --- config-gz | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config-gz b/config-gz index 6fe3b43..980e05b 100644 --- a/config-gz +++ b/config-gz @@ -2,7 +2,7 @@ apiVersion: v1 clusters: - cluster: insecure-skip-tls-verify: true - server: https://10.125.164.35:48662 + server: https://10.125.164.111:42733;https://10.125.164.158:41745;https://10.125.164.8:43001 name: demok8s contexts: - context: @@ -14,4 +14,4 @@ kind: Config users: - name: cluster-admin user: - token: df5e4896a4f6d1b1447b2584ca7405f7 + token: ae123cd22080c2712d08cb31633a2fa6 \ No newline at end of file From 4f3b72a2a1602c3ad2109ca8435c2aed531bc0d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9F=A9=E6=9B=A6=E9=94=90?= Date: Sat, 10 Apr 2021 11:10:19 +0800 Subject: [PATCH 10/24] Update deployment-gz.yaml --- deployment-gz.yaml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/deployment-gz.yaml b/deployment-gz.yaml index 4d9e7d4..50b0f2d 100644 --- a/deployment-gz.yaml +++ b/deployment-gz.yaml @@ -57,7 +57,11 @@ spec: env: # Apollo 配置中心变量设置 - name: APOLLO_CONFIGSERVICE - value: http://10.242.31.158:6001 + value: http://apollo-configservice:8080 + - name: MY_POD_IP #自动获取pod ip作为agent id + valueFrom: + fieldRef: + fieldPath: status.podIP --- kind: Service apiVersion: v1 @@ -67,7 +71,7 @@ metadata: labels: app: biz-service-ebtp-extend annotations: - lb.cke.tg.unicom/target-vports: 18018-18018 + # lb.cke.tg.unicom/target-vports: 18018-18018 prometheus.io/port: '18018' prometheus.io/jl-svc: 'true' spec: From 832ce161d48610b1a5dc8fb108cbc90958d0da73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9F=A9=E6=9B=A6=E9=94=90?= Date: Sat, 10 Apr 2021 11:12:37 +0800 Subject: [PATCH 11/24] Update application-uat.yml --- src/main/resources/application-uat.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/resources/application-uat.yml b/src/main/resources/application-uat.yml index ed339c2..819b0ae 100644 --- a/src/main/resources/application-uat.yml +++ b/src/main/resources/application-uat.yml @@ -19,7 +19,7 @@ app: # Apollo 配置信息 apollo: - meta: http://10.242.31.158:6001/ + meta: http://apollo-configservice:8080 bootstrap: namespace: application enabled: true @@ -102,7 +102,7 @@ spring: eureka: client: service-url: - defaultZone: http://10.242.31.158:5001/eureka,http://10.242.31.158:5002/eureka,http://10.242.31.158:5003/eureka + defaultZone: http://eureka-1:8080/eureka,http://eureka-2:8080/eureka,http://eureka-3:8080/eureka instance: prefer-ip-address: true instance-id: http://10.242.31.158:${server.port} From eade35d0ca9d37fff4020ddef3a3a0d548055313 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9F=A9=E6=9B=A6=E9=94=90?= Date: Sat, 10 Apr 2021 11:12:57 +0800 Subject: [PATCH 12/24] Update logback.xml --- src/main/resources/logback.xml | 50 ++++------------------------------ 1 file changed, 5 insertions(+), 45 deletions(-) diff --git a/src/main/resources/logback.xml b/src/main/resources/logback.xml index ab31609..e1ea49f 100644 --- a/src/main/resources/logback.xml +++ b/src/main/resources/logback.xml @@ -11,33 +11,23 @@ - %d{yyyy-MM-dd HH:mm:ss.SSS} %contextName [%thread] %-5level %logger{50} - %msg%n + %d{yyyy-MM-dd HH:mm:ss.SSS} ${MY_POD_IP} %contextName [%thread] %-5level %logger{50} - [ppTraceId: %X{PtxId}, ppSpanId: %X{PspanId}] - %msg%n - - - - ERROR - - DENY - - ACCEPT - - ${logback.logdir}/info.${logback.appname}.log + ${logback.logdir}/${logback.appname}-${MY_POD_IP}.log - ${logback.logdir}/info.${logback.appname}.%d{yyyy-MM-dd}.log + ${logback.logdir}/${logback.appname}-${MY_POD_IP}.%d{yyyy-MM-dd}.log - 3 + 90 true @@ -46,44 +36,14 @@ UTF-8 - %d [%thread] %-5level %logger{64} %line - %msg%n - - - - - - - Error - - - ${logback.logdir}/error.${logback.appname}.log - - - - ${logback.logdir}/error.${logback.appname}.%d{yyyy-MM-dd}.log - - 3 - - true - - - - - - UTF-8 - %d [%thread] %-5level %logger{128} %line - %msg%n + %d ${MY_POD_IP} [%thread] %-5level %logger{64} %line - [ppTraceId: %X{PtxId}, ppSpanId: %X{PspanId}] - %msg%n - - From 804c9463b7fac43cafdc86fc99ee8e37e8e17050 Mon Sep 17 00:00:00 2001 From: zhangyx <1254353766@qq.com> Date: Sat, 10 Apr 2021 11:40:31 +0800 Subject: [PATCH 13/24] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=A4=A9=E5=AE=AB?= =?UTF-8?q?=E7=8E=AF=E5=A2=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config-gz | 4 +-- deployment-gz.yaml | 8 +++-- src/main/resources/application-uat.yml | 4 +-- src/main/resources/logback.xml | 50 +++----------------------- 4 files changed, 15 insertions(+), 51 deletions(-) diff --git a/config-gz b/config-gz index 6fe3b43..980e05b 100644 --- a/config-gz +++ b/config-gz @@ -2,7 +2,7 @@ apiVersion: v1 clusters: - cluster: insecure-skip-tls-verify: true - server: https://10.125.164.35:48662 + server: https://10.125.164.111:42733;https://10.125.164.158:41745;https://10.125.164.8:43001 name: demok8s contexts: - context: @@ -14,4 +14,4 @@ kind: Config users: - name: cluster-admin user: - token: df5e4896a4f6d1b1447b2584ca7405f7 + token: ae123cd22080c2712d08cb31633a2fa6 \ No newline at end of file diff --git a/deployment-gz.yaml b/deployment-gz.yaml index 4d9e7d4..4f664e2 100644 --- a/deployment-gz.yaml +++ b/deployment-gz.yaml @@ -57,7 +57,11 @@ spec: env: # Apollo 配置中心变量设置 - name: APOLLO_CONFIGSERVICE - value: http://10.242.31.158:6001 + value: http://apollo-configservice:8080 + - name: MY_POD_IP #自动获取pod ip作为agent id + valueFrom: + fieldRef: + fieldPath: status.podIP --- kind: Service apiVersion: v1 @@ -67,7 +71,7 @@ metadata: labels: app: biz-service-ebtp-extend annotations: - lb.cke.tg.unicom/target-vports: 18018-18018 +# lb.cke.tg.unicom/target-vports: 18018-18018 prometheus.io/port: '18018' prometheus.io/jl-svc: 'true' spec: diff --git a/src/main/resources/application-uat.yml b/src/main/resources/application-uat.yml index ed339c2..819b0ae 100644 --- a/src/main/resources/application-uat.yml +++ b/src/main/resources/application-uat.yml @@ -19,7 +19,7 @@ app: # Apollo 配置信息 apollo: - meta: http://10.242.31.158:6001/ + meta: http://apollo-configservice:8080 bootstrap: namespace: application enabled: true @@ -102,7 +102,7 @@ spring: eureka: client: service-url: - defaultZone: http://10.242.31.158:5001/eureka,http://10.242.31.158:5002/eureka,http://10.242.31.158:5003/eureka + defaultZone: http://eureka-1:8080/eureka,http://eureka-2:8080/eureka,http://eureka-3:8080/eureka instance: prefer-ip-address: true instance-id: http://10.242.31.158:${server.port} diff --git a/src/main/resources/logback.xml b/src/main/resources/logback.xml index ab31609..f4b99f1 100644 --- a/src/main/resources/logback.xml +++ b/src/main/resources/logback.xml @@ -11,33 +11,23 @@ - %d{yyyy-MM-dd HH:mm:ss.SSS} %contextName [%thread] %-5level %logger{50} - %msg%n + %d{yyyy-MM-dd HH:mm:ss.SSS} ${MY_POD_IP} %contextName [%thread] %-5level %logger{50} - [ppTraceId: %X{PtxId}, ppSpanId: %X{PspanId}] - %msg%n - - - - ERROR - - DENY - - ACCEPT - - ${logback.logdir}/info.${logback.appname}.log + ${logback.logdir}/${logback.appname}-${MY_POD_IP}.log - ${logback.logdir}/info.${logback.appname}.%d{yyyy-MM-dd}.log + ${logback.logdir}/${logback.appname}-${MY_POD_IP}.%d{yyyy-MM-dd}.log - 3 + 90 true @@ -46,44 +36,14 @@ UTF-8 - %d [%thread] %-5level %logger{64} %line - %msg%n + %d ${MY_POD_IP} [%thread] %-5level %logger{64} %line - [ppTraceId: %X{PtxId}, ppSpanId: %X{PspanId}] - %msg%n - - - - Error - - - ${logback.logdir}/error.${logback.appname}.log - - - - ${logback.logdir}/error.${logback.appname}.%d{yyyy-MM-dd}.log - - 3 - - true - - - - - - UTF-8 - %d [%thread] %-5level %logger{128} %line - %msg%n - - - - - From d3321c162fdce00519804d2293a525b39d08b33c Mon Sep 17 00:00:00 2001 From: zhangyx <1254353766@qq.com> Date: Sat, 10 Apr 2021 11:48:00 +0800 Subject: [PATCH 14/24] =?UTF-8?q?Revert=20"=E4=BF=AE=E6=94=B9=E5=A4=A9?= =?UTF-8?q?=E5=AE=AB=E7=8E=AF=E5=A2=83"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 804c9463 --- config-gz | 4 +-- deployment-gz.yaml | 8 ++--- src/main/resources/application-uat.yml | 4 +-- src/main/resources/logback.xml | 50 +++++++++++++++++++++++--- 4 files changed, 51 insertions(+), 15 deletions(-) diff --git a/config-gz b/config-gz index 980e05b..6fe3b43 100644 --- a/config-gz +++ b/config-gz @@ -2,7 +2,7 @@ apiVersion: v1 clusters: - cluster: insecure-skip-tls-verify: true - server: https://10.125.164.111:42733;https://10.125.164.158:41745;https://10.125.164.8:43001 + server: https://10.125.164.35:48662 name: demok8s contexts: - context: @@ -14,4 +14,4 @@ kind: Config users: - name: cluster-admin user: - token: ae123cd22080c2712d08cb31633a2fa6 \ No newline at end of file + token: df5e4896a4f6d1b1447b2584ca7405f7 diff --git a/deployment-gz.yaml b/deployment-gz.yaml index 4f664e2..4d9e7d4 100644 --- a/deployment-gz.yaml +++ b/deployment-gz.yaml @@ -57,11 +57,7 @@ spec: env: # Apollo 配置中心变量设置 - name: APOLLO_CONFIGSERVICE - value: http://apollo-configservice:8080 - - name: MY_POD_IP #自动获取pod ip作为agent id - valueFrom: - fieldRef: - fieldPath: status.podIP + value: http://10.242.31.158:6001 --- kind: Service apiVersion: v1 @@ -71,7 +67,7 @@ metadata: labels: app: biz-service-ebtp-extend annotations: -# lb.cke.tg.unicom/target-vports: 18018-18018 + lb.cke.tg.unicom/target-vports: 18018-18018 prometheus.io/port: '18018' prometheus.io/jl-svc: 'true' spec: diff --git a/src/main/resources/application-uat.yml b/src/main/resources/application-uat.yml index 819b0ae..ed339c2 100644 --- a/src/main/resources/application-uat.yml +++ b/src/main/resources/application-uat.yml @@ -19,7 +19,7 @@ app: # Apollo 配置信息 apollo: - meta: http://apollo-configservice:8080 + meta: http://10.242.31.158:6001/ bootstrap: namespace: application enabled: true @@ -102,7 +102,7 @@ spring: eureka: client: service-url: - defaultZone: http://eureka-1:8080/eureka,http://eureka-2:8080/eureka,http://eureka-3:8080/eureka + defaultZone: http://10.242.31.158:5001/eureka,http://10.242.31.158:5002/eureka,http://10.242.31.158:5003/eureka instance: prefer-ip-address: true instance-id: http://10.242.31.158:${server.port} diff --git a/src/main/resources/logback.xml b/src/main/resources/logback.xml index f4b99f1..ab31609 100644 --- a/src/main/resources/logback.xml +++ b/src/main/resources/logback.xml @@ -11,23 +11,33 @@ - %d{yyyy-MM-dd HH:mm:ss.SSS} ${MY_POD_IP} %contextName [%thread] %-5level %logger{50} - [ppTraceId: %X{PtxId}, ppSpanId: %X{PspanId}] - %msg%n + %d{yyyy-MM-dd HH:mm:ss.SSS} %contextName [%thread] %-5level %logger{50} - %msg%n + + + + ERROR + + DENY + + ACCEPT + - ${logback.logdir}/${logback.appname}-${MY_POD_IP}.log + ${logback.logdir}/info.${logback.appname}.log - ${logback.logdir}/${logback.appname}-${MY_POD_IP}.%d{yyyy-MM-dd}.log + ${logback.logdir}/info.${logback.appname}.%d{yyyy-MM-dd}.log - 90 + 3 true @@ -36,14 +46,44 @@ UTF-8 - %d ${MY_POD_IP} [%thread] %-5level %logger{64} %line - [ppTraceId: %X{PtxId}, ppSpanId: %X{PspanId}] - %msg%n + %d [%thread] %-5level %logger{64} %line - %msg%n + + + + Error + + + ${logback.logdir}/error.${logback.appname}.log + + + + ${logback.logdir}/error.${logback.appname}.%d{yyyy-MM-dd}.log + + 3 + + true + + + + + + UTF-8 + %d [%thread] %-5level %logger{128} %line - %msg%n + + + + + From bb828681f64644569740da6dd870907c878ac572 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=87=E5=AE=B8=E8=88=9C?= Date: Mon, 12 Apr 2021 14:04:53 +0800 Subject: [PATCH 15/24] Update application-uat.yml --- src/main/resources/application-uat.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/main/resources/application-uat.yml b/src/main/resources/application-uat.yml index 819b0ae..c0f891c 100644 --- a/src/main/resources/application-uat.yml +++ b/src/main/resources/application-uat.yml @@ -105,9 +105,7 @@ eureka: defaultZone: http://eureka-1:8080/eureka,http://eureka-2:8080/eureka,http://eureka-3:8080/eureka instance: prefer-ip-address: true - instance-id: http://10.242.31.158:${server.port} - # 这是客户端的注册地址, eureka 会通过这个地址建立管道 - ip-address: 10.242.31.158 + instance-ip: ${spring.cloud.client.ip-address}:${server.port} mybatis-plus: configuration: From 78888192f4a16fa782a0ac282e39a670d64bf8c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=87=E5=AE=B8=E8=88=9C?= Date: Mon, 12 Apr 2021 16:51:18 +0800 Subject: [PATCH 16/24] Update logback.xml --- src/main/resources/logback.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/resources/logback.xml b/src/main/resources/logback.xml index e1ea49f..e8a706c 100644 --- a/src/main/resources/logback.xml +++ b/src/main/resources/logback.xml @@ -42,6 +42,7 @@ + From 042f4699b1d3e823ecff17de3ed2c364605aa451 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=87=E5=AE=B8=E8=88=9C?= Date: Mon, 12 Apr 2021 17:18:53 +0800 Subject: [PATCH 17/24] Update application-uat.yml --- src/main/resources/application-uat.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/main/resources/application-uat.yml b/src/main/resources/application-uat.yml index c0f891c..5249254 100644 --- a/src/main/resources/application-uat.yml +++ b/src/main/resources/application-uat.yml @@ -6,12 +6,11 @@ server: seata: service: vgroup-mapping: - biz-service-ebtp-extend-service-group: default - - #registry: - # type: eureka - # eureka: - # serviceUrl: http://10.242.31.158:5001/eureka,http://10.242.31.158:5002/eureka,http://10.242.31.158:5003/eureka + biz-service-ebtp-extend-service-group: seata-server-jl + registry: + type: eureka + eureka: + serviceUrl: http://eureka-1:8080/eureka,http://eureka-2:8080/eureka,http://eureka-3:8080/eureka # 对应 apollo 配置中心的应用名 app: From c8b3d5cbcd4e9a0a5152f605905afa91c38e088d Mon Sep 17 00:00:00 2001 From: ajaxfan <909938737@qq.com> Date: Mon, 12 Apr 2021 17:25:00 +0800 Subject: [PATCH 18/24] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/logback.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main/resources/logback.xml b/src/main/resources/logback.xml index ab31609..fde1240 100644 --- a/src/main/resources/logback.xml +++ b/src/main/resources/logback.xml @@ -83,7 +83,6 @@ - From be11afa86f37d8a1597545179b10fae1ec00939e Mon Sep 17 00:00:00 2001 From: zhangqinbin <181961702@qq.com> Date: Tue, 13 Apr 2021 09:35:39 +0800 Subject: [PATCH 19/24] =?UTF-8?q?=E6=97=B6=E9=97=B4=E6=88=B3=E6=9C=8D?= =?UTF-8?q?=E5=8A=A1BUG=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../extend/timeService/controller/TimeServiceController.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/timeService/controller/TimeServiceController.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/timeService/controller/TimeServiceController.java index 98dace0..3720306 100644 --- a/src/main/java/com/chinaunicom/mall/ebtp/extend/timeService/controller/TimeServiceController.java +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/timeService/controller/TimeServiceController.java @@ -39,7 +39,7 @@ public class TimeServiceController { * @return 时间戳对象 */ @ApiOperation("解析时间戳加密原文") - @GetMapping(value = "/verifyTimeStamp") + @PostMapping(value = "/verifyTimeStamp") public BaseResponse verifyTimeStamp(@ApiParam(value = "时间戳加密原文", required = true) @RequestBody String timestamp) { TimeServiceConstant constant = new TimeServiceConstant(); return BaseResponse.success(constant.verifyTimeStamp2(timestamp)); @@ -51,7 +51,7 @@ public class TimeServiceController { * @return 时间戳对象 */ @ApiOperation("直接获取时间戳对象(内涵日期)") - @PostMapping(value = "/getServiceTimeObj") + @GetMapping(value = "/getServiceTimeObj") public BaseResponse getServiceTimeObj(@ApiParam(value = "待申请时间戳的原文", required = false) @RequestParam(name = "data",required = false) String data) { TimeServiceConstant constant = new TimeServiceConstant(); return BaseResponse.success(constant.getServiceTimeObj(data)); From 82b602d885e80079873859e1d0e5d2c5c1221a0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E8=8A=B9=E5=BD=AC?= Date: Tue, 13 Apr 2021 09:47:30 +0800 Subject: [PATCH 20/24] Update logback.xml --- src/main/resources/logback.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/resources/logback.xml b/src/main/resources/logback.xml index e8a706c..4db3903 100644 --- a/src/main/resources/logback.xml +++ b/src/main/resources/logback.xml @@ -45,6 +45,7 @@ + From 81aa01b3ea69c07e3acbae1709e80952c81eba2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E8=8A=B9=E5=BD=AC?= Date: Tue, 13 Apr 2021 09:54:09 +0800 Subject: [PATCH 21/24] Update logback.xml --- src/main/resources/logback.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main/resources/logback.xml b/src/main/resources/logback.xml index 4db3903..e8a706c 100644 --- a/src/main/resources/logback.xml +++ b/src/main/resources/logback.xml @@ -45,7 +45,6 @@ - From 40042d3b78ba2135c5f4cf0fe1b983dbf2e52e63 Mon Sep 17 00:00:00 2001 From: zhangyx <1254353766@qq.com> Date: Wed, 21 Apr 2021 15:55:09 +0800 Subject: [PATCH 22/24] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=EF=BC=8C=E6=9F=A5=E8=AF=A2=E6=9C=80=E4=BD=8E=E6=9C=80=E9=AB=98?= =?UTF-8?q?=E7=89=88=E6=9C=AC=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../TemplateWarehouseController.java | 25 +++++++++-- .../dao/ClientVersionCheckMapper.java | 10 +++++ .../dao/mapper/BizBidClientVersionMapper.xml | 1 + .../dao/mapper/ClientVersionCheckMapper.xml | 12 +++++ .../entity/BizBidClientVersion.java | 13 ++++-- .../entity/ClientVersionCheck.java | 44 +++++++++++++++++++ .../sevice/ClientVersionCheckService.java | 16 +++++++ .../impl/ClientVersionCheckServiceImpl.java | 18 ++++++++ 8 files changed, 132 insertions(+), 7 deletions(-) create mode 100644 src/main/java/com/chinaunicom/mall/ebtp/extend/templatewarehouse/dao/ClientVersionCheckMapper.java create mode 100644 src/main/java/com/chinaunicom/mall/ebtp/extend/templatewarehouse/dao/mapper/ClientVersionCheckMapper.xml create mode 100644 src/main/java/com/chinaunicom/mall/ebtp/extend/templatewarehouse/entity/ClientVersionCheck.java create mode 100644 src/main/java/com/chinaunicom/mall/ebtp/extend/templatewarehouse/sevice/ClientVersionCheckService.java create mode 100644 src/main/java/com/chinaunicom/mall/ebtp/extend/templatewarehouse/sevice/impl/ClientVersionCheckServiceImpl.java diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/templatewarehouse/controller/TemplateWarehouseController.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/templatewarehouse/controller/TemplateWarehouseController.java index e1a3ac4..d70b52f 100644 --- a/src/main/java/com/chinaunicom/mall/ebtp/extend/templatewarehouse/controller/TemplateWarehouseController.java +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/templatewarehouse/controller/TemplateWarehouseController.java @@ -1,20 +1,19 @@ package com.chinaunicom.mall.ebtp.extend.templatewarehouse.controller; import com.chinaunicom.mall.ebtp.common.base.entity.BaseResponse; -import com.chinaunicom.mall.ebtp.extend.templatewarehouse.entity.BizBidClientVersion; import com.chinaunicom.mall.ebtp.extend.templatewarehouse.entity.BizBidTemplateWarehouse; +import com.chinaunicom.mall.ebtp.extend.templatewarehouse.entity.ClientVersionCheck; import com.chinaunicom.mall.ebtp.extend.templatewarehouse.sevice.BizBidClientVersionService; import com.chinaunicom.mall.ebtp.extend.templatewarehouse.sevice.BizBidTemplateWarehouseService; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.chinaunicom.mall.ebtp.extend.templatewarehouse.sevice.ClientVersionCheckService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; -import java.io.ByteArrayOutputStream; -import java.io.FileOutputStream; import java.io.IOException; +import java.util.List; @RestController @Api(tags = "模板仓库") @@ -24,6 +23,8 @@ public class TemplateWarehouseController { private BizBidTemplateWarehouseService templateWarehouseService; @Resource private BizBidClientVersionService bizBidClientVersionService; + @Resource + private ClientVersionCheckService clientVersionCheckService; /** * 通过模板类型查询模板数据 @@ -79,4 +80,20 @@ public class TemplateWarehouseController { bizBidClientVersionService.getClientByVersion(version); return BaseResponse.success(); } + + + /** + * 通过版本号获得对应客户端文件id + * + * @return + */ + @ApiOperation("查询最低最高版本号") + @GetMapping("/client/check") + public BaseResponse getClientByVersion() { + List checkList = clientVersionCheckService.list(); + if (checkList.isEmpty()){ + return BaseResponse.fail(new ClientVersionCheck()); + } + return BaseResponse.success(checkList.get(0)); + } } diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/templatewarehouse/dao/ClientVersionCheckMapper.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/templatewarehouse/dao/ClientVersionCheckMapper.java new file mode 100644 index 0000000..3a6fd5a --- /dev/null +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/templatewarehouse/dao/ClientVersionCheckMapper.java @@ -0,0 +1,10 @@ +package com.chinaunicom.mall.ebtp.extend.templatewarehouse.dao; + + +import com.chinaunicom.mall.ebtp.common.base.dao.IBaseMapper; +import com.chinaunicom.mall.ebtp.extend.templatewarehouse.entity.ClientVersionCheck; + +public interface ClientVersionCheckMapper extends IBaseMapper { + + +} diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/templatewarehouse/dao/mapper/BizBidClientVersionMapper.xml b/src/main/java/com/chinaunicom/mall/ebtp/extend/templatewarehouse/dao/mapper/BizBidClientVersionMapper.xml index 3195b5a..af1178d 100644 --- a/src/main/java/com/chinaunicom/mall/ebtp/extend/templatewarehouse/dao/mapper/BizBidClientVersionMapper.xml +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/templatewarehouse/dao/mapper/BizBidClientVersionMapper.xml @@ -7,6 +7,7 @@ + diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/templatewarehouse/dao/mapper/ClientVersionCheckMapper.xml b/src/main/java/com/chinaunicom/mall/ebtp/extend/templatewarehouse/dao/mapper/ClientVersionCheckMapper.xml new file mode 100644 index 0000000..68cf42d --- /dev/null +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/templatewarehouse/dao/mapper/ClientVersionCheckMapper.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/templatewarehouse/entity/BizBidClientVersion.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/templatewarehouse/entity/BizBidClientVersion.java index dd5bcf1..836e5cb 100644 --- a/src/main/java/com/chinaunicom/mall/ebtp/extend/templatewarehouse/entity/BizBidClientVersion.java +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/templatewarehouse/entity/BizBidClientVersion.java @@ -35,11 +35,18 @@ public class BizBidClientVersion implements Serializable { private String id; /** - * 文档中心-文档ID - */ - @ApiModelProperty(value = "文档中心-文档ID") + * 客户端对应文档中心-文档ID + */ + @ApiModelProperty(value = "客户端对应文档中心-文档ID") private String documentCenterId; + /** + * 配置文件对应文档中心-文档ID + */ + @ApiModelProperty(value = "配置文件对应文档中心-文档ID") + private String configDocumentId; + + /** * ipass客户端版本号 */ diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/templatewarehouse/entity/ClientVersionCheck.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/templatewarehouse/entity/ClientVersionCheck.java new file mode 100644 index 0000000..002f132 --- /dev/null +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/templatewarehouse/entity/ClientVersionCheck.java @@ -0,0 +1,44 @@ +package com.chinaunicom.mall.ebtp.extend.templatewarehouse.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.chinaunicom.mall.ebtp.common.base.entity.BaseEntity; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.experimental.Accessors; + +import java.io.Serializable; + +/** + * 实体类 ClientVersionCheck + * + * @auto.generated + */ +@Data +@Accessors(chain = true) +@ApiModel +@TableName(value = "client_version_check", autoResultMap = true) +public class ClientVersionCheck extends BaseEntity implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 新版本客户端版本号 + */ + @ApiModelProperty(value = "新版本客户端版本号") + private String newVersion; + + /** + * 旧版本客户端版本号 + */ + @ApiModelProperty(value = "旧版本客户端版本号") + private String oldVersion; + + /** + * 状态 是否启用校验 1-启用,2-不启用 + */ + @ApiModelProperty(value = "状态 是否启用校验 1-启用,2-不启用") + private Integer status; + + +} diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/templatewarehouse/sevice/ClientVersionCheckService.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/templatewarehouse/sevice/ClientVersionCheckService.java new file mode 100644 index 0000000..a4d4381 --- /dev/null +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/templatewarehouse/sevice/ClientVersionCheckService.java @@ -0,0 +1,16 @@ +package com.chinaunicom.mall.ebtp.extend.templatewarehouse.sevice; + + +import com.chinaunicom.mall.ebtp.common.base.service.IBaseService; +import com.chinaunicom.mall.ebtp.extend.templatewarehouse.entity.ClientVersionCheck; + +/** + * 对数据表 client_version_check 操作的 service + * @author Auto create + * + */ +public interface ClientVersionCheckService extends IBaseService{ + + + +} diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/templatewarehouse/sevice/impl/ClientVersionCheckServiceImpl.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/templatewarehouse/sevice/impl/ClientVersionCheckServiceImpl.java new file mode 100644 index 0000000..87378b0 --- /dev/null +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/templatewarehouse/sevice/impl/ClientVersionCheckServiceImpl.java @@ -0,0 +1,18 @@ +package com.chinaunicom.mall.ebtp.extend.templatewarehouse.sevice.impl; + + +import com.chinaunicom.mall.ebtp.extend.templatewarehouse.dao.ClientVersionCheckMapper; +import com.chinaunicom.mall.ebtp.extend.templatewarehouse.entity.ClientVersionCheck; +import com.chinaunicom.mall.ebtp.extend.templatewarehouse.sevice.ClientVersionCheckService; +import org.springframework.stereotype.Service; +import com.chinaunicom.mall.ebtp.common.base.service.impl.BaseServiceImpl; +/** + * 对数据表 client_version_check 操作的 serviceImpl + * @author Auto create + * + */ +@Service +public class ClientVersionCheckServiceImpl extends BaseServiceImpl implements ClientVersionCheckService { + + +} From 949c5488967ec3ac1c48635ef75eeaf29c59c705 Mon Sep 17 00:00:00 2001 From: zhangyx <1254353766@qq.com> Date: Wed, 21 Apr 2021 16:06:17 +0800 Subject: [PATCH 23/24] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AE=9E=E4=BD=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dao/mapper/ClientVersionCheckMapper.xml | 4 ++-- .../templatewarehouse/entity/ClientVersionCheck.java | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/templatewarehouse/dao/mapper/ClientVersionCheckMapper.xml b/src/main/java/com/chinaunicom/mall/ebtp/extend/templatewarehouse/dao/mapper/ClientVersionCheckMapper.xml index 68cf42d..6c08f5a 100644 --- a/src/main/java/com/chinaunicom/mall/ebtp/extend/templatewarehouse/dao/mapper/ClientVersionCheckMapper.xml +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/templatewarehouse/dao/mapper/ClientVersionCheckMapper.xml @@ -4,8 +4,8 @@ - - + + diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/templatewarehouse/entity/ClientVersionCheck.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/templatewarehouse/entity/ClientVersionCheck.java index 002f132..652352e 100644 --- a/src/main/java/com/chinaunicom/mall/ebtp/extend/templatewarehouse/entity/ClientVersionCheck.java +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/templatewarehouse/entity/ClientVersionCheck.java @@ -23,16 +23,16 @@ public class ClientVersionCheck extends BaseEntity implements Serializable { private static final long serialVersionUID = 1L; /** - * 新版本客户端版本号 + * 最高版本客户端版本号 */ - @ApiModelProperty(value = "新版本客户端版本号") - private String newVersion; + @ApiModelProperty(value = "最高版本客户端版本号") + private String highVersion; /** - * 旧版本客户端版本号 + * 最低版本客户端版本号 */ - @ApiModelProperty(value = "旧版本客户端版本号") - private String oldVersion; + @ApiModelProperty(value = "最低版本客户端版本号") + private String lowVersion; /** * 状态 是否启用校验 1-启用,2-不启用 From 9bd070550c3e09864321a834cedf8b855a871f86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BB=98=E5=BA=86=E5=90=89?= <51312040@qq.com> Date: Fri, 23 Apr 2021 16:54:04 +0800 Subject: [PATCH 24/24] =?UTF-8?q?=E9=87=8D=E6=9E=84=E5=BC=80=E6=A0=87?= =?UTF-8?q?=E4=B8=80=E8=A7=88=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/BizExportDictServiceImpl.java | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/export/service/impl/BizExportDictServiceImpl.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/export/service/impl/BizExportDictServiceImpl.java index 0b7ede0..e2ff4f4 100644 --- a/src/main/java/com/chinaunicom/mall/ebtp/extend/export/service/impl/BizExportDictServiceImpl.java +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/export/service/impl/BizExportDictServiceImpl.java @@ -56,14 +56,9 @@ public class BizExportDictServiceImpl extends BaseServiceImpl> resultsMap = new HashMap<>(); + //是否包含开标阶段 - //是否包含开标阶段 - boolean toInitialOpenRoom = "procurement_mode_1".equals(proj.getBidMethodDict()) || "procurement_mode_2".equals(proj.getBidMethodDict()); - if ("procurement_mode_3".equals(proj.getBidMethodDict())) { - if ("selection_method_1".equals(proj.getBiddingSignDict())) { - toInitialOpenRoom = true; - } - } + boolean toInitialOpenRoom = room.getRoomType().equals(CommonConstants.ROOM_TYPE_2); for (BizExportDict bizExportDict : level1) { //不含开标阶段 100 = 开标阶段 @@ -105,8 +100,7 @@ public class BizExportDictServiceImpl extends BaseServiceImpl