Browse Source

打印日志 删除e.printStackTrace()

dev
jianjun 3 years ago
parent
commit
40d42a04e6
  1. 4
      epmet-auth/src/main/java/com/epmet/controller/GovWebController.java
  2. 2
      epmet-auth/src/main/java/com/epmet/controller/LoginController.java
  3. 4
      epmet-auth/src/main/java/com/epmet/controller/SsoController.java
  4. 2
      epmet-auth/src/main/java/com/epmet/controller/WxController.java
  5. 4
      epmet-auth/src/main/java/com/epmet/service/impl/LoginServiceImpl.java
  6. 4
      epmet-auth/src/main/java/com/epmet/service/impl/PublicUserLoginServiceImpl.java
  7. 2
      epmet-auth/src/main/java/com/epmet/service/impl/ThirdLoginServiceImpl.java
  8. 4
      epmet-commons/epmet-commons-dynamic-datasource/src/main/java/com/epmet/commons/dynamic/datasource/config/DynamicDataSourceFactory.java
  9. 2
      epmet-commons/epmet-commons-thirdplat/src/main/java/com/epmet/commons/thirdplat/apiservice/jcet/JcetApiService.java
  10. 6
      epmet-commons/epmet-commons-tools-wx-ma/src/main/java/com/epmet/wx/ma/WxMaConfig.java
  11. 2
      epmet-commons/epmet-commons-tools-wx-mp/src/main/java/com/epmet/wx/mp/handler/MsgHandler.java
  12. 4
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/EnvEnum.java
  13. 6
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/BarcodeUtils.java
  14. 18
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/DateUtils.java
  15. 6
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/HttpClientManager.java
  16. 2
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/Md5Util.java
  17. 4
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/MultipartFileToFileUtils.java
  18. 4
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/Pinyin4jUtil.java
  19. 2
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/YuShanSysApiService.java
  20. 15
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/net/OkHttpUtil.java
  21. 6
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/net/SSLSocketClient.java
  22. 1
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/validator/IdCardNoValidatorUtils.java
  23. 2
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/controller/GovOrgController.java
  24. 6
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/impl/GovOrgServiceImpl.java
  25. 4
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/fact/impl/FactIndexServiceImpl.java
  26. 7
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/utils/DateUtils.java
  27. 4
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java
  28. 2
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/external/IndexCalculateController.java
  29. 2
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/healthcheck/HealthCheckController.java
  30. 2
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsDemoServiceImpl.java
  31. 2
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsPartyMemberVanguardServiceImpl.java
  32. 2
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsProjectServiceImpl.java
  33. 6
      epmet-module/epmet-activiti/epmet-activiti-server/src/main/java/com/epmet/service/ActModelService.java
  34. 19
      epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/ShowApiServiceImpl.java
  35. 6
      epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/WorkDayServiceImpl.java
  36. 2
      epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/utils/ShowApiUtil.java
  37. 4
      epmet-module/epmet-demo/epmet-demo-server/src/main/java/com/epmet/service/impl/DemoServiceImpl.java
  38. 2
      epmet-module/epmet-ext/epmet-ext-server/src/main/java/com/epmet/aspect/OpenApiRequestCheckAspect.java
  39. 6
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyActivityController.java
  40. 6
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyUnitController.java
  41. 7
      epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/SysSmsServiceImpl.java
  42. 4
      epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/WxmpMessageServiceImpl.java
  43. 4
      epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/sms/AliyunSmsService.java
  44. 4
      epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/AliyunCloudStorageService.java
  45. 13
      epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/controller/TestController.java
  46. 6
      epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/service/impl/OssServiceImpl.java
  47. 8
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/mpaes/SHA1.java
  48. 8
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/mpaes/WXBizMsgCrypt.java
  49. 21
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/mpaes/WXXmlToMapUtil.java
  50. 8
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/mpaes/XMLParse.java
  51. 8
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/mq/producer/BlockChainProducer.java
  52. 4
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/WarrantServiceImpl.java
  53. 6
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/wxapi/service/impl/WxMaCodeServiceImpl.java
  54. 6
      epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/TestController.java
  55. 3
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/GovIssueRedis.java
  56. 7
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueVoteDetailRedis.java
  57. 4
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/AgencyController.java
  58. 2
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcNeighborHoodController.java
  59. 10
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/ImportBuildingInfoListener.java
  60. 11
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/ImportHouseInfoListener.java
  61. 2
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java
  62. 6
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterServiceImpl.java
  63. 2
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java
  64. 2
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectTraceServiceImpl.java
  65. 3
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/redis/ResiGroupRedis.java
  66. 5
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java
  67. 5
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/impl/ResiGroupMemberServiceImpl.java
  68. 8
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/redis/ResiPartyMemberRedis.java
  69. 4
      epmet-openapi/epmet-openapi-scan/src/main/java/com/epmet/openapi/scan/common/util/HttpClientManager.java
  70. 5
      epmet-openapi/epmet-openapi-scan/src/test/java/BaseSample.java
  71. 8
      epmet-openapi/epmet-openapi-scan/src/test/java/ImageAsyncScanRequestSample.java
  72. 8
      epmet-openapi/epmet-openapi-scan/src/test/java/ImageAsyncScanResultsSample.java
  73. 8
      epmet-openapi/epmet-openapi-scan/src/test/java/ImageSyncScanRequestSample.java
  74. 4
      epmet-openapi/epmet-openapi-scan/src/test/java/VoiceAsyncScanRequestSample.java
  75. 6
      epmet-openapi/epmet-openapi-scan/src/test/java/VoiceAsyncScanResultsRequestSample.java
  76. 2
      epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcNatController.java
  77. 2
      epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java
  78. 2
      epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcTripReportRecordController.java
  79. 2
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java
  80. 2
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcNatServiceImpl.java
  81. 2
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserImportServiceImpl.java
  82. 4
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcTripReportRecordServiceImpl.java
  83. 4
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/StaffPatrolRecordServiceImpl.java

4
epmet-auth/src/main/java/com/epmet/controller/GovWebController.java

@ -6,6 +6,7 @@ import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.dto.form.GovWebLoginFormDTO;
import com.epmet.dto.result.UserTokenResultDTO;
import com.epmet.service.GovWebService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.PostMapping;
@ -18,6 +19,7 @@ import org.springframework.web.bind.annotation.RestController;
* @author sun
* @Description PC工作端-登陆服务
*/
@Slf4j
@RestController
@RequestMapping("govweb")
public class GovWebController {
@ -46,7 +48,7 @@ public class GovWebController {
}
} catch (Exception e) {
e.printStackTrace();
log.error("method exception", e);
}
return new Result<UserTokenResultDTO>().ok(govWebService.login(formDTO));
}

2
epmet-auth/src/main/java/com/epmet/controller/LoginController.java

@ -147,7 +147,7 @@ public class LoginController {
byte[] digest = md.digest(content.toString().getBytes());
tmpStr = byteToStr(digest);
} catch (NoSuchAlgorithmException e) {
e.printStackTrace();
log.error("method exception", e);
}
content = null;

4
epmet-auth/src/main/java/com/epmet/controller/SsoController.java

@ -11,6 +11,7 @@ import com.epmet.dto.form.SsoLoginOperFormDTO;
import com.epmet.dto.result.SsoLoginResultDTO;
import com.epmet.dto.result.UserTokenResultDTO;
import com.epmet.service.SsoService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
@ -21,6 +22,7 @@ import org.springframework.web.bind.annotation.RestController;
* @Author zxc
* @DateTime 2021/1/18 下午4:33
*/
@Slf4j
@RestController
@RequestMapping("sso")
public class SsoController {
@ -61,7 +63,7 @@ public class SsoController {
try {
userInfoByTicket = jcetApiService.getCUserInfoByTicket("ssoTicket-vYtMRuXAQZri3wpA2vyq5D8n3Q9oO7ui");
} catch (Exception e) {
e.printStackTrace();
log.error("method exception", e);
}
return new Result<ThirdPlatUserInfo>().ok(userInfoByTicket);
}

2
epmet-auth/src/main/java/com/epmet/controller/WxController.java

@ -78,7 +78,7 @@ public class WxController {
byte[] digest = md.digest(content.toString().getBytes());
tmpStr = byteToStr(digest);
} catch (NoSuchAlgorithmException e) {
e.printStackTrace();
log.error("method exception", e);
}
content = null;

4
epmet-auth/src/main/java/com/epmet/service/impl/LoginServiceImpl.java

@ -161,10 +161,10 @@ public class LoginServiceImpl implements LoginService {
phone= phoneNoInfo.getPurePhoneNumber();
}
} catch (WxErrorException e) {
e.printStackTrace();
log.error("method exception", e);
log.error(String.format("获取用户微信绑定的手机号接口异常%s",e.getMessage()));
} catch(Exception e){
e.printStackTrace();
log.error("method exception", e);
log.error(String.format("获取用户微信绑定的手机号接口异常%s",e.getMessage()));
}
return phone;

4
epmet-auth/src/main/java/com/epmet/service/impl/PublicUserLoginServiceImpl.java

@ -22,6 +22,7 @@ import com.epmet.jwt.JwtTokenProperties;
import com.epmet.jwt.JwtTokenUtils;
import com.epmet.redis.CaptchaRedis;
import com.epmet.service.PublicUserLoginService;
import lombok.extern.slf4j.Slf4j;
import me.chanjar.weixin.common.error.WxErrorException;
import me.chanjar.weixin.mp.api.WxMpService;
import me.chanjar.weixin.mp.bean.result.WxMpOAuth2AccessToken;
@ -41,6 +42,7 @@ import java.util.Map;
* @author yinzuomei@elink-cn.com
* @date 2020/7/8 18:31
*/
@Slf4j
@Service
public class PublicUserLoginServiceImpl implements PublicUserLoginService {
private static final Logger logger = LoggerFactory.getLogger(PublicUserLoginServiceImpl.class);
@ -99,7 +101,7 @@ public class PublicUserLoginServiceImpl implements PublicUserLoginService {
wxMpUser = wxMpService.oauth2getUserInfo(wxMpOAuth2AccessToken, null);
} catch (WxErrorException e) {
logger.error("->[getWxMpUser]::error[{}]", "解析微信用户信息失败", e.getMessage());
e.printStackTrace();
log.error("method exception", e);
throw new RenException("解析微信用户信息失败" + e.getMessage());
}
if (null == wxMpUser ) {

2
epmet-auth/src/main/java/com/epmet/service/impl/ThirdLoginServiceImpl.java

@ -618,7 +618,7 @@ public class ThirdLoginServiceImpl implements ThirdLoginService, ResultDataResol
phone = phoneNoInfo.getPurePhoneNumber();
}
} catch (Exception e) {
e.printStackTrace();
log.error("method exception", e);
log.error(String.format("获取用户微信绑定的手机号接口异常%s", e.getMessage()));
}
return phone;

