Browse Source

Merge branches 'dev' and 'dev_heart' of http://git.elinkit.com.cn:7070/r/epmet-cloud into dev_heart

 Conflicts:
	epmet-module/epmet-point/epmet-point-server/deploy/docker-compose-dev.yml
	epmet-module/epmet-point/epmet-point-server/pom.xml
	epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-dev.yml
	epmet-module/epmet-third/epmet-third-server/pom.xml
	epmet-module/resi-mine/resi-mine-server/deploy/docker-compose-dev.yml
	epmet-module/resi-mine/resi-mine-server/pom.xml
	epmet-user/epmet-user-server/deploy/docker-compose-dev.yml
	epmet-user/epmet-user-server/pom.xml
	epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.6__add_isRegister.sql
dev_shibei_match
yinzuomei 5 years ago
parent
commit
8e5dc0edb8
  1. 3
      epmet-gateway/src/main/java/com/epmet/filter/UserTokenFilter.java
  2. 2
      epmet-module/epmet-heart/epmet-heart-server/deploy/docker-compose-dev.yml
  3. 2
      epmet-module/epmet-heart/epmet-heart-server/pom.xml
  4. 2
      epmet-module/epmet-point/epmet-point-server/deploy/docker-compose-dev.yml
  5. 2
      epmet-module/epmet-point/epmet-point-server/pom.xml
  6. 18
      epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/controller/ExchangeController.java
  7. 4
      epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/PointVerificationLogServiceImpl.java
  8. 40
      epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/result/CategoryResultDTO.java
  9. 2
      epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-dev.yml
  10. 2
      epmet-module/epmet-third/epmet-third-server/pom.xml
  11. 28
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/CodeController.java
  12. 24
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/CodeService.java
  13. 28
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/CodeServiceImpl.java
  14. 13
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/wxapi/result/WxMaCategoryResult.java
  15. 4
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/wxapi/service/WxMaCodeService.java
  16. 4
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/wxapi/service/impl/WxMaCodeServiceImpl.java
  17. 2
      epmet-module/resi-mine/resi-mine-server/deploy/docker-compose-dev.yml
  18. 2
      epmet-module/resi-mine/resi-mine-server/pom.xml
  19. 2
      epmet-user/epmet-user-server/deploy/docker-compose-dev.yml
  20. 2
      epmet-user/epmet-user-server/pom.xml
  21. 10
      epmet-user/epmet-user-server/src/main/java/com/epmet/entity/UserCustomerEntity.java
  22. 1
      epmet-user/epmet-user-server/src/main/java/com/epmet/redis/UserBaseInfoRedis.java
  23. 8
      epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.6__add_isRegister.sql
  24. 4
      epmet-user/epmet-user-server/src/main/resources/mapper/UserWechatDao.xml

3
epmet-gateway/src/main/java/com/epmet/filter/UserTokenFilter.java

@ -16,7 +16,8 @@ public interface UserTokenFilter {
//是否过期
Claims claims = jwtTokenUtils.getClaimByToken(token);
if (claims == null || jwtTokenUtils.isTokenExpired(claims.getExpiration())) {
throw new RenException(EpmetErrorCode.ERR401.getCode());
// throw new RenException(EpmetErrorCode.ERR401.getCode());
return null;
}
//获取用户ID
String app = (String) claims.get("app");

2
epmet-module/epmet-heart/epmet-heart-server/deploy/docker-compose-dev.yml

@ -2,7 +2,7 @@ version: "3.7"
services:
epmet-heart-server:
container_name: epmet-heart-server-dev
image: 192.168.1.130:10080/epmet-cloud-dev/epmet-heart-server:0.0.8
image: 192.168.1.130:10080/epmet-cloud-dev/epmet-heart-server:0.0.9
ports:
- "8111:8111"
network_mode: host # 使用现有网络

2
epmet-module/epmet-heart/epmet-heart-server/pom.xml

@ -2,7 +2,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<version>0.0.8</version>
<version>0.0.9</version>
<parent>
<groupId>com.epmet</groupId>
<artifactId>epmet-heart</artifactId>

2
epmet-module/epmet-point/epmet-point-server/deploy/docker-compose-dev.yml

@ -2,7 +2,7 @@ version: "3.7"
services:
epmet-point-server:
container_name: epmet-point-server-dev
image: 192.168.1.130:10080/epmet-cloud-dev/epmet-point-server:0.0.5
image: 192.168.1.130:10080/epmet-cloud-dev/epmet-point-server:0.0.9
ports:
- "8112:8112"
network_mode: host # 使用现有网络

2
epmet-module/epmet-point/epmet-point-server/pom.xml

@ -3,7 +3,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<version>0.0.5</version>
<version>0.0.9</version>
<parent>
<artifactId>epmet-point</artifactId>
<groupId>com.epmet</groupId>

18
epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/controller/ExchangeController.java

@ -1,12 +1,15 @@
package com.epmet.controller;
import com.epmet.common.token.annotation.Login;
import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.dto.form.PointVerificationFormDTO;
import com.epmet.dto.form.ResiCommonUserIdFormDTO;
import com.epmet.dto.form.WorkPointVerificationFormDTO;
import com.epmet.dto.result.PointVerificationResultDTO;
import com.epmet.dto.result.WorkPointVerficationListResultDTO;
import com.epmet.service.PointVerificationLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
@ -40,5 +43,18 @@ public class ExchangeController {
return new Result<PointVerificationResultDTO>().ok(pointVerificationLogService.verifyPoint(verificationParam));
}
/**
* @Description 获取工作端积分核销记录
* @param verificationParam
* @return
* @author wangc
* @date 2020.07.24 16:08
**/
@PostMapping("recordmonthly")
public Result<WorkPointVerficationListResultDTO> getStaffVerificationRecordMonthly(@LoginUser TokenDto token,@RequestBody WorkPointVerificationFormDTO verificationParam){
verificationParam.setStaffId(token.getUserId());
ValidatorUtils.validateEntity(verificationParam, ResiCommonUserIdFormDTO.UserIdGroup.class);
return new Result<WorkPointVerficationListResultDTO>().ok(pointVerificationLogService.getStaffVerificationRecordMonthly(verificationParam));
}
}

