diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/HttpClientManager.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/HttpClientManager.java index 7d456a6707..8777143097 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/HttpClientManager.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/HttpClientManager.java @@ -6,6 +6,7 @@ import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; import lombok.extern.slf4j.Slf4j; import org.apache.commons.codec.binary.Base64; +import org.apache.commons.io.IOUtils; import org.apache.commons.lang3.StringUtils; import org.apache.http.HttpEntity; import org.apache.http.HttpStatus; @@ -326,6 +327,23 @@ public class HttpClientManager { } } + public Result getMediaByteArray(String url, String json) { + + try { + HttpPost httppost = new HttpPost(url); + httppost.setConfig(requestConfig); + httppost.addHeader("Content-Type", "application/json"); + if (StringUtils.isNotEmpty(json)) { + StringEntity se = new StringEntity(json, "utf-8"); + httppost.setEntity(se); + } + return executeToByte(httppost); + } catch (Exception e) { + log.error("sendGet exception", e); + return new Result().error(EpmetErrorCode.SERVER_ERROR.getCode(), EpmetErrorCode.SERVER_ERROR.getMsg()); + } + } + private Result executeToByte(HttpRequestBase httpMethod) { CloseableHttpResponse response = null; try { @@ -334,14 +352,16 @@ public class HttpClientManager { if (response != null && response.getStatusLine() != null) { if (response.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { InputStream in = response.getEntity().getContent(); - ByteArrayOutputStream output = new ByteArrayOutputStream(); - byte[] buffer = new byte[4096]; - int n = 0; - while (-1 != (n = in.read(buffer))) { - output.write(buffer, 0, n); - } + byte[] responseContent = IOUtils.toByteArray(in); +// ByteArrayOutputStream output = new ByteArrayOutputStream(); +// byte[] buffer = new byte[4096]; +// int n = 0; +// while (-1 != (n = in.read(buffer))) { +// output.write(buffer, 0, n); +// } // return new Result().ok(ArrayUtils.toObject(output.toByteArray())); - return new Result().ok(output.toByteArray()); +// return new Result().ok(output.toByteArray()); + return new Result().ok(responseContent); } else { log.warn("execute http method fail,httpStatus:{0}", response.getStatusLine().getStatusCode()); } 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 6ccb3197a1..7147290341 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.29 + image: 192.168.1.130:10080/epmet-cloud-dev/epmet-heart-server:0.0.30 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 54bb0afbeb..fd1aeb191c 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.29 + 0.0.30 com.epmet epmet-heart diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/ActInfoDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/ActInfoDao.xml index 046267b067..532a1ec5b2 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/ActInfoDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/ActInfoDao.xml @@ -348,10 +348,12 @@ i.ACT_ADDRESS actAddress, 'finished' actCurrentState FROM act_info i + LEFT JOIN act_live_rec r ON r.ACT_ID = i.ID AND r.DEL_FLAG = '0' WHERE i.DEL_FLAG = '0' - AND i.SUMMARY_FLAG = 1 OR (SELECT r.ACT_ID FROM act_live_rec r WHERE r.DEL_FLAG = '0' AND r.ACT_ID = i.ID GROUP BY r.ACT_ID) + AND i.SUMMARY_FLAG = 1 OR r.ID is NOT NULL AND i.CUSTOMER_ID = #{customerId} AND i.ACT_STATUS = 'finished' + GROUP BY r.ACT_ID ORDER BY i.CREATED_TIME DESC LIMIT #{pageNo}, #{pageSize} @@ -711,10 +713,12 @@ i.ACT_ADDRESS actAddress, 'finished' actCurrentState FROM act_info i + LEFT JOIN act_live_rec r ON r.ACT_ID = i.ID AND r.DEL_FLAG = '0' WHERE i.DEL_FLAG = '0' - AND i.SUMMARY_FLAG = 1 OR (SELECT r.ACT_ID FROM act_live_rec r WHERE r.DEL_FLAG = '0' AND r.ACT_ID = i.ID GROUP BY r.ACT_ID) + AND i.SUMMARY_FLAG = 1 OR r.ID is NOT NULL AND i.CUSTOMER_ID = #{customerId} AND i.ACT_STATUS = 'finished' + GROUP BY r.ACT_ID ORDER BY i.CREATED_TIME DESC LIMIT 0, #{num} diff --git a/epmet-module/epmet-message/epmet-message-server/deploy/docker-compose-dev.yml b/epmet-module/epmet-message/epmet-message-server/deploy/docker-compose-dev.yml index 7270990fd3..5c8fea6fb7 100644 --- a/epmet-module/epmet-message/epmet-message-server/deploy/docker-compose-dev.yml +++ b/epmet-module/epmet-message/epmet-message-server/deploy/docker-compose-dev.yml @@ -2,7 +2,7 @@ version: "3.7" services: epmet-message-server: container_name: epmet-message-server-dev - image: 192.168.1.130:10080/epmet-cloud-dev/epmet-message-server:0.3.26 + image: 192.168.1.130:10080/epmet-cloud-dev/epmet-message-server:0.3.27 ports: - "8085:8085" network_mode: host # 使用现有网络 diff --git a/epmet-module/epmet-message/epmet-message-server/pom.xml b/epmet-module/epmet-message/epmet-message-server/pom.xml index 7de41867a5..ab4397473b 100644 --- a/epmet-module/epmet-message/epmet-message-server/pom.xml +++ b/epmet-module/epmet-message/epmet-message-server/pom.xml @@ -2,7 +2,7 @@ 4.0.0 - 0.3.26 + 0.3.27 com.epmet epmet-message diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/UserMessageServiceImpl.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/UserMessageServiceImpl.java index f54f420294..eb0e559e74 100644 --- a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/UserMessageServiceImpl.java +++ b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/UserMessageServiceImpl.java @@ -149,7 +149,8 @@ public class UserMessageServiceImpl extends BaseServiceImpl wrapper = new QueryWrapper<>(); wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id) .eq(StringUtils.isNotBlank(customerId), FieldConstant.CUSTOMER_ID, customerId) - .eq(StringUtils.isNotBlank(gridId), FieldConstant.GRID_ID, gridId) +// 注释掉此列,居民端和工作端消息浮窗看到的是当前客户下所有的消息 +// .eq(StringUtils.isNotBlank(gridId), FieldConstant.GRID_ID, gridId) .eq(StringUtils.isNotBlank(userId), FieldConstant.USER_ID, userId) .eq(StringUtils.isNotBlank(deFlag), FieldConstant.DEL_FLAG, deFlag) .eq(StringUtils.isNotBlank(readFlag), "read_flag", readFlag); 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 303753d2d5..ba513723c1 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.19 + image: 192.168.1.130:10080/epmet-cloud-dev/epmet-point-server:0.0.20 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 c69724dee4..6e70a67018 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.19 + 0.0.20 epmet-point com.epmet diff --git a/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/FixationAppIdDTO.java b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/FixationAppIdDTO.java new file mode 100644 index 0000000000..ad55fbb43d --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/FixationAppIdDTO.java @@ -0,0 +1,86 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dto; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 固定的AppId表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-03 + */ +@Data +public class FixationAppIdDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * ID + */ + private String id; + + /** + * 小程序AppId + */ + private String appId; + + /** + * 客户Id + */ + private String customerId; + + /** + * 客户端类型resi:居民端,work:工作端 + */ + private String clientType; + + /** + * 删除状态0:正常,已删除 + */ + private Integer delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/ModifyCustomerFormDTO.java b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/ModifyCustomerFormDTO.java new file mode 100644 index 0000000000..aff37e587b --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/ModifyCustomerFormDTO.java @@ -0,0 +1,26 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author sun + * @Description 修改各业务表customerId(兼容党群e事通已上线客户,将已有客户Id同步到第三方问题)-接口入参 + */ +@Data +public class ModifyCustomerFormDTO implements Serializable { + + private static final long serialVersionUID = -6547893374373422628L; + + /** + * 待修改的客户Id 公众号创建的客户 + * */ + private String oldCustomerId; + + /** + * 修改后的客户Id crm表原来的customerId + */ + private String newCustomerId; + +} diff --git a/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/result/FixationAppIdResultDTO.java b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/result/FixationAppIdResultDTO.java new file mode 100644 index 0000000000..d27aa43ef7 --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/result/FixationAppIdResultDTO.java @@ -0,0 +1,30 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2020/8/3 4:15 下午 + */ +@Data +public class FixationAppIdResultDTO implements Serializable { + + private static final long serialVersionUID = 3810567059789358255L; + + /** + * 客户ID + */ + private String masterCustomerId; + + /** + * 客户端类型:resi:居民端,work:工作端 + */ + private String clientType; + + /** + * AppId + */ + private String appId; +} diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/constant/ModuleConstant.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/constant/ModuleConstant.java index 1bc5e3b98b..bbe5ac73b9 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/constant/ModuleConstant.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/constant/ModuleConstant.java @@ -86,6 +86,21 @@ public interface ModuleConstant { String AUDIT_FAILED = "audit_failed"; String XML = "xml"; String CREATE_TIME = "CreateTime"; + String QUERY_AUTH_CODE = "QUERY_AUTH_CODE"; + String _CALL_BACK = "_callback"; + String FROM_CALLBACK = "from_callback"; + String APPLICATION_JSON = "application/json"; + String _FROM_API = "_from_api"; + + /** + * 微信模推送给第三方平台方 Content固定格式 + */ + String TESTCOMPONENT_MSG_TYPE_TEXT = "TESTCOMPONENT_MSG_TYPE_TEXT"; + + /** + * 第三方平台方立马回应文本消息并最终触达粉丝 Content固定格式 + */ + String TESTCOMPONENT_MSG_TYPE_TEXT_callback = "TESTCOMPONENT_MSG_TYPE_TEXT_callback"; int FORTY_THOUSAND_AND_THIRTEEN = 40013; int EIGHTY_NINE_THOUSAND = 89000; diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/constant/PaConstant.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/constant/PaConstant.java index 7f25762c5e..21e369aec9 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/constant/PaConstant.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/constant/PaConstant.java @@ -78,4 +78,8 @@ public interface PaConstant { * 获取访问记录表数据失败失败 */ String SELECT_VISITED_EXCEPTION = "获取访问记录表数据失败"; + /** + * 更新客户Id信息失败 + */ + String UPDATE_CUSTOMER_EXCEPTION = "更新客户Id信息失败"; } diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/constant/ThirdRunTimeInfoConstant.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/constant/ThirdRunTimeInfoConstant.java index 188c19a89e..1f896bae8f 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/constant/ThirdRunTimeInfoConstant.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/constant/ThirdRunTimeInfoConstant.java @@ -103,4 +103,8 @@ public interface ThirdRunTimeInfoConstant { String BEGIN_CREATE_OPEN = "============================开始执行绑定开放平台账号==================================="; String CODE_AUDIT_RESULT = "----------------------------------代码审核结果即将插入,需要插入的内容为:%s-----------------------------------------"; + + String TEXT_MESSAGE_LOG_INFO = "content:%s,content[1]:%s,fromUserName:%s,toUserName:%s"; + + String SEND_MESSAGE_XML = "要发送的xml内容为:%s"; } diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/CustomerMpDao.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/CustomerMpDao.java index a3fca59cc8..0e5243e6e7 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/CustomerMpDao.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/CustomerMpDao.java @@ -21,6 +21,7 @@ import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.CustomerMpDTO; import com.epmet.dto.PaCustomerDTO; import com.epmet.dto.form.AuthCodeFormDTO; +import com.epmet.dto.form.ModifyCustomerFormDTO; import com.epmet.entity.CustomerMpEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -123,4 +124,12 @@ public interface CustomerMpDao extends BaseDao { * @author zxc */ String getAppId(@Param("customerId")String customerId,@Param("clientType")String clientType); + + /** + * @param formDTO + * @return + * @Author sun + * @Description 修改customer_mp表客户Id + **/ + int updateCustomerId(ModifyCustomerFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/FixationAppIdDao.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/FixationAppIdDao.java new file mode 100644 index 0000000000..ceb297a05c --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/FixationAppIdDao.java @@ -0,0 +1,43 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.result.FixationAppIdResultDTO; +import com.epmet.entity.FixationAppIdEntity; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +/** + * 固定的AppId表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-03 + */ +@Mapper +public interface FixationAppIdDao extends BaseDao { + + /** + * @Description 查询固定AppId信息 + * @author zxc + * @date 2020/8/3 4:25 下午 + */ + List selectFixationInfos(); + +} \ No newline at end of file diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/PaCustomerAgencyDao.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/PaCustomerAgencyDao.java index a3031b9b15..46938bfc31 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/PaCustomerAgencyDao.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/PaCustomerAgencyDao.java @@ -19,6 +19,7 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.PaCustomerAgencyDTO; +import com.epmet.dto.form.ModifyCustomerFormDTO; import com.epmet.entity.PaCustomerAgencyEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -54,4 +55,12 @@ public interface PaCustomerAgencyDao extends BaseDao { * @Description 公众号-查询客户组织信息 **/ PaCustomerAgencyDTO selectAgency(@Param("customerId") String customerId); + + /** + * @param formDTO + * @return + * @Author sun + * @Description 修改pa_customer_agency表客户Id + **/ + int updateCustomerId(ModifyCustomerFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/PaCustomerDao.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/PaCustomerDao.java index 5d403cb1cf..c977d5d7f4 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/PaCustomerDao.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/PaCustomerDao.java @@ -19,6 +19,7 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.PaCustomerDTO; +import com.epmet.dto.form.ModifyCustomerFormDTO; import com.epmet.dto.form.RegisterByAuthFormDTO; import com.epmet.dto.result.CustomerAgencyResultDTO; import com.epmet.dto.result.RegisterByAuthResultDTO; @@ -69,4 +70,11 @@ public interface PaCustomerDao extends BaseDao { **/ List selectCustomerList(RegisterByAuthFormDTO formDTO); + /** + * @param formDTO + * @return + * @Author sun + * @Description 修改pa_customer表主键值 + **/ + int updateIdById(ModifyCustomerFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/PaCustomerUserAgencyDao.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/PaCustomerUserAgencyDao.java index 2083f9c1e9..bd0c8253c4 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/PaCustomerUserAgencyDao.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/PaCustomerUserAgencyDao.java @@ -19,6 +19,7 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.PaCustomerUserAgencyDTO; +import com.epmet.dto.form.ModifyCustomerFormDTO; import com.epmet.entity.PaCustomerUserAgencyEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -47,4 +48,12 @@ public interface PaCustomerUserAgencyDao extends BaseDao { * @Description 根据数据来源和手机号查询公众号用户基本信息,校验用户是否存在 **/ PaUserDTO selectUser(@Param("id") String id, @Param("source") String source); + + /** + * @Description 查询管理员基本信息 + * @param customerId + * @author zxc + * @date 2020/8/3 5:21 下午 + */ + CustomerManagerFormDTO selectManagerInfo(@Param("customerId") String customerId); } \ No newline at end of file diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/entity/FixationAppIdEntity.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/entity/FixationAppIdEntity.java new file mode 100644 index 0000000000..4d7a70e7e8 --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/entity/FixationAppIdEntity.java @@ -0,0 +1,56 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 固定的AppId表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-03 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("fixation_app_id") +public class FixationAppIdEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 小程序AppId + */ + private String appId; + + /** + * 客户Id + */ + private String customerId; + + /** + * 客户端类型resi:居民端,work:工作端 + */ + private String clientType; + +} diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/PaCustomerService.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/PaCustomerService.java index 829029168f..b08f4aead1 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/PaCustomerService.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/PaCustomerService.java @@ -21,10 +21,7 @@ import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.dto.PaCustomerDTO; -import com.epmet.dto.form.CreateAgencyFormDTO; -import com.epmet.dto.form.RegisterByAuthFormDTO; -import com.epmet.dto.form.RegisterFormDTO; -import com.epmet.dto.form.RegisterInfoFormDTO; +import com.epmet.dto.form.*; import com.epmet.dto.result.*; import com.epmet.entity.PaCustomerEntity; @@ -163,4 +160,12 @@ public interface PaCustomerService extends BaseService { * @Description 根据初始化状态获取公众号注册的客户列表 **/ List registerByAuth(RegisterByAuthFormDTO formDTO); + + /** + * @param formDTO + * @return + * @Author sun + * @Description 修改各业务表customerId(兼容党群e事通已上线客户,将已有客户Id同步到第三方问题) + **/ + void modifyCustomer(ModifyCustomerFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/ComponentVerifyTicketServiceImpl.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/ComponentVerifyTicketServiceImpl.java index c54dd03a31..67bcddbac0 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/ComponentVerifyTicketServiceImpl.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/ComponentVerifyTicketServiceImpl.java @@ -15,6 +15,7 @@ import com.epmet.dao.*; import com.epmet.dto.PaCustomerUserAgencyDTO; import com.epmet.dto.form.*; import com.epmet.dto.result.*; +import com.epmet.feign.OperCrmOpenFeignClient; import com.epmet.mpaes.WXBizMsgCrypt; import com.epmet.mpaes.WXXmlToMapUtil; import com.epmet.redis.RedisThird; @@ -79,6 +80,14 @@ public class ComponentVerifyTicketServiceImpl implements ComponentVerifyTicketSe private AuthResultRecordDao authResultRecordDao; @Autowired private PaCustomerUserAgencyDao paCustomerUserAgencyDao; + @Autowired + private FixationAppIdDao fixationAppIdDao; + @Autowired + private OperCrmOpenFeignClient operCrmOpenFeignClient; + @Autowired + private PaUserDao paUserDao; + @Autowired + private PaCustomerServiceImpl paCustomerServiceImpl; @Value("${third.platform.appId}") private String componentAppId; @@ -386,8 +395,11 @@ public class ComponentVerifyTicketServiceImpl implements ComponentVerifyTicketSe String authCode = authCodeAndTime.getAuthCode(); String clientType = authCodeAndTime.getClientType(); String expiresIn = authCodeAndTime.getExpiresIn(); + // 公众号创建客户的id String customerId = this.getLoginUserCustomerId(tokenDto); Date expiresInTime = this.countExpirationTime(expiresIn); + + //authCode存数据库 AuthCodeFormDTO formDTO = new AuthCodeFormDTO(); formDTO.setAuthCode(authCode); @@ -402,6 +414,32 @@ public class ComponentVerifyTicketServiceImpl implements ComponentVerifyTicketSe // 1. 开始获取授权信息(使用授权码) AuthorizationInfoResultDTO authorizationInfoResultDTO = this.authInfoByAuthCode(authCode, customerId, clientType); String authAppId = authorizationInfoResultDTO.getAuthorizer_appid(); + List fixationAppIdResultDTOS = fixationAppIdDao.selectFixationInfos(); + String finalCustomerId = customerId;// + fixationAppIdResultDTOS.forEach(fixationAppId -> { + if (fixationAppId.getAppId().equals(authAppId)){ + // TODO 是城阳项目或者党群e事通 + // crm表中的customerId【原customerId】 + String masterCustomerId = fixationAppId.getMasterCustomerId(); + formDTO.setCustomerId(masterCustomerId); + authCodeDao.deleteCustomerAuthCode(finalCustomerId,clientType); + authCodeDao.insertRedirectAuthCode(formDTO); + //authCode存缓存 + redisThird.setAuthCode(formDTO); + + ModifyCustomerFormDTO modifyCustomer = new ModifyCustomerFormDTO(); + modifyCustomer.setOldCustomerId(finalCustomerId); + modifyCustomer.setNewCustomerId(masterCustomerId); + paCustomerServiceImpl.modifyCustomer(modifyCustomer); + + // 管理员授权 + CustomerManagerFormDTO customerManager = paUserDao.selectManagerInfo(finalCustomerId); + customerManager.setCustomerId(finalCustomerId); + operCrmOpenFeignClient.addManager(customerManager); + } + }); + //替换 新customerId为旧customerId + customerId = formDTO.getCustomerId(); // 2. 创建开放平台账号并绑定 或者 直接绑定开放平台 this.createAndBindOpenAccount(customerId,authAppId,clientType); // 3. 更新 customer_mp 表授权状态和AuthAppId diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/PaCustomerServiceImpl.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/PaCustomerServiceImpl.java index 2652afb556..ae9d730829 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/PaCustomerServiceImpl.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/PaCustomerServiceImpl.java @@ -34,10 +34,7 @@ import com.epmet.commons.tools.utils.CpUserDetailRedis; import com.epmet.constant.PaConstant; import com.epmet.dao.*; import com.epmet.dto.*; -import com.epmet.dto.form.CreateAgencyFormDTO; -import com.epmet.dto.form.RegisterByAuthFormDTO; -import com.epmet.dto.form.RegisterFormDTO; -import com.epmet.dto.form.RegisterInfoFormDTO; +import com.epmet.dto.form.*; import com.epmet.dto.result.*; import com.epmet.entity.*; import com.epmet.redis.PaCustomerRedis; @@ -505,4 +502,36 @@ public class PaCustomerServiceImpl extends BaseServiceImpl%s,修改后的客户Id->%s", formDTO.getOldCustomerId(), formDTO.getNewCustomerId())); + throw new RenException(PaConstant.UPDATE_CUSTOMER_EXCEPTION); + } + //2.修改pa_customer_agency表customerId + if (paCustomerAgencyDao.updateCustomerId(formDTO) < NumConstant.ONE) { + logger.error(String.format("修改pa_customer_agency表客户Id失败,待修改的客户Id->%s,修改后的客户Id->%s", formDTO.getOldCustomerId(), formDTO.getNewCustomerId())); + throw new RenException(PaConstant.UPDATE_CUSTOMER_EXCEPTION); + } + //3.修改customer_mp表customerId + if (customerMpDao.updateCustomerId(formDTO) < NumConstant.ONE) { + logger.error(String.format("修改customer_mp表客户Id失败,待修改的客户Id->%s,修改后的客户Id->%s", formDTO.getOldCustomerId(), formDTO.getNewCustomerId())); + throw new RenException(PaConstant.UPDATE_CUSTOMER_EXCEPTION); + } + //4.修改pa_customer_user_agency表customerId + if (paCustomerUserAgencyDao.updateCustomerId(formDTO) < NumConstant.ONE) { + logger.error(String.format("修改pa_customer_user_agency表客户Id失败,待修改的客户Id->%s,修改后的客户Id->%s", formDTO.getOldCustomerId(), formDTO.getNewCustomerId())); + throw new RenException(PaConstant.UPDATE_CUSTOMER_EXCEPTION); + } + + } + } \ No newline at end of file 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 956c5c31e6..d5e2249cef 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 @@ -1,18 +1,29 @@ 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.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.utils.HttpClientManager; import com.epmet.constant.ModuleConstant; +import com.epmet.constant.ThirdRedisKeyConstant; import com.epmet.constant.ThirdRunTimeInfoConstant; import com.epmet.dao.*; import com.epmet.dto.form.CodeAuditRecordFormDTO; import com.epmet.dto.form.MessagePushTextFormDTO; +import com.epmet.dto.result.AuthorizationInfoResultDTO; import com.epmet.dto.result.CustomerIdAndClientResultDTO; import com.epmet.dto.result.TemplateAndAppIdResultDTO; import com.epmet.mpaes.AesException; import com.epmet.mpaes.WXBizMsgCrypt; import com.epmet.mpaes.WXXmlToMapUtil; +import com.epmet.redis.RedisThird; import com.epmet.service.WarrantService; +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 lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; import org.dom4j.DocumentException; @@ -26,6 +37,7 @@ import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.io.InputStream; import java.util.Date; +import java.util.HashMap; import java.util.Map; /** @@ -56,6 +68,8 @@ public class WarrantServiceImpl implements WarrantService { private ComponentVerifyTicketServiceImpl componentVerifyTicketServiceImpl; @Autowired private MessagePushTextDao messagePushTextDao; + @Autowired + private RedisThird redisThird; /** * @Description 1.保存代码审核结果 2.更新代码上传结果 @@ -134,8 +148,140 @@ public class WarrantServiceImpl implements WarrantService { 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()); +// +// } } log.info("消息与事件接收URL【代码审核结果】结束......"); return ModuleConstant.SUCCESS; } + + /** + * 方法描述: 类型为enevt的时候,拼接 + * @param request + * @param response + * @param event + * @param toUserName 发送接收人 + * @param fromUserName 发送人 + * @author zxc + */ + public void replyEventMessage(HttpServletRequest request, HttpServletResponse response, + String event, String toUserName, String fromUserName) + throws DocumentException, IOException { + String content = event + ModuleConstant.FROM_CALLBACK; + replyTextMessage(request,response,content,toUserName,fromUserName); + } + + + /** + * 立马回应文本消息并最终触达粉丝 + * @param content 文本 + * @param toUserName 发送接收人 + * @param fromUserName 发送人 + * @author zxc + */ + public void processTextMessage(HttpServletRequest request, HttpServletResponse response, + String content,String toUserName, String fromUserName) + throws IOException, DocumentException{ + if(ModuleConstant.TESTCOMPONENT_MSG_TYPE_TEXT.equals(content)){ + String returnContent = content+ModuleConstant._CALL_BACK; + replyTextMessage(request,response,returnContent,toUserName,fromUserName); + }else if(StringUtils.startsWithIgnoreCase(content, ModuleConstant.QUERY_AUTH_CODE)){ + response.getWriter().print("");//需在5秒内返回空串表明暂时不回复,然后再立即使用客服消息接口发送消息回复粉丝 + log.info(String.format(ThirdRunTimeInfoConstant.TEXT_MESSAGE_LOG_INFO,content,content.split(ThirdRedisKeyConstant.COLON)[NumConstant.ONE],fromUserName,toUserName)); + //接下来客服API再回复一次消息 + replyApiTextMessage(content.split(ThirdRedisKeyConstant.COLON)[NumConstant.ONE],toUserName); + } + } + + + + /** + * 方法描述: 直接返回给微信开放平台 + * @param request + * @param response + * @param content 文本 + * @param toUserName 发送接收人 + * @param fromUserName 发送人 + * @author zxc + */ + public void replyTextMessage(HttpServletRequest request, HttpServletResponse response, + String content,String toUserName, String fromUserName) + throws DocumentException, IOException { + Long createTime = System.currentTimeMillis() / 1000; + StringBuffer sb = new StringBuffer(512); + sb.append(""); + sb.append(""); + sb.append(""); + sb.append(""+createTime.toString()+""); + sb.append(""); + sb.append(""); + sb.append(""); + String replyMsg = sb.toString(); + log.info(String.format(ThirdRunTimeInfoConstant.SEND_MESSAGE_XML,replyMsg)); + returnJSON(replyMsg,response); + } + + /** + * 方法描述: 调用客服回复消息给粉丝 + * @param auth_code + * @param fromUserName + * @throws DocumentException + * @throws IOException + * @return void + * @author zxc + */ + public void replyApiTextMessage(String auth_code, String fromUserName) throws DocumentException, IOException { + // 得到微信授权成功的消息后,应该立刻进行处理!!相关信息只会在首次授权的时候推送过来 + //第三方平台【component_access_token】 + String componentAccessToken = redisThird.getComponentAccessToken(); + com.alibaba.fastjson.JSONObject jsonObject = new com.alibaba.fastjson.JSONObject(); + jsonObject.put(ModuleConstant.COMPONENT_APPID, componentAppId); + jsonObject.put(ModuleConstant.AUTHORIZATION_CODE, auth_code); + String authInfo = HttpClientManager.getInstance().sendPostByJSON(WxMaCodeConstant.API_QUERY_AUTH_URL + componentAccessToken, JSON.toJSONString(jsonObject)).getData(); + HashMap hashMap = JSON.parseObject(authInfo, HashMap.class); + Map map = hashMap.get(ModuleConstant.AUTHORIZATION_INFO); + AuthorizationInfoResultDTO authorizationInfoResultDTO = ConvertUtils.mapToEntity(map, AuthorizationInfoResultDTO.class); + String authorizer_access_token = authorizationInfoResultDTO.getAuthorizer_access_token(); + + JSONObject json = new JSONObject(); + json.put("touser",fromUserName); + json.put("msgtype", "text"); + json.put("text", "{\"content\":\""+auth_code+ModuleConstant._FROM_API+"\"}"); + + String data = HttpClientManager.getInstance().sendPostByJSON(WxMaCodeConstant.SEND_MESSAGE_CUSTOM + authorizer_access_token, JSON.toJSONString(json)).getData(); + log.info("客服发送接口返回值:"+data); + } + + + /** + * 方法描述: 返回数据到请求方 + * @param data 数据 + * @param response + * @author zxc + */ + public void returnJSON(Object data,HttpServletResponse response) { + try { + ObjectMapper objectMapper = new ObjectMapper(); + JsonEncoding encoding = JsonEncoding.UTF8; + response.setContentType(ModuleConstant.APPLICATION_JSON); + JsonGenerator generator = objectMapper.getJsonFactory(). + createJsonGenerator(response.getOutputStream(), encoding); + objectMapper.writeValue(generator, data); + } catch (IOException e) { + e.printStackTrace(); + } + } + } diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/wxapi/constant/WxMaCodeConstant.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/wxapi/constant/WxMaCodeConstant.java index 75ce684c49..f27eaff2c1 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/wxapi/constant/WxMaCodeConstant.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/wxapi/constant/WxMaCodeConstant.java @@ -76,6 +76,11 @@ public interface WxMaCodeConstant { */ String API_OPEN_GET = "https://api.weixin.qq.com/cgi-bin/open/get?access_token="; + /** + * + */ + String SEND_MESSAGE_CUSTOM = "https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token="; + /** * 为授权的小程序帐号上传小程序代码. */ diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/wxapi/service/impl/WxMaCodeServiceImpl.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/wxapi/service/impl/WxMaCodeServiceImpl.java index 34c1931c88..7b09a3e440 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/wxapi/service/impl/WxMaCodeServiceImpl.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/wxapi/service/impl/WxMaCodeServiceImpl.java @@ -204,7 +204,7 @@ public class WxMaCodeServiceImpl implements WxMaCodeService { public WxResult getMaterial(String accessToken, WxMaNewsReq request) { WxResult result = new WxResult<>(); String url = WxMaCodeConstant.GET_MATERIAL_URL + "?" + "access_token=" + accessToken; - Result statusResult = HttpClientManager.getInstance().getByteArray(url, toMap(request)); + Result statusResult = HttpClientManager.getInstance().getMediaByteArray(url, toJson(request)); if (!statusResult.success()) { result.setErrorCode(statusResult.getCode()); result.setErrorMsg(statusResult.getMsg()); diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/resources/db/migration/V0.0.4__thirdUpdate.sql b/epmet-module/epmet-third/epmet-third-server/src/main/resources/db/migration/V0.0.4__thirdUpdate.sql new file mode 100644 index 0000000000..55fa2a7a2f --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-server/src/main/resources/db/migration/V0.0.4__thirdUpdate.sql @@ -0,0 +1,13 @@ +CREATE TABLE `fixation_app_id` ( + `ID` varchar(64) NOT NULL COMMENT 'ID', + `APP_ID` varchar(64) DEFAULT NULL COMMENT '小程序AppId', + `CUSTOMER_ID` varchar(64) DEFAULT NULL COMMENT '客户Id', + `CLIENT_TYPE` varchar(32) DEFAULT NULL COMMENT '客户端类型resi:居民端,work:工作端', + `DEL_FLAG` int(11) DEFAULT NULL COMMENT '删除状态0:正常,已删除', + `REVISION` int(11) DEFAULT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(32) DEFAULT NULL COMMENT '创建人', + `CREATED_TIME` datetime DEFAULT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(32) DEFAULT NULL COMMENT '更新人', + `UPDATED_TIME` datetime DEFAULT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='固定的AppId表 '; \ No newline at end of file diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/CustomerMpDao.xml b/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/CustomerMpDao.xml index d7281d2a9f..f8f3d37ff6 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/CustomerMpDao.xml +++ b/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/CustomerMpDao.xml @@ -145,4 +145,12 @@ AND client = #{clientType} + + UPDATE customer_mp + SET customer_id = #{newCustonerId} + WHERE + del_flag = '0' + AND customer_id = #{oldCustomerId} + + \ No newline at end of file diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/FixationAppIdDao.xml b/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/FixationAppIdDao.xml new file mode 100644 index 0000000000..b688f5f77d --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/FixationAppIdDao.xml @@ -0,0 +1,17 @@ + + + + + + + + \ No newline at end of file diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/PaCustomerAgencyDao.xml b/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/PaCustomerAgencyDao.xml index 9911ae88ff..752fb6081a 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/PaCustomerAgencyDao.xml +++ b/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/PaCustomerAgencyDao.xml @@ -82,4 +82,12 @@ LIMIT 1 + + UPDATE pa_customer_agency + SET customer_id = #{newCustonerId} + WHERE + del_flag = '0' + AND customer_id = #{oldCustomerId} + + \ No newline at end of file diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/PaCustomerDao.xml b/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/PaCustomerDao.xml index 0c584b7615..f56a663a07 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/PaCustomerDao.xml +++ b/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/PaCustomerDao.xml @@ -79,4 +79,12 @@ AND id = #{id} + + UPDATE pa_customer + SET id = #{newCustonerId} + WHERE + del_flag = '0' + AND id = #{oldCustomerId} + + \ No newline at end of file diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/PaCustomerUserAgencyDao.xml b/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/PaCustomerUserAgencyDao.xml index 93a0b840f0..dee9a80f90 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/PaCustomerUserAgencyDao.xml +++ b/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/PaCustomerUserAgencyDao.xml @@ -34,4 +34,12 @@ AND pcua.user_id = #{userId} + + UPDATE pa_customer_user_agency + SET customer_id = #{newCustonerId} + WHERE + del_flag = '0' + AND customer_id = #{oldCustomerId} + + \ No newline at end of file diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/PaUserDao.xml b/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/PaUserDao.xml index 628eefe53f..4b67271ab7 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/PaUserDao.xml +++ b/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/PaUserDao.xml @@ -50,4 +50,20 @@ AND source = #{source} + + + \ No newline at end of file diff --git a/epmet-module/oper-crm/oper-crm-client/src/main/java/com/epmet/feign/OperCrmOpenFeignClient.java b/epmet-module/oper-crm/oper-crm-client/src/main/java/com/epmet/feign/OperCrmOpenFeignClient.java index 59a01476e7..6048121b9d 100644 --- a/epmet-module/oper-crm/oper-crm-client/src/main/java/com/epmet/feign/OperCrmOpenFeignClient.java +++ b/epmet-module/oper-crm/oper-crm-client/src/main/java/com/epmet/feign/OperCrmOpenFeignClient.java @@ -5,9 +5,11 @@ import com.epmet.commons.tools.utils.Result; import com.epmet.dto.CustomerAppDTO; import com.epmet.dto.CustomerDTO; import com.epmet.dto.form.CustomerAppSecretFormDTO; +import com.epmet.dto.form.CustomerManagerFormDTO; import com.epmet.feign.fallback.OperCrmOpenFeignClientFallback; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; import java.util.List; @@ -41,4 +43,14 @@ public interface OperCrmOpenFeignClient { */ @PostMapping("/oper/crm/customerapp/getconfigallapp") Result> getConfigAllApp(); + + /** + * 添加根管理员 + * @author zhaoqifeng + * @date 2020/8/3 15:24 + * @param form + * @return com.epmet.commons.tools.utils.Result + */ + @PostMapping("/oper/crm/customer/addmanager") + Result addManager(@RequestBody CustomerManagerFormDTO form); } diff --git a/epmet-module/oper-crm/oper-crm-client/src/main/java/com/epmet/feign/fallback/OperCrmOpenFeignClientFallback.java b/epmet-module/oper-crm/oper-crm-client/src/main/java/com/epmet/feign/fallback/OperCrmOpenFeignClientFallback.java index 81b74a4f7c..504d2be412 100644 --- a/epmet-module/oper-crm/oper-crm-client/src/main/java/com/epmet/feign/fallback/OperCrmOpenFeignClientFallback.java +++ b/epmet-module/oper-crm/oper-crm-client/src/main/java/com/epmet/feign/fallback/OperCrmOpenFeignClientFallback.java @@ -6,6 +6,7 @@ import com.epmet.commons.tools.utils.Result; import com.epmet.dto.CustomerAppDTO; import com.epmet.dto.CustomerDTO; import com.epmet.dto.form.CustomerAppSecretFormDTO; +import com.epmet.dto.form.CustomerManagerFormDTO; import com.epmet.feign.OperCrmOpenFeignClient; import org.springframework.stereotype.Component; @@ -39,4 +40,9 @@ public class OperCrmOpenFeignClientFallback implements OperCrmOpenFeignClient { public Result> getConfigAllApp() { return ModuleUtils.feignConError(ServiceConstant.OPER_CRM_SERVER, "getConfigAllApp", null); } + + @Override + public Result addManager(CustomerManagerFormDTO form) { + return ModuleUtils.feignConError(ServiceConstant.OPER_CRM_SERVER, "CustomerManagerFormDTO", form); + } } diff --git a/epmet-module/oper-crm/oper-crm-server/deploy/docker-compose-dev.yml b/epmet-module/oper-crm/oper-crm-server/deploy/docker-compose-dev.yml index 270b2e9325..fa922decda 100644 --- a/epmet-module/oper-crm/oper-crm-server/deploy/docker-compose-dev.yml +++ b/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.58 + image: 192.168.1.130:10080/epmet-cloud-dev/oper-crm-server:0.3.59 ports: - "8090:8090" network_mode: host # 使用现有网络 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 74e4dd8653..560586a971 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 @@ -278,6 +278,19 @@ public class CustomerServiceImpl extends BaseServiceImpl> managersResult = epmetUserFeignClient.getStaffsInRole(staffRoleFormDTO); + if(!managersResult.success()) { + log.error("查询客户根级组织的管理员失败".concat(getRoleResult.toString())); + throw new RenException("查询客户根级组织的管理员失败".concat(getRoleResult.toString())); + } + if(null != managersResult.getData() && managersResult.getData().size() > NumConstant.ZERO) { + log.error("客户已存在管理员".concat(getRoleResult.toString())); + throw new RenException("客户已存在管理员".concat(getRoleResult.toString())); + } + StaffSubmitFromDTO staffSubmitFrom = new StaffSubmitFromDTO(); staffSubmitFrom.setCustomerId(form.getCustomerId()); staffSubmitFrom.setAgencyId(customerRootAgencyResult.getData().getId()); diff --git a/epmet-module/resi-mine/resi-mine-server/pom.xml b/epmet-module/resi-mine/resi-mine-server/pom.xml index 7b2dbcaf2d..382d1f2a4c 100644 --- a/epmet-module/resi-mine/resi-mine-server/pom.xml +++ b/epmet-module/resi-mine/resi-mine-server/pom.xml @@ -90,6 +90,12 @@ 2.0.0 compile + + com.epmet + epmet-third-client + 2.0.0 + compile + diff --git a/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/grid/controller/ResiMineGridController.java b/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/grid/controller/ResiMineGridController.java index bb6bcc34ae..0b5553599b 100644 --- a/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/grid/controller/ResiMineGridController.java +++ b/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/grid/controller/ResiMineGridController.java @@ -3,14 +3,13 @@ package com.epmet.modules.grid.controller; 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.LatestGridInfoFormDTO; import com.epmet.dto.result.AllGridsByUserIdResultDTO; import com.epmet.dto.result.LatestGridInfoResultDTO; import com.epmet.modules.grid.service.ResiMineGridService; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; import java.util.List; @@ -48,4 +47,19 @@ public class ResiMineGridController { public Result> allGrids(@LoginUser TokenDto tokenDto){ return resiMineGridService.allGrids(tokenDto.getUserId()); } + + /** + * @return + * @param formDTO + * @Author sun + * @Description 单客户-获取用户最近访问网格 + * @Date 2020/8/3 + **/ + @PostMapping("latestgridinfo") + public Result latestGridInfo(@LoginUser TokenDto token, @RequestBody LatestGridInfoFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO); + formDTO.setUserId(token.getUserId()); + return new Result().ok(resiMineGridService.latestGridInfo(formDTO)); + } + } diff --git a/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/grid/service/ResiMineGridService.java b/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/grid/service/ResiMineGridService.java index f4f398306c..0d1c3f3f8f 100644 --- a/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/grid/service/ResiMineGridService.java +++ b/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/grid/service/ResiMineGridService.java @@ -2,6 +2,7 @@ package com.epmet.modules.grid.service; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.Result; +import com.epmet.dto.form.LatestGridInfoFormDTO; import com.epmet.dto.result.AllGridsByUserIdResultDTO; import com.epmet.dto.result.LatestGridInfoResultDTO; @@ -29,4 +30,13 @@ public interface ResiMineGridService { * @Author sun **/ Result> allGrids(String userId); + + /** + * @return + * @param formDTO + * @Author sun + * @Description 单客户-获取用户最近访问网格 + * @Date 2020/8/3 + **/ + LatestGridInfoResultDTO latestGridInfo(LatestGridInfoFormDTO formDTO); } diff --git a/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/grid/service/impl/ResiMineGridServiceImpl.java b/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/grid/service/impl/ResiMineGridServiceImpl.java index 279b7eae9e..7ba79252b2 100644 --- a/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/grid/service/impl/ResiMineGridServiceImpl.java +++ b/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/grid/service/impl/ResiMineGridServiceImpl.java @@ -1,13 +1,19 @@ package com.epmet.modules.grid.service.impl; import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; import com.epmet.commons.tools.constant.AppClientConstant; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.security.dto.TokenDto; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.utils.HttpClientManager; import com.epmet.commons.tools.utils.Result; +import com.epmet.dto.PaCustomerDTO; +import com.epmet.dto.form.LatestGridInfoFormDTO; import com.epmet.dto.result.AllGridsByUserIdResultDTO; import com.epmet.dto.result.LatestGridInfoResultDTO; +import com.epmet.feign.EpmetUserOpenFeignClient; import com.epmet.modules.feign.EpmetUserFeignClient; import com.epmet.modules.feign.GovOrgFeignClient; import com.epmet.modules.grid.service.ResiMineGridService; @@ -20,6 +26,7 @@ import org.springframework.stereotype.Service; import java.util.ArrayList; import java.util.List; +import java.util.Map; /** * @Description 居民端用户网格信息service @@ -33,6 +40,8 @@ public class ResiMineGridServiceImpl implements ResiMineGridService { private EpmetUserFeignClient epmetUserFeignClient; @Autowired private GovOrgFeignClient govOrgFeignClient; + @Autowired + private EpmetUserOpenFeignClient epmetUserOpenFeignClient; /** * @param tokenDto @@ -88,4 +97,42 @@ public class ResiMineGridServiceImpl implements ResiMineGridService { } return result.ok(resultGrids.getData()); } + + /** + * @return + * @param formDTO + * @Author sun + * @Description 单客户-获取用户最近访问网格 + * @Date 2020/8/3 + **/ + @Override + public LatestGridInfoResultDTO latestGridInfo(LatestGridInfoFormDTO formDTO) { + logger.info(String.format("居民端获取用户最近访问网格入参%s", JSON.toJSONString(formDTO))); + //1.调用third服务,根据appId获取客户Id + JSONObject jsonObject = new JSONObject(); + String customerMsgUrl = "https://epmet-cloud.elinkservice.cn/api/third/customermp/getcustomermsg/"; + String data = HttpClientManager.getInstance().sendPostByJSON(customerMsgUrl + formDTO.getAppId(), JSON.toJSONString(jsonObject)).getData(); + logger.info("调用third服务,根据appId查询客户信息:httpclient->url:" + customerMsgUrl + ",结果->" + data); + JSONObject toResult = JSON.parseObject(data); + Result mapToResult = ConvertUtils.mapToEntity(toResult, Result.class); + if (!mapToResult.success()) { + logger.error(String.format("根据appId查询客户信息失败,对应appId->" + formDTO.getAppId())); + throw new RenException(mapToResult.getMsg()); + } + Object PublicCustomerResultDTO = mapToResult.getData(); + JSONObject json = JSON.parseObject(PublicCustomerResultDTO.toString()); + Map map = (Map) json.get("customer"); + PaCustomerDTO customer = ConvertUtils.mapToEntity(map, PaCustomerDTO.class); + logger.info("小程序登陆third服务获取客户用户信息PaCustomerDTO->" + customer); + + //2.调用epmet-user服务,根据客户Id和用户Id查询最后一次访问记录 + formDTO.setCustomerId(customer.getId()); + Result userResult = epmetUserOpenFeignClient.latestGridInfo(formDTO); + if (!userResult.success()) { + logger.error(String.format("居民端获取用户最近访问网格失败,接口入参客户Id->%s,appId->%s,调用epmet-user-server服务返回->%s", formDTO.getCustomerId(), formDTO.getAppId(), JSON.toJSONString(userResult))); + } + + return userResult.getData(); + } + } diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/LatestGridInfoFormDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/LatestGridInfoFormDTO.java new file mode 100644 index 0000000000..3df970fc0c --- /dev/null +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/LatestGridInfoFormDTO.java @@ -0,0 +1,38 @@ +package com.epmet.dto.form; + +import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @Description 单客户-获取用户最近访问网格-接口入参 + * @Auth sun + */ +@Data +public class LatestGridInfoFormDTO implements Serializable { + private static final long serialVersionUID = -6534841370041338474L; + + public interface AddUserInternalGroup { + } + public interface AddUserShowGroup extends CustomerClientShowGroup { + } + + /** + * 小程序绑定的appId + */ + @NotBlank(message = "数据来源不能为空", groups = {LatestGridInfoFormDTO.AddUserInternalGroup.class, LatestGridInfoFormDTO.AddUserShowGroup.class}) + private String appId; + + /** + * 根据appId查询到的客户Id + */ + private String customerId; + + /** + * token中userId + */ + private String userId; + +} diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java index 857df537c1..8ea872a683 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java @@ -249,4 +249,14 @@ public interface EpmetUserOpenFeignClient { **/ @PostMapping("/epmetuser/userbaseinfo/volunteerbaseinfo") Result volunteerBaseInfo(@RequestBody ResiVolunteerAuthenticateFormDTO param); + + /** + * @return + * @param formDTO + * @Author sun + * @Description 单客户-获取用户最近访问网格 + * @Date 2020/8/3 + **/ + @PostMapping(value = "epmetuser/gridlatest/latestgridinfo") + Result latestGridInfo(@RequestBody LatestGridInfoFormDTO formDTO); } diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java index 0be4d08c3d..6e137becc1 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java @@ -178,4 +178,9 @@ public class EpmetUserOpenFeignClientFallback implements EpmetUserOpenFeignClien public Result volunteerBaseInfo(ResiVolunteerAuthenticateFormDTO param) { return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "volunteerBaseInfo", param); } + + @Override + public Result latestGridInfo(LatestGridInfoFormDTO formDTO) { + return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "latestGridInfo", formDTO); + } } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/GridLatestController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/GridLatestController.java index 342300ea58..ba8fd626ce 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/GridLatestController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/GridLatestController.java @@ -27,6 +27,7 @@ import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.dto.GridLatestDTO; import com.epmet.dto.form.CustomerUserFormDTO; +import com.epmet.dto.form.LatestGridInfoFormDTO; import com.epmet.dto.result.CustomerUser4PointResultDTO; import com.epmet.dto.result.LatestGridInfoResultDTO; import com.epmet.excel.GridLatestExcel; @@ -130,4 +131,16 @@ public class GridLatestController { return new Result>().ok(gridLatestService.getCustomerUsers(param)); } + /** + * @return + * @param formDTO + * @Author sun + * @Description 单客户-根据客户Id和userId查询用户最后一次访问的网格 + * @Date 2020/8/3 + **/ + @PostMapping("latestgridinfo") + public Result latestGridInfo(@RequestBody LatestGridInfoFormDTO formDTO){ + return new Result().ok(gridLatestService.latestGridInfo(formDTO)); + } + } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/GridLatestDao.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/GridLatestDao.java index 2e5b9e7b8f..84450fc6f1 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/GridLatestDao.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/GridLatestDao.java @@ -19,6 +19,7 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.GridLatestDTO; +import com.epmet.dto.form.LatestGridInfoFormDTO; import com.epmet.dto.result.LatestGridInfoResultDTO; import com.epmet.entity.GridLatestEntity; import org.apache.ibatis.annotations.Mapper; @@ -64,4 +65,13 @@ public interface GridLatestDao extends BaseDao { * @date 2020.07.25 15:26 **/ List selectAllUserByCustomerId(@Param("customerId")String customerId); + + /** + * @return + * @param formDTO + * @Author sun + * @Description 单客户-根据客户Id和userId查询用户最后一次访问的网格 + * @Date 2020/8/3 + **/ + LatestGridInfoResultDTO selectLatestGridInfo(LatestGridInfoFormDTO formDTO); } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/GridLatestService.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/GridLatestService.java index 4298d1ef68..1395099c22 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/GridLatestService.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/GridLatestService.java @@ -23,6 +23,7 @@ import com.epmet.commons.tools.utils.Result; import com.epmet.dto.CustomerGridDTO; import com.epmet.dto.GridLatestDTO; import com.epmet.dto.form.CustomerUserFormDTO; +import com.epmet.dto.form.LatestGridInfoFormDTO; import com.epmet.dto.form.VisitedFormDTO; import com.epmet.dto.result.CustomerUser4PointResultDTO; import com.epmet.dto.result.LatestGridInfoResultDTO; @@ -131,4 +132,12 @@ public interface GridLatestService extends BaseService { **/ List getCustomerUsers(CustomerUserFormDTO customerUserFormDTO); + /** + * @return + * @param formDTO + * @Author sun + * @Description 单客户-根据客户Id和userId查询用户最后一次访问的网格 + * @Date 2020/8/3 + **/ + LatestGridInfoResultDTO latestGridInfo(LatestGridInfoFormDTO formDTO); } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/GridLatestServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/GridLatestServiceImpl.java index 71c4005717..fbeac02c2b 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/GridLatestServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/GridLatestServiceImpl.java @@ -30,6 +30,7 @@ import com.epmet.dao.UserWechatDao; import com.epmet.dto.CustomerGridDTO; import com.epmet.dto.GridLatestDTO; import com.epmet.dto.form.CustomerUserFormDTO; +import com.epmet.dto.form.LatestGridInfoFormDTO; import com.epmet.dto.form.VisitedFormDTO; import com.epmet.dto.result.CustomerUser4PointResultDTO; import com.epmet.dto.result.LatestGridInfoResultDTO; @@ -204,4 +205,17 @@ public class GridLatestServiceImpl extends BaseServiceImpl + +