4
epmet-commons/epmet-commons-dynamic-datasource/src/main/java/com/epmet/commons/dynamic/datasource/config/DynamicDataSourceFactory.java

@ -10,6 +10,7 @@ package com.epmet.commons.dynamic.datasource.config;
import com.alibaba.druid.pool.DruidDataSource;
import com.epmet.commons.dynamic.datasource.properties.DataSourceProperties;
import lombok.extern.slf4j.Slf4j;
import java.sql.SQLException;
@ -19,6 +20,7 @@ import java.sql.SQLException;
* @author Mark sunlightcs@gmail.com
* @since 1.0.0
*/
@Slf4j
public class DynamicDataSourceFactory {
public static DruidDataSource buildDruidDataSource(DataSourceProperties properties) {
@ -47,7 +49,7 @@ public class DynamicDataSourceFactory {
druidDataSource.setFilters(properties.getFilters());
druidDataSource.init();
} catch (SQLException e) {
e.printStackTrace();
log.error("method exception", e);
}
return druidDataSource;
}

2
epmet-commons/epmet-commons-thirdplat/src/main/java/com/epmet/commons/thirdplat/apiservice/jcet/JcetApiService.java

@ -108,7 +108,7 @@ public class JcetApiService extends AbstractApiService {
try {
logger.info("【请求酒城e通第三方平台】getUserInfoByTicket()接口返回:{}", result.getData());
} catch (Exception e) {
//e.printStackTrace();
//log.error("method exception", e);
}
logger.info("【请求酒城e通第三方平台】getUserInfoByTicket()接口结束<<<<<<<<<<<<");

6
epmet-commons/epmet-commons-tools-wx-ma/src/main/java/com/epmet/wx/ma/WxMaConfig.java

@ -10,6 +10,7 @@ import cn.binarywang.wx.miniapp.message.WxMaMessageHandler;
import cn.binarywang.wx.miniapp.message.WxMaMessageRouter;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import lombok.extern.slf4j.Slf4j;
import me.chanjar.weixin.common.bean.result.WxMediaUploadResult;
import me.chanjar.weixin.common.error.WxErrorException;
import org.springframework.beans.factory.annotation.Autowired;
@ -25,6 +26,7 @@ import java.util.stream.Collectors;
/**
* @author <a href="https://github.com/binarywang">Binary Wang</a>
*/
@Slf4j
@Configuration
@EnableConfigurationProperties(WxMaProperties.class)
public class WxMaConfig {
@ -122,7 +124,7 @@ public class WxMaConfig {
.toUser(wxMessage.getFromUser())
.build());
} catch (WxErrorException e) {
e.printStackTrace();
log.error("method exception", e);
}
return null;
@ -139,7 +141,7 @@ public class WxMaConfig {
.toUser(wxMessage.getFromUser())
.build());
} catch (WxErrorException e) {
e.printStackTrace();
log.error("method exception", e);
}
return null;

2
epmet-commons/epmet-commons-tools-wx-mp/src/main/java/com/epmet/wx/mp/handler/MsgHandler.java

@ -39,7 +39,7 @@ public class MsgHandler extends AbstractHandler {
.toUser(wxMessage.getFromUser()).build();
}
} catch (WxErrorException e) {
e.printStackTrace();
logger.error("method exception", e);
}
//TODO 组装回复消息

4
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/EnvEnum.java

@ -1,6 +1,7 @@
package com.epmet.commons.tools.enums;
import com.epmet.commons.tools.utils.SpringContextUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.core.env.Environment;
/**
@ -10,6 +11,7 @@ import org.springframework.core.env.Environment;
* @author jianjun liu
* @date 2020-07-03 11:14
**/
@Slf4j
public enum EnvEnum {
/**
* 环境变量枚举
@ -51,7 +53,7 @@ public enum EnvEnum {
return getEnum(activeProfiles[0]);
}
} catch (Exception e) {
e.printStackTrace();
log.error("method exception", e);
}
return EnvEnum.UN_KNOWN;
}

6
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/BarcodeUtils.java

@ -10,6 +10,7 @@ import com.google.zxing.client.j2se.MatrixToImageWriter;
import com.google.zxing.common.BitMatrix;
import com.google.zxing.common.CharacterSetECI;
import com.google.zxing.qrcode.decoder.ErrorCorrectionLevel;
import lombok.extern.slf4j.Slf4j;
import javax.imageio.ImageIO;
import java.awt.*;
@ -23,6 +24,7 @@ import java.util.HashMap;
* Date 2021/08/27 16:01
* Description:二维码生成工具类
*/
@Slf4j
public class BarcodeUtils {
/**
* 二维码颜色 默认是黑色
@ -63,7 +65,7 @@ public class BarcodeUtils {
try {
matrix = new MultiFormatWriter().encode(contents, format, WIDTH, HEIGHT, hints);
} catch (WriterException e) {
e.printStackTrace();
log.error("method exception", e);
}
// 设置矩阵转为图片的参数
@ -175,7 +177,7 @@ public class BarcodeUtils {
File file= new File(s);
FileUtils.copyInputStreamToFile(inputStream, file);
} catch (Exception e) {
e.printStackTrace();
log.error("method exception", e);
}
}*/

18
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/DateUtils.java

@ -12,6 +12,7 @@ import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.constant.StrConstant;
import com.epmet.commons.tools.dto.form.TimeListResultDTO;
import com.google.common.collect.Maps;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.joda.time.DateTime;
import org.joda.time.LocalDate;
@ -30,6 +31,7 @@ import java.util.*;
* @author Mark sunlightcs@gmail.com
* @since 1.0.0
*/
@Slf4j
public class DateUtils {
/** 季度月份列表 */
@ -94,7 +96,7 @@ public class DateUtils {
try {
return new SimpleDateFormat(pattern).parse(date);
} catch (ParseException e) {
e.printStackTrace();
log.error("method exception", e);
}
return null;
}
@ -517,7 +519,7 @@ public class DateUtils {
tempStart.add(Calendar.DAY_OF_YEAR, 1);
}
} catch (Exception e) {
e.printStackTrace();
log.error("method exception", e);
}
return days;
}
@ -548,7 +550,7 @@ public class DateUtils {
tempStart.add(Calendar.DAY_OF_YEAR, 1);
}
} catch (Exception e) {
e.printStackTrace();
log.error("method exception", e);
}
return days;
}
@ -582,7 +584,7 @@ public class DateUtils {
}
min = null;max = null;curr = null;
}catch(Exception e){
e.printStackTrace();
log.error("method exception", e);
}
return result;
}
@ -629,7 +631,7 @@ public class DateUtils {
try {
return format.parse(date);
} catch (ParseException e) {
e.printStackTrace();
log.error("method exception", e);
}
}
return null;
@ -719,7 +721,7 @@ public class DateUtils {
String weekId = dateId.substring(NumConstant.ZERO,NumConstant.FOUR).concat("W").concat(String.valueOf(weekOfYear));
result.setWeekId(weekId);
} catch (ParseException e) {
e.printStackTrace();
log.error("method exception", e);
}
return result;
}
@ -739,7 +741,7 @@ public class DateUtils {
java.time.LocalDate localDate = birth.minusMonths(NumConstant.ONE);
minusMonthId = localDate.toString().substring(NumConstant.ZERO, NumConstant.FOUR).concat(localDate.toString().substring(NumConstant.FIVE, NumConstant.SEVEN));
} catch (ParseException e) {
e.printStackTrace();
log.error("method exception", e);
}
return minusMonthId;
}
@ -810,7 +812,7 @@ public class DateUtils {
DateFormat dateFormat = new SimpleDateFormat(format);
date = dateFormat.parse(dateStr);
} catch (Exception e) {
e.printStackTrace();
log.error("method exception", e);
}
return date;
}

6
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/HttpClientManager.java

@ -93,7 +93,7 @@ public class HttpClientManager {
// 创建自定义的httpclient对象
httpsClient = HttpClients.custom().setConnectionManager(connManager).build();
} catch (Exception e) {
e.printStackTrace();
log.error("method exception", e);
}
}
@ -321,7 +321,7 @@ public class HttpClientManager {
String jsonStrParam = msg.getMsgContent();
return sendPostByJSON(url, jsonStrParam);
} catch (Exception e) {
e.printStackTrace();
log.error("method exception", e);
}
return new Result<String>().error();
}
@ -348,7 +348,7 @@ public class HttpClientManager {
log.info("robot发送消息结果为:"+stringResult.getData());
return stringResult;
} catch (Exception e) {
e.printStackTrace();
log.error("method exception", e);
}
return new Result<String>().error();
}

2
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/Md5Util.java

@ -126,7 +126,7 @@ public class Md5Util {
hex = byteArrayToHexString(md.digest(SALT.concat(string)
.getBytes(StandardCharsets.UTF_8)));
} catch (Exception e) {
e.printStackTrace();
log.error("method exception", e);
}
int hexLen = hex.length();

4
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/MultipartFileToFileUtils.java

