Browse Source

Merge branch 'dev' of http://git.elinkit.com.cn:7070/r/epmet-cloud into dev_bugfix

dev_shibei_match
wangchao 5 years ago
parent
commit
4ea4d14ed1
  1. 2
      epmet-module/epmet-heart/epmet-heart-server/deploy/docker-compose-dev.yml
  2. 2
      epmet-module/epmet-heart/epmet-heart-server/pom.xml
  3. 28
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActServiceImpl.java
  4. 45
      epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/InitPointRuleResultDTO.java
  5. 11
      epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/form/PointRuleFormDTO.java
  6. 2
      epmet-module/epmet-point/epmet-point-server/deploy/docker-compose-dev.yml
  7. 8
      epmet-module/epmet-point/epmet-point-server/pom.xml
  8. 27
      epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/controller/BackDoorController.java
  9. 4
      epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/dao/PointRuleDao.java
  10. 33
      epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/dao/PointRuleDefaultDao.java
  11. 97
      epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/entity/PointRuleDefaultEntity.java
  12. 4
      epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/entity/PointRuleEntity.java
  13. 3
      epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/PointRuleService.java
  14. 40
      epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/PointRuleServiceImpl.java
  15. 4
      epmet-module/epmet-point/epmet-point-server/src/main/resources/db/migration/epmet_point.sql
  16. 3
      epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/PointRuleDao.xml
  17. 27
      epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/PointRuleDefaultDao.xml
  18. 2
      epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-dev.yml
  19. 2
      epmet-module/epmet-third/epmet-third-server/pom.xml
  20. 2
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/constant/ThirdRunTimeInfoConstant.java
  21. 4
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/PaUserDao.java
  22. 1
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/ComponentVerifyTicketServiceImpl.java
  23. 35
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/WarrantServiceImpl.java
  24. 7
      epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/PaUserDao.xml
  25. 9
      epmet-module/oper-crm/oper-crm-client/src/main/java/com/epmet/feign/OperCrmOpenFeignClient.java
  26. 5
      epmet-module/oper-crm/oper-crm-client/src/main/java/com/epmet/feign/fallback/OperCrmOpenFeignClientFallback.java
  27. 2
      epmet-module/oper-crm/oper-crm-server/deploy/docker-compose-dev.yml
  28. 2
      epmet-module/oper-crm/oper-crm-server/pom.xml
  29. 9
      epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/controller/CustomerController.java
  30. 7
      epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/dao/CustomerDao.java
  31. 5
      epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/CustomerService.java
  32. 6
      epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/impl/CustomerServiceImpl.java
  33. 8
      epmet-module/oper-crm/oper-crm-server/src/main/resources/mapper/CustomerDao.xml
  34. 2
      epmet-module/resi-guide/resi-guide-server/deploy/docker-compose-dev.yml
  35. 2
      epmet-module/resi-guide/resi-guide-server/pom.xml
  36. 8
      epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/service/impl/StrangerAccessRecordServiceImpl.java

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.33
image: 192.168.1.130:10080/epmet-cloud-dev/epmet-heart-server:0.0.34
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.33</version>
<version>0.0.34</version>
<parent>
<groupId>com.epmet</groupId>
<artifactId>epmet-heart</artifactId>

28
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActServiceImpl.java

