diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/filter/LogMsgSendFilter.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/filter/LogMsgSendFilter.java index 4745de9afa..fc5702f97a 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/filter/LogMsgSendFilter.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/filter/LogMsgSendFilter.java @@ -93,20 +93,28 @@ public class LogMsgSendFilter extends LevelFilter { /** * desc:获取服务 ip及profile信息 - * */ private void getServerInfo() { - if (serverIp == null) { - InetUtils inetUtils = SpringContextUtils.getBean(InetUtils.class); - serverIp = inetUtils.findFirstNonLoopbackHostInfo().getIpAddress(); + try { + if (serverIp == null) { + InetUtils inetUtils = SpringContextUtils.getBean(InetUtils.class); + serverIp = inetUtils.findFirstNonLoopbackHostInfo().getIpAddress(); + } + } catch (Exception e) { + logger.warn("getServerInfo get bean InetUtils exception", e); + return; } - if (activeEnv == null) { - Environment environment = SpringContextUtils.getBean(Environment.class); - String[] activeProfiles = environment.getActiveProfiles(); - if (activeProfiles != null && activeProfiles.length > 0) { - logger.info("activeProfiles:{}", activeProfiles); - activeEnv = activeProfiles[0]; + try { + if (activeEnv == null) { + Environment environment = SpringContextUtils.getBean(Environment.class); + String[] activeProfiles = environment.getActiveProfiles(); + if (activeProfiles != null && activeProfiles.length > 0) { + logger.info("activeProfiles:{}", activeProfiles); + activeEnv = activeProfiles[0]; + } } + } catch (Exception e) { + logger.warn("getServerInfo get bean Environment exception", e); } } diff --git a/epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-dev.yml b/epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-dev.yml index e86909b2c8..d507e12a9f 100644 --- a/epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-dev.yml +++ b/epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-dev.yml @@ -2,7 +2,7 @@ version: "3.7" services: data-statistical-server: container_name: data-statistical-server-dev - image: 192.168.1.130:10080/epmet-cloud-dev/data-statistical-server:0.3.41 + image: 192.168.1.130:10080/epmet-cloud-dev/data-statistical-server:0.3.42 ports: - "8108:8108" network_mode: host # 使用现有网络 diff --git a/epmet-module/data-statistical/data-statistical-server/pom.xml b/epmet-module/data-statistical/data-statistical-server/pom.xml index 1709484e94..0dfdd97d91 100644 --- a/epmet-module/data-statistical/data-statistical-server/pom.xml +++ b/epmet-module/data-statistical/data-statistical-server/pom.xml @@ -2,7 +2,7 @@ - 0.3.41 + 0.3.42 data-statistical com.epmet diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/voice/ArticleDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/voice/ArticleDao.java index 8ad5156de5..1d0d92784b 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/voice/ArticleDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/voice/ArticleDao.java @@ -23,6 +23,7 @@ import com.epmet.entity.voice.ArticleEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; +import java.util.Date; import java.util.List; /** @@ -45,11 +46,12 @@ public interface ArticleDao extends BaseDao { List getAllPublishedCount(@Param("customerId") String customerId, @Param("publishDate") String publishDate, @Param("publisherType") String publisherType); /** - * desc:根据客户Id 和发布时间 获取文章数据 + * desc:根据客户Id 和创建时间 获取文章数据 * * @param customerId - * @param publishDate + * @param startTime + * @param endTime * @return */ - List getPublishedArticleByDay(@Param("customerId") String customerId, @Param("publishDate") String publishDate); + List getPublishedArticleByDay(@Param("customerId") String customerId, @Param("startTime") Date startTime, @Param("endTime") Date endTime); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsPublicityServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsPublicityServiceImpl.java index bcc55ede28..e507b0e8ec 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsPublicityServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsPublicityServiceImpl.java @@ -598,14 +598,14 @@ public class StatsPublicityServiceImpl implements StatsPublicityService { //转换为 需要插入的Entity Map dimAgencyEntityMap = agencyDTOList.stream().collect(Collectors.toMap(DimAgencyEntity::getId, o -> o)); + Date startTime = DateUtils.integrate(statsDate, DateUtils.DATE_PATTERN); + Date endTime = DateUtils.integrate(DateUtils.addDateDays(statsDate, NumConstant.ONE), DateUtils.DATE_PATTERN); //获取当天的业务数据 //1获取文章及机关id,网格Id - List publishedArticleList = articleService.getPublishedArticleByPublishTime(customerId, DateUtils.format(statsDate)); + List publishedArticleList = articleService.getPublishedArticleByCreateTime(customerId, startTime, endTime); if (!CollectionUtils.isEmpty(publishedArticleList)) { //KEY 文章Id Map articleMap = publishedArticleList.stream().collect(Collectors.toMap(ArticleEntity::getId, o -> o)); - Date startTime = DateUtils.integrate(statsDate, DateUtils.DATE_PATTERN); - Date endTime = DateUtils.integrate(DateUtils.addDateDays(statsDate, NumConstant.ONE), DateUtils.DATE_PATTERN); //2 获取文章标签 List articleTagsList = articleTagsService.getArticleTagsByCreateTime(customerId, startTime, endTime); if (!CollectionUtils.isEmpty(articleTagsList)) { diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/voice/ArticleService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/voice/ArticleService.java index ce6025a17a..0cd4e5838a 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/voice/ArticleService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/voice/ArticleService.java @@ -21,6 +21,7 @@ import com.epmet.commons.mybatis.service.BaseService; import com.epmet.dto.voice.ArticleGridPublishedSummaryDTO; import com.epmet.entity.voice.ArticleEntity; +import java.util.Date; import java.util.List; /** @@ -56,12 +57,13 @@ public interface ArticleService extends BaseService { List getAllGridPublishedCount(String customerId, String publishDate); /** - * desc:根据客户id,发布时间 获取文章数据 + * desc:根据客户id,创建时间 获取文章数据,因为存在当天可以发布之前时间点的数据 所以采用创建时间 * @param customerId - * @param publishDate + * @param startTime + * @param endTime * @return */ - List getPublishedArticleByPublishTime(String customerId, String publishDate); + List getPublishedArticleByCreateTime(String customerId, Date startTime, Date endTime); ArticleEntity selectArticleById(String articleId); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/voice/impl/ArticleServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/voice/impl/ArticleServiceImpl.java index 2a9bd8d17e..8325d99fb0 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/voice/impl/ArticleServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/voice/impl/ArticleServiceImpl.java @@ -30,6 +30,7 @@ import com.epmet.service.voice.ArticleService; import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; +import java.util.Date; import java.util.List; /** @@ -63,9 +64,11 @@ public class ArticleServiceImpl extends BaseServiceImpl getPublishedArticleByPublishTime(String customerId, String publishDate) { - checkParam(customerId, publishDate); - return baseDao.getPublishedArticleByDay(customerId,publishDate); + public List getPublishedArticleByCreateTime(String customerId, Date startTime, Date endTime) { + if (StringUtils.isBlank(customerId) || startTime == null || endTime == null) { + throw new RenException(EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getCode(), EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getMsg()); + } + return baseDao.getPublishedArticleByDay(customerId, startTime, endTime); } @Override diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/bootstrap.yml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/bootstrap.yml index c2ed87bf1e..f148ea791b 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/bootstrap.yml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/bootstrap.yml @@ -10,7 +10,7 @@ spring: name: data-statistical-server #环境 dev|test|prod profiles: - active: dev + active: @spring.profiles.active@ jackson: time-zone: GMT+8 date-format: yyyy-MM-dd HH:mm:ss diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/voice/ArticleDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/voice/ArticleDao.xml index 0ecf25fb1b..4ac5086bf9 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/voice/ArticleDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/voice/ArticleDao.xml @@ -65,7 +65,7 @@ FROM article WHERE - PUBLISH_DATE = #{publishDate,jdbcType=VARCHAR} + CREATED_TIME BETWEEN #{startTime,jdbcType=TIMESTAMP} AND #{endTime,jdbcType=TIMESTAMP} AND DEL_FLAG = 0 AND TAGS IS NOT NULL AND CUSTOMER_ID = #{customerId,jdbcType=VARCHAR} diff --git a/epmet-module/epmet-heart/epmet-heart-server/deploy/docker-compose-dev.yml b/epmet-module/epmet-heart/epmet-heart-server/deploy/docker-compose-dev.yml index 808e933cd6..2253c56b00 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/deploy/docker-compose-dev.yml +++ b/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.37 + image: 192.168.1.130:10080/epmet-cloud-dev/epmet-heart-server:0.0.38 ports: - "8111:8111" network_mode: host # 使用现有网络 diff --git a/epmet-module/epmet-heart/epmet-heart-server/deploy/docker-compose-test.yml b/epmet-module/epmet-heart/epmet-heart-server/deploy/docker-compose-test.yml index 2c181a2d06..b3b8fecd49 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/deploy/docker-compose-test.yml +++ b/epmet-module/epmet-heart/epmet-heart-server/deploy/docker-compose-test.yml @@ -2,7 +2,7 @@ version: "3.7" services: epmet-heart-server: container_name: epmet-heart-server-test - image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/epmet-heart-server:0.0.37 + image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/epmet-heart-server:0.0.38 ports: - "8111:8111" network_mode: host # 使用现有网络 diff --git a/epmet-module/epmet-heart/epmet-heart-server/pom.xml b/epmet-module/epmet-heart/epmet-heart-server/pom.xml index dba3114f69..37349a39b5 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/pom.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/pom.xml @@ -2,7 +2,7 @@ 4.0.0 - 0.0.37 + 0.0.38 com.epmet epmet-heart diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/bootstrap.yml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/bootstrap.yml index c6e70a0bc3..fe8a9ba0d4 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/bootstrap.yml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/bootstrap.yml @@ -10,7 +10,7 @@ spring: name: epmet-heart-server #环境 dev|test|prod profiles: - active: dev + active: @spring.profiles.active@ jackson: time-zone: GMT+8 date-format: yyyy-MM-dd HH:mm:ss diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/ActUserRelationDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/ActUserRelationDao.xml index 618cfb76fb..17fbb27e9a 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/ActUserRelationDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/ActUserRelationDao.xml @@ -75,7 +75,7 @@ FROM act_user_relation re WHERE re.DEL_FLAG = '0' AND re.ACT_ID = #{actId} - AND re.`STATUS` != 'refused' AND re.`STATUS` != 'cancele' + AND re.`STATUS` != 'refused' AND re.`STATUS` != 'canceled' diff --git a/epmet-module/epmet-job/epmet-job-server/deploy/docker-compose-dev.yml b/epmet-module/epmet-job/epmet-job-server/deploy/docker-compose-dev.yml index 497d893625..8c9ba33c2d 100644 --- a/epmet-module/epmet-job/epmet-job-server/deploy/docker-compose-dev.yml +++ b/epmet-module/epmet-job/epmet-job-server/deploy/docker-compose-dev.yml @@ -2,7 +2,7 @@ version: "3.7" services: epmet-job-server: container_name: epmet-job-server-dev - image: 192.168.1.130:10080/epmet-cloud-dev/epmet-job-server:0.3.23 + image: 192.168.1.130:10080/epmet-cloud-dev/epmet-job-server:0.3.24 ports: - "8084:8084" network_mode: host # 使用现有网络 diff --git a/epmet-module/epmet-job/epmet-job-server/pom.xml b/epmet-module/epmet-job/epmet-job-server/pom.xml index 7ee8d4b25d..e1e049d0d1 100644 --- a/epmet-module/epmet-job/epmet-job-server/pom.xml +++ b/epmet-module/epmet-job/epmet-job-server/pom.xml @@ -2,7 +2,7 @@ 4.0.0 - 0.3.23 + 0.3.24 com.epmet epmet-job diff --git a/epmet-module/epmet-job/epmet-job-server/src/main/resources/bootstrap.yml b/epmet-module/epmet-job/epmet-job-server/src/main/resources/bootstrap.yml index b8faf3661a..72cbbdaaf8 100644 --- a/epmet-module/epmet-job/epmet-job-server/src/main/resources/bootstrap.yml +++ b/epmet-module/epmet-job/epmet-job-server/src/main/resources/bootstrap.yml @@ -10,7 +10,7 @@ spring: name: epmet-job-server #环境 dev|test|prod profiles: - active: dev + active: @spring.profiles.active@ messages: encoding: UTF-8 basename: i18n/messages,i18n/messages_common diff --git a/epmet-module/epmet-point/epmet-point-server/deploy/docker-compose-dev.yml b/epmet-module/epmet-point/epmet-point-server/deploy/docker-compose-dev.yml index 17fb954689..3998c514b4 100644 --- a/epmet-module/epmet-point/epmet-point-server/deploy/docker-compose-dev.yml +++ b/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.31 + image: 192.168.1.130:10080/epmet-cloud-dev/epmet-point-server:0.0.32 ports: - "8112:8112" network_mode: host # 使用现有网络 diff --git a/epmet-module/epmet-point/epmet-point-server/pom.xml b/epmet-module/epmet-point/epmet-point-server/pom.xml index 55a2f16d7e..c96d4e9ee4 100644 --- a/epmet-module/epmet-point/epmet-point-server/pom.xml +++ b/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"> 4.0.0 - 0.0.31 + 0.0.32 epmet-point com.epmet diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/controller/PointRuleController.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/controller/PointRuleController.java index 526e56fa46..2cd02a244d 100644 --- a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/controller/PointRuleController.java +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/controller/PointRuleController.java @@ -50,14 +50,12 @@ public class PointRuleController { /** * desc:根据功能id获取积分规则 * - * @param tokenDTO * @param formDTO * @return */ @PostMapping(value = "list") @RequirePermission( requirePermission = RequirePermissionEnum.MORE_POINT_RULE_LIST) public Result> list( @RequestBody PointRuleListFormDTO formDTO) { - formDTO.setCustomerId("3ef7e4bb195eb9e622d68b52509aa940"); ValidatorUtils.validateEntity(formDTO); return new Result>().ok(pointRuleService.list(formDTO)); } diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/UserPointActionLogServiceImpl.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/UserPointActionLogServiceImpl.java index 0f33787a49..52e451ba6e 100644 --- a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/UserPointActionLogServiceImpl.java +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/UserPointActionLogServiceImpl.java @@ -333,8 +333,7 @@ public class UserPointActionLogServiceImpl extends BaseServiceImpl【%s】", JSON.toJSON(event))); - throw new RenException("未检测到该用户下有效的积分规则"); + log.warn(String.format("未检测到该用户下有效的积分规则,消息体->【%s】", JSON.toJSON(event))); } diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/resources/bootstrap.yml b/epmet-module/epmet-point/epmet-point-server/src/main/resources/bootstrap.yml index bf7eb31f91..0f4b3289d7 100644 --- a/epmet-module/epmet-point/epmet-point-server/src/main/resources/bootstrap.yml +++ b/epmet-module/epmet-point/epmet-point-server/src/main/resources/bootstrap.yml @@ -10,7 +10,7 @@ spring: name: epmet-point-server #环境 dev|test|prod profiles: - active: dev + active: @spring.profiles.active@ jackson: time-zone: GMT+8 date-format: yyyy-MM-dd HH:mm:ss diff --git a/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-dev.yml b/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-dev.yml index 08e805f726..b8f9bca08f 100644 --- a/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-dev.yml +++ b/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.100 + image: 192.168.1.130:10080/epmet-cloud-dev/epmet-third-server:0.0.102 ports: - "8110:8110" network_mode: host # 使用现有网络 diff --git a/epmet-module/epmet-third/epmet-third-server/pom.xml b/epmet-module/epmet-third/epmet-third-server/pom.xml index 4cc685ec5c..aa8fe373d8 100644 --- a/epmet-module/epmet-third/epmet-third-server/pom.xml +++ b/epmet-module/epmet-third/epmet-third-server/pom.xml @@ -2,7 +2,7 @@ 4.0.0 - 0.0.100 + 0.0.102 com.epmet @@ -147,6 +147,14 @@ 5.1.12.RELEASE compile + + + + com.aliyun + alibaba-dingtalk-service-sdk + 1.0.1 + + diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/WarrantServiceImpl.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/WarrantServiceImpl.java index 85b4a9277b..7177625410 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/WarrantServiceImpl.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/WarrantServiceImpl.java @@ -3,6 +3,10 @@ package com.epmet.service.impl; import cn.hutool.json.JSONObject; import com.alibaba.fastjson.JSON; import com.alibaba.nacos.client.config.utils.IOUtils; +import com.dingtalk.api.DefaultDingTalkClient; +import com.dingtalk.api.DingTalkClient; +import com.dingtalk.api.request.OapiRobotSendRequest; +import com.dingtalk.api.response.OapiRobotSendResponse; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.HttpClientManager; @@ -24,6 +28,7 @@ import com.epmet.wxapi.constant.WxMaCodeConstant; import com.fasterxml.jackson.core.JsonEncoding; import com.fasterxml.jackson.core.JsonGenerator; import com.fasterxml.jackson.databind.ObjectMapper; +import com.taobao.api.ApiException; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; import org.dom4j.DocumentException; @@ -139,16 +144,20 @@ public class WarrantServiceImpl implements WarrantService { codeAuditRecordDao.insertCodeAuditRecord(codeAuditRecord); // 修改 code_audit_result 中的代码审核结果 // String event = codeAuditRecord.getEvent(); + String reason = codeAuditRecord.getReason(); String codeResult = null; switch (event) { case ModuleConstant.WEAPP_AUDIT_SUCCESS: codeResult = ModuleConstant.AUDIT_SUCCESS; + this.dingDingRobot(reason,null); break; case ModuleConstant.WEAPP_AUDIT_FAIL: codeResult = ModuleConstant.AUDIT_FAILED; + this.dingDingRobot(reason,codeResult); break; case ModuleConstant.WEAPP_AUDIT_DELAY: codeResult = ModuleConstant.DELAY; + this.dingDingRobot(reason,codeResult); break; } String codeCustomerId = codeCustomerDao.selectCodeCustomerId(codeAuditRecord); @@ -190,6 +199,33 @@ public class WarrantServiceImpl implements WarrantService { return ModuleConstant.SUCCESS; } + public void dingDingRobot(String result,String event){ + DingTalkClient client = new DefaultDingTalkClient("https://oapi.dingtalk.com/robot/send?access_token=5b48fcbc3fde24b8ba4696aa062b7f8146479a9d3467dbb1f9cf132ec36b955a"); + OapiRobotSendRequest request = new OapiRobotSendRequest(); + request.setMsgtype("text"); + OapiRobotSendRequest.Text text = new OapiRobotSendRequest.Text(); + switch (event){ + case ModuleConstant.WEAPP_AUDIT_SUCCESS: + text.setContent("代码审核结果: 审核成功"); + break; + case ModuleConstant.WEAPP_AUDIT_FAIL: + text.setContent("代码审核结果: 审核不通过,"+ + "不通过原因:"+result); + break; + case ModuleConstant.WEAPP_AUDIT_DELAY: + text.setContent("代码审核结果: 审核延时,"+ + "延时原因:"+result); + break; + } + request.setText(text); + try { + OapiRobotSendResponse response = client.execute(request); + } catch (ApiException e) { + log.error("机器人生病了......"); + e.printStackTrace(); + } + } + /** * 方法描述: 类型为enevt的时候,拼接 * @param request diff --git a/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/impl/CustomerServiceImpl.java b/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/impl/CustomerServiceImpl.java index 55505076e7..c666fde165 100644 --- a/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/impl/CustomerServiceImpl.java +++ b/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/impl/CustomerServiceImpl.java @@ -44,6 +44,7 @@ import com.epmet.feign.OperCustomizeFeignClient; import com.epmet.redis.CustomerRedis; import com.epmet.service.CustomerService; import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -400,11 +401,12 @@ public class CustomerServiceImpl extends BaseServiceImpl list = baseDao.selectCustomerList(formDTO.getCustomerName()); - //PageInfo pi = new PageInfo<>(list); - PageData resultDTO = new PageData(list,list.size()); - return resultDTO; + PageInfo pageInfo = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()) + .doSelectPageInfo(() -> baseDao.selectCustomerList(formDTO.getCustomerName())); +// List list = baseDao.selectCustomerList(formDTO.getCustomerName()); +// //PageInfo pi = new PageInfo<>(list); +// int total=baseDao.selectCountByCustomerName(formDTO.getCustomerName()); + return new PageData(pageInfo.getList(),pageInfo.getTotal()); } /** diff --git a/epmet-module/oper-crm/oper-crm-server/src/main/resources/mapper/CustomerDao.xml b/epmet-module/oper-crm/oper-crm-server/src/main/resources/mapper/CustomerDao.xml index 1e1c8649d1..a0d49c5172 100644 --- a/epmet-module/oper-crm/oper-crm-server/src/main/resources/mapper/CustomerDao.xml +++ b/epmet-module/oper-crm/oper-crm-server/src/main/resources/mapper/CustomerDao.xml @@ -70,6 +70,7 @@ AND customer_name LIKE concat('%', trim(#{customerName}), '%') +