@ -1,5 +1,6 @@
package com.epmet.commons.tools.utils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.multipart.MultipartFile;
import java.io.File;
@ -12,6 +13,7 @@ import java.io.OutputStream;
* @dscription
* @date 2020/7/17 14:01
*/
@Slf4j
public class MultipartFileToFileUtils {
/**
* MultipartFile File
@ -46,7 +48,7 @@ public class MultipartFileToFileUtils {
ins.close();
return file;
} catch (Exception e) {
e.printStackTrace();
log.error("method exception", e);
}
return null;
}

4
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/Pinyin4jUtil.java

@ -1,5 +1,6 @@
package com.epmet.commons.tools.utils;
import lombok.extern.slf4j.Slf4j;
import net.sourceforge.pinyin4j.PinyinHelper;
import net.sourceforge.pinyin4j.format.HanyuPinyinCaseType;
import net.sourceforge.pinyin4j.format.HanyuPinyinOutputFormat;
@ -16,6 +17,7 @@ import java.util.Set;
/**
* @author liujianjun
*/
@Slf4j
public class Pinyin4jUtil {
private static Map<Character,String[]> duoyinMap;
static {
@ -134,7 +136,7 @@ public class Pinyin4jUtil {
}
}
} catch (BadHanyuPinyinOutputFormatCombination e) {
e.printStackTrace();
log.error("method exception", e);
}
} else if (((int) c >= 65 && (int) c <= 90)
|| ((int) c >= 97 && (int) c <= 122)) {//英文

2
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/YuShanSysApiService.java

@ -38,7 +38,7 @@ public class YuShanSysApiService {
Thread.sleep(1000l);
} catch (InterruptedException e) {
log.error("调用榆山街道发放积分睡眠发生异常,{}",e);
e.printStackTrace();
log.error("method exception", e);
}*/
if (StringUtils.isBlank(customerId) || CollectionUtils.isEmpty(paramList)) {
log.warn("updateUserPoints 参数错误");

15
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/net/OkHttpUtil.java

@ -1,6 +1,7 @@
package com.epmet.commons.tools.utils.net;
import lombok.extern.slf4j.Slf4j;
import okhttp3.*;
import org.apache.http.client.utils.URIBuilder;
import org.slf4j.Logger;
@ -19,7 +20,7 @@ import java.security.cert.X509Certificate;
import java.util.*;
import java.util.concurrent.TimeUnit;
@Slf4j
public class OkHttpUtil {
private static final Logger logger = LoggerFactory.getLogger(OkHttpUtil.class);
@ -117,7 +118,7 @@ public class OkHttpUtil {
try {
response = call.execute();
} catch (IOException e) {
e.printStackTrace();
log.error("method exception", e);
}
return response;
}
@ -142,7 +143,7 @@ public class OkHttpUtil {
try {
response = call.execute();
} catch (IOException e) {
e.printStackTrace();
log.error("method exception", e);
}
return response;
}*/
@ -172,7 +173,7 @@ public class OkHttpUtil {
try {
response = call.execute();
} catch (IOException e) {
e.printStackTrace();
log.error("method exception", e);
}
return response;
}
@ -199,7 +200,7 @@ public class OkHttpUtil {
try {
response = call.execute();
} catch (IOException e) {
e.printStackTrace();
log.error("method exception", e);
}
return response;
@ -225,7 +226,7 @@ public class OkHttpUtil {
try {
response = call.execute();
} catch (IOException e) {
e.printStackTrace();
log.error("method exception", e);
}
return response;
}
@ -426,7 +427,7 @@ public class OkHttpUtil {
System.out.println(Objects.requireNonNull(data.body()).string());
System.out.println(Optional.ofNullable(null).get());
} catch (Exception e) {
e.printStackTrace();
log.error("method exception", e);
}
}

6
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/net/SSLSocketClient.java

@ -1,12 +1,14 @@
package com.epmet.commons.tools.utils.net;
import lombok.extern.slf4j.Slf4j;
import javax.net.ssl.*;
import java.security.KeyStore;
import java.security.SecureRandom;
import java.security.cert.X509Certificate;
import java.util.Arrays;
@Slf4j
public class SSLSocketClient {
//获取这个SSLSocketFactory
@ -56,7 +58,7 @@ public class SSLSocketClient {
}
trustManager = (X509TrustManager) trustManagers[0];
} catch (Exception e) {
e.printStackTrace();
log.error("method exception", e);
}
return trustManager;

1
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/validator/IdCardNoValidatorUtils.java

@ -102,7 +102,6 @@ public class IdCardNoValidatorUtils {
} catch (Exception e) {
logger.warn(String.format("校验身份证号方法异常"));
e.printStackTrace();
}
return true;
}

2
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/controller/GovOrgController.java

@ -334,7 +334,7 @@ public class GovOrgController {
} while (page.getList().size() == pageSize);
} catch (Exception e) {
e.printStackTrace();
log.error("method exception", e);
log.error("【PC工作端网格员数据统计导出】生成excel失败:{}", ExceptionUtils.getErrorStackTrace(e));
} finally {
// 关闭流

6
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/impl/GovOrgServiceImpl.java

@ -850,7 +850,7 @@ public class GovOrgServiceImpl implements GovOrgService {
List<GridLivelyExcel> data = ConvertUtils.sourceToTarget(grdiLively(formDTO), GridLivelyExcel.class);
excelWriter.write(data, writeSheet);
} catch (Exception e) {
e.printStackTrace();
log.error("method exception", e);
} finally {
if (excelWriter != null) {
excelWriter.finish();
@ -925,7 +925,7 @@ public class GovOrgServiceImpl implements GovOrgService {
try{
titleName.append("(").append(format2.format(format1.parse(startTime))).append("至").append(format2.format(format1.parse(endTime))).append(")").append(name);
} catch (Exception e) {
e.printStackTrace();
log.error("method exception", e);
}
return titleName.toString();
}
@ -937,7 +937,7 @@ public class GovOrgServiceImpl implements GovOrgService {
try{
name.append(format2.format(format1.parse(formDTO.getStartTime()))).append("至").append(format2.format(format1.parse(formDTO.getEndTime()))).append("网格活跃度统计");
} catch (Exception e) {
e.printStackTrace();
log.error("method exception", e);
}
return name.toString();
}

4
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/fact/impl/FactIndexServiceImpl.java

@ -430,7 +430,7 @@ public class FactIndexServiceImpl implements FactIndexService {
ds.add(Calendar.YEAR, -1);
date = sdf.format(ds.getTime());
} catch (RenException | ParseException e) {
e.printStackTrace();
log.error("method exception", e);
}
return date;
}
@ -455,7 +455,7 @@ public class FactIndexServiceImpl implements FactIndexService {
try {
sdf.parse(newDate);
} catch (ParseException e) {
e.printStackTrace();
log.error("method exception", e);
return false;
}
return matches;

7
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/utils/DateUtils.java

@ -2,6 +2,7 @@ package com.epmet.datareport.utils;
import com.epmet.commons.tools.constant.NumConstant;
import com.google.common.collect.Maps;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Component;
@ -9,7 +10,6 @@ import java.text.SimpleDateFormat;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.util.*;
import java.util.stream.Collectors;
/**
* @Description
@ -17,6 +17,7 @@ import java.util.stream.Collectors;
* @Auth wangc
* @Date 2020-08-20 10:56
*/
@Slf4j
@Component
public class DateUtils {
private static SimpleDateFormat defaultFormat = new SimpleDateFormat("yyyyMM");
@ -129,7 +130,7 @@ public class DateUtils {
date = format.parse(dateStr);
}catch(Exception e){
e.printStackTrace();
log.error("method exception", e);
}
}else{
return null;
@ -162,7 +163,7 @@ public class DateUtils {
System.out.println();
});
List<String> xLine = result.values().stream().collect(Collectors.toList());
List<String> xLine = new ArrayList<>(result.values());
xLine.forEach(x -> {
System.out.println(x);
});

4
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java

@ -183,9 +183,9 @@ public class DemoController {
System.out.println("<<-----------");
} catch (InterruptedException e) {
e.printStackTrace();
log.error("method exception", e);
} catch (ExecutionException e) {
e.printStackTrace();
log.error("method exception", e);
}
}

2
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/external/IndexCalculateController.java

@ -188,7 +188,7 @@ public class IndexCalculateController {
// Thread.sleep(20000l);
// System.out.println(System.currentTimeMillis());
//} catch (InterruptedException e) {
// e.printStackTrace();
// log.error("method exception", e);
//}
//redisUtils.delete(RedisKeys.getCustomerStatsCalFlag(formDTO.getCustomerId()));
//futureMap.remove(formDTO.getCustomerId());

2
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/healthcheck/HealthCheckController.java

@ -25,7 +25,7 @@ public class HealthCheckController {
try {
serverIp = Inet4Address.getLocalHost();
} catch (UnknownHostException e) {
e.printStackTrace();
log.error("method exception", e);
}
log.info("健康检查:serverName:{}", serverIp);
return new Result().ok(serverIp);

2
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsDemoServiceImpl.java

@ -36,7 +36,6 @@ public class StatsDemoServiceImpl implements StatsDemoService {
Thread.sleep(2000l);
} catch (InterruptedException e) {
System.err.println("睡眠发生异常");
e.printStackTrace();
}
return true;
}
@ -52,7 +51,6 @@ public class StatsDemoServiceImpl implements StatsDemoService {
System.out.println(LocalDateTime.now().getSecond());
} catch (InterruptedException e) {
System.err.println("睡眠发生异常");
e.printStackTrace();
}
}

2
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsPartyMemberVanguardServiceImpl.java

@ -363,7 +363,7 @@ public class StatsPartyMemberVanguardServiceImpl implements StatsPartyMemberVang
String str = sdf.format(calendar.getTime());
date = sdf.parse(str);
} catch (Exception e) {
e.printStackTrace();
log.error("method exception", e);
}
return date;
}

2
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsProjectServiceImpl.java

@ -950,7 +950,7 @@ public class StatsProjectServiceImpl implements StatsProjectService {
String str = sdf.format(calendar.getTime());
date = sdf.parse(str);
} catch (Exception e) {
e.printStackTrace();
log.error("method exception", e);
}
return date;
}

6
epmet-module/epmet-activiti/epmet-activiti-server/src/main/java/com/epmet/service/ActModelService.java