@ -413,8 +413,10 @@ public class WorkActServiceImpl implements WorkActService {
textScanParamDTO.getTasks().add(taskDTO);
});
Result<SyncScanResult> contentSyncScanRes = ScanContentUtils.textSyncScan(scanApiUrl.concat(textSyncScanMethod), textScanParamDTO);
logger.info("内容审核入参:"+JSON.toJSONString(textScanParamDTO));
logger.info("内容审核返参:"+JSON.toJSONString(contentSyncScanRes));
if (!contentSyncScanRes.success()) {
logger.error("活动详情内容审核接口失败,返参:", JSON.toJSONString(contentSyncScanRes));
logger.warn("活动详情内容审核接口失败,返参:", JSON.toJSONString(contentSyncScanRes));
throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode());
} else {
if (!contentSyncScanRes.getData().isAllPass()) {
@ -433,8 +435,10 @@ public class WorkActServiceImpl implements WorkActService {
imgScanParamDTO.getTasks().add(task);
});
Result<SyncScanResult> imgScanResult = ScanContentUtils.imgSyncScan(scanApiUrl.concat(imgSyncScanMethod), imgScanParamDTO);
logger.info("图片审核入参:"+JSON.toJSONString(imgScanParamDTO));
logger.info("图片审核返参:"+JSON.toJSONString(imgScanResult));
if (!imgScanResult.success()){
logger.error("活动详情图片审核接口失败,返参:", JSON.toJSONString(imgScanResult));
logger.warn("活动详情图片审核接口失败,返参:", JSON.toJSONString(imgScanResult));
throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode());
} else {
if (!imgScanResult.getData().isAllPass()) {
@ -459,12 +463,14 @@ public class WorkActServiceImpl implements WorkActService {
taskDTO.setDataId(UUID.randomUUID().toString().replace("-", ""));
textScanParamDTO.getTasks().add(taskDTO);
Result<SyncScanResult> textSyncScanResult = ScanContentUtils.textSyncScan(scanApiUrl.concat(textSyncScanMethod), textScanParamDTO);
logger.info("活动报名条件审核入参:"+JSON.toJSONString(textScanParamDTO));
logger.info("活动报名条件审核返参:"+JSON.toJSONString(textSyncScanResult));
if (!textSyncScanResult.success()) {
logger.error("活动报名条件审核接口返回失败,返参:", JSON.toJSONString(textSyncScanResult));
logger.warn("活动报名条件审核接口返回失败,返参:", JSON.toJSONString(textSyncScanResult));
throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode());
} else {
if (!textSyncScanResult.getData().isAllPass()) {
logger.error("活动报名条件审核失败,报名条件:",requirement);
logger.warn("活动报名条件审核失败,报名条件:",requirement);
throw new RenException(EpmetErrorCode.ACT_REQ_SCAN_FAILED.getCode());
}
}
@ -485,16 +491,18 @@ public class WorkActServiceImpl implements WorkActService {
coverImgtask.setUrl(coverPic);
coverPicScanParamDTO.getTasks().add(coverImgtask);
Result<SyncScanResult> coverPicScanRes = ScanContentUtils.imgSyncScan(scanApiUrl.concat(imgSyncScanMethod), coverPicScanParamDTO);
logger.info("活动封面图审核入参:"+JSON.toJSONString(coverPicScanParamDTO));
logger.info("活动封面图审核返参:"+JSON.toJSONString(coverPicScanRes));
if (!coverPicScanRes.success()){
logger.error("活动封面审核失败接口返回失败,返参:", JSON.toJSONString(coverPicScanRes));
logger.warn("活动封面审核失败接口返回失败,返参:", JSON.toJSONString(coverPicScanRes));
throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode());
} else {
if (!coverPicScanRes.getData().isAllPass()) {
logger.error("活动封面审核失败,封面图片地址:",coverPic);
logger.warn("活动封面审核失败,封面图片地址:",coverPic);
throw new RenException(EpmetErrorCode.ACT_COVER_PIC_SCAN_FAILED.getCode());
}
}
logger.info("活动封面审核成功");
logger.info("活动封面审核成功");
}
/**
@ -511,12 +519,14 @@ public class WorkActServiceImpl implements WorkActService {
taskDTO.setDataId(UUID.randomUUID().toString().replace("-", ""));
textScanParamDTO.getTasks().add(taskDTO);
Result<SyncScanResult> textSyncScanResult = ScanContentUtils.textSyncScan(scanApiUrl.concat(textSyncScanMethod), textScanParamDTO);
logger.info("活动标题审核入参:"+JSON.toJSONString(textScanParamDTO));
logger.info("活动标题审核返参:"+JSON.toJSONString(textSyncScanResult));
if (!textSyncScanResult.success()) {
logger.error("活动标题审核接口返回失败,返参:", JSON.toJSONString(textSyncScanResult));
logger.warn("活动标题审核接口返回失败,返参:", JSON.toJSONString(textSyncScanResult));
throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode());
} else {
if (!textSyncScanResult.getData().isAllPass()) {
logger.error("活动标题审核失败,标题内容:",title);
logger.warn("活动标题审核失败,标题内容:",title);
throw new RenException(EpmetErrorCode.ACT_TITLE_SCAN_FAILED.getCode());
}
}

45
epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/InitPointRuleResultDTO.java

@ -0,0 +1,45 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dto;
import lombok.Data;
import java.io.Serializable;
/**
* 初始化客户规则
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-07-20
*/
@Data
public class InitPointRuleResultDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 客户总数
*/
private Integer customerTotal;
/**
* 已经初始化总数
*/
private Integer initedTotal;
}

