From 3da588dd8672209fd31feeb086331fbc63234083 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E7=9A=93=E6=98=B1?= Date: Thu, 27 May 2021 18:00:32 +0800 Subject: [PATCH 01/10] =?UTF-8?q?1.=E6=97=A5=E5=BF=97=E6=8C=82=E8=BD=BD?= =?UTF-8?q?=E8=B7=AF=E5=BE=84=E4=BF=AE=E6=94=B9=202.=E5=B0=B1=E7=BB=AA?= =?UTF-8?q?=E6=A3=80=E6=B5=8B=E4=B8=8E=E5=AD=98=E6=B4=BB=E6=A3=80=E6=B5=8B?= =?UTF-8?q?=E8=A7=84=E5=88=99=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deployment-master.yaml | 55 ++++++++++++++++++++++++------------------ 1 file changed, 31 insertions(+), 24 deletions(-) diff --git a/deployment-master.yaml b/deployment-master.yaml index 110aee1..79e816c 100644 --- a/deployment-master.yaml +++ b/deployment-master.yaml @@ -36,10 +36,9 @@ spec: # 定义容器模板,该模板可以包含多个容器 spec: volumes: - - name: log - persistentVolumeClaim: - claimName: log-pvc - readOnly: false + - name: log + hostPath: + path: /var/lib/docker/log/349553515466-prod/default-group/30days affinity: podAntiAffinity: requiredDuringSchedulingIgnoredDuringExecution: @@ -60,25 +59,25 @@ spec: mountPath: /log ports: - containerPort: 18018 - #livenessProbe: - # failureThreshold: 3 - # httpGet: - # port: 18018 #[11] pod存活检测端口,修改为该微服务配置文件中server.port的端口号,与参数[5]相同 - # path: /actuator/prometheus - # scheme: HTTP - # initialDelaySeconds: 300 - # periodSeconds: 60 - # successThreshold: 1 - # timeoutSeconds: 2 - #readinessProbe: - # failureThreshold: 1 - # httpGet: - # port: 18018 #[12] pod就绪检测端口,修改为该微服务配置文件中server.port的端口号,与参数[5]相同 - # path: /actuator/prometheus - # scheme: HTTP - # periodSeconds: 5 - # successThreshold: 2 - # timeoutSeconds: 2 + livenessProbe: + failureThreshold: 3 + httpGet: + port: 18018 #[11] pod存活检测端口,修改为该微服务配置文件中server.port的端口号,与参数[5]相同 + path: /actuator/health + scheme: HTTP + initialDelaySeconds: 300 + periodSeconds: 60 + successThreshold: 1 + timeoutSeconds: 2 + readinessProbe: + failureThreshold: 1 + httpGet: + port: 18018 #[12] pod就绪检测端口,修改为该微服务配置文件中server.port的端口号,与参数[5]相同 + path: /actuator/health + scheme: HTTP + periodSeconds: 5 + successThreshold: 2 + timeoutSeconds: 2 resources: requests: cpu: 1000m @@ -90,13 +89,21 @@ spec: - name: AGENT_LICENCE value: 527BFA7B28577578 - name: APP_NAME - value: biz_service_ebtp_extend + value: biz_ebtp_extend #24位长度限,制统一去掉service - name: APOLLO_CONFIGSERVICE value: http://apollo-configservice:8080 - name: MY_POD_IP valueFrom: fieldRef: fieldPath: status.podIP + - name: JAVA_TOOL_OPTIONS + value: -XX:+UnlockExperimentalVMOptions + -XX:+UseContainerSupport + -XX:+UseCGroupMemoryLimitForHeap + -XX:InitialRAMPercentage=40.0 + -XX:MinRAMPercentage=20.0 + -XX:MaxRAMPercentage=80.0 + --- kind: Service apiVersion: v1 From bd9af4a277c15546dff8f4092842c2cc50ca4ecc 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, 28 May 2021 09:46:55 +0800 Subject: [PATCH 02/10] =?UTF-8?q?=E4=BF=AE=E6=94=B9skywalking=E9=85=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile-uat | 2 +- deployment-uat.yaml | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Dockerfile-uat b/Dockerfile-uat index 8d548e7..c441d3f 100644 --- a/Dockerfile-uat +++ b/Dockerfile-uat @@ -1,4 +1,4 @@ -FROM harbor.dcos.guangzhou.unicom.local/eshop/skywalking_agent_springboot_8.1.0:v1.0 +FROM harbor.dcos.guangzhou.unicom.local/eshop/jdk8_springboot_agent:v1.6 ENV LC_ALL=zh_CN.utf8 ENV LANG=zh_CN.utf8 ENV LANGUAGE=zh_CN.utf8 diff --git a/deployment-uat.yaml b/deployment-uat.yaml index 95e8e56..c778f5f 100644 --- a/deployment-uat.yaml +++ b/deployment-uat.yaml @@ -82,6 +82,8 @@ spec: valueFrom: fieldRef: fieldPath: status.podIP + - name: SW_AGENT_COLLECTOR_BACKEND_SERVICES + value: skywalking-oap-cluster.skywalking:11800 --- kind: Service apiVersion: v1 From 0c7d019a6b49a17dbd7f0a9ea9884a27046f88f2 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, 28 May 2021 10:02:39 +0800 Subject: [PATCH 03/10] =?UTF-8?q?=E4=BF=AE=E6=94=B9skywalking=E9=85=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deployment-uat.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/deployment-uat.yaml b/deployment-uat.yaml index c778f5f..3d2e32d 100644 --- a/deployment-uat.yaml +++ b/deployment-uat.yaml @@ -84,6 +84,8 @@ spec: fieldPath: status.podIP - name: SW_AGENT_COLLECTOR_BACKEND_SERVICES value: skywalking-oap-cluster.skywalking:11800 + - name: SW_AGENT_NAME + value: biz-service-ebtp-extend --- kind: Service apiVersion: v1 From 72f4b7251f10dfbfd9dd98a3490bb37fe448cf95 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, 28 May 2021 14:29:37 +0800 Subject: [PATCH 04/10] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deployment-master.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deployment-master.yaml b/deployment-master.yaml index 79e816c..04c5d8d 100644 --- a/deployment-master.yaml +++ b/deployment-master.yaml @@ -77,7 +77,7 @@ spec: scheme: HTTP periodSeconds: 5 successThreshold: 2 - timeoutSeconds: 2 + timeoutSeconds: 2 resources: requests: cpu: 1000m From b2a9cb9a1a42f3a5f6e171a2fd6e5be45e9f4179 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BB=98=E5=BA=86=E5=90=89?= <51312040@qq.com> Date: Sat, 5 Jun 2021 11:26:01 +0800 Subject: [PATCH 05/10] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=85=B1=E4=BA=AB?= =?UTF-8?q?=E6=96=87=E6=A1=A3=E6=9F=A5=E8=AF=A2=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bizbidshared/service/impl/BizBidSharedServiceImpl.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidshared/service/impl/BizBidSharedServiceImpl.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidshared/service/impl/BizBidSharedServiceImpl.java index d52a108..f32cacc 100644 --- a/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidshared/service/impl/BizBidSharedServiceImpl.java +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidshared/service/impl/BizBidSharedServiceImpl.java @@ -33,6 +33,7 @@ public class BizBidSharedServiceImpl extends BaseServiceImpl wrapper = Wrappers.lambdaQuery(); wrapper.like(StrUtil.isNotEmpty(bizBidNotice.getSharedName()), BizBidShared::getSharedName, bizBidNotice.getSharedName()) .like(StrUtil.isNotEmpty(bizBidNotice.getSharedRole()), BizBidShared::getSharedRole, bizBidNotice.getSharedRole()) + .like(BizBidShared::getSharedRoles,user.getCurrentRoleCode()) .orderByDesc(BizBidShared::getCreateDate); if (bizBidNotice.getCreateDate() != null) { From e0d1ddd9d156a17e278076ea7698f106f48de377 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BB=98=E5=BA=86=E5=90=89?= <51312040@qq.com> Date: Tue, 8 Jun 2021 14:14:56 +0800 Subject: [PATCH 06/10] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=85=B1=E4=BA=AB?= =?UTF-8?q?=E6=96=87=E6=A1=A3=E6=9F=A5=E8=AF=A2=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bizbidshared/service/impl/BizBidSharedServiceImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidshared/service/impl/BizBidSharedServiceImpl.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidshared/service/impl/BizBidSharedServiceImpl.java index f32cacc..48a371f 100644 --- a/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidshared/service/impl/BizBidSharedServiceImpl.java +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/bizbidshared/service/impl/BizBidSharedServiceImpl.java @@ -9,6 +9,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.chinaunicom.mall.ebtp.common.base.entity.BaseCacheUser; import com.chinaunicom.mall.ebtp.common.base.service.IBaseCacheUserService; import com.chinaunicom.mall.ebtp.common.base.service.impl.BaseServiceImpl; +import com.chinaunicom.mall.ebtp.common.constant.EbtpRoleEnum; import com.chinaunicom.mall.ebtp.extend.bizbidshared.dao.BizBidSharedMapper; import com.chinaunicom.mall.ebtp.extend.bizbidshared.entity.BizBidShared; import com.chinaunicom.mall.ebtp.extend.bizbidshared.entity.BizBidSharedVO; @@ -33,7 +34,7 @@ public class BizBidSharedServiceImpl extends BaseServiceImpl wrapper = Wrappers.lambdaQuery(); wrapper.like(StrUtil.isNotEmpty(bizBidNotice.getSharedName()), BizBidShared::getSharedName, bizBidNotice.getSharedName()) .like(StrUtil.isNotEmpty(bizBidNotice.getSharedRole()), BizBidShared::getSharedRole, bizBidNotice.getSharedRole()) - .like(BizBidShared::getSharedRoles,user.getCurrentRoleCode()) + .like(!EbtpRoleEnum.SYSTEM_ADMIN.getRole().equals(user.getCurrentRoleCode()),BizBidShared::getSharedRoles,user.getCurrentRoleCode()) .orderByDesc(BizBidShared::getCreateDate); if (bizBidNotice.getCreateDate() != null) { From 6481d1b43644044bc96b074aa533d676051a0785 Mon Sep 17 00:00:00 2001 From: yss <17921@qq.com> Date: Tue, 15 Jun 2021 14:53:46 +0800 Subject: [PATCH 07/10] =?UTF-8?q?=E5=B9=B3=E5=8F=B0=E5=AF=86=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/UserPasswordController.java | 39 +++++++++++++++++++ .../userpassword/dao/UserPasswordMapper.java | 13 +++++++ .../dao/mapper/UserPasswordMapper.xml | 17 ++++++++ .../userpassword/entity/UserPassword.java | 33 ++++++++++++++++ .../service/IUserPasswordService.java | 16 ++++++++ .../service/impl/UserPasswordServiceImpl.java | 17 ++++++++ 6 files changed, 135 insertions(+) create mode 100644 src/main/java/com/chinaunicom/mall/ebtp/extend/userpassword/controller/UserPasswordController.java create mode 100644 src/main/java/com/chinaunicom/mall/ebtp/extend/userpassword/dao/UserPasswordMapper.java create mode 100644 src/main/java/com/chinaunicom/mall/ebtp/extend/userpassword/dao/mapper/UserPasswordMapper.xml create mode 100644 src/main/java/com/chinaunicom/mall/ebtp/extend/userpassword/entity/UserPassword.java create mode 100644 src/main/java/com/chinaunicom/mall/ebtp/extend/userpassword/service/IUserPasswordService.java create mode 100644 src/main/java/com/chinaunicom/mall/ebtp/extend/userpassword/service/impl/UserPasswordServiceImpl.java diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/userpassword/controller/UserPasswordController.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/userpassword/controller/UserPasswordController.java new file mode 100644 index 0000000..95a87e7 --- /dev/null +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/userpassword/controller/UserPasswordController.java @@ -0,0 +1,39 @@ +package com.chinaunicom.mall.ebtp.extend.userpassword.controller; + + +import com.chinaunicom.mall.ebtp.common.base.entity.BaseResponse; +import com.chinaunicom.mall.ebtp.extend.userpassword.entity.UserPassword; +import com.chinaunicom.mall.ebtp.extend.userpassword.service.IUserPasswordService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import javax.annotation.Resource; + +@RestController +@Api(tags = "") +@RequestMapping("/api/userpassword") +public class UserPasswordController{ + + @Resource + private IUserPasswordService iuserPasswordService; + + /** + * 查询数据 + * @return + */ + @ApiOperation("查询数据") + @GetMapping("/getPassword") + public BaseResponse getPassword(){ + + UserPassword userPassword = iuserPasswordService.list().get(0); + + return BaseResponse.success(userPassword); + } + + +} diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/userpassword/dao/UserPasswordMapper.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/userpassword/dao/UserPasswordMapper.java new file mode 100644 index 0000000..f15ea6c --- /dev/null +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/userpassword/dao/UserPasswordMapper.java @@ -0,0 +1,13 @@ +package com.chinaunicom.mall.ebtp.extend.userpassword.dao; + + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.chinaunicom.mall.ebtp.extend.userpassword.entity.UserPassword; + +/** +* @author daixc +*/ +public interface UserPasswordMapper extends BaseMapper { + + +} diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/userpassword/dao/mapper/UserPasswordMapper.xml b/src/main/java/com/chinaunicom/mall/ebtp/extend/userpassword/dao/mapper/UserPasswordMapper.xml new file mode 100644 index 0000000..6551b85 --- /dev/null +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/userpassword/dao/mapper/UserPasswordMapper.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + update user_password + set + delete_flag="deleted" + where ID=#{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/userpassword/entity/UserPassword.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/userpassword/entity/UserPassword.java new file mode 100644 index 0000000..2613439 --- /dev/null +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/userpassword/entity/UserPassword.java @@ -0,0 +1,33 @@ +package com.chinaunicom.mall.ebtp.extend.userpassword.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +import java.io.Serializable; + +/** + * 实体类 UserPassword + * + * @auto.generated + */ +@Data +@Accessors(chain = true) +@ApiModel +@EqualsAndHashCode(callSuper = false) +@TableName(value = "user_password", autoResultMap = true) +public class UserPassword implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * + */ + @ApiModelProperty(value = "") + private String password; + + +} diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/userpassword/service/IUserPasswordService.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/userpassword/service/IUserPasswordService.java new file mode 100644 index 0000000..919ea73 --- /dev/null +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/userpassword/service/IUserPasswordService.java @@ -0,0 +1,16 @@ +package com.chinaunicom.mall.ebtp.extend.userpassword.service; + + +import com.baomidou.mybatisplus.extension.service.IService; +import com.chinaunicom.mall.ebtp.extend.userpassword.entity.UserPassword; + +/** + * 对数据表 user_password 操作的 service + * @author Auto create + * + */ +public interface IUserPasswordService extends IService { + + + +} diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/userpassword/service/impl/UserPasswordServiceImpl.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/userpassword/service/impl/UserPasswordServiceImpl.java new file mode 100644 index 0000000..752ab11 --- /dev/null +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/userpassword/service/impl/UserPasswordServiceImpl.java @@ -0,0 +1,17 @@ +package com.chinaunicom.mall.ebtp.extend.userpassword.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.chinaunicom.mall.ebtp.extend.userpassword.dao.UserPasswordMapper; +import com.chinaunicom.mall.ebtp.extend.userpassword.entity.UserPassword; +import com.chinaunicom.mall.ebtp.extend.userpassword.service.IUserPasswordService; +import org.springframework.stereotype.Service; +/** + * 对数据表 user_password 操作的 serviceImpl + * @author daixc + * + */ +@Service +public class UserPasswordServiceImpl extends ServiceImpl implements IUserPasswordService { + + +} From d405d4d10f0e60be563ff974ab9a6e6fd0440a0a Mon Sep 17 00:00:00 2001 From: yss <17921@qq.com> Date: Tue, 15 Jun 2021 16:02:18 +0800 Subject: [PATCH 08/10] =?UTF-8?q?=E5=B9=B3=E5=8F=B0=E5=AF=86=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/UserPasswordController.java | 14 ++++---------- .../userpassword/service/IUserPasswordService.java | 2 +- .../service/impl/UserPasswordServiceImpl.java | 10 +++++++++- 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/userpassword/controller/UserPasswordController.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/userpassword/controller/UserPasswordController.java index 95a87e7..61292b1 100644 --- a/src/main/java/com/chinaunicom/mall/ebtp/extend/userpassword/controller/UserPasswordController.java +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/userpassword/controller/UserPasswordController.java @@ -7,10 +7,7 @@ import com.chinaunicom.mall.ebtp.extend.userpassword.service.IUserPasswordServic import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; @@ -27,12 +24,9 @@ public class UserPasswordController{ * @return */ @ApiOperation("查询数据") - @GetMapping("/getPassword") - public BaseResponse getPassword(){ - - UserPassword userPassword = iuserPasswordService.list().get(0); - - return BaseResponse.success(userPassword); + @PostMapping("/validatePassword") + public BaseResponse validatePassword(@RequestParam String code){ + return BaseResponse.success(iuserPasswordService.validatePassword(code)); } diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/userpassword/service/IUserPasswordService.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/userpassword/service/IUserPasswordService.java index 919ea73..0231fb3 100644 --- a/src/main/java/com/chinaunicom/mall/ebtp/extend/userpassword/service/IUserPasswordService.java +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/userpassword/service/IUserPasswordService.java @@ -12,5 +12,5 @@ import com.chinaunicom.mall.ebtp.extend.userpassword.entity.UserPassword; public interface IUserPasswordService extends IService { - + boolean validatePassword(String code); } diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/userpassword/service/impl/UserPasswordServiceImpl.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/userpassword/service/impl/UserPasswordServiceImpl.java index 752ab11..ef4d5f9 100644 --- a/src/main/java/com/chinaunicom/mall/ebtp/extend/userpassword/service/impl/UserPasswordServiceImpl.java +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/userpassword/service/impl/UserPasswordServiceImpl.java @@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.chinaunicom.mall.ebtp.extend.userpassword.dao.UserPasswordMapper; import com.chinaunicom.mall.ebtp.extend.userpassword.entity.UserPassword; import com.chinaunicom.mall.ebtp.extend.userpassword.service.IUserPasswordService; +import org.apache.commons.lang.StringUtils; import org.springframework.stereotype.Service; /** * 对数据表 user_password 操作的 serviceImpl @@ -13,5 +14,12 @@ import org.springframework.stereotype.Service; @Service public class UserPasswordServiceImpl extends ServiceImpl implements IUserPasswordService { - + @Override + public boolean validatePassword(String code) { + UserPassword userPassword = this.list().get(0); + if(StringUtils.isNotBlank(code) && code.equals(userPassword.getPassword())){ + return true; + } + return false; + } } From 6ebd72bd55870e3cccddcecca7134ac7540c1bf8 Mon Sep 17 00:00:00 2001 From: yss <17921@qq.com> Date: Tue, 15 Jun 2021 16:40:19 +0800 Subject: [PATCH 09/10] =?UTF-8?q?=E5=B9=B3=E5=8F=B0=E5=AF=86=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../extend/userpassword/controller/UserPasswordController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/userpassword/controller/UserPasswordController.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/userpassword/controller/UserPasswordController.java index 61292b1..0765f8e 100644 --- a/src/main/java/com/chinaunicom/mall/ebtp/extend/userpassword/controller/UserPasswordController.java +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/userpassword/controller/UserPasswordController.java @@ -13,7 +13,7 @@ import javax.annotation.Resource; @RestController @Api(tags = "") -@RequestMapping("/api/userpassword") +@RequestMapping("/v1/userpassword") public class UserPasswordController{ @Resource From ba7ccc4fd86c9e41a59b55fe9c5924b3ac73f850 Mon Sep 17 00:00:00 2001 From: yss <17921@qq.com> Date: Tue, 15 Jun 2021 16:46:20 +0800 Subject: [PATCH 10/10] =?UTF-8?q?=E5=B9=B3=E5=8F=B0=E5=AF=86=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../extend/userpassword/controller/UserPasswordController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/userpassword/controller/UserPasswordController.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/userpassword/controller/UserPasswordController.java index 0765f8e..5a5c097 100644 --- a/src/main/java/com/chinaunicom/mall/ebtp/extend/userpassword/controller/UserPasswordController.java +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/userpassword/controller/UserPasswordController.java @@ -25,7 +25,7 @@ public class UserPasswordController{ */ @ApiOperation("查询数据") @PostMapping("/validatePassword") - public BaseResponse validatePassword(@RequestParam String code){ + public BaseResponse validatePassword(@RequestParam("code") String code){ return BaseResponse.success(iuserPasswordService.validatePassword(code)); }