@ -15,6 +15,7 @@ import com.epmet.commons.tools.constant.Constant;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.page.PageData;
import com.epmet.exception.ModuleErrorCode;
import lombok.extern.slf4j.Slf4j;
import org.activiti.bpmn.converter.BpmnXMLConverter;
import org.activiti.bpmn.model.BpmnModel;
import org.activiti.editor.constants.ModelDataJsonConstants;
@ -46,6 +47,7 @@ import java.util.Map;
*
* @author Mark sunlightcs@gmail.com
*/
@Slf4j
@Service
public class ActModelService {
@Autowired
@ -186,14 +188,14 @@ public class ActModelService {
response.getWriter().println("No image Info!");
}
} catch (IOException e) {
e.printStackTrace();
log.error("method exception", e);
} finally {
try {
if(null != in){
in.close();
}
} catch (IOException e) {
e.printStackTrace();
log.error("method exception", e);
}
}
}

19
epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/ShowApiServiceImpl.java

@ -13,7 +13,6 @@ import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.text.Format;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
@ -66,7 +65,7 @@ public class ShowApiServiceImpl implements ShowApiService {
}
}
} catch (ParseException e) {
e.printStackTrace();
logger.error("method exception", e);
}
}
@ -103,7 +102,7 @@ public class ShowApiServiceImpl implements ShowApiService {
logger.info("无需更新");
}
} catch (Exception e) {
e.printStackTrace();
logger.error("method exception", e);
}
}
@ -119,7 +118,7 @@ public class ShowApiServiceImpl implements ShowApiService {
calenderDao.updateHoliday(holidayDetail);
}
} catch (Exception e) {
e.printStackTrace();
logger.error("method exception", e);
throw new RenException("根据年份查询当年的节假日列表API【https://route.showapi.com/894-4】查询异常");
}
}
@ -130,11 +129,12 @@ public class ShowApiServiceImpl implements ShowApiService {
try {
dayDetailResultDTO = ShowApiUtil.queryHolidayV2020(currentDate);
} catch (Exception e) {
e.printStackTrace();
logger.error("queryHolidayV2020 exception", e);
return;
}
List<CalenderEntity> list = calenderDao.selectByDay(currentDate);
if(null!=list&&list.size()>0){
if (null != dayDetailResultDTO && 0 == dayDetailResultDTO.getRet_code()) {
if (0 == dayDetailResultDTO.getRet_code()) {
for (CalenderEntity calenderEntity : list) {
calenderEntity.setRetCode(dayDetailResultDTO.getRet_code());
calenderEntity.setWeekday(dayDetailResultDTO.getWeekDay());
@ -169,7 +169,6 @@ public class ShowApiServiceImpl implements ShowApiService {
calenderEntity.setQueryDate(queryDate);
} catch (ParseException e) {
logger.error("QUERY_DATE 赋值 错误");
e.printStackTrace();
}
calenderEntity.setRetCode(dayDetailResultDTO.getRet_code());
calenderEntity.setWeekday(dayDetailResultDTO.getWeekDay());
@ -217,7 +216,7 @@ public class ShowApiServiceImpl implements ShowApiService {
date = dateFormat.parse(datetime);
cal.setTime(date);
} catch (ParseException e) {
e.printStackTrace();
logger.error("method exception", e);
}
int w = cal.get(Calendar.DAY_OF_WEEK) - 1;
return weekDays[w];
@ -238,7 +237,7 @@ public class ShowApiServiceImpl implements ShowApiService {
date = dateFormat.parse(datetime);
cal.setTime(date);
} catch (ParseException e) {
e.printStackTrace();
logger.error("method exception", e);
}
int w = cal.get(Calendar.DAY_OF_WEEK) - 1;
return weekDays[w];
@ -259,7 +258,7 @@ public class ShowApiServiceImpl implements ShowApiService {
date = dateFormat.parse(datetime);
cal.setTime(date);
} catch (ParseException e) {
e.printStackTrace();
logger.error("method exception", e);
}
int w = cal.get(Calendar.DAY_OF_WEEK) - 1;
return weekDays[w];

6
epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/WorkDayServiceImpl.java

@ -177,7 +177,7 @@ public class WorkDayServiceImpl implements WorkDayService {
}
return String.valueOf(detentionDay);
} catch (Exception e) {
e.printStackTrace();
logger.error("method exception", e);
}
return "-1";
}
@ -418,7 +418,7 @@ public class WorkDayServiceImpl implements WorkDayService {
logger.info(String.format("当前日期[%s]-被吹日期[%s]-期间的节假日[%s]=%s", endDateStr, startDateStr, totalHoliday, detentionDay));
return (int)detentionDay;
} catch (Exception e) {
e.printStackTrace();
logger.error("method exception", e);
}
return -1;
}
@ -438,7 +438,7 @@ public class WorkDayServiceImpl implements WorkDayService {
long day = (endDate.getTime() - startDate.getTime()) / (24 * 60 * 60 * 1000);
return (int)day;
} catch (Exception e) {
e.printStackTrace();
logger.error("method exception", e);
}
return -1;
}

2
epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/utils/ShowApiUtil.java

@ -101,7 +101,7 @@ public class ShowApiUtil {
System.out.println(dayDetailResultDTO);
//holidayList("2020");
} catch (Exception e) {
e.printStackTrace();
logger.error("method exception", e);
}
}
}

4
epmet-module/epmet-demo/epmet-demo-server/src/main/java/com/epmet/service/impl/DemoServiceImpl.java

@ -39,6 +39,7 @@ import com.epmet.feign.GovOrgFeignClient;
import com.epmet.feign.OperCrmFeignClient;
import com.epmet.redis.DemoRedis;
import com.epmet.service.DemoService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -58,6 +59,7 @@ import java.util.Map;
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-03-08
*/
@Slf4j
@Service
public class DemoServiceImpl extends BaseServiceImpl<DemoDao, DemoEntity> implements DemoService {
private static final Logger logger = LoggerFactory.getLogger(DemoServiceImpl.class);
@ -156,7 +158,7 @@ public class DemoServiceImpl extends BaseServiceImpl<DemoDao, DemoEntity> implem
try {
dto.setValidityTime(dateFormat.parse(formDTO.getValidityTime()));
} catch (ParseException e) {
e.printStackTrace();
log.error("method exception", e);
}
return operCrmFeignClient.saveCustomerInfo(dto);
}

2
epmet-module/epmet-ext/epmet-ext-server/src/main/java/com/epmet/aspect/OpenApiRequestCheckAspect.java

@ -187,7 +187,7 @@ public class OpenApiRequestCheckAspect {
// try {
// appId = getAppIdFromDTO(arg);
// } catch (IllegalAccessException e) {
// e.printStackTrace();
// log.error("method exception", e);
// }
// }
// }

6
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyActivityController.java

@ -65,7 +65,7 @@ import java.util.stream.Collectors;
@RestController
@RequestMapping("icpartyactivity")
public class IcPartyActivityController {
@Autowired
private IcPartyActivityService icPartyActivityService;
@Resource
@ -155,7 +155,7 @@ public class IcPartyActivityController {
try {
Thread.sleep(1000L);
} catch (InterruptedException e) {
e.printStackTrace();
log.error("method exception", e);
}
submitResiImportTask(tokenDto, response, file, result.getData().getTaskId());
});
@ -202,4 +202,4 @@ public class IcPartyActivityController {
PageData<IcPartyActivityDTO> page = icPartyActivityService.getActivityList(tokenDto, formDTO);
return new Result<PageData<IcPartyActivityDTO>>().ok(page);
}
}
}

6
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyUnitController.java

@ -72,7 +72,7 @@ import java.util.stream.Collectors;
@RestController
@RequestMapping("icpartyunit")
public class IcPartyUnitController {
@Autowired
private IcPartyUnitService icPartyUnitService;
@Resource
@ -200,7 +200,7 @@ public class IcPartyUnitController {
try {
Thread.sleep(1000L);
} catch (InterruptedException e) {
e.printStackTrace();
log.error("method exception", e);
}
submitResiImportTask(tokenDto, response, file, result.getData().getTaskId());
});
@ -267,4 +267,4 @@ public class IcPartyUnitController {
}
}
}
}
}

7
epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/SysSmsServiceImpl.java

@ -37,6 +37,7 @@ import com.epmet.sms.AbstractSmsService;
import com.epmet.sms.SmsFactory;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -49,7 +50,7 @@ import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
@Slf4j
@Service
public class SysSmsServiceImpl extends BaseServiceImpl<SysSmsDao, SysSmsEntity> implements SysSmsService {
@ -184,7 +185,6 @@ public class SysSmsServiceImpl extends BaseServiceImpl<SysSmsDao, SysSmsEntity>
logger.error(String.format("短信验证码发送失败,手机号:%s。code:%d,msg:%s", mobile, result.getCode(), result.getMsg()));
}
} catch (JsonProcessingException e) {
e.printStackTrace();
logger.error(String.format("短信验证码发送失败,手机号:%s。errorMessage:%s", mobile, e.getMessage()));
}
return new Result().error(EpmetErrorCode.MESSAGE_SMS_SEND_ERROR.getCode());
@ -215,7 +215,6 @@ public class SysSmsServiceImpl extends BaseServiceImpl<SysSmsDao, SysSmsEntity>
throw new RenException(EpmetErrorCode.MESSAGE_SMS_SEND_ERROR.getCode());
}*/
} catch (Exception e) {
e.printStackTrace();
logger.error(String.format("短信验证码发送失败,手机号:%s。errorMessage:%s", formDTO.getMobile(), e.getMessage()));
throw new RenException(EpmetErrorCode.MESSAGE_SMS_SEND_ERROR.getCode());
}
@ -280,7 +279,7 @@ public class SysSmsServiceImpl extends BaseServiceImpl<SysSmsDao, SysSmsEntity>
String paramJson = new ObjectMapper().writeValueAsString(map);
sysSmsDTO.setParams(paramJson);
} catch (JsonProcessingException e) {
e.printStackTrace();
log.error("method exception", e);
}
//推送短信
this.sendMsg(sysSmsDTO);

4
epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/WxmpMessageServiceImpl.java