11
epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/form/PointRuleFormDTO.java

@ -53,7 +53,7 @@ public class PointRuleFormDTO implements Serializable {
@NotBlank(message = "是否开启不能为空", groups = {UpdateGroup.class})
private String enabledFlag;
/**
* 是否启用
* 积分上限不能为空
*/
@NotNull(message = "积分上限不能为空", groups = {UpdateGroup.class})
private Integer upLimit;
@ -62,6 +62,15 @@ public class PointRuleFormDTO implements Serializable {
* 积分上限描述
*/
private String upLimitDesc;
/**
* 积分上限前缀
*/
private String upLimitPrefix;
/**
* 上限积分计算周期
*/
private String rulePeriod;
//=======系统添加时的属性======
/**

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.23
image: 192.168.1.130:10080/epmet-cloud-dev/epmet-point-server:0.0.24
ports:
- "8112:8112"
network_mode: host # 使用现有网络

8
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.23</version>
<version>0.0.24</version>
<parent>
<artifactId>epmet-point</artifactId>
<groupId>com.epmet</groupId>
@ -81,6 +81,12 @@
<version>2.0.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.epmet</groupId>
<artifactId>oper-crm-client</artifactId>
<version>2.0.0</version>
<scope>compile</scope>
</dependency>
</dependencies>
<build>

27
epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/controller/BackDoorController.java

@ -5,6 +5,7 @@ import com.epmet.common.enu.PointUnitEnum;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.dto.InitPointRuleResultDTO;
import com.epmet.dto.form.PointRuleFormDTO;
import com.epmet.service.PointRuleService;
import org.springframework.beans.factory.annotation.Autowired;
@ -13,6 +14,8 @@ import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
* @author jianjun liu
* @date 2020-06-04 20:39
@ -24,18 +27,32 @@ public class BackDoorController {
private PointRuleService pointRuleService;
/**
* desc:添加规则
* desc:批量添加规则
*
* @param formDTO
* @param list
* @return
*/
@PostMapping(value = "addpointrule")
public Result<Boolean> add(@RequestBody PointRuleFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO, AddGroup.class);
pointRuleService.add(null, formDTO);
public Result<Boolean> add(@RequestBody List<PointRuleFormDTO> list) {
for (PointRuleFormDTO formDTO:list){
ValidatorUtils.validateEntity(list, AddGroup.class);
pointRuleService.add(null, formDTO);
}
return new Result<Boolean>().ok(true);
}
/**
* desc:批量添加规则
*
* @param list
* @return
*/
@PostMapping(value = "initpointrule")
public Result<InitPointRuleResultDTO> initPointRule() {
InitPointRuleResultDTO resultDTO = pointRuleService.initPointRule();
return new Result<InitPointRuleResultDTO>().ok(resultDTO);
}
public static void main(String[] args) {
PointRuleFormDTO formDTO = new PointRuleFormDTO();
formDTO.setPoint(0);

4
epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/dao/PointRuleDao.java

@ -22,7 +22,6 @@ import com.epmet.dto.form.PointRuleListFormDTO;
import com.epmet.entity.PointRuleEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.PostMapping;
import java.util.List;
@ -54,4 +53,7 @@ public interface PointRuleDao extends BaseDao<PointRuleEntity> {
int updateByCustomerId(PointRuleEntity entity);
PointRuleEntity selectByEventCodeAndCustomerId(@Param("customerId") String customerId, @Param("eventCode") String eventCode);
List<String> selectCustomerIds();
}

33
epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/dao/PointRuleDefaultDao.java

@ -0,0 +1,33 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.PointRuleDefaultEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 积分规则表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-07-20
*/
@Mapper
public interface PointRuleDefaultDao extends BaseDao<PointRuleDefaultEntity> {
}

97
epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/entity/PointRuleDefaultEntity.java

@ -0,0 +1,97 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 积分规则表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-07-20
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("point_rule_default")
public class PointRuleDefaultEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 规则名称 与事件名称保持一致即可
*/
private String ruleName;
/**
* 规则说明 事件说明
*/
private String ruleDesc;
/**
* 事件CODE 来自事件表
*/
private String eventCode;
/**
* 功能分组Id
*/
private String functionId;
/**
* 操作类型 加积分:add;减积分:subtract
*/
private String operateType;
/**
* 积分上限
*/
private Integer upLimit;
/**
* 积分上限描述
*/
private String upLimitDesc;
/**
* 积分示例中 积分上限前缀
*/
private String upLimitPrefix;
/**
* 上限积分计算周期不限unlimit首次firstdayweekmonthyear
*/
private String rulePeriod;
/**
* 获得积分值
*/
private Integer point;
/**
* 获得积分单位 time分钟minute小时hour
*/
private String pointUnit;
/**
* 是否启用 0-1-
*/
private String enabledFlag;
}

4
epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/entity/PointRuleEntity.java

@ -116,6 +116,8 @@ public class PointRuleEntity extends BaseEpmetEntity {
Objects.equals(operateType, entity.operateType) &&
Objects.equals(upLimit, entity.upLimit) &&
Objects.equals(upLimitDesc, entity.upLimitDesc) &&
Objects.equals(upLimitPrefix, entity.upLimitPrefix) &&
Objects.equals(rulePeriod, entity.rulePeriod) &&
Objects.equals(point, entity.point) &&
Objects.equals(pointUnit, entity.pointUnit) &&
Objects.equals(enabledFlag, entity.enabledFlag);
@ -123,6 +125,6 @@ public class PointRuleEntity extends BaseEpmetEntity {
@Override
public int hashCode() {
return Objects.hash(super.hashCode(), customerId, ruleName, ruleDesc, eventCode, functionId, operateType, upLimit, upLimitDesc, point, pointUnit, enabledFlag);
return Objects.hash(super.hashCode(), customerId, ruleName, ruleDesc, eventCode, functionId, operateType, upLimit, upLimitDesc, upLimitPrefix, rulePeriod, point, pointUnit, enabledFlag);
}
}

3
epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/PointRuleService.java

@ -19,6 +19,7 @@ package com.epmet.service;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.dto.InitPointRuleResultDTO;
import com.epmet.dto.form.PointDetailFormDTO;
import com.epmet.dto.form.PointRuleFormDTO;
import com.epmet.dto.form.PointRuleListFormDTO;
@ -66,4 +67,6 @@ public interface PointRuleService extends BaseService<PointRuleEntity> {
* @date 2020.07.31 14:54
**/
PointRuleEntity getByEventCodeAndCustomerId(String customerId,String eventCode);
InitPointRuleResultDTO initPointRule();
}

40
epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/PointRuleServiceImpl.java

@ -30,8 +30,11 @@ import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dao.PointRuleDao;
import com.epmet.dao.PointRuleDefaultDao;
import com.epmet.dao.RuleOperateLogDao;
import com.epmet.dto.CustomerDTO;
import com.epmet.dto.CustomerStaffDTO;
import com.epmet.dto.InitPointRuleResultDTO;
import com.epmet.dto.form.CustomerFunctionListFormDTO;
import com.epmet.dto.form.PointDetailFormDTO;
import com.epmet.dto.form.PointRuleFormDTO;
@ -40,9 +43,11 @@ import com.epmet.dto.result.CustomerFunctionResultDTO;
import com.epmet.dto.result.DefaultFunctionListResultDTO;
import com.epmet.dto.result.PointDetailResultDTO;
import com.epmet.dto.result.PointRuleResultDTO;
import com.epmet.entity.PointRuleDefaultEntity;
import com.epmet.entity.PointRuleEntity;
import com.epmet.entity.RuleOperateLogEntity;
import com.epmet.feign.EpmetUserOpenFeignClient;
import com.epmet.feign.OperCrmOpenFeignClient;
import com.epmet.feign.OperCustomizeOpenFeignClient;
import com.epmet.service.PointRuleService;
import lombok.extern.slf4j.Slf4j;
@ -71,6 +76,10 @@ public class PointRuleServiceImpl extends BaseServiceImpl<PointRuleDao, PointRul
private EpmetUserOpenFeignClient epmetUserOpenFeignClient;
@Autowired
private RuleOperateLogDao ruleOperateLogDao;
@Autowired
private OperCrmOpenFeignClient operCrmOpenFeignClient;
@Autowired
private PointRuleDefaultDao pointRuleDefaultDao;
@Override
public List<CustomerFunctionResultDTO> getFunctionList(String customerId) {
@ -171,16 +180,43 @@ public class PointRuleServiceImpl extends BaseServiceImpl<PointRuleDao, PointRul
}
/**
* @Description 根据evetCode和客户Id查找积分规则详情
* @param customerId
* @param eventCode
* @return
* @Description 根据evetCode和客户Id查找积分规则详情
* @author wangc
* @date 2020.07.31 14:54
**/
@Override
public PointRuleEntity getByEventCodeAndCustomerId(String customerId, String eventCode) {
return baseDao.selectByEventCodeAndCustomerId(customerId,eventCode);
return baseDao.selectByEventCodeAndCustomerId(customerId, eventCode);
}
@Override
public InitPointRuleResultDTO initPointRule() {
Result<List<CustomerDTO>> customerListResult = operCrmOpenFeignClient.getAllCustomerList();
if (!customerListResult.success() || CollectionUtils.isEmpty(customerListResult.getData())) {
log.error("获取所有客户列表失败");
}
List<CustomerDTO> customerDTOList = customerListResult.getData();
List<PointRuleDefaultEntity> ruleDefaultEntities = pointRuleDefaultDao.selectList(null);
List<String> haveInitCustomerIds = baseDao.selectCustomerIds();
List<PointRuleEntity> insertList = new ArrayList<>();
ruleDefaultEntities.forEach(defaultRule -> {
for (CustomerDTO customerDTO : customerDTOList) {
if (haveInitCustomerIds.contains(customerDTO.getId())) {
continue;
}
PointRuleEntity entity = ConvertUtils.sourceToTarget(defaultRule, PointRuleEntity.class);
entity.setCustomerId(customerDTO.getId());
insertList.add(entity);
}
});
this.insertBatch(insertList, 100);
InitPointRuleResultDTO result = new InitPointRuleResultDTO();
result.setCustomerTotal(customerDTOList.size());
result.setInitedTotal(insertList.size());
return result;
}
private void insertOperateRecord(TokenDto tokenDTO, PointRuleEntity entityNew, PointRuleEntity entityDB, String opType) {

4
epmet-module/epmet-point/epmet-point-server/src/main/resources/db/migration/epmet_point.sql

@ -40,5 +40,5 @@ CREATE TABLE rule_operate_log(
PRIMARY KEY (ID)
) COMMENT = '积分规则操作记录表';
INSERT INTO `epmet_point`.`point_rule`(`ID`, `CUSTOMER_ID`, `RULE_NAME`, `RULE_DESC`, `EVENT_CODE`, `FUNCTION_ID`, `OPERATE_TYPE`, `UP_LIMIT`, `UP_LIMIT_DESC`, `UP_LIMIT_PREFIX`, `POINT`, `POINT_UNIT`, `ENABLED_FLAG`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1', '3ef7e4bb195eb9e622d68b52509aa940', '注册志愿者', '首次注册志愿者获得积分 ', 'register_volunteer', '43addd0735230c01eedbb38d721076b0', 'plus', 0, '', '', 7, 'time', '1', '0', 0, 'APP_USER', '2020-07-23 14:48:56', 'APP_USER', '2020-07-23 14:48:56');
INSERT INTO `epmet_point`.`point_rule`(`ID`, `CUSTOMER_ID`, `RULE_NAME`, `RULE_DESC`, `EVENT_CODE`, `FUNCTION_ID`, `OPERATE_TYPE`, `UP_LIMIT`, `UP_LIMIT_DESC`, `UP_LIMIT_PREFIX`, `POINT`, `POINT_UNIT`, `ENABLED_FLAG`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('2', '3ef7e4bb195eb9e622d68b52509aa940', '添加实况', '添加活动实况获得积分', 'active_insert_live', '43addd0735230c01eedbb38d721076b0', 'plus', 30, '每日该项所得积分总和上限,为0时表示没有积分上限', '每日获得积分上限', 20, 'time', '1', '0', 0, 'APP_USER', '2020-07-23 14:48:56', 'APP_USER', '2020-07-23 14:48:56');
INSERT INTO `epmet_point`.`point_rule`(`ID`, `CUSTOMER_ID`, `RULE_NAME`, `RULE_DESC`, `EVENT_CODE`, `FUNCTION_ID`, `OPERATE_TYPE`, `UP_LIMIT`, `UP_LIMIT_DESC`, `UP_LIMIT_PREFIX`, `RULE_PERIOD`, `POINT`, `POINT_UNIT`, `ENABLED_FLAG`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1', '3ef7e4bb195eb9e622d68b52509aa940', '注册志愿者', '首次注册志愿者获得积分 ', 'register_volunteer', '43addd0735230c01eedbb38d721076b0', 'plus', 0, '', '', 'first', 7, 'time', '1', '0', 0, 'APP_USER', '2020-07-23 14:48:56', 'APP_USER', '2020-07-23 14:48:56');
INSERT INTO `epmet_point`.`point_rule`(`ID`, `CUSTOMER_ID`, `RULE_NAME`, `RULE_DESC`, `EVENT_CODE`, `FUNCTION_ID`, `OPERATE_TYPE`, `UP_LIMIT`, `UP_LIMIT_DESC`, `UP_LIMIT_PREFIX`, `RULE_PERIOD`, `POINT`, `POINT_UNIT`, `ENABLED_FLAG`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('2', '3ef7e4bb195eb9e622d68b52509aa940', '添加实况', '添加活动实况获得积分', 'active_insert_live', '43addd0735230c01eedbb38d721076b0', 'plus', 30, '每日该项所得积分总和上限,为0时表示没有积分上限', '每日获得积分上限', 'day', 20, 'time', '1', '0', 0, 'APP_USER', '2020-07-23 14:48:56', 'APP_USER', '2020-07-23 14:48:56');

3
epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/PointRuleDao.xml

@ -47,4 +47,7 @@
AND
CUSTOMER_ID = #{customerId,jdbcType=VARCHAR} AND EVENT_CODE = #{eventCode,jdbcType=VARCHAR}
</select>
<select id="selectCustomerIds" resultType="java.lang.String">
SELECT DISTINCT CUSTOMER_ID FROM point_rule WHERE DEL_FLAG = '0'
</select>
</mapper>

27
epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/PointRuleDefaultDao.xml

@ -0,0 +1,27 @@
<?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.epmet.dao.PointRuleDefaultDao">
<resultMap type="com.epmet.entity.PointRuleDefaultEntity" id="pointRuleMap">
<result property="id" column="ID"/>
<result property="ruleName" column="RULE_NAME"/>
<result property="ruleDesc" column="RULE_DESC"/>
<result property="eventCode" column="EVENT_CODE"/>
<result property="operateType" column="OPERATE_TYPE"/>
<result property="upLimit" column="UP_LIMIT"/>
<result property="upLimitDesc" column="UP_LIMIT_DESC"/>
<result property="upLimitPrefix" column="UP_LIMIT_PREFIX"/>
<result property="rulePeriod" column="RULE_PERIOD"/>
<result property="point" column="POINT"/>
<result property="pointUnit" column="POINT_UNIT"/>
<result property="enabledFlag" column="ENABLED_FLAG"/>
<result property="delFlag" column="DEL_FLAG"/>
<result property="revision" column="REVISION"/>
<result property="createdBy" column="CREATED_BY"/>
<result property="createdTime" column="CREATED_TIME"/>
<result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
</mapper>

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.97
image: 192.168.1.130:10080/epmet-cloud-dev/epmet-third-server:0.0.99
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.97</version>
<version>0.0.99</version>
<parent>
<groupId>com.epmet</groupId>

2
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/constant/ThirdRunTimeInfoConstant.java

@ -107,4 +107,6 @@ public interface ThirdRunTimeInfoConstant {
String TEXT_MESSAGE_LOG_INFO = "content:%s,content[1]:%s,fromUserName:%s,toUserName:%s";
String SEND_MESSAGE_XML = "要发送的xml内容为:%s";
String CONTENT = "content为:%s";
}

4
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/PaUserDao.java

@ -62,9 +62,9 @@ public interface PaUserDao extends BaseDao<PaUserEntity> {
/**
* @Description 查询管理员基本信息
* @param customerId
* @param userId
* @author zxc
* @date 2020/8/3 5:21 下午
*/
CustomerManagerFormDTO selectManagerInfo(@Param("customerId") String customerId);
CustomerManagerFormDTO selectManagerInfo(@Param("userId") String userId);
}

1
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/ComponentVerifyTicketServiceImpl.java

@ -430,6 +430,7 @@ public class ComponentVerifyTicketServiceImpl implements ComponentVerifyTicketSe
authCodeDao.insertRedirectAuthCode(formDTO);
//authCode存缓存
redisThird.setAuthCode(formDTO);
this.authInfoByAuthCode(authCode, masterCustomerId, clientType);
log.info("=======================公众号的客户id为:"+finalCustomerId);

35
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/WarrantServiceImpl.java

@ -147,21 +147,26 @@ public class WarrantServiceImpl implements WarrantService {
Object createTime = xml.get(ModuleConstant.CREATE_TIME);
Date date = componentVerifyTicketServiceImpl.sToDate(createTime.toString());
messagePushTextFormDTO.setWeChatCreateTime(date);
messagePushTextDao.insertMessageText(messagePushTextFormDTO);
// switch (messagePushTextFormDTO.getContent()){
// //测试公众号处理用户消息
// case ModuleConstant.TESTCOMPONENT_MSG_TYPE_TEXT:
//
//
// }
// if (messagePushTextFormDTO.getContent().startsWith(ModuleConstant.QUERY_AUTH_CODE)){
// // 测试公众号使用客服消息接口处理用户消息
// String content = messagePushTextFormDTO.getContent();
// String contentBefore = content.substring(NumConstant.ZERO, content.indexOf(ThirdRedisKeyConstant.COLON));
// //auth_code
// String queryAuthCode = content.substring(contentBefore.length() + NumConstant.ONE, content.length());
//
// }
// messagePushTextDao.insertMessageText(messagePushTextFormDTO);
String content = messagePushTextFormDTO.getContent();
log.info(String.format(ThirdRunTimeInfoConstant.CONTENT,content));
/**
* 测试公众号处理用户消息
* 模拟粉丝发送文本消息给专用测试公众号第三方平台方需根据文本消息的内容进行相应的响应
* 1微信模推送给第三方平台方文本消息其中 Content 字段的内容固定为TESTCOMPONENT_MSG_TYPE_TEXT
* 2第三方平台方立马回应文本消息并最终触达粉丝Content 必须固定为TESTCOMPONENT_MSG_TYPE_TEXT_callback
*/
if (content.equals(ModuleConstant.TESTCOMPONENT_MSG_TYPE_TEXT)){
}else if (content.startsWith(ModuleConstant.QUERY_AUTH_CODE)){
// 测试公众号使用客服消息接口处理用户消息
String contentBefore = content.substring(NumConstant.ZERO, content.indexOf(ThirdRedisKeyConstant.COLON));
//auth_code
String queryAuthCode = content.substring(contentBefore.length() + NumConstant.ONE, content.length());
}
}
log.info("消息与事件接收URL【代码审核结果】结束......");
return ModuleConstant.SUCCESS;

7
epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/PaUserDao.xml

@ -58,12 +58,11 @@
pu.phone AS mobile
FROM
pa_user pu
LEFT JOIN customer_mp cm ON cm.created_by = pu.id
LEFT JOIN pa_customer_user_agency pcua ON pcua.user_id = pu.id
WHERE
pu.del_flag = '0'
AND cm.CUSTOMER_ID = #{customerId}
AND CM.DEL_FLAG = '0'
LIMIT 1
AND pu.id = #{userId}
AND pcua.DEL_FLAG = '0'
</select>
</mapper>

9
epmet-module/oper-crm/oper-crm-client/src/main/java/com/epmet/feign/OperCrmOpenFeignClient.java

@ -53,4 +53,13 @@ public interface OperCrmOpenFeignClient {
*/
@PostMapping("/oper/crm/customer/addmanager")
Result addManager(@RequestBody CustomerManagerFormDTO form);
/**
* 获取客户李彪
* @author zhaoqifeng
* @date 2020/8/3 15:24
* @return com.epmet.commons.tools.utils.Result
*/
@PostMapping("/oper/crm/customer/getalllist")
Result<List<CustomerDTO>> getAllCustomerList();
}

5
epmet-module/oper-crm/oper-crm-client/src/main/java/com/epmet/feign/fallback/OperCrmOpenFeignClientFallback.java

@ -45,4 +45,9 @@ public class OperCrmOpenFeignClientFallback implements OperCrmOpenFeignClient {
public Result addManager(CustomerManagerFormDTO form) {
return ModuleUtils.feignConError(ServiceConstant.OPER_CRM_SERVER, "CustomerManagerFormDTO", form);
}
@Override
public Result<List<CustomerDTO>> getAllCustomerList() {
return ModuleUtils.feignConError(ServiceConstant.OPER_CRM_SERVER, "getAllCustomerList", null);
}
}

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

@ -2,7 +2,7 @@ version: "3.7"
services:
oper-crm-server:
container_name: oper-crm-server-dev
image: 192.168.1.130:10080/epmet-cloud-dev/oper-crm-server:0.3.59
image: 192.168.1.130:10080/epmet-cloud-dev/oper-crm-server:0.3.60
ports:
- "8090:8090"
network_mode: host # 使用现有网络

2
epmet-module/oper-crm/oper-crm-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.59</version>
<version>0.3.60</version>
<parent>
<groupId>com.epmet</groupId>
<artifactId>oper-crm</artifactId>

9
epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/controller/CustomerController.java

@ -247,4 +247,13 @@ public class CustomerController {
return new Result();
}
/**
* desc:获取所有未删除的客户
* @return
*/
@PostMapping("getalllist")
public Result<List<CustomerDTO>> getAllList() {
return new Result<List<CustomerDTO>>().ok(customerService.getAllList());
}
}

7
epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/dao/CustomerDao.java

@ -67,4 +67,11 @@ public interface CustomerDao extends BaseDao<CustomerEntity> {
* @Description 查询有效客户数据(不区分是否在有效期内)按名称模糊查询
**/
List<CustomerResultDTO> selectCustomerList(@Param("customerName") String customerName);
/**
* desc获取未删除的所有用户
* @return
*/
List<CustomerEntity> getAllList();
}

5
epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/CustomerService.java

@ -169,4 +169,9 @@ public interface CustomerService extends BaseService<CustomerEntity> {
**/
void init(CustomerInitFormDTO formDTO);
/**
* desc获取所有客户列表
* @return
*/
List<CustomerDTO> getAllList();
}

6
epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/impl/CustomerServiceImpl.java

@ -520,4 +520,10 @@ public class CustomerServiceImpl extends BaseServiceImpl<CustomerDao, CustomerEn
}
@Override
public List<CustomerDTO> getAllList() {
List<CustomerEntity> list = baseDao.getAllList();
return ConvertUtils.sourceToTarget(list,CustomerDTO.class);
}
}

8
epmet-module/oper-crm/oper-crm-server/src/main/resources/mapper/CustomerDao.xml

@ -70,4 +70,12 @@
AND customer_name LIKE concat('%', trim(#{customerName}), '%')
</if>
</select>
<select id="getAllList" resultMap="customerMap">
SELECT
id,customer_name,title,organizationNumber,organizationImg,validityTime,customerAdmin,
organizationLevel,logo
FROM customer
WHERE
del_flag = '0'
</select>
</mapper>

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

@ -2,7 +2,7 @@ version: "3.7"
services:
resi-guide-server:
container_name: resi-guide-server-dev
image: 192.168.1.130:10080/epmet-cloud-dev/resi-guide-server:0.3.18
image: 192.168.1.130:10080/epmet-cloud-dev/resi-guide-server:0.3.19
ports:
- "8091:8091"
network_mode: host # 使用现有网络

2
epmet-module/resi-guide/resi-guide-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.18</version>
<version>0.3.19</version>
<parent>
<groupId>com.epmet</groupId>
<artifactId>resi-guide</artifactId>

8
epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/service/impl/StrangerAccessRecordServiceImpl.java

@ -307,9 +307,10 @@ public class StrangerAccessRecordServiceImpl extends BaseServiceImpl<StrangerAcc
* @param appId
* @author zxc
*/
public PaCustomerDTO getCustomerInfo(String appId){
public PaCustomerDTO getCustomerInfo(String appId) {
JSONObject jsonObject = new JSONObject();
String data = HttpClientManager.getInstance().sendPostByJSON(GuideHttpUrlConstant.CUSTOMER_MSG_URL + appId, JSON.toJSONString(jsonObject)).getData();
logger.info("ThirdLoginServiceImpl.getCustomerInfo:httpclient->url:" + GuideHttpUrlConstant.CUSTOMER_MSG_URL + ",结果->" + data);
JSONObject toResult = JSON.parseObject(data);
Result mapToResult = ConvertUtils.mapToEntity(toResult, Result.class);
if (!mapToResult.success()) {
@ -318,8 +319,9 @@ public class StrangerAccessRecordServiceImpl extends BaseServiceImpl<StrangerAcc
}
Object PublicCustomerResultDTO = mapToResult.getData();
JSONObject json = JSON.parseObject(PublicCustomerResultDTO.toString());
PublicCustomerResultDTO publicCustomerResultDTO = ConvertUtils.mapToEntity(json, PublicCustomerResultDTO.class);
PaCustomerDTO customer = publicCustomerResultDTO.getCustomer();
Map<String, Object> map = (Map) json.get("customer");
PaCustomerDTO customer = ConvertUtils.mapToEntity(map, PaCustomerDTO.class);
logger.info("小程序登陆third服务获取客户用户信息PaCustomerDTO->" + customer);
return customer;
}

Loading…
Cancel
Save