Merge branch 'master' into 'sim'
Master See merge request eshop/biz_service_ebtp_extend!49
This commit is contained in:
@ -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 LC_ALL=zh_CN.utf8
|
||||||
ENV LANG=zh_CN.utf8
|
ENV LANG=zh_CN.utf8
|
||||||
ENV LANGUAGE=zh_CN.utf8
|
ENV LANGUAGE=zh_CN.utf8
|
||||||
|
@ -36,10 +36,9 @@ spec:
|
|||||||
# 定义容器模板,该模板可以包含多个容器
|
# 定义容器模板,该模板可以包含多个容器
|
||||||
spec:
|
spec:
|
||||||
volumes:
|
volumes:
|
||||||
- name: log
|
- name: log
|
||||||
persistentVolumeClaim:
|
hostPath:
|
||||||
claimName: log-pvc
|
path: /var/lib/docker/log/349553515466-prod/default-group/30days
|
||||||
readOnly: false
|
|
||||||
affinity:
|
affinity:
|
||||||
podAntiAffinity:
|
podAntiAffinity:
|
||||||
requiredDuringSchedulingIgnoredDuringExecution:
|
requiredDuringSchedulingIgnoredDuringExecution:
|
||||||
@ -60,25 +59,25 @@ spec:
|
|||||||
mountPath: /log
|
mountPath: /log
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 18018
|
- containerPort: 18018
|
||||||
#livenessProbe:
|
livenessProbe:
|
||||||
# failureThreshold: 3
|
failureThreshold: 3
|
||||||
# httpGet:
|
httpGet:
|
||||||
# port: 18018 #[11] pod存活检测端口,修改为该微服务配置文件中server.port的端口号,与参数[5]相同
|
port: 18018 #[11] pod存活检测端口,修改为该微服务配置文件中server.port的端口号,与参数[5]相同
|
||||||
# path: /actuator/prometheus
|
path: /actuator/health
|
||||||
# scheme: HTTP
|
scheme: HTTP
|
||||||
# initialDelaySeconds: 300
|
initialDelaySeconds: 300
|
||||||
# periodSeconds: 60
|
periodSeconds: 60
|
||||||
# successThreshold: 1
|
successThreshold: 1
|
||||||
# timeoutSeconds: 2
|
timeoutSeconds: 2
|
||||||
#readinessProbe:
|
readinessProbe:
|
||||||
# failureThreshold: 1
|
failureThreshold: 1
|
||||||
# httpGet:
|
httpGet:
|
||||||
# port: 18018 #[12] pod就绪检测端口,修改为该微服务配置文件中server.port的端口号,与参数[5]相同
|
port: 18018 #[12] pod就绪检测端口,修改为该微服务配置文件中server.port的端口号,与参数[5]相同
|
||||||
# path: /actuator/prometheus
|
path: /actuator/health
|
||||||
# scheme: HTTP
|
scheme: HTTP
|
||||||
# periodSeconds: 5
|
periodSeconds: 5
|
||||||
# successThreshold: 2
|
successThreshold: 2
|
||||||
# timeoutSeconds: 2
|
timeoutSeconds: 2
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
cpu: 1000m
|
cpu: 1000m
|
||||||
@ -90,13 +89,21 @@ spec:
|
|||||||
- name: AGENT_LICENCE
|
- name: AGENT_LICENCE
|
||||||
value: 527BFA7B28577578
|
value: 527BFA7B28577578
|
||||||
- name: APP_NAME
|
- name: APP_NAME
|
||||||
value: biz_service_ebtp_extend
|
value: biz_ebtp_extend #24位长度限,制统一去掉service
|
||||||
- name: APOLLO_CONFIGSERVICE
|
- name: APOLLO_CONFIGSERVICE
|
||||||
value: http://apollo-configservice:8080
|
value: http://apollo-configservice:8080
|
||||||
- name: MY_POD_IP
|
- name: MY_POD_IP
|
||||||
valueFrom:
|
valueFrom:
|
||||||
fieldRef:
|
fieldRef:
|
||||||
fieldPath: status.podIP
|
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
|
kind: Service
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
|
@ -82,6 +82,10 @@ spec:
|
|||||||
valueFrom:
|
valueFrom:
|
||||||
fieldRef:
|
fieldRef:
|
||||||
fieldPath: status.podIP
|
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
|
kind: Service
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
|
@ -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.entity.BaseCacheUser;
|
||||||
import com.chinaunicom.mall.ebtp.common.base.service.IBaseCacheUserService;
|
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.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.dao.BizBidSharedMapper;
|
||||||
import com.chinaunicom.mall.ebtp.extend.bizbidshared.entity.BizBidShared;
|
import com.chinaunicom.mall.ebtp.extend.bizbidshared.entity.BizBidShared;
|
||||||
import com.chinaunicom.mall.ebtp.extend.bizbidshared.entity.BizBidSharedVO;
|
import com.chinaunicom.mall.ebtp.extend.bizbidshared.entity.BizBidSharedVO;
|
||||||
@ -33,6 +34,7 @@ public class BizBidSharedServiceImpl extends BaseServiceImpl<BizBidSharedMapper,
|
|||||||
LambdaQueryWrapper<BizBidShared> wrapper = Wrappers.lambdaQuery();
|
LambdaQueryWrapper<BizBidShared> wrapper = Wrappers.lambdaQuery();
|
||||||
wrapper.like(StrUtil.isNotEmpty(bizBidNotice.getSharedName()), BizBidShared::getSharedName, bizBidNotice.getSharedName())
|
wrapper.like(StrUtil.isNotEmpty(bizBidNotice.getSharedName()), BizBidShared::getSharedName, bizBidNotice.getSharedName())
|
||||||
.like(StrUtil.isNotEmpty(bizBidNotice.getSharedRole()), BizBidShared::getSharedRole, bizBidNotice.getSharedRole())
|
.like(StrUtil.isNotEmpty(bizBidNotice.getSharedRole()), BizBidShared::getSharedRole, bizBidNotice.getSharedRole())
|
||||||
|
.like(!EbtpRoleEnum.SYSTEM_ADMIN.getRole().equals(user.getCurrentRoleCode()),BizBidShared::getSharedRoles,user.getCurrentRoleCode())
|
||||||
.orderByDesc(BizBidShared::getCreateDate);
|
.orderByDesc(BizBidShared::getCreateDate);
|
||||||
|
|
||||||
if (bizBidNotice.getCreateDate() != null) {
|
if (bizBidNotice.getCreateDate() != null) {
|
||||||
|
@ -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<Boolean> validatePassword(@RequestParam("code") String code){
|
||||||
|
return BaseResponse.success(iuserPasswordService.validatePassword(code));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -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<UserPassword> {
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
|
||||||
|
<mapper namespace="com.chinaunicom.mall.ebtp.extend.userpassword.dao.UserPasswordMapper">
|
||||||
|
<resultMap id="BaseResultMap"
|
||||||
|
type="com.chinaunicom.mall.ebtp.extend.userpassword.entity.UserPassword">
|
||||||
|
<result column="password" jdbcType="VARCHAR" property="password"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<!--逻辑删除方法 此方法为代码生成器生成 不允许修改 如有特殊需求 请自行新建SQL语句-->
|
||||||
|
<update id="deleteOff" parameterType="java.lang.Long">
|
||||||
|
update user_password
|
||||||
|
set
|
||||||
|
delete_flag="deleted"
|
||||||
|
where ID=#{id,jdbcType=BIGINT}
|
||||||
|
</update>
|
||||||
|
</mapper>
|
@ -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;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -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<UserPassword> {
|
||||||
|
|
||||||
|
|
||||||
|
boolean validatePassword(String code);
|
||||||
|
}
|
@ -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<UserPasswordMapper, UserPassword> 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;
|
||||||
|
}
|
||||||
|
}
|
Reference in New Issue
Block a user