@ -44,6 +44,7 @@ import com.epmet.service.WxmpMessageService;
import com.epmet.service.WxmpMsgSendRecordService;
import com.epmet.service.WxmpUpdateSendDataService;
import com.epmet.service.WxmpUpdateSendRecordService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -61,6 +62,7 @@ import java.util.*;
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-10-21
*/
@Slf4j
@Service
public class WxmpMessageServiceImpl implements WxmpMessageService {
private Logger logger = LoggerFactory.getLogger(getClass());
@ -542,7 +544,7 @@ public class WxmpMessageServiceImpl implements WxmpMessageService {
throw new WxSubscribeException("clientType有误", "", openId);
}
} catch (Exception e) {
e.printStackTrace();
log.error("method exception", e);
throw new WxSubscribeException("获取openId失败:" + e.getMessage(), "", "");
}
return openId;

4
epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/sms/AliyunSmsService.java

@ -26,6 +26,7 @@ import com.epmet.dto.SysSmsDTO;
import com.epmet.enums.PlatformEnum;
import com.epmet.exception.ModuleErrorCode;
import com.epmet.service.SysSmsService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import java.util.LinkedHashMap;
@ -35,6 +36,7 @@ import java.util.LinkedHashMap;
*
* @author Mark sunlightcs@gmail.com
*/
@Slf4j
public class AliyunSmsService extends AbstractSmsService {
/**
* 短信API产品名称短信产品名固定无需修改
@ -61,7 +63,7 @@ public class AliyunSmsService extends AbstractSmsService {
profile = DefaultProfile.getProfile("cn-hangzhou", config.getAliyunAccessKeyId(), config.getAliyunAccessKeySecret());
DefaultProfile.addEndpoint("cn-hangzhou", "cn-hangzhou", PRODUCT, DOMAIN);
} catch (ClientException e) {
e.printStackTrace();
log.error("method exception", e);
}
}

4
epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/AliyunCloudStorageService.java

@ -16,6 +16,7 @@ import com.aliyun.oss.model.DownloadFileResult;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.constants.PrivacyType;
import com.epmet.exception.ModuleErrorCode;
import lombok.extern.slf4j.Slf4j;
import java.io.ByteArrayInputStream;
import java.io.IOException;
@ -26,6 +27,7 @@ import java.io.InputStream;
*
* @author Mark sunlightcs@gmail.com
*/
@Slf4j
public class AliyunCloudStorageService extends AbstractCloudStorageService {
private OSS internalClient = null;
@ -189,7 +191,7 @@ public class AliyunCloudStorageService extends AbstractCloudStorageService {
} catch (Exception e){
throw new RenException(ModuleErrorCode.OSS_UPLOAD_FILE_ERROR, e, "");
} catch (Throwable throwable) {
throwable.printStackTrace();
log.error("method exception", throwable);
}
}

13
epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/controller/TestController.java

@ -2,6 +2,7 @@ package com.epmet.controller;
import com.epmet.commons.tools.utils.Result;
import com.epmet.service.OssService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.io.FileUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.mock.web.MockMultipartFile;
@ -12,7 +13,7 @@ import java.io.*;
import java.net.Inet4Address;
import java.net.InetAddress;
import java.net.UnknownHostException;
@Slf4j
@RestController
@RequestMapping("test")
public class TestController {
@ -28,7 +29,7 @@ public class TestController {
try(InputStream inputStream = file.getInputStream()) {
FileUtils.copyInputStreamToFile(inputStream, tempFile);
} catch (IOException e) {
e.printStackTrace();
log.error("method exception", e);
}
return new Result();
}
@ -39,9 +40,9 @@ public class TestController {
final MockMultipartFile mockMultipartFile = new MockMultipartFile(fileName, fis);
return ossService.uploadImg(mockMultipartFile, null);
} catch (FileNotFoundException e) {
e.printStackTrace();
log.error("method exception", e);
} catch (IOException e) {
e.printStackTrace();
log.error("method exception", e);
}
return new Result();
}
@ -59,9 +60,9 @@ public class TestController {
Thread.sleep(sleep);
localHost = Inet4Address.getLocalHost();
} catch (UnknownHostException e) {
e.printStackTrace();
log.error("method exception", e);
} catch (InterruptedException e) {
e.printStackTrace();
log.error("method exception", e);
}
return new Result().ok(localHost);
}

6
epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/service/impl/OssServiceImpl.java

