优化客户后台

master
river 4 years ago
parent 83187434b6
commit 5f23ebd502
  1. 125
      dq-financial-crms/src/main/java/com/daqing/financial/crms/service/impl/CustomerServiceImpl.java
  2. BIN
      dq-financial-crms/target/classes/com/daqing/financial/crms/service/impl/CustomerServiceImpl.class
  3. 2
      dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/controller/UserLoginController.java
  4. 4
      dq-financial-hrms-auth/src/main/resources/bootstrap.properties
  5. 1
      dq-financial-hrms/src/main/java/com/daqing/financial/hrms/service/impl/EmployeeServiceImpl.java
  6. 25
      dq-financial-hrms/src/main/resources/mapper/hrms/EmployeeDao.xml
  7. BIN
      dq-financial-hrms/target/classes/com/daqing/financial/hrms/controller/DeptController.class
  8. 25
      dq-financial-hrms/target/classes/mapper/hrms/EmployeeDao.xml
  9. 6
      dq-framework-common/src/main/java/com/daqing/framework/util/JwtUtils.java
  10. 92
      dq-framework-model/src/main/java/com/daqing/framework/domain/crms/ext/CustomerCompanyDTO.java
  11. 19
      dq-framework-model/src/main/java/com/daqing/framework/domain/crms/ext/CustomerCompanyVO.java
  12. 101
      dq-framework-model/src/main/java/com/daqing/framework/domain/crms/ext/CustomerPersonalDTO.java
  13. 2
      dq-framework-model/src/main/java/com/daqing/framework/domain/crms/ext/CustomerPersonalVO.java
  14. BIN
      dq-framework-model/target/classes/com/daqing/framework/domain/crms/ext/CustomerCompanyVO.class
  15. BIN
      dq-framework-model/target/classes/com/daqing/framework/domain/hrms/response/HrmsCode.class
  16. 4
      dq-govern-gateway/src/main/java/com/daqing/financial/gateway/config/ApiGlobalFilter.java
  17. 14
      dq-govern-gateway/src/main/resources/application.yml
  18. 12
      dq-govern-gateway/src/main/resources/bootstrap.properties
  19. 5
      dq-govern-gateway/src/main/resources/jwt.properties
  20. 34
      dq-govern-gateway/target/classes/application.yml
  21. 12
      dq-govern-gateway/target/classes/bootstrap.properties
  22. 5
      dq-govern-gateway/target/classes/jwt.properties