4
epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/PointVerificationLogServiceImpl.java

@ -195,8 +195,8 @@ public class PointVerificationLogServiceImpl extends BaseServiceImpl<PointVerifi
dataList.stream().mapToInt(o -> o.getPoint()).sum()
);
}else{
int fromIndex = verificationParam.getPageNo() * verificationParam.getPageSize();
int toIndex = (verificationParam.getPageNo() + 1) * verificationParam.getPageSize();
int fromIndex = (verificationParam.getPageNo() - 1) * verificationParam.getPageSize();
int toIndex = verificationParam.getPageNo() * verificationParam.getPageSize();
if(toIndex > dataList.size()) {
toIndex = dataList.size();
}

40
epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/result/CategoryResultDTO.java

@ -0,0 +1,40 @@
package com.epmet.dto.result;
import lombok.Data;
import java.io.Serializable;
/**
* @author zhaoqifeng
* @dscription
* @date 2020/7/29 13:36
*/
@Data
public class CategoryResultDTO implements Serializable {
private static final long serialVersionUID = -5691303280428707533L;
/**
* 一级类目名称
*/
private String firstClass;
/**
* 二级类目名称
*/
private String secondClass;
/**
* 三级类目名称
*/
private String thirdClass;
/**
* 一级类目的ID编号
*/
private String firstId;
/**
* 二级类目的ID编号
*/
private String secondId;
/**
* 三级类目的ID编号
*/
private String thirdId;
}

2
epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-dev.yml

@ -2,7 +2,7 @@ version: "3.7"
services:
epmet-third-server:
container_name: epmet-third-server-dev
image: 192.168.1.130:10080/epmet-cloud-dev/epmet-third-server:0.0.75
image: 192.168.1.130:10080/epmet-cloud-dev/epmet-third-server:0.0.77
ports:
- "8110:8110"
network_mode: host # 使用现有网络

2
epmet-module/epmet-third/epmet-third-server/pom.xml

@ -2,7 +2,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<version>0.0.75</version>
<version>0.0.77</version>
<parent>
<groupId>com.epmet</groupId>

28
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/CodeController.java

@ -1,12 +1,10 @@
package com.epmet.controller;
import com.baomidou.mybatisplus.extension.api.R;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.form.*;
import com.epmet.dto.result.*;
import com.epmet.service.CodeService;
import oracle.jdbc.proxy.annotation.Post;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
@ -179,4 +177,30 @@ public class CodeController {
String result = codeService.mediaUpload(formDTO);
return new Result<String>().ok(result);
}
/**
* 获取小程序的第三方提交代码的页面配置
* @author zhaoqifeng
* @date 2020/7/29 15:45
* @param formDTO
* @return com.epmet.commons.tools.utils.Result<java.util.List<java.lang.String>>
*/
@PostMapping("getpage")
public Result<List<String>> getPage(@RequestBody CodeCommonFormDTO formDTO){
List<String> result = codeService.getPage(formDTO);
return new Result<List<String>>().ok(result);
}
/**
* 获取小程序的第三方提交代码的页面配置
* @author zhaoqifeng
* @date 2020/7/29 15:45
* @param formDTO
* @return com.epmet.commons.tools.utils.Result<java.util.List<com.epmet.dto.result.CategoryResultDTO>>
*/
@PostMapping("getcategory")
public Result<List<CategoryResultDTO>> getCategory(@RequestBody CodeCommonFormDTO formDTO) {
List<CategoryResultDTO> result = codeService.getCategory(formDTO);
return new Result<List<CategoryResultDTO>>().ok(result);
}
}