@ -28,6 +28,7 @@ import com.epmet.dto.result.UploadImgResultDTO;
import com.epmet.entity.OssEntity;
import com.epmet.exception.ModuleErrorCode;
import com.epmet.service.OssService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.io.FilenameUtils;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
@ -40,6 +41,7 @@ import java.io.File;
import java.io.IOException;
import java.util.Map;
@Slf4j
@Service
public class OssServiceImpl extends BaseServiceImpl<OssDao, OssEntity> implements OssService {
private static final Logger logger = LoggerFactory.getLogger(OssServiceImpl.class);
@ -97,7 +99,7 @@ public class OssServiceImpl extends BaseServiceImpl<OssDao, OssEntity> implement
try {
OssFactory.build().down(privacy);
} catch (IOException e) {
e.printStackTrace();
log.error("method exception", e);
}
if (file.isEmpty()) {
@ -109,7 +111,7 @@ public class OssServiceImpl extends BaseServiceImpl<OssDao, OssEntity> implement
try {
url = OssFactory.build().uploadSuffix(file.getBytes(), extension, privacy);
} catch (IOException e) {
e.printStackTrace();
log.error("method exception", e);
logger.error("图片上传异常");
throw new RenException("图片上传异常");

8
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/mpaes/SHA1.java

@ -1,6 +1,6 @@
/**
* 对公众平台发送给公众账号的消息加解密示例代码.
*
*
* @copyright Copyright (c) 1998-2014 Tencent Inc.
*/
@ -10,6 +10,7 @@ package com.epmet.mpaes;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.wxapi.enums.WxMaErrorMsgEnum;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import java.security.MessageDigest;
@ -20,6 +21,7 @@ import java.util.Arrays;
*
* 计算公众平台的消息签名接口.
*/
@Slf4j
@Component
public class SHA1 {
@ -30,7 +32,7 @@ public class SHA1 {
* @param nonce 随机字符串
* @param encrypt 密文
* @return 安全签名
* @throws AesException
* @throws AesException
*/
public static String getSHA1(String token, String timestamp, String nonce, String encrypt) throws AesException {
try {
@ -58,7 +60,7 @@ public class SHA1 {
}
return hexstr.toString();
} catch (Exception e) {
e.printStackTrace();
log.error("method exception", e);
throw new RenException(WxMaErrorMsgEnum.CODE_MINUS_40003.getMsg());
}
}

8
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/mpaes/WXBizMsgCrypt.java

@ -15,6 +15,7 @@ package com.epmet.mpaes;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.wxapi.enums.WxMaErrorMsgEnum;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.codec.binary.Base64;
import javax.crypto.Cipher;
@ -40,6 +41,7 @@ import java.util.Random;
* <li>如果安装了JDK将两个jar文件放到%JDK_HOME%\jre\lib\security目录下覆盖原来文件</li>
* </ol>
*/
@Slf4j
public class WXBizMsgCrypt {
static Charset CHARSET = StandardCharsets.UTF_8;
Base64 base64 = new Base64();
@ -139,7 +141,7 @@ public class WXBizMsgCrypt {
return base64Encrypted;
} catch (Exception e) {
e.printStackTrace();
log.error("method exception", e);
throw new RenException(WxMaErrorMsgEnum.CODE_MINUS_40006.getMsg());
}
}
@ -166,7 +168,7 @@ public class WXBizMsgCrypt {
// 解密
original = cipher.doFinal(encrypted);
} catch (Exception e) {
e.printStackTrace();
log.error("method exception", e);
throw new RenException(WxMaErrorMsgEnum.CODE_MINUS_40007.getMsg());
}
@ -184,7 +186,7 @@ public class WXBizMsgCrypt {
from_appid = new String(Arrays.copyOfRange(bytes, 20 + xmlLength, bytes.length),
CHARSET);
} catch (Exception e) {
e.printStackTrace();
log.error("method exception", e);
throw new RenException(WxMaErrorMsgEnum.CODE_MINUS_40008.getMsg());
}

21
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/mpaes/WXXmlToMapUtil.java

@ -3,6 +3,7 @@ package com.epmet.mpaes;
import com.thoughtworks.xstream.XStream;
import com.thoughtworks.xstream.io.naming.NoNameCoder;
import com.thoughtworks.xstream.io.xml.DomDriver;
import lombok.extern.slf4j.Slf4j;
import org.dom4j.Document;
import org.dom4j.DocumentException;
import org.dom4j.DocumentHelper;
@ -15,6 +16,13 @@ import org.slf4j.LoggerFactory;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.transform.OutputKeys;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
import java.io.ByteArrayInputStream;
import java.io.InputStream;
import java.io.StringReader;
@ -24,18 +32,11 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.transform.OutputKeys;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
/**
* @Author zxc
* @CreateTime 2020/7/6 9:51
*/
@Slf4j
public class WXXmlToMapUtil {
private static final Logger logger = LoggerFactory.getLogger(WXXmlToMapUtil.class);
@ -65,7 +66,7 @@ public class WXXmlToMapUtil {
stream.close();
return data;
} catch (Exception e) {
e.printStackTrace();
log.error("method exception", e);
return null;
}
}
@ -105,7 +106,7 @@ public class WXXmlToMapUtil {
writer.close();
return output;
} catch (Exception e) {
e.printStackTrace();
log.error("method exception", e);
return null;
}
}

8
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/mpaes/XMLParse.java

@ -1,6 +1,6 @@
/**
* 对公众平台发送给公众账号的消息加解密示例代码.
*
*
* @copyright Copyright (c) 1998-2014 Tencent Inc.
*/
@ -10,6 +10,7 @@ package com.epmet.mpaes;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.wxapi.enums.WxMaErrorMsgEnum;
import lombok.extern.slf4j.Slf4j;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.NodeList;
@ -24,13 +25,14 @@ import java.io.StringReader;
*
* 提供提取消息格式中的密文及生成回复消息格式的接口.
*/
@Slf4j
public class XMLParse {
/**
* 提取出xml数据包中的加密消息
* @param xmltext 待提取的xml字符串
* @return 提取出的加密消息字符串
* @throws AesException
* @throws AesException
*/
public static String extract(String xmltext) throws AesException {
// Object[] result = new Object[3];
@ -49,7 +51,7 @@ public class XMLParse {
// result[2] = nodelist2.item(0).getTextContent();
return result;
} catch (Exception e) {
e.printStackTrace();
log.error("method exception", e);
throw new RenException(WxMaErrorMsgEnum.CODE_MINUS_40002.getMsg());
}
}

8
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/mq/producer/BlockChainProducer.java

@ -57,19 +57,19 @@ public class BlockChainProducer {
@PostConstruct
private void postConstruct() {
try {
// 如果没有启用,则跳过
if (!rocketMQProperties.getBlockChain().getEnable()) {
log.info("未开启区块链的MQ配置,初始化Producer动作取消");
return;
}
producer = new DefaultMQProducer(GROUP_EPMET_CLOUD_PROJECT_SENDER,
new AclClientRPCHook(new SessionCredentials(rocketMQProperties.getBlockChain().getAccessKey(), rocketMQProperties.getBlockChain().getSecretKey())));
producer.setNamesrvAddr(rocketMQProperties.getBlockChain().getNameServer());
producer.start();
} catch (MQClientException e) {
e.printStackTrace();
log.error("method exception", e);
}
}
@ -95,7 +95,7 @@ public class BlockChainProducer {
log.info("未开启区块链的MQ配置,发送消息到区块链动作取消");
return;
}
Message msg = new Message(topic, tag, content.getBytes(RemotingHelper.DEFAULT_CHARSET));
SendResult sendResult = producer.send(msg);
if (SendStatus.SEND_OK == sendResult.getSendStatus()

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

@ -99,7 +99,7 @@ public class WarrantServiceImpl implements WarrantService {
wxBizMsgCrypt = new WXBizMsgCrypt(token,aesKey,componentAppId);
msg = wxBizMsgCrypt.decryptMsg(msgSignature, timeStamp, nonce, postData);
} catch (AesException e) {
e.printStackTrace();
log.error("method exception", e);
}
// 将xml转为map
Map<String, Object> result = WXXmlToMapUtil.multilayerXmlToMap(msg);
@ -311,7 +311,7 @@ public class WarrantServiceImpl implements WarrantService {
pw.write(generate);
pw.flush();
} catch (AesException e) {
e.printStackTrace();
log.error("method exception", e);
}
}

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

@ -12,6 +12,7 @@ import com.epmet.wxapi.service.WxMaCodeService;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.reflect.TypeToken;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -30,6 +31,7 @@ import java.util.Map;
* @author yinzuomei@elink-cn.com
* @date 2020/7/10 11:23
*/
@Slf4j
@Service
public class WxMaCodeServiceImpl implements WxMaCodeService {
private static final String ERR_CODE = "errcode";
@ -80,7 +82,7 @@ public class WxMaCodeServiceImpl implements WxMaCodeService {
try {
url.append("&path=").append(URLEncoder.encode(path, StandardCharsets.UTF_8.name()));
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
log.error("method exception", e);
}
}
Result<byte[]> qrCodeResult = HttpClientManager.getInstance().getByteArray(url.toString(), null);
@ -484,4 +486,4 @@ public class WxMaCodeServiceImpl implements WxMaCodeService {
}
return gson.fromJson(toJson(object), new TypeToken<Map<String, Object>>() {}.getType());
}
}
}

6
epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/TestController.java

@ -6,6 +6,7 @@ import com.epmet.commons.tools.utils.HttpClientManager;
import com.epmet.commons.tools.utils.Result;
import com.epmet.service.TestService;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
@ -18,6 +19,7 @@ import java.util.concurrent.CountDownLatch;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
@Slf4j
@RestController
@RequestMapping("test")
public class TestController {
@ -32,7 +34,7 @@ public class TestController {
try {
Thread.sleep(5000);
} catch (InterruptedException e) {
e.printStackTrace();
log.error("method exception", e);
}
String s = "这里是测试结果!";
return new Result<String>().ok(s);
@ -53,7 +55,7 @@ public class TestController {
Result<String> stringResult = HttpClientManager.getInstance().sendPostByJSONAndHeader(url, "", headersMap);
System.out.println(stringResult.getData());
} catch (InterruptedException e) {
e.printStackTrace();
log.error("method exception", e);
}
});

3
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/GovIssueRedis.java

@ -33,7 +33,6 @@ public class GovIssueRedis {
logger.info(String.format("居民端话题转议题提交,更新redis-reddot值成功,key[%s],Value[%s]", workGrassrootsIssueRedDotKey, votingIssueCount));
} catch (Exception e) {
logger.error(String.format("居民端话题转议题提交,更新redis-reddot值异常%s",e.getMessage()));
e.printStackTrace();
}
return votingIssueCount;
}
@ -53,7 +52,6 @@ public class GovIssueRedis {
logger.info(String.format("政府端(关闭议题、议题转项目)提交,更新redis-reddot值成功,key[%s],Value[%s]", workGrassrootsIssueRedDotKey, votingIssueCount));
} catch (Exception e) {
logger.error(String.format("政府端(关闭议题、议题转项目)提交,更新redis-reddot值异常%s",e.getMessage()));
e.printStackTrace();
}
return votingIssueCount;
}
@ -72,7 +70,6 @@ public class GovIssueRedis {
auditingGroupCount = (Integer) redisUtils.get(workGrassrootsGroupRedDotKey);
} catch (Exception e) {
logger.error(String.format("网格id%s,查询网格下表决中议题总数异常%s", gridId, e.getMessage()));
e.printStackTrace();
}
return auditingGroupCount;
}

7
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueVoteDetailRedis.java

@ -34,6 +34,7 @@ import com.epmet.feign.ResiGroupFeignClient;
import com.epmet.service.IssueService;
import com.epmet.service.IssueVoteDetailService;
import com.epmet.utils.ModuleConstants;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
@ -50,7 +51,6 @@ import java.util.Set;
import java.util.stream.Collectors;
import static com.epmet.commons.tools.redis.RedisUtils.DEFAULT_EXPIRE;
import static com.epmet.commons.tools.redis.RedisUtils.NOT_EXPIRE;
/**
* 议题表决记录表
@ -58,6 +58,7 @@ import static com.epmet.commons.tools.redis.RedisUtils.NOT_EXPIRE;
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-05-11
*/
@Slf4j
@Component
public class IssueVoteDetailRedis {
protected static final Logger logger = LoggerFactory.getLogger(IssueVoteDetailRedis.class);
@ -149,9 +150,9 @@ public class IssueVoteDetailRedis {
}
return t;
} catch (InstantiationException e) {
e.printStackTrace();
log.error("method exception", e);
} catch (IllegalAccessException e) {
e.printStackTrace();
log.error("method exception", e);
}
return t;
}

4
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/AgencyController.java

@ -42,6 +42,7 @@ import com.epmet.send.SendMqMsgUtil;
import com.epmet.service.AgencyService;
import com.epmet.service.CustomerAgencyService;
import com.epmet.service.IcNeighborHoodService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.io.FileUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
@ -69,6 +70,7 @@ import java.util.Map;
*
* @author generator generator@elink-cn.com
*/
@Slf4j
@RestController
@RequestMapping("agency")
public class AgencyController {
@ -444,7 +446,7 @@ public class AgencyController {
}
outputStream.flush();
} catch (Exception e) {
e.printStackTrace();
log.error("method exception", e);
}
}

2
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcNeighborHoodController.java

@ -221,7 +221,7 @@ public class IcNeighborHoodController {
}
outputStream.flush();
} catch (Exception e) {
e.printStackTrace();
log.error("method exception", e);
}
}

10
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/ImportBuildingInfoListener.java

@ -3,7 +3,6 @@ package com.epmet.model;
import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.event.AnalysisEventListener;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.exception.EpmetException;
import com.epmet.commons.tools.redis.common.CustomerOrgRedis;
import com.epmet.commons.tools.redis.common.bean.AgencyInfoCache;
import com.epmet.commons.tools.redis.common.bean.GridInfoCache;
@ -20,11 +19,15 @@ import com.epmet.enums.BuildingTypeEnums;
import com.epmet.feign.EpmetCommonServiceOpenFeignClient;
import com.epmet.redis.IcHouseRedis;
import com.epmet.service.IcNeighborHoodService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.util.CollectionUtils;
import java.io.IOException;
import java.util.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
@ -32,6 +35,7 @@ import java.util.stream.Collectors;
* @DateTime 2022/2/15 10:06 上午
* @DESC
*/
@Slf4j
public class ImportBuildingInfoListener extends AnalysisEventListener<BuildingInfoModel> {
List<Integer> nums = new ArrayList<>();
@ -406,7 +410,7 @@ public class ImportBuildingInfoListener extends AnalysisEventListener<BuildingIn
input.setResultDescFilePath(s);
} catch (IOException e) {
epmetCommonServiceOpenFeignClient.finishImportTask(input);
e.printStackTrace();
log.error("method exception", e);
}
}
epmetCommonServiceOpenFeignClient.finishImportTask(input);

11
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/ImportHouseInfoListener.java

@ -1,6 +1,5 @@
package com.epmet.model;
import cn.hutool.core.collection.ConcurrentHashSet;
import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.event.AnalysisEventListener;
import com.epmet.commons.tools.constant.NumConstant;
@ -17,7 +16,6 @@ import com.epmet.dto.form.ImportInfoFormDTO;
import com.epmet.dto.form.ImportTaskCommonFormDTO;
import com.epmet.dto.result.ExistHouseInfoResultDTO;
import com.epmet.dto.result.ImportResultDTO;
import com.epmet.dto.result.UpdateBuildingHouseNumResultDTO;
import com.epmet.entity.IcHouseEntity;
import com.epmet.enums.HousePurposeEnums;
import com.epmet.enums.HouseRentFlagEnums;
@ -26,12 +24,16 @@ import com.epmet.feign.EpmetCommonServiceOpenFeignClient;
import com.epmet.redis.IcHouseRedis;
import com.epmet.service.IcHouseService;
import com.epmet.service.IcNeighborHoodService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import java.io.IOException;
import java.util.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
@ -39,6 +41,7 @@ import java.util.stream.Collectors;
* @DateTime 2022/2/13 1:25 下午
* @DESC
*/
@Slf4j
public class ImportHouseInfoListener extends AnalysisEventListener<HouseInfoModel> {
List<Integer> nums = new ArrayList<>();
@ -580,7 +583,7 @@ public class ImportHouseInfoListener extends AnalysisEventListener<HouseInfoMode
input.setResultDescFilePath(s);
} catch (IOException e) {
epmetCommonServiceOpenFeignClient.finishImportTask(input);
e.printStackTrace();
log.error("method exception", e);
}
}
epmetCommonServiceOpenFeignClient.finishImportTask(input);