@ -63,12 +63,10 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerDao, CustomerEntity
// 时间参数校验
this.timeCheckout(customerRequest.getCreateTime(), customerRequest.getStartTime(), customerRequest.getEndTime(), customerRequest);
// 分页参数校验
Page<Object> pages = this.pageCheckout(page, size);
// 查询所有客户的基本信息
IPage<CustomerEntity> customerEntityIPage = customerDao.queryList(pages, customerRequest);
// 获取所有的客户基本信息
List<CustomerEntity> customers = customerEntityIPage.getRecords();
// 获取所有的客户经理id
@ -78,10 +76,8 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerDao, CustomerEntity
//TODO 远程调用查询客户经理信息的接口
ResponseResult responseResult = hrmsFeignService.getEmployeeAndDeptById(ids);
List<EmployeeTO> employeeTO = (List<EmployeeTO>) responseResult.getData();
// 将客户信息和客户经理及部门信息拼装起来
List<CustomerTO> customerTOS = this.jointCustomerEmployee(customers, employeeTO);
// 属性拷贝,将泛型为CustomerEntity类型的IPage的属性拷贝给泛型为CustomerTO类型的IPage,才能赋值给PageUtils
IPage<CustomerTO> iPage = new Page<>();
BeanUtils.copyProperties(customerEntityIPage, iPage);
@ -101,6 +97,33 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerDao, CustomerEntity
@Override
public ResponseResult queryCustomerById(Long id) {
if (id == null){
return new ResponseResult(CommonCode.INVALID_PARAM);
}
// 员工基本信息
CustomerEntity customer = customerDao.queryCustomerById(id);
if (customer == null) {
return new ResponseResult(CommonCode.INEXISTENCE);
}
// 判断该客户的类型
if (Objects.equals(customer.getType(), CrmsConstant.CustomerType.PERSONAL_CUSTOMER.getType())) {
PersonalCustomerEntity personalCustomerEntity = personalCustomerDao.queryPersonalCustomerById(id);
// 封装个人类型客户信息
CustomerPersonalDTO customerPersonalDTO = this.setPersonal(customer,personalCustomerEntity);
return new ResponseResult<CustomerPersonalDTO>().SUCCESS(customerPersonalDTO);
} else {
CompanyCustomerEntity companyCustomerEntity = companyCustomerDao.queryCompanyCustomerById(id);
// 封装企业类型客户信息
CustomerCompanyDTO customerCompanyDTO = this.setCompany(customer, companyCustomerEntity);
return new ResponseResult<CustomerCompanyDTO>().SUCCESS(customerCompanyDTO);
}
}
/**
* 根据id查询客户的信息(导入到excel中)
*/
public ResponseResult getCustomerById(Long id) {
if (id == null){
return new ResponseResult(CommonCode.INVALID_PARAM);
}
@ -203,6 +226,9 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerDao, CustomerEntity
@Transactional
@Override
public boolean updateCustomerPersonal(CustomerEntity customerEntity, PersonalCustomerEntity personalCustomerEntity) {
if (customerEntity.getId() == null){
return false;
}
customerEntity.setMotifyTime(new Date());
boolean customer = customerDao.updateCustomer(customerEntity);
personalCustomerEntity.setCustomerId(customerEntity.getId());
@ -219,6 +245,9 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerDao, CustomerEntity
@Transactional
@Override
public boolean updateCustomerCompany(CustomerEntity customerEntity, CompanyCustomerEntity companyCustomerEntity) {
if (customerEntity.getId() == null){
return false;
}
customerEntity.setMotifyTime(new Date());
boolean customer = customerDao.updateCustomer(customerEntity);
companyCustomerEntity.setCustomerId(customerEntity.getId());
@ -239,7 +268,7 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerDao, CustomerEntity
List<CustomerPersonalVO> personalList = new ArrayList<>();
List<Long> longList = customerDao.listCustomerId();
for (Long id : longList) {
ResponseResult responseResult = this.queryCustomerById(id);
ResponseResult responseResult = this.getCustomerById(id);
if ((responseResult.getData()).getClass() == CustomerCompanyVO.class){
companyList.add((CustomerCompanyVO) responseResult.getData());
}else {
@ -337,7 +366,7 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerDao, CustomerEntity
*/
private void timeCheckout(Integer createTime, String startTime, String endTime, CustomerRequest customerRequest) {
// 没有选择自定义时间且选择了固定的"3个月内、6个月内、9个月内...."时间
if (startTime == null && endTime == null && createTime != null) {
if ((startTime == null || startTime.length() == 0) && (endTime == null || endTime.length() == 0) && createTime != null) {
if (createTime == 3 || createTime == 6 || createTime == 9 || createTime == 12) {
String pastTime = this.pastTime(createTime);
customerRequest.setStartTime(pastTime);
@ -399,95 +428,77 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerDao, CustomerEntity
private List<CustomerTO> jointCustomerEmployee(List<CustomerEntity> customers, List<EmployeeTO> employeeTO) {
List<CustomerTO> customerTOS = new ArrayList<>();// 用于拼装客户信息和员工及部门信息的集合
CustomerTO customerTO;
// 将客户信息和客户经理及部门信息拼装起来
for (CustomerEntity customer : customers) {
// 每一个客户对应一个不同的对象
customerTO = new CustomerTO();
for (EmployeeTO anEmployeeTO : employeeTO) {
if (Objects.equals(customer.getManager(), anEmployeeTO.getId())) {
customerTO.setId(customer.getId());
customerTO.setCode(customer.getCode());
customerTO.setName(customer.getName());
customerTO.setPhone(customer.getPhone());
customerTO.setType(customer.getType());
BeanUtils.copyProperties(customer,customerTO);
customerTO.setManager(anEmployeeTO.getEmpName());
customerTO.setDepartments(anEmployeeTO.getDeptNames());
customerTOS.add(customerTO);
}
}
if (!Objects.equals(customerTO.getId(), customer.getId())) {
customerTO.setId(customer.getId());
customerTO.setCode(customer.getCode());
customerTO.setName(customer.getName());
customerTO.setPhone(customer.getPhone());
customerTO.setType(customer.getType());
BeanUtils.copyProperties(customer,customerTO);
customerTOS.add(customerTO);
}
}
return customerTOS;
}
/**
* 封装个人类型的客户信息
*
* @param customer 客户基本信息
* @param name 客户经理姓名
* @param personal 个人类型信息
* @return
*/
private CustomerPersonalVO setPersonal(CustomerEntity customer, String name, PersonalCustomerEntity personal) {
private CustomerPersonalDTO setPersonal(CustomerEntity customer, PersonalCustomerEntity personal) {
//BeanUtils能批量封装相同字段名称和类型的属性的值
CustomerPersonalVO customerPersonalVO = new CustomerPersonalVO();
customerPersonalVO.setCode(customer.getCode());
customerPersonalVO.setType(customer.getType());
customerPersonalVO.setManager(name);
customerPersonalVO.setName(customer.getName());
customerPersonalVO.setAddr(customer.getAddr());
customerPersonalVO.setPhone(customer.getPhone());
customerPersonalVO.setIdCard(personal.getIdCard());
customerPersonalVO.setAge(personal.getAge());
customerPersonalVO.setGender(personal.getGender());
customerPersonalVO.setMaritalStatus(personal.getMaritalStatus());
customerPersonalVO.setEducation(personal.getEducation());
customerPersonalVO.setEmployer(personal.getEmployer());
customerPersonalVO.setPosition(personal.getPosition());
customerPersonalVO.setWorkingYears(personal.getWorkingYears());
customerPersonalVO.setSocialSecurityNum(personal.getSocialSecurityNum());
customerPersonalVO.setLivingSituation(personal.getLivingSituation());
customerPersonalVO.setResidenceAddr(personal.getResidenceAddr());
customerPersonalVO.setBusinessSource(personal.getBusinessSource());
customerPersonalVO.setEmergencyLinkman(personal.getEmergencyLinkman());
customerPersonalVO.setEmergencyLinkmanRelationship(personal.getEmergencyLinkmanRelationship());
customerPersonalVO.setEmergencyLinkmanPhone(personal.getEmergencyLinkmanPhone());
return customerPersonalVO;
CustomerPersonalDTO personalDTO = new CustomerPersonalDTO();
BeanUtils.copyProperties(customer,personalDTO);
BeanUtils.copyProperties(personal,personalDTO);
return personalDTO;
}
/**
* 封装企业类型的客户信息
*
* @param customer 客户基本信息
* @param name 客户经理姓名
* @param company 企业类型信息
* @return
*/
private CustomerCompanyDTO setCompany(CustomerEntity customer, CompanyCustomerEntity company) {
CustomerCompanyDTO companyDTO = new CustomerCompanyDTO();
BeanUtils.copyProperties(customer,companyDTO);
BeanUtils.copyProperties(company,companyDTO);
return companyDTO;
}
/**
* 封装企业类型的客户信息(excel)
*/
private CustomerCompanyVO setCompany(CustomerEntity customer, String name, CompanyCustomerEntity company) {
CustomerCompanyVO customerCompanyVO = new CustomerCompanyVO();
customerCompanyVO.setCode(customer.getCode());
customerCompanyVO.setType(customer.getType());
BeanUtils.copyProperties(customer,customerCompanyVO);
BeanUtils.copyProperties(company,customerCompanyVO);
customerCompanyVO.setManager(name);
customerCompanyVO.setName(customer.getName());
customerCompanyVO.setAddr(customer.getAddr());
customerCompanyVO.setPhone(customer.getPhone());
customerCompanyVO.setRegisteredCapital(company.getRegisteredCapital());
customerCompanyVO.setIndustry(company.getIndustry());
customerCompanyVO.setYears(company.getYears());
customerCompanyVO.setRegion(company.getRegion());
customerCompanyVO.setShareholder(company.getShareholder());
customerCompanyVO.setAffiliatedCompany(company.getAffiliatedCompany());
customerCompanyVO.setEmployeeNumber(company.getEmpNum());
customerCompanyVO.setLinkman(company.getLinkman());
customerCompanyVO.setBusinessSource(company.getBusinessSource());
return customerCompanyVO;
}
/**
* 封装个人类型的客户信息(excel)
*/
private CustomerPersonalVO setPersonal(CustomerEntity customer, String name, PersonalCustomerEntity personal) {
//BeanUtils能批量封装相同字段名称和类型的属性的值
CustomerPersonalVO customerPersonalVO = new CustomerPersonalVO();
BeanUtils.copyProperties(customer,customerPersonalVO);
BeanUtils.copyProperties(personal,customerPersonalVO);
customerPersonalVO.setManager(name);
return customerPersonalVO;
}
}

@ -14,7 +14,7 @@ import javax.validation.Valid;
/**
* @auther River
* @auther River
* @date 2020/9/22 15:27
*/
@RestController

@ -18,9 +18,9 @@ spring.cloud.nacos.config.ext-config[2].data-id=other.yml
spring.cloud.nacos.config.ext-config[2].group=dev
spring.cloud.nacos.config.ext-config[2].refresh=true
spring.redis.host=127.0.0.1
spring.redis.host=192.168.232.128
spring.redis.port=6379
spring.redis.password=123456
spring.redis.password=
spring.redis.database=0
spring.redis.timeout=30000
spring.redis.jedis.pool.max-active=8

@ -55,5 +55,4 @@ public class EmployeeServiceImpl extends ServiceImpl<EmployeeDao, EmployeeEntity
return this.getBaseMapper().listEmployeeName();
}
}

@ -35,7 +35,10 @@
ON e.id = ed.employee_id
LEFT JOIN hrms_dept d
ON d.id = ed.dept_id
WHERE e.id
LEFT JOIN hrms_user u
ON e.user_id = u.id
WHERE u.del_or_not = 0
AND e.id
IN
<foreach collection="ids" open="(" separator="," close=")" item="id">
#{id}
@ -44,7 +47,12 @@
<!-- 根据id查询员工姓名 -->
<select id="getEmployeeById" parameterType="long" resultType="com.daqing.framework.domain.hrms.EmployeeEntity">
SELECT name FROM hrms_employee WHERE id = #{id}
SELECT e.name name
FROM hrms_employee e
LEFT JOIN hrms_user u
ON e.user_id = u.id
WHERE u.del_or_not = 0
AND e.id = #{id}
</select>
<!-- 根据部门id获取该部门下面所有的员工 -->
@ -55,15 +63,22 @@
ON e.id = ed.employee_id
LEFT JOIN hrms_dept d
ON ed.dept_id = d.id
WHERE d.id = #{id}
LEFT JOIN hrms_user u
ON e.user_id = u.id
WHERE u.del_or_not = 0
AND d.id = #{id}
</select>
<!-- 查询所有的员工姓名和id -->
<select id="listEmployeeName" resultType="com.daqing.framework.domain.hrms.ext.EmployeeVO">
SELECT id,name
FROM hrms_employee
SELECT e.id id,e.name name
FROM hrms_employee e
LEFT JOIN hrms_user u
ON e.user_id = u.id
WHERE u.del_or_not = 0
</select>
<!-- //TODO 修改查询员工为user表的del_or_not = 0的员工 -->
<select id="pageByCondition" resultMap="employeeMap">
SELECT e.id eid,e.name emp_name,d.name
,u.account,e.job_number,u.create_time,p.name pos_name

@ -35,7 +35,10 @@
ON e.id = ed.employee_id
LEFT JOIN hrms_dept d
ON d.id = ed.dept_id
WHERE e.id
LEFT JOIN hrms_user u
ON e.user_id = u.id
WHERE u.del_or_not = 0
AND e.id
IN
<foreach collection="ids" open="(" separator="," close=")" item="id">
#{id}
@ -44,7 +47,12 @@
<!-- 根据id查询员工姓名 -->
<select id="getEmployeeById" parameterType="long" resultType="com.daqing.framework.domain.hrms.EmployeeEntity">
SELECT name FROM hrms_employee WHERE id = #{id}
SELECT e.name name
FROM hrms_employee e
LEFT JOIN hrms_user u
ON e.user_id = u.id
WHERE u.del_or_not = 0
AND e.id = #{id}
</select>
<!-- 根据部门id获取该部门下面所有的员工 -->
@ -55,15 +63,22 @@
ON e.id = ed.employee_id
LEFT JOIN hrms_dept d
ON ed.dept_id = d.id
WHERE d.id = #{id}
LEFT JOIN hrms_user u
ON e.user_id = u.id
WHERE u.del_or_not = 0
AND d.id = #{id}
</select>
<!-- 查询所有的员工姓名和id -->
<select id="listEmployeeName" resultType="com.daqing.framework.domain.hrms.ext.EmployeeVO">
SELECT id,name
FROM hrms_employee
SELECT e.id id,e.name name
FROM hrms_employee e
LEFT JOIN hrms_user u
ON e.user_id = u.id
WHERE u.del_or_not = 0
</select>
<!-- //TODO 修改查询员工为user表的del_or_not = 0的员工 -->
<select id="pageByCondition" resultMap="employeeMap">
SELECT e.id eid,e.name emp_name,d.name
,u.account,e.job_number,u.create_time,p.name pos_name

@ -41,9 +41,9 @@ public class JwtUtils {
}
public static void main(String[] args) {
System.out.println(validateJWT(createJWT("1","123",100000)));
//byte[] encodedKey = Base64.decode("DQJWT");
//System.out.println(encodedKey);
//System.out.printf(createJWT("1","111", 10000000));
boolean isTrue = validateJWT("eyJhbGciOiJIUzI1NiJ9.eyJqdGkiOiIxIiwic3ViIjoiMTExIiwiaXNzIjoidXNlciIsImlhdCI6MTYwMTM0MzYyNywiZXhwIjoxNjAxMzUzNjI3fQ.q5Ssg2LM1OzzgvVWqLhgP_Hko0-pfeNO5bvpUE5KQ-s");
System.out.println(isTrue);
}
/**

@ -0,0 +1,92 @@
package com.daqing.framework.domain.crms.ext;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;
import java.io.Serializable;
/**
* @auther River
* @date 2020/9/29 11:00
*/
@Data
@ToString
public class CustomerCompanyDTO implements Serializable {
/**
* 客户编号
*/
@ApiModelProperty(value = "客户编号")
private String code;
/**
* 客户类型1企业类型0个人类型
*/
@ApiModelProperty(value = "企业类型")
private Integer type;
/**
* 客户经理
*/
@ApiModelProperty(value = "客户经理")
private Long manager;
/**
* 客户名称
*/
@ApiModelProperty(value = "客户名称")
private String name;
/**
* 联系地址
*/
@ApiModelProperty(value = "联系地址")
private String addr;
/**
* 联系电话
*/
@ApiModelProperty(value = "联系电话")
private String phone;
/**
* 注册资金
*/
@ApiModelProperty(value = "注册资金")
private String registeredCapital;
/**
* 所属行业
*/
@ApiModelProperty(value = "所属行业")
private String industry;
/**
* 成立年限
*/
@ApiModelProperty(value = "成立年限")
private Integer years;
/**
* 所在区域
*/
@ApiModelProperty(value = "所在区域")
private String region;
/**
* 股东名称
*/
@ApiModelProperty(value = "股东名称")
private String shareholder;
/**
* 关联企业
*/
@ApiModelProperty(value = "关联企业")
private String affiliatedCompany;
/**
* 员工个数
*/
@ApiModelProperty(value = "员工个数")
private String empNum;
/**
* 联系人
*/
@ApiModelProperty(value = "联系人")
private String linkman;
/**
* 业务来源
*/
@ApiModelProperty(value = "业务来源")
private String businessSource;
}

@ -10,7 +10,7 @@ import javax.validation.constraints.Email;
import java.io.Serializable;
/**
* 企业类型客户返回信息包装类
* 企业类型客户返回信息包装类(excel)
*
* @auther River
* @date 2020/9/14 10:48
@ -23,90 +23,75 @@ public class CustomerCompanyVO extends BaseRowModel implements Serializable {
* 客户编号
*/
@ExcelProperty(value = "编号",index = 0)
@ApiModelProperty(value = "客户编号")
private String code;
/**
* 客户类型1企业类型0个人类型
*/
@ApiModelProperty(value = "企业类型")
@ExcelProperty(value = "企业类型",index = 1)
private Integer type;
/**
* 客户经理
*/
@ExcelProperty(value = "客户经理",index = 2)
@ApiModelProperty(value = "客户经理")
private String manager;
/**
* 客户名称
*/
@ApiModelProperty(value = "客户名称")
@ExcelProperty(value = "姓名",index = 3)
private String name;
/**
* 联系地址
*/
@ApiModelProperty(value = "联系地址")
@ExcelProperty(value = "地址",index = 4)
private String addr;
/**
* 联系电话
*/
@ApiModelProperty(value = "联系电话")
@ExcelProperty(value = "电话",index = 5)
private String phone;
/**
* 注册资金
*/
@ApiModelProperty(value = "注册资金")
@ExcelProperty(value = "注册资金",index = 6)
private String registeredCapital;
/**
* 所属行业
*/
@ApiModelProperty(value = "所属行业")
@ExcelProperty(value = "所属行业",index = 7)
private String industry;
/**
* 成立年限
*/
@ApiModelProperty(value = "成立年限")
@ExcelProperty(value = "成立年限",index = 8)
private Integer years;
/**
* 所在区域
*/
@ApiModelProperty(value = "所在区域")
@ExcelProperty(value = "所在区域",index = 9)
private String region;
/**
* 股东名称
*/
@ApiModelProperty(value = "股东名称")
@ExcelProperty(value = "股东名称",index = 10)
private String shareholder;
/**
* 关联企业
*/
@ApiModelProperty(value = "关联企业")
@ExcelProperty(value = "关联企业",index = 11)
private String affiliatedCompany;
/**
* 员工个数
*/
@ApiModelProperty(value = "员工个数")
@ExcelProperty(value = "员工个数",index = 12)
private String employeeNumber;
private String empNum;
/**
* 联系人
*/
@ApiModelProperty(value = "联系人")
@ExcelProperty(value = "联系人",index = 13)
private String linkman;
/**
* 业务来源
*/
@ApiModelProperty(value = "业务来源")
@ExcelProperty(value = "业务来源",index = 14)
private String businessSource;
}

@ -0,0 +1,101 @@
package com.daqing.framework.domain.crms.ext;
import lombok.Data;
import lombok.ToString;
import java.io.Serializable;
/**
* @auther River
* @date 2020/9/29 11:01
*/
@Data
@ToString
public class CustomerPersonalDTO implements Serializable {
/**
* 客户编号
*/
private String code;
/**
* 客户类型1企业类型0个人类型
*/
private Integer type;
/**
* 客户经理
*/
private Long manager;
/**
* 客户名称
*/
private String name;
/**
* 联系地址
*/
private String addr;
/**
* 联系电话
*/
private String phone;
/**
* 身份证号
*/
private String idCard;
/**
* 年龄
*/
private Integer age;
/**
* 性别10
*/
private Integer gender;
/**
* 婚姻状况1已婚0未婚
*/
private Integer maritalStatus;
/**
* 学历
*/
private Integer education;
/**
* 工作单位
*/
private String employer;
/**
* 职务
*/
private String position;
/**
* 工作年限
*/
private Integer workingYears;
/**
* 社保账号
*/
private String socialSecurityNum;
/**
* 居住情况
*/
private String livingSituation;
/**
* 户籍地址
*/
private String residenceAddr;
/**
* 业务来源
*/
private String businessSource;
/**
* 紧急联系人
*/
private String emergencyLinkman;
/**
* 紧急联系人关系
*/
private String emergencyLinkmanRelationship;
/**
* 紧急联系人电话
*/
private String emergencyLinkmanPhone;
}

@ -8,7 +8,7 @@ import lombok.ToString;
import java.io.Serializable;
/**
* 个人类型返回信息包装类
* 个人类型返回信息包装类(excel)
*
* @auther River
* @date 2020/9/11 17:28

@ -85,10 +85,10 @@ public class ApiGlobalFilter implements GlobalFilter, Ordered {
* @return userPhone
*/
private Boolean verifyJWT(String token){
String id = RedisUtil.get("dq:token:"+token);
/*String id = RedisUtil.get("dq:token:"+token);
if(id == null || "".equals(id)){
return false;
}
}*/
return JwtUtils.validateJWT(token);
//return Long.parseLong(id);
}

@ -10,14 +10,20 @@ spring:
# - id: qq_route
# uri: https://www.qq.com
# predicates:
# - Query=url,qq
# - Query=url,qq//localhost:8080/api
#
- id: crms_route
uri: http://localhost:8000/dq-financial-crms
predicates:
- Path=/api-crms/**
filters:
- RewritePath=/api-crms/(?<segment>.*), /$\{segment}
- id: hrms_route
uri: lb://localhost:7000/dq-financial-hrms
uri: http://localhost:7000/dq-financial-hrms
predicates:
- Path=/api/**
- Path=/api-hrms/**
filters:
- RewritePath=/api/(?<segment>.*), /$\{segment}
- RewritePath=/api-hrms/(?<segment>.*), /$\{segment}
- id: hrms_auth_route
uri: http://localhost:9000/dq-financial-hrms-auth #lb://dq-financial-hrms-auth
predicates:

@ -6,4 +6,14 @@ spring.cloud.nacos.config.namespace=772e2607-b929-4246-9671-ee5a36d74d25
spring.cloud.nacos.config.ext-config[0].data-id=dq-govern-gateway.yml
spring.cloud.nacos.config.ext-config[0].group=dev
spring.cloud.nacos.config.ext-config[0].refresh=true
spring.cloud.nacos.config.ext-config[0].refresh=true
spring.redis.host=192.168.232.128
spring.redis.port=6379
spring.redis.password=
spring.redis.database=0
spring.redis.timeout=30000
spring.redis.jedis.pool.max-active=8
spring.redis.jedis.pool.max-wait=-1
spring.redis.jedis.pool.max-idle=8
spring.redis.jedis.pool.min-idle=0

@ -1 +1,4 @@
jwt.ignoreUrlList=/apiHrmsAuth/hrms/auth/userlogin/getBackPwd,/apiHrmsAuth/hrms/auth/userlogin/login,/apiHrmsAuth/hrms/auth/userlogin/verifyMobile
jwt.ignoreUrlList=/apiHrmsAuth/hrms/auth/userlogin/getBackPwd,\
/apiHrmsAuth/hrms/auth/userlogin/login,\
/apiHrmsAuth/hrms/auth/userlogin/verifyMobile,\
/api-crms/sweagger-ui.html

@ -10,25 +10,23 @@ spring:
# - id: qq_route
# uri: https://www.qq.com
# predicates:
# - Query=url,qq
# - Query=url,qq//localhost:8080/api
#
- id: crms_route
uri: http://localhost:8000/dq-financial-crms
predicates:
- Path=/api-crms/**
filters:
- RewritePath=/api-crms/(?<segment>.*), /$\{segment}
- id: hrms_route
uri: lb://dq-financial-hrms
uri: http://localhost:7000/dq-financial-hrms
predicates:
- Path=/api-hrms/**
filters:
- RewritePath=/api-hrms/(?<segment>.*), /$\{segment}
- id: hrms_auth_route
uri: http://localhost:9000/dq-financial-hrms-auth #lb://dq-financial-hrms-auth
predicates:
- Path=/api/hrms/**
- Path=/apiHrmsAuth/**
filters:
- RewritePath=/api/(?<segment>.*),/ $\{segment}
-
- id: crms_auth
uri: lb://dq-financial-crms
predicates:
- Path=/crms/**
filters:
- RewritePath=/crms/(?<segment>.*),/ $\{segment}
redis:
host:
port:
password:
database: 1
timeout: 60s
- RewritePath=/apiHrmsAuth/(?<segment>.*), /$\{segment}

@ -6,4 +6,14 @@ spring.cloud.nacos.config.namespace=772e2607-b929-4246-9671-ee5a36d74d25
spring.cloud.nacos.config.ext-config[0].data-id=dq-govern-gateway.yml
spring.cloud.nacos.config.ext-config[0].group=dev
spring.cloud.nacos.config.ext-config[0].refresh=true
spring.cloud.nacos.config.ext-config[0].refresh=true
spring.redis.host=192.168.232.128
spring.redis.port=6379
spring.redis.password=
spring.redis.database=0
spring.redis.timeout=30000
spring.redis.jedis.pool.max-active=8
spring.redis.jedis.pool.max-wait=-1
spring.redis.jedis.pool.max-idle=8
spring.redis.jedis.pool.min-idle=0

@ -1 +1,4 @@
jwt.ignoreUrlList=/route-api/login,/route-api/refresh
jwt.ignoreUrlList=/apiHrmsAuth/hrms/auth/userlogin/getBackPwd,\
/apiHrmsAuth/hrms/auth/userlogin/login,\
/apiHrmsAuth/hrms/auth/userlogin/verifyMobile,\
/api-crms/sweagger-ui.html
Loading…
Cancel
Save