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-master.yaml b/deployment-master.yaml index 110aee1..04c5d8d 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 diff --git a/deployment-uat.yaml b/deployment-uat.yaml index 95e8e56..3d2e32d 100644 --- a/deployment-uat.yaml +++ b/deployment-uat.yaml @@ -82,6 +82,10 @@ spec: valueFrom: fieldRef: 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 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..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,6 +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(!EbtpRoleEnum.SYSTEM_ADMIN.getRole().equals(user.getCurrentRoleCode()),BizBidShared::getSharedRoles,user.getCurrentRoleCode()) .orderByDesc(BizBidShared::getCreateDate); if (bizBidNotice.getCreateDate() != null) { 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..5a5c097 --- /dev/null +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/userpassword/controller/UserPasswordController.java @@ -0,0 +1,33 @@ +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.*; + +import javax.annotation.Resource; + +@RestController +@Api(tags = "") +@RequestMapping("/v1/userpassword") +public class UserPasswordController{ + + @Resource + private IUserPasswordService iuserPasswordService; + + /** + * 查询数据 + * @return + */ + @ApiOperation("查询数据") + @PostMapping("/validatePassword") + public BaseResponse validatePassword(@RequestParam("code") String code){ + return BaseResponse.success(iuserPasswordService.validatePassword(code)); + } + + +} 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..0231fb3 --- /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 { + + + 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 new file mode 100644 index 0000000..ef4d5f9 --- /dev/null +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/userpassword/service/impl/UserPasswordServiceImpl.java @@ -0,0 +1,25 @@ +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.apache.commons.lang.StringUtils; +import org.springframework.stereotype.Service; +/** + * 对数据表 user_password 操作的 serviceImpl + * @author daixc + * + */ +@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; + } +}