2
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java

@ -1214,7 +1214,7 @@ public class CustomerAgencyServiceImpl extends BaseServiceImpl<CustomerAgencyDao
root.getSubAgencyList().add(grid);
}
} catch (Exception e) {
e.printStackTrace();
log.error("method exception", e);
}
}

6
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterServiceImpl.java

@ -50,6 +50,7 @@ import com.epmet.entity.IcPartyServiceCenterMatterEntity;
import com.epmet.feign.EpmetUserOpenFeignClient;
import com.epmet.service.IcPartyServiceCenterMatterService;
import com.epmet.service.IcPartyServiceCenterService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
@ -72,6 +73,7 @@ import java.util.stream.Collectors;
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-11-18
*/
@Slf4j
@Service
public class IcPartyServiceCenterServiceImpl extends BaseServiceImpl<IcPartyServiceCenterDao, IcPartyServiceCenterEntity> implements IcPartyServiceCenterService {
@ -734,7 +736,7 @@ public class IcPartyServiceCenterServiceImpl extends BaseServiceImpl<IcPartyServ
Date date = simpleDateFormat.parse(dateStr);
return date;
} catch (ParseException e) {
e.printStackTrace();
log.error("method exception", e);
}
return null;
}
@ -744,4 +746,4 @@ public class IcPartyServiceCenterServiceImpl extends BaseServiceImpl<IcPartyServ
return simpleDateFormat.format(date);
}
}
}

2
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java

@ -3274,7 +3274,7 @@ public class ProjectServiceImpl extends BaseServiceImpl<ProjectDao, ProjectEntit
Date date = simpleDateFormat.parse(dateStr);
return date;
} catch (ParseException e) {
e.printStackTrace();
log.error("method exception", e);
}
return null;
}

2
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectTraceServiceImpl.java

@ -1000,7 +1000,7 @@ public class ProjectTraceServiceImpl<ProjectTagService> implements ProjectTraceS
formDTO.setPageNo(formDTO.getPageNo() + NumConstant.ONE);
} while (num > NumConstant.ZERO && num.compareTo(formDTO.getPageSize()) == NumConstant.ZERO);
} catch (Exception e) {
e.printStackTrace();
log.error("method exception", e);
} finally {
if (excelWriter != null) {
excelWriter.finish();

3
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/redis/ResiGroupRedis.java

@ -191,7 +191,6 @@ public class ResiGroupRedis {
logger.info(String.format("居民端创建小组提交,更新redis-reddot值成功,key[%s],Value[%s]", workGrassrootsGroupRedDotKey, auditingGroupCount));
} catch (Exception e) {
logger.error(String.format("居民端创建小组提交,更新redis-reddot值异常%s",e.getMessage()));
e.printStackTrace();
}
return auditingGroupCount;
}
@ -211,7 +210,6 @@ public class ResiGroupRedis {
logger.info(String.format("政府端(wxmp)同意建组,更新redis-reddot值成功,key[%s],Value[%s]", workGrassrootsGroupRedDotKey, auditingGroupCount));
} catch (Exception e) {
logger.error(String.format("政府端(wxmp)同意建组,更新redis-reddot值异常%s", e.getMessage()));
e.printStackTrace();
}
return auditingGroupCount;
}
@ -230,7 +228,6 @@ public class ResiGroupRedis {
auditingGroupCount = (Integer) redisUtils.get(workGrassrootsGroupRedDotKey);
} catch (Exception e) {
logger.error(String.format("网格id%s,查询网格下待审核小组总数异常%s", gridId, e.getMessage()));
e.printStackTrace();
}
return auditingGroupCount;
}

5
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java

@ -47,7 +47,6 @@ import com.epmet.dto.result.UserInfoResultDTO;
import com.epmet.dto.result.UserResiInfoResultDTO;
import com.epmet.dto.result.UserRoleResultDTO;
import com.epmet.feign.EpmetMessageOpenFeignClient;
import com.epmet.group.constant.GroupConstant;
import com.epmet.feign.EpmetUserOpenFeignClient;
import com.epmet.modules.constant.UserMessageConstant;
import com.epmet.modules.feign.EpmetMessageFeignClient;
@ -86,6 +85,7 @@ import com.epmet.resi.group.dto.member.result.GroupAchievementDTO;
import com.epmet.resi.group.enums.SearchScopeTypeEnum;
import com.epmet.send.SendMqMsgUtil;
import com.github.pagehelper.PageHelper;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
@ -109,6 +109,7 @@ import java.util.stream.Collectors;
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-03-28
*/
@Slf4j
@Service
public class ResiGroupServiceImpl extends BaseServiceImpl<ResiGroupDao, ResiGroupEntity> implements ResiGroupService {
private Logger logger = LoggerFactory.getLogger(getClass());
@ -534,7 +535,7 @@ public class ResiGroupServiceImpl extends BaseServiceImpl<ResiGroupDao, ResiGrou
try{
}catch(Exception e){
e.printStackTrace();
log.error("method exception", e);
}
}

5
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/impl/ResiGroupMemberServiceImpl.java

@ -337,7 +337,6 @@ public class ResiGroupMemberServiceImpl extends BaseServiceImpl<ResiGroupMemberD
epmetMessageOpenFeignClient.sendWxSubscribeMessage(msgList);
} catch (Exception e) {
logger.warn("居民申请入群,给组长发送消息通知异常");
e.printStackTrace();
}
}
@ -678,9 +677,9 @@ public class ResiGroupMemberServiceImpl extends BaseServiceImpl<ResiGroupMemberD
//mqBaseMsgDTO.setEventClass("resi_group");
//事件code
//mqBaseMsgDTO.setEventTag(isNew ? EventEnum.INVITE_NEW_RESIDENT_INTO_GROUP.getEventTag() : EventEnum.INVITE_RESIDENT_INTO_GROUP.getEventTag());
String eventTag = isNew ? SystemMessageType.INVITE_NEW_INTO_GROUP : SystemMessageType.INVITE_RESI_INTO_GROUP;
List<BasePointEventMsg> pointEventMsgList = new ArrayList<>();
BasePointEventMsg pointEventMsg = new BasePointEventMsg();
pointEventMsg.setCustomerId(groupCache.getCustomerId());

8
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/redis/ResiPartyMemberRedis.java

@ -63,7 +63,6 @@ public class ResiPartyMemberRedis {
logger.info(String.format("居民端热心居民申请提交,更新redis-reddot值成功,key[%s],Value[%s]", workGrassrootsResiRedDotKey, auditingResiWarmHeartedCount));
} catch (Exception e) {
logger.error(String.format("居民端热心居民申请提交,更新redis-reddot值异常%s", e.getMessage()));
e.printStackTrace();
}
return auditingResiWarmHeartedCount;
}
@ -83,7 +82,6 @@ public class ResiPartyMemberRedis {
logger.info(String.format("政府端(wxmp)审核热心居民申请,更新redis-reddot值成功,key[%s],Value[%s]", workGrassrootsPartyAuthRedDotKey, auditingPartyMemberCount));
} catch (Exception e) {
logger.error(String.format("政府端(wxmp)审核热心居民申请,更新redis-reddot值异常%s", e.getMessage()));
e.printStackTrace();
}
return auditingPartyMemberCount;
}
@ -103,7 +101,6 @@ public class ResiPartyMemberRedis {
logger.info(String.format("居民端党员认证补充信息提交,更新redis-reddot值成功,key[%s],Value[%s]", workGrassrootsPartyAuthRedDotKey, auditingPartyMemberCount));
} catch (Exception e) {
logger.error(String.format("居民端党员认证补充信息提交,更新redis-reddot值异常%s", e.getMessage()));
e.printStackTrace();
}
return auditingPartyMemberCount;
}
@ -123,7 +120,6 @@ public class ResiPartyMemberRedis {
logger.info(String.format("居民端党员认证补充信息提交,更新redis-reddot值成功,key[%s],Value[%s]", workGrassrootsPartyAuthRedDotKey, auditingPartyMemberCount));
} catch (Exception e) {
logger.error(String.format("居民端党员认证补充信息提交,更新redis-reddot值异常%s", e.getMessage()));
e.printStackTrace();
}
return auditingPartyMemberCount;
}
@ -142,7 +138,6 @@ public class ResiPartyMemberRedis {
auditingResiWarmHeartedCount = (Integer) redisUtils.get(workGrassrootsResiRedDotKey);
} catch (Exception e) {
logger.error(String.format("网格id%s,查询网格下待审核热心居民总数异常%s", gridId, e.getMessage()));
e.printStackTrace();
}
return auditingResiWarmHeartedCount;
}
@ -161,8 +156,7 @@ public class ResiPartyMemberRedis {
auditingParyMember = (Integer) redisUtils.get(workGrassrootsResiRedDotKey);
} catch (Exception e) {
logger.error(String.format("网格id%s,查询网格下待审核党员总数异常%s", gridId, e.getMessage()));
e.printStackTrace();
}
return auditingParyMember;
}
}
}

4
epmet-openapi/epmet-openapi-scan/src/main/java/com/epmet/openapi/scan/common/util/HttpClientManager.java

@ -79,7 +79,7 @@ public class HttpClientManager {
return execute(httppost);
} catch (Exception e) {
e.printStackTrace();
log.error("method exception", e);
log.error("send exception", e);
return new Result<String>().error(8000, e.getMessage());
}
@ -106,7 +106,7 @@ public class HttpClientManager {
}
return execute(httppost);
} catch (Exception e) {
e.printStackTrace();
log.error("method exception", e);
log.error("send exception", e);
return new Result<String>().error(8000, e.getMessage());
}