24
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/CodeService.java

@ -1,9 +1,11 @@
package com.epmet.service;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.form.*;
import com.epmet.dto.result.*;
import com.epmet.dto.result.CategoryResultDTO;
import com.epmet.dto.result.QrCodeResultDTO;
import com.epmet.dto.result.ReasonResultDTO;
import com.epmet.dto.result.TemplateListResultDTO;
import java.util.List;
@ -118,4 +120,22 @@ public interface CodeService {
* @date 2020/7/17 11:20
*/
String mediaUpload(MediaUploadFormDTO formDTO);
/**
* 获取小程序的第三方提交代码的页面配置
* @author zhaoqifeng
* @date 2020/7/29 13:34
* @param formDTO
* @return java.util.List<java.lang.String>
*/
List<String> getPage(CodeCommonFormDTO formDTO);
/**
* 获取小程序的第三方提交代码的页面配置
* @author zhaoqifeng
* @date 2020/7/29 13:34
* @param formDTO
* @return java.util.List<java.lang.String>
*/
List<CategoryResultDTO> getCategory(CodeCommonFormDTO formDTO);
}

28
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/CodeServiceImpl.java

@ -425,6 +425,34 @@ public class CodeServiceImpl implements CodeService {
}
}
@Override
public List<String> getPage(CodeCommonFormDTO formDTO) {
//获取上传代码信息
CodeCustomerDTO codeCustomerDTO = codeCustomerService.get(formDTO.getCodeId());
//获取小程序调用令牌
AuthorizationInfoDTO authInfo = authorizationInfoDao.getAuthInfoByCustomer(codeCustomerDTO.getCustomerId(), codeCustomerDTO.getClientType());
//调用微信API获取获取体验版二维码
WxResult<List<String>> wxResult = wxMaCodeService.getPage(authInfo.getAuthorizerAccessToken());
if (!wxResult.success()) {
throw new RenException(wxResult.getErrorCode(), wxResult.getErrorMsg());
}
return wxResult.getData();
}
@Override
public List<CategoryResultDTO> getCategory(CodeCommonFormDTO formDTO) {
//获取上传代码信息
CodeCustomerDTO codeCustomerDTO = codeCustomerService.get(formDTO.getCodeId());
//获取小程序调用令牌
AuthorizationInfoDTO authInfo = authorizationInfoDao.getAuthInfoByCustomer(codeCustomerDTO.getCustomerId(), codeCustomerDTO.getClientType());
//调用微信API获取获取体验版二维码
WxResult<List<WxMaCategoryResult>> wxResult = wxMaCodeService.getCategory(authInfo.getAuthorizerAccessToken());
if (!wxResult.success()) {
throw new RenException(wxResult.getErrorCode(), wxResult.getErrorMsg());
}
return ConvertUtils.sourceToTarget(wxResult.getData(), CategoryResultDTO.class);
}
private void saveOperation(String customerId, String codeId, String version, String operation, String describe) {
CodeOperationHistoryDTO operationDTO = new CodeOperationHistoryDTO();
operationDTO.setCustomerId(customerId);

13
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/wxapi/result/WxMaCategoryResult.java

@ -12,6 +12,7 @@ import java.io.Serializable;
*/
@Data
public class WxMaCategoryResult implements Serializable {
private static final long serialVersionUID = 2504852726988873959L;
/**
* 一级类目名称
*/
@ -37,16 +38,4 @@ public class WxMaCategoryResult implements Serializable {
*/
private String thirdId;
/**
* 小程序的页面可通过获取小程序的第三方提交代码的页面配置接口获得
*/
private String address;
/**
* 小程序的标签多个标签用空格分隔标签不能多于10个标签长度不超过20
*/
private String tag;
/**
* 小程序页面的标题,标题长度不超过32
*/
private String title;
}

4
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/wxapi/service/WxMaCodeService.java

@ -56,7 +56,7 @@ public interface WxMaCodeService {
* @param accessToken 提交审核参数
* @return List<WxMaCategory>
*/
WxResult getCategory(String accessToken);
WxResult<List<WxMaCategoryResult>> getCategory(String accessToken);
/**
* 获取小程序的第三方提交代码的页面配置仅供第三方开发者代小程序调用.
@ -64,7 +64,7 @@ public interface WxMaCodeService {
* @param accessToken 提交审核参数
* @return page_list 页面配置列表
*/
WxResult getPage(String accessToken);
WxResult<List<String>> getPage(String accessToken);
/**
* 将第三方提交的代码包提交审核仅供第三方开发者代小程序调用.

4
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/wxapi/service/impl/WxMaCodeServiceImpl.java

@ -97,7 +97,7 @@ public class WxMaCodeServiceImpl implements WxMaCodeService {
}
@Override
public WxResult getCategory(String accessToken) {
public WxResult<List<WxMaCategoryResult>> getCategory(String accessToken) {
WxResult<List<WxMaCategoryResult>> result = new WxResult<>();
String url = WxMaCodeConstant.GET_CATEGORY_URL + "?" + "access_token=" + accessToken;
Result<String> getCategoryResult = HttpClientManager.getInstance().sendGet(url, null);
@ -115,7 +115,7 @@ public class WxMaCodeServiceImpl implements WxMaCodeService {
}
@Override
public WxResult getPage(String accessToken) {
public WxResult<List<String>> getPage(String accessToken) {
WxResult<List<String>> result = new WxResult<>();
String url = WxMaCodeConstant.GET_PAGE_URL + "?" + "access_token=" + accessToken;
Result<String> getPageResult = HttpClientManager.getInstance().sendGet(url, null);

2
epmet-module/resi-mine/resi-mine-server/deploy/docker-compose-dev.yml

@ -2,7 +2,7 @@ version: "3.7"
services:
resi-mine-server:
container_name: resi-mine-server-dev
image: 192.168.1.130:10080/epmet-cloud-dev/resi-mine-server:0.3.30
image: 192.168.1.130:10080/epmet-cloud-dev/resi-mine-server:0.3.32
ports:
- "8094:8094"
network_mode: host # 使用现有网络

2
epmet-module/resi-mine/resi-mine-server/pom.xml

@ -2,7 +2,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<version>0.3.30</version>
<version>0.3.32</version>
<parent>
<groupId>com.epmet</groupId>
<artifactId>resi-mine</artifactId>

2
epmet-user/epmet-user-server/deploy/docker-compose-dev.yml

@ -2,7 +2,7 @@ version: "3.7"
services:
epmet-user-server:
container_name: epmet-user-server-dev
image: 192.168.1.130:10080/epmet-cloud-dev/epmet-user-server:0.3.86
image: 192.168.1.130:10080/epmet-cloud-dev/epmet-user-server:0.3.91
ports:
- "8087:8087"
network_mode: host # 不会创建新的网络

2
epmet-user/epmet-user-server/pom.xml

@ -2,7 +2,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<version>0.3.86</version>
<version>0.3.91</version>
<parent>
<groupId>com.epmet</groupId>
<artifactId>epmet-user</artifactId>

10
epmet-user/epmet-user-server/src/main/java/com/epmet/entity/UserCustomerEntity.java

@ -20,12 +20,18 @@ public class UserCustomerEntity extends BaseEpmetEntity {
/**
* 客户Id
* */
*/
private String customerId;
/**
* 用户Id
* */
*/
private String userId;
/**
* 是否注册 1已注册 0未注册
*/
private String isRegister;
}

1
epmet-user/epmet-user-server/src/main/java/com/epmet/redis/UserBaseInfoRedis.java

@ -106,6 +106,7 @@ public class UserBaseInfoRedis {
baseInfo.setCustomerId(relation.getCustomerId());
BelongGridNameFormDTO gridParam = new BelongGridNameFormDTO();
gridParam.setGridId(relation.getGridId());
baseInfo.setRegisteredGridId(relation.getGridId());
Result<BelongGridNameResultDTO> gridResult =
govOrgOpenFeignClient.getGridNameByGridId(gridParam);
if(gridResult.success() && null != gridResult.getData()

8
epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.6__add_isRegister.sql

@ -0,0 +1,8 @@
ALTER TABLE `epmet_user`.`user_customer`
ADD COLUMN `IS_REGISTER` varchar(1) NOT NULL DEFAULT 0 COMMENT '是否注册 1注册; 0未注册' AFTER `USER_ID`;
UPDATE user_customer uc,
register_relation t
SET uc.IS_REGISTER = 1
WHERE
uc.CUSTOMER_ID = t.CUSTOMER_ID
AND t.USER_ID = uc.USER_ID;

4
epmet-user/epmet-user-server/src/main/resources/mapper/UserWechatDao.xml

@ -107,8 +107,8 @@
<foreach collection="userIds" item="item" open="AND (" separator=" OR " close=" )">
wechat.USER_ID = #{item}
</foreach>
<if test='null != realName and "" != reamName'>
AND base.REAL_NAME = #{realName}
<if test='null != realName and "" != realName'>
AND (base.REAL_NAME LIKE concat('%',#{realName},'%') OR wechat.NICKNAME LIKE concat('%',#{realName},'%'))
</if>
ORDER BY
base.REAL_NAME , wechat.NICKNAME

Loading…
Cancel
Save