5
epmet-openapi/epmet-openapi-scan/src/test/java/BaseSample.java

@ -1,9 +1,12 @@
import lombok.extern.slf4j.Slf4j;
import java.io.IOException;
import java.util.Properties;
/**
* Created by liuhai.lh on 17/01/12.
*/
@Slf4j
public class BaseSample {
protected static String accessKeyId = "123";
@ -20,7 +23,7 @@ public class BaseSample {
accessKeySecret = properties.getProperty("aliyun.green.accessKeySecret");
regionId = properties.getProperty("aliyun.green.url");
} catch(IOException e) {
e.printStackTrace();
log.error("method exception", e);
}
}

8
epmet-openapi/epmet-openapi-scan/src/test/java/ImageAsyncScanRequestSample.java

@ -11,6 +11,7 @@ import com.aliyuncs.http.HttpResponse;
import com.aliyuncs.profile.DefaultProfile;
import com.aliyuncs.profile.IClientProfile;
import com.epmet.openapi.scan.common.enu.RegionIdEnum;
import lombok.extern.slf4j.Slf4j;
import java.util.*;
@ -20,6 +21,7 @@ import java.util.*;
* @author liuhai.lh
* @date 2017/02/17
*/
@Slf4j
public class ImageAsyncScanRequestSample extends BaseSample{
public static void main(String[] args) throws Exception {
@ -85,11 +87,11 @@ public class ImageAsyncScanRequestSample extends BaseSample{
System.out.println("response not success. status:" + httpResponse.getStatus());
}
} catch (ServerException e) {
e.printStackTrace();
log.error("method exception", e);
} catch (ClientException e) {
e.printStackTrace();
log.error("method exception", e);
} catch (Exception e){
e.printStackTrace();
log.error("method exception", e);
}
}
}

8
epmet-openapi/epmet-openapi-scan/src/test/java/ImageAsyncScanResultsSample.java

@ -10,6 +10,7 @@ import com.aliyuncs.http.FormatType;
import com.aliyuncs.http.HttpResponse;
import com.aliyuncs.profile.DefaultProfile;
import com.aliyuncs.profile.IClientProfile;
import lombok.extern.slf4j.Slf4j;
import java.util.ArrayList;
import java.util.List;
@ -20,6 +21,7 @@ import java.util.List;
* @author liuhai.lh
* @date 2017/02/17
*/
@Slf4j
public class ImageAsyncScanResultsSample extends BaseSample{
public static void main(String[] args) throws Exception {
@ -73,11 +75,11 @@ public class ImageAsyncScanResultsSample extends BaseSample{
System.out.println("response not success. status:" + httpResponse.getStatus());
}
} catch (ServerException e) {
e.printStackTrace();
log.error("method exception", e);
} catch (ClientException e) {
e.printStackTrace();
log.error("method exception", e);
} catch (Exception e){
e.printStackTrace();
log.error("method exception", e);
}
}
}

8
epmet-openapi/epmet-openapi-scan/src/test/java/ImageSyncScanRequestSample.java

@ -10,6 +10,7 @@ import com.aliyuncs.http.FormatType;
import com.aliyuncs.http.HttpResponse;
import com.aliyuncs.profile.DefaultProfile;
import com.aliyuncs.profile.IClientProfile;
import lombok.extern.slf4j.Slf4j;
import java.util.*;
@ -19,6 +20,7 @@ import java.util.*;
* @author liuhai.lh
* @date 2017/02/17
*/
@Slf4j
public class ImageSyncScanRequestSample extends BaseSample {
@ -91,11 +93,11 @@ public class ImageSyncScanRequestSample extends BaseSample {
System.out.println("response not success. status:" + httpResponse.getStatus());
}
} catch (ServerException e) {
e.printStackTrace();
log.error("method exception", e);
} catch (ClientException e) {
e.printStackTrace();
log.error("method exception", e);
} catch (Exception e){
e.printStackTrace();
log.error("method exception", e);
}
}
}

4
epmet-openapi/epmet-openapi-scan/src/test/java/VoiceAsyncScanRequestSample.java

@ -8,6 +8,7 @@ import com.aliyuncs.http.FormatType;
import com.aliyuncs.http.HttpResponse;
import com.aliyuncs.profile.DefaultProfile;
import com.aliyuncs.profile.IClientProfile;
import lombok.extern.slf4j.Slf4j;
import java.util.*;
@ -17,6 +18,7 @@ import java.util.*;
* @author yinzuomei@elink-cn.com
* @date 2020/12/8 21:51
*/
@Slf4j
public class VoiceAsyncScanRequestSample extends BaseSample {
@ -83,7 +85,7 @@ public class VoiceAsyncScanRequestSample extends BaseSample {
System.out.println("response not success. status: " + httpResponse.getStatus());
}
} catch (Exception e) {
e.printStackTrace();
log.error("method exception", e);
}
}

6
epmet-openapi/epmet-openapi-scan/src/test/java/VoiceAsyncScanResultsRequestSample.java

@ -8,6 +8,7 @@ import com.aliyuncs.http.FormatType;
import com.aliyuncs.http.HttpResponse;
import com.aliyuncs.profile.DefaultProfile;
import com.aliyuncs.profile.IClientProfile;
import lombok.extern.slf4j.Slf4j;
import java.util.*;
@ -17,6 +18,7 @@ import java.util.*;
* @author yinzuomei@elink-cn.com
* @date 2020/12/8 22:08
*/
@Slf4j
public class VoiceAsyncScanResultsRequestSample extends BaseSample {
@ -39,7 +41,7 @@ public class VoiceAsyncScanResultsRequestSample extends BaseSample {
// 设置每10秒查询一次。
Thread.sleep(10 * 1000);
JSONObject scanResult = getScanResult(client, taskIdList);
System.out.println("接口完整返参:"+JSON.toJSONString(scanResult, true));
System.out.println("接口完整返参:" + JSON.toJSONString(scanResult, true));
if (scanResult == null || 200 != scanResult.getInteger("code")) {
failCount++;
System.out.println("请求失败,get result fail, failCount=" + failCount);
@ -106,7 +108,7 @@ public class VoiceAsyncScanResultsRequestSample extends BaseSample {
System.out.println("response not success. status: " + httpResponse.getStatus());
}
} catch (Exception e) {
e.printStackTrace();
log.error("method exception", e);
}
return null;
}

2
epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcNatController.java

@ -212,7 +212,7 @@ public class IcNatController implements ResultDataResolver {
os = new FileOutputStream(fileSavePath.toString());
IOUtils.copy(is, os);
} catch (Exception e) {
e.printStackTrace();
log.error("method exception", e);
} finally {
org.apache.poi.util.IOUtils.closeQuietly(is);
org.apache.poi.util.IOUtils.closeQuietly(os);

2
epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java

@ -756,7 +756,7 @@ public class IcResiUserController implements ResultDataResolver {
log.info("[我是子线程]:" + EpmetRequestHolder.getHeader("app"));
System.out.println("---");
} catch (InterruptedException e) {
e.printStackTrace();
log.error("method exception", e);
}
icResiUserImportService.testAsync();
});

2
epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcTripReportRecordController.java

@ -252,7 +252,7 @@ public class IcTripReportRecordController implements ResultDataResolver {
os = new FileOutputStream(fileSavePath.toString());
IOUtils.copy(is, os);
} catch (Exception e) {
e.printStackTrace();
log.error("method exception", e);
} finally {
org.apache.poi.util.IOUtils.closeQuietly(is);
org.apache.poi.util.IOUtils.closeQuietly(os);

2
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java

@ -403,7 +403,7 @@ public class CustomerStaffServiceImpl extends BaseServiceImpl<CustomerStaffDao,
}
logger.info("修改用户信息:修改用户已缓存的角色列表成功");
} catch (Exception e) {
e.printStackTrace();
log.error("method exception", e);
logger.error("修改用户信息:修改用户已缓存的角色列表异常:{}", ExceptionUtils.getErrorStackTrace(e));
}

2
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcNatServiceImpl.java

@ -393,7 +393,7 @@ public class IcNatServiceImpl extends BaseServiceImpl<IcNatDao, IcNatEntity> imp
try {
Files.delete(filePath);
} catch (IOException e) {
e.printStackTrace();
log.error("method exception", e);
}
}
}

2
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserImportServiceImpl.java

@ -1078,7 +1078,7 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res
ParameterizedTypeReference<Result<List<OptionResultDTO>>> tr = new ParameterizedTypeReference<Result<List<OptionResultDTO>>>() {};
response = new RestTemplate().exchange(url, HttpMethod.POST, null, tr);
} catch (NacosException e) {
e.printStackTrace();
log.error("method exception", e);
}
if (response != null && (response.getStatusCode() == HttpStatus.OK)) {

4
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcTripReportRecordServiceImpl.java

@ -406,7 +406,7 @@ public class IcTripReportRecordServiceImpl extends BaseServiceImpl<IcTripReportR
try {
Files.delete(filePath);
} catch (IOException e) {
e.printStackTrace();
log.error("method exception", e);
}
}
}
@ -426,4 +426,4 @@ public class IcTripReportRecordServiceImpl extends BaseServiceImpl<IcTripReportR
baseDao.insert(e);
});
}
}
}

4
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/StaffPatrolRecordServiceImpl.java

@ -559,7 +559,7 @@ public class StaffPatrolRecordServiceImpl extends BaseServiceImpl<StaffPatrolRec
formDTO.setPageNo(formDTO.getPageNo() + NumConstant.ONE);
} while (num == formDTO.getPageSize());
} catch (Exception e) {
e.printStackTrace();
log.error("method exception", e);
} finally {
if (excelWriter != null) {
excelWriter.finish();
@ -592,7 +592,7 @@ public class StaffPatrolRecordServiceImpl extends BaseServiceImpl<StaffPatrolRec
name.append(format2.format(format1.parse(formDTO.getEndTime()))).append("累计值");
}
} catch (Exception e) {
e.printStackTrace();
log.error("method exception", e);
}
return name.toString();
}

Loading…
Cancel
Save