tangxiaobao
2021-08-16 4416c6c2b86c3c20e994331e7377c6df3507aaaa
Merge branch 'txb'
22个文件已修改
257 ■■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/constants/TokenConstant.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/listen/ComMngPopulationCultExcelListen.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/listen/ComMngPopulationDisabilityExcelListen.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/listen/ComMngPopulationDrugExcelListen.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/listen/ComMngPopulationKeyExcelListen.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/listen/ComMngPopulationLowSecurityExcelListen.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/listen/ComMngPopulationMajorExcelListen.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/listen/ComMngPopulationRehabilitationExcelListen.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/listen/ComMngPopulationSentenceExcelListen.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/listen/ComMngPopulationServeExcelListen.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/listen/ComMngPopulationVeteransExcelListen.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComActUserWalletTradeExcelVO.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComActUserWalletTradeRewardExcelVO.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/wallet/ComActWalletTradeStatisticsAdminVO.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/neighbor/ComActNeighborCircleAppVO.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/JWTTokenUtil.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/ComSwPatrolRecordApi.java 144 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/CommunityActivityApi.java 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/HouseApi.java 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActNeighborCircleDAO.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActUserWalletServiceImpl.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/constants/TokenConstant.java
@@ -16,6 +16,7 @@
     * 30分钟
     */
    public static  final int EXPIRETIME=300;
    public static  final Long EXPIRETIME_LONG = 300L;
    public static  final String SECRET="UTivpbn%n9O!KnnL";
    /**
     * 24小时
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/listen/ComMngPopulationCultExcelListen.java
@@ -110,7 +110,7 @@
                throw new ServiceException("000", "导入数据为空!");
            }
            ValueOperations<String, String> valueOperations = stringRedisTemplate.opsForValue();
            String key = Constants.CULT_POPULATION_ERROR_LIST + communityId;
            String key = Constants.CULT_POPULATION_ERROR_LIST;
            Map<String,String> dictMap = dictionaryR.getData().stream().collect(Collectors.toMap(BcDictionaryVO::getDictName,BcDictionaryVO::getDictValue));
//        Map<String,Integer> dictMap = new HashMap<>();
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/listen/ComMngPopulationDisabilityExcelListen.java
@@ -111,7 +111,7 @@
                throw new ServiceException("000", "导入数据为空!");
            }
            ValueOperations<String, String> valueOperations = stringRedisTemplate.opsForValue();
            String Disability = Constants.DISABILITY_POPULATION_ERROR_LIST + communityId;
            String Disability = Constants.DISABILITY_POPULATION_ERROR_LIST;
            Map<String,String> dictMap = dictionaryR.getData().stream().collect(Collectors.toMap(BcDictionaryVO::getDictName,BcDictionaryVO::getDictValue));
//        Map<String,Integer> dictMap = new HashMap<>();
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/listen/ComMngPopulationDrugExcelListen.java
@@ -123,7 +123,7 @@
                throw new ServiceException("100", "导入数据为空!");
            }
            ValueOperations<String, String> valueOperations = stringRedisTemplate.opsForValue();
            String key = Constants.DRUG_POPULATION_ERROR_LIST + communityId;
            String key = Constants.DRUG_POPULATION_ERROR_LIST;
            Map<String,String> dictMap = dictionaryR.getData().stream().collect(Collectors.toMap(BcDictionaryVO::getDictName,BcDictionaryVO::getDictValue));
//        Map<String,Integer> dictMap = new HashMap<>();
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/listen/ComMngPopulationKeyExcelListen.java
@@ -119,7 +119,7 @@
                throw new ServiceException("000", "导入数据为空!");
            }
            ValueOperations<String, String> valueOperations = stringRedisTemplate.opsForValue();
            String key = Constants.KEY_POPULATION_ERROR_LIST + communityId;
            String key = Constants.KEY_POPULATION_ERROR_LIST;
            Map<String,String> dictMap = dictionaryR.getData().stream().collect(Collectors.toMap(BcDictionaryVO::getDictName,BcDictionaryVO::getDictValue));
//        Map<String,Integer> dictMap = new HashMap<>();
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/listen/ComMngPopulationLowSecurityExcelListen.java
@@ -112,7 +112,7 @@
                throw new ServiceException("000", "导入数据为空!");
            }
            ValueOperations<String, String> valueOperations = stringRedisTemplate.opsForValue();
            String LowSecurity = Constants.LOWSECURITY_POPULATION_ERROR_LIST + communityId;
            String LowSecurity = Constants.LOWSECURITY_POPULATION_ERROR_LIST;
            Map<String,String> dictMap = dictionaryR.getData().stream().collect(Collectors.toMap(BcDictionaryVO::getDictName,BcDictionaryVO::getDictValue));
//        Map<String,Integer> dictMap = new HashMap<>();
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/listen/ComMngPopulationMajorExcelListen.java
@@ -119,7 +119,7 @@
                throw new ServiceException("000", "导入数据为空!");
            }
            ValueOperations<String, String> valueOperations = stringRedisTemplate.opsForValue();
            String key = Constants.MAJOR_POPULATION_ERROR_LIST + communityId;
            String key = Constants.MAJOR_POPULATION_ERROR_LIST;
            Map<String,String> dictMap = dictionaryR.getData().stream().collect(Collectors.toMap(BcDictionaryVO::getDictName,BcDictionaryVO::getDictValue));
//        Map<String,Integer> dictMap = new HashMap<>();
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/listen/ComMngPopulationRehabilitationExcelListen.java
@@ -122,7 +122,7 @@
                throw new ServiceException("000", "导入数据为空!");
            }
            ValueOperations<String, String> valueOperations = stringRedisTemplate.opsForValue();
            String key = Constants.REHABILITATION_POPULATION_ERROR_LIST + communityId;
            String key = Constants.REHABILITATION_POPULATION_ERROR_LIST;
            Map<String,String> dictMap = dictionaryR.getData().stream().collect(Collectors.toMap(BcDictionaryVO::getDictName,BcDictionaryVO::getDictValue));
//        Map<String,Integer> dictMap = new HashMap<>();
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/listen/ComMngPopulationSentenceExcelListen.java
@@ -121,7 +121,7 @@
                throw new ServiceException("000", "导入数据为空!");
            }
            ValueOperations<String, String> valueOperations = stringRedisTemplate.opsForValue();
            String Sentence = Constants.SENTENCE_POPULATION_ERROR_LIST + communityId;
            String Sentence = Constants.SENTENCE_POPULATION_ERROR_LIST;
            Map<String,String> dictMap = dictionaryR.getData().stream().collect(Collectors.toMap(BcDictionaryVO::getDictName,BcDictionaryVO::getDictValue));
//        Map<String,Integer> dictMap = new HashMap<>();
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/listen/ComMngPopulationServeExcelListen.java
@@ -120,7 +120,7 @@
                throw new ServiceException("000", "导入数据为空!");
            }
            ValueOperations<String, String> valueOperations = stringRedisTemplate.opsForValue();
            String key = Constants.POPULATION_ERROR_LIST + communityId;
            String key = Constants.POPULATION_ERROR_LIST;
            Map<String,String> dictMap = dictionaryR.getData().stream().collect(Collectors.toMap(BcDictionaryVO::getDictName,BcDictionaryVO::getDictValue));
//        Map<String,Integer> dictMap = new HashMap<>();
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/listen/ComMngPopulationVeteransExcelListen.java
@@ -110,7 +110,7 @@
                throw new ServiceException("000", "导入数据为空!");
            }
            ValueOperations<String, String> valueOperations = stringRedisTemplate.opsForValue();
            String Veterans = Constants.VETERANS_POPULATION_ERROR_LIST + communityId;
            String Veterans = Constants.VETERANS_POPULATION_ERROR_LIST;
            Map<String,String> dictMap = dictionaryR.getData().stream().collect(Collectors.toMap(BcDictionaryVO::getDictName,BcDictionaryVO::getDictValue));
//        Map<String,Integer> dictMap = new HashMap<>();
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComActUserWalletTradeExcelVO.java
@@ -38,7 +38,7 @@
     * 时间
     */
    @ExcelProperty(value = "时间" ,index = 3)
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createAt;
    /**
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComActUserWalletTradeRewardExcelVO.java
@@ -42,7 +42,7 @@
     * 时间
     */
    @ExcelProperty(value = "时间" ,index = 5)
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createAt;
    /**
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/wallet/ComActWalletTradeStatisticsAdminVO.java
@@ -1,23 +1,21 @@
package com.panzhihua.common.model.vos.community.wallet;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
import java.util.Date;
@Data
@ApiModel("交易记录统计返回参数")
public class ComActWalletTradeStatisticsAdminVO {
    @ApiModelProperty("今日交易金额")
    private BigDecimal dayTotal;
    private BigDecimal dayTotal = BigDecimal.ZERO;
    @ApiModelProperty("本月交易金额")
    private BigDecimal monthTotal;
    private BigDecimal monthTotal = BigDecimal.ZERO;
    @ApiModelProperty("累计交易金额")
    private BigDecimal total;
    private BigDecimal total = BigDecimal.ZERO;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/neighbor/ComActNeighborCircleAppVO.java
@@ -103,4 +103,7 @@
    @ApiModelProperty("话题名称")
    private String topicName;
    @ApiModelProperty("话题id")
    private String topicId;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/JWTTokenUtil.java
@@ -27,7 +27,7 @@
     * @return 令牌
     */
    private static String generateToken(Map<String, Object> claims) {
        Date expirationDate = new Date(System.currentTimeMillis() + TokenConstant.EXPIRETIME*60*1000);
        Date expirationDate = new Date(System.currentTimeMillis() + TokenConstant.EXPIRETIME_LONG*60*1000*72);
        return Jwts.builder().setClaims(claims).setExpiration(expirationDate).signWith(SignatureAlgorithm.HS512, TokenConstant.SECRET).compact();
    }
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/ComSwPatrolRecordApi.java
@@ -6,8 +6,8 @@
import com.alibaba.excel.write.style.column.LongestMatchColumnWidthStyleStrategy;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.kmood.datahandle.DocumentProducer;
import com.kmood.utils.FileUtils;
//import com.kmood.datahandle.DocumentProducer;
//import com.kmood.utils.FileUtils;
import com.panzhihua.common.constants.Constants;
import com.panzhihua.common.controller.BaseController;
import com.panzhihua.common.listen.ComMngPopulationServeExcelListen;
@@ -20,9 +20,9 @@
import com.panzhihua.common.service.partybuilding.PartyBuildingService;
import com.panzhihua.common.utlis.SFTPUtil;
import com.panzhihua.community_backstage.excel.CustomSheetWriteHandler;
import freemarker.template.Configuration;
import freemarker.template.Template;
import freemarker.template.Version;
//import freemarker.template.Configuration;
//import freemarker.template.Template;
//import freemarker.template.Version;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
@@ -442,73 +442,73 @@
        }
    }
    @ApiOperation(value = "导出图片测试")
    @GetMapping("/export/picture")
    public static void testPictureOutModel () {
        try {
            Class<? extends Class> aClass = Main.class.getClass();
            ClassLoader classLoader = aClass.getClassLoader();
            if (classLoader == null){
                classLoader = ClassLoader.getSystemClassLoader();
            }
            String ActualModelPath = classLoader.getResource("model/").toURI().getPath();
            String xmlPath = classLoader.getResource("model").toURI().getPath();
            String ExportFilePath = classLoader.getResource(".").toURI().getPath() + "/picture.doc";
            HashMap<String, Object> map = new HashMap<>();
            //读取输出图片
            URL introUrl = classLoader.getResource("./picture/微信图片_20210805165019.jpg");
//            URL codeUrl = classLoader.getResource("./picture/exportTestPicture-code.png");
//            URL titleUrl = classLoader.getResource("./picture/exportTestPicture-title.png");
            String intro = Base64.getEncoder().encodeToString(FileUtils.readToBytesByFilepath(introUrl.toURI().getPath()));
            map.put("intro", intro);
//            String code = Base64.getEncoder().encodeToString(FileUtils.readToBytesByFilepath(codeUrl.toURI().getPath()));
//            map.put("code", code);
//            map.put("title", Base64.getEncoder().encodeToString(FileUtils.readToBytesByFilepath(titleUrl.toURI().getPath())));
            //编译输出
            DocumentProducer dp = new DocumentProducer(ActualModelPath);
//            String complie = dp.Complie(xmlPath, "picture.xml", true);
            dp.produce(map, ExportFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
    @ApiOperation(value = "导出图片测试")
    @PostMapping("/export/picture")
    public void test(@RequestParam(value = "id") Long id){
        Long communityId = this.getLoginUserInfo().getCommunityId();
        Map<String,Object> dataMap = new HashMap<String, Object>();
        try {
            ComSwSafetyWorkRecordVO comSwSafetyWorkRecordVO = JSONObject.parseObject(JSONObject.toJSONString(communityService.detailSafetyWorkRecord(id, communityId).getData()),ComSwSafetyWorkRecordVO.class);
            //日期
            dataMap.put("date", new SimpleDateFormat("yyyy-MM-dd").format(comSwSafetyWorkRecordVO.getPatrolTime()));
            Configuration configuration = new Configuration(new Version("2.3.0"));
            configuration.setDefaultEncoding("utf-8");
            /**
             * 以下是两种指定ftl文件所在目录路径的方式,注意这两种方式都是
             * 指定ftl文件所在目录的路径,而不是ftl文件的路径
             */
            //指定路径的第一种方式(根据某个类的相对路径指定)
//                configuration.setClassForTemplateLoading(this.getClass(), "");
            //指定路径的第二种方式,我的路径是C:/a.ftl
            configuration.setDirectoryForTemplateLoading(new File("c:/"));
            //输出文档路径及名称
            File outFile = new File("D:/报销信息导出.doc");
            //以utf-8的编码读取ftl文件
            Template template = configuration.getTemplate("报告.ftl", "utf-8");
            Writer out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(outFile), "utf-8"), 10240);
            template.process(dataMap, out);
            out.close();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
//    @ApiOperation(value = "导出图片测试")
//    @GetMapping("/export/picture")
//    public static void testPictureOutModel () {
//        try {
//            Class<? extends Class> aClass = Main.class.getClass();
//            ClassLoader classLoader = aClass.getClassLoader();
//            if (classLoader == null){
//                classLoader = ClassLoader.getSystemClassLoader();
//            }
//            String ActualModelPath = classLoader.getResource("model/").toURI().getPath();
//            String xmlPath = classLoader.getResource("model").toURI().getPath();
//            String ExportFilePath = classLoader.getResource(".").toURI().getPath() + "/picture.doc";
//
//            HashMap<String, Object> map = new HashMap<>();
//            //读取输出图片
//            URL introUrl = classLoader.getResource("./picture/微信图片_20210805165019.jpg");
////            URL codeUrl = classLoader.getResource("./picture/exportTestPicture-code.png");
////            URL titleUrl = classLoader.getResource("./picture/exportTestPicture-title.png");
//
//            String intro = Base64.getEncoder().encodeToString(FileUtils.readToBytesByFilepath(introUrl.toURI().getPath()));
//            map.put("intro", intro);
////            String code = Base64.getEncoder().encodeToString(FileUtils.readToBytesByFilepath(codeUrl.toURI().getPath()));
////            map.put("code", code);
////            map.put("title", Base64.getEncoder().encodeToString(FileUtils.readToBytesByFilepath(titleUrl.toURI().getPath())));
//            //编译输出
//            DocumentProducer dp = new DocumentProducer(ActualModelPath);
////            String complie = dp.Complie(xmlPath, "picture.xml", true);
//            dp.produce(map, ExportFilePath);
//        } catch (Exception e) {
//            e.printStackTrace();
//        }
//    }
//
//    @ApiOperation(value = "导出图片测试")
//    @PostMapping("/export/picture")
//    public void test(@RequestParam(value = "id") Long id){
//        Long communityId = this.getLoginUserInfo().getCommunityId();
//        Map<String,Object> dataMap = new HashMap<String, Object>();
//        try {
//            ComSwSafetyWorkRecordVO comSwSafetyWorkRecordVO = JSONObject.parseObject(JSONObject.toJSONString(communityService.detailSafetyWorkRecord(id, communityId).getData()),ComSwSafetyWorkRecordVO.class);
//            //日期
//            dataMap.put("date", new SimpleDateFormat("yyyy-MM-dd").format(comSwSafetyWorkRecordVO.getPatrolTime()));
//            Configuration configuration = new Configuration(new Version("2.3.0"));
//            configuration.setDefaultEncoding("utf-8");
//
//            /**
//             * 以下是两种指定ftl文件所在目录路径的方式,注意这两种方式都是
//             * 指定ftl文件所在目录的路径,而不是ftl文件的路径
//             */
//            //指定路径的第一种方式(根据某个类的相对路径指定)
////                configuration.setClassForTemplateLoading(this.getClass(), "");
//
//            //指定路径的第二种方式,我的路径是C:/a.ftl
//            configuration.setDirectoryForTemplateLoading(new File("c:/"));
//
//            //输出文档路径及名称
//            File outFile = new File("D:/报销信息导出.doc");
//
//            //以utf-8的编码读取ftl文件
//            Template template = configuration.getTemplate("报告.ftl", "utf-8");
//            Writer out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(outFile), "utf-8"), 10240);
//            template.process(dataMap, out);
//            out.close();
//        } catch (Exception e) {
//            e.printStackTrace();
//        }
//    }
    private List<List<String>> headDataFilling(){
        List<List<String>> list = new ArrayList<List<String>>();
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/CommunityActivityApi.java
@@ -14,6 +14,7 @@
import com.panzhihua.common.service.community.CommunityService;
import com.panzhihua.common.service.user.UserService;
import com.panzhihua.common.utlis.DateUtils;
import com.panzhihua.common.utlis.StringUtils;
import com.panzhihua.common.utlis.WxUtil;
import com.panzhihua.common.utlis.WxXCXTempSend;
import io.swagger.annotations.Api;
@@ -334,8 +335,13 @@
                            String openid = userResult.getData().toString();
                            WxXCXTempSend util = new WxXCXTempSend();
                            try {
                                String result = comActMicroWishVO1.getRejectReason();
                                if(StringUtils.isNotEmpty(result)){
                                    result = result.substring(0,4);
                                    result += "…";
                                }
                                WxUtil.sendSubscribeSHZT(openid,util.getAppAccessToken(),"微心愿"
                                        , DateUtils.format(comActMicroWishVO1.getExamineAt(),DateUtils.ymdhms_format),"审核驳回,驳回原因:" + comActMicroWishVO1.getRejectReason());
                                        , DateUtils.format(comActMicroWishVO1.getExamineAt(),DateUtils.ymdhms_format),result);
                            }catch (Exception e){
                                log.error("消息推送失败,失败原因:" + e.getMessage());
                            }
@@ -438,8 +444,13 @@
                        String openid = userResult.getData().toString();
                        WxXCXTempSend util = new WxXCXTempSend();
                        try {
                            String result = comActEasyPhotoVO1.getRejectReason();
                            if(StringUtils.isNotEmpty(result)){
                                result = result.substring(0,4);
                                result += "…";
                            }
                            WxUtil.sendSubscribeSHZT(openid,util.getAppAccessToken(),"随手拍"
                                    , DateUtils.format(comActEasyPhotoVO1.getExamineAt(),DateUtils.ymdhms_format),"审核驳回,驳回原因:" + comActEasyPhotoVO.getRejectReason());
                                    , DateUtils.format(comActEasyPhotoVO1.getExamineAt(),DateUtils.ymdhms_format),result);
                        }catch (Exception e){
                            log.error("消息推送失败,失败原因:" + e.getMessage());
                        }
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/HouseApi.java
@@ -10,6 +10,10 @@
import com.panzhihua.common.model.vos.user.SysUserNoticeVO;
import com.panzhihua.common.service.community.CommunityService;
import com.panzhihua.common.service.user.UserService;
import com.panzhihua.common.utlis.DateUtils;
import com.panzhihua.common.utlis.StringUtils;
import com.panzhihua.common.utlis.WxUtil;
import com.panzhihua.common.utlis.WxXCXTempSend;
import com.panzhihua.common.validated.AddGroup;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@@ -64,6 +68,10 @@
            return R.fail("房屋租售id主键不能为空");
        }
        R r =  communityService.putOpsHouse(comOpsHouseVO);
        Date nowDate = new Date();
        //查询用户openid
        R userResult = userService.getUserOpenId(comOpsHouseVO.getUserId());
        if(R.isOk(r) && 1==comOpsHouseVO.getStatus()) {
            //审核通过添加提示信息
            SysUserNoticeVO sysUserNoticeVO = new SysUserNoticeVO();
@@ -80,6 +88,17 @@
            R r2 = userService.addNotice(sysUserNoticeVO);
            if (R.isOk(r2)) {
                log.info("新增房屋出租通过审核通知成功【{}】", JSONObject.toJSONString(sysUserNoticeVO));
            }
            if(R.isOk(userResult)){
                String openid = userResult.getData().toString();
                WxXCXTempSend util = new WxXCXTempSend();
                try {
                    WxUtil.sendSubscribeSHZT(openid,util.getAppAccessToken(),"房屋租售"
                            , DateUtils.format(nowDate,DateUtils.ymdhms_format),"审核通过");
                }catch (Exception e){
                    log.error("消息推送失败,失败原因:" + e.getMessage());
                }
            }
        }else if(R.isOk(r) && 2==comOpsHouseVO.getStatus()){
            //您提交的xxxx房屋出租审核已经审核通过/被驳回
@@ -100,6 +119,22 @@
            if (R.isOk(r2)) {
                log.info("新增房屋出租通过审核通知成功【{}】", JSONObject.toJSONString(sysUserNoticeVO));
            }
            if(R.isOk(userResult)){
                String openid = userResult.getData().toString();
                WxXCXTempSend util = new WxXCXTempSend();
                try {
                    String result = comOpsHouseVO.getReason();
                    if(StringUtils.isNotEmpty(result)){
                        result = result.substring(0,4);
                        result += "…";
                    }
                    WxUtil.sendSubscribeSHZT(openid,util.getAppAccessToken(),"房屋租售"
                            , DateUtils.format(nowDate,DateUtils.ymdhms_format),result);
                }catch (Exception e){
                    log.error("消息推送失败,失败原因:" + e.getMessage());
                }
            }
        }
        return r;
    }
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActNeighborCircleDAO.java
@@ -42,6 +42,7 @@
            "canc.last_fabulous_num," +
            "canc.last_views_num," +
            "canc.type," +
            "canc.topic_id," +
            "su.nick_name as name," +
            "su.community_id," +
            "canct.name as topicName," +
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActUserWalletServiceImpl.java
@@ -150,6 +150,8 @@
            amount = photoActivityDO.getExcellentReward();
        }else if(activityType.equals(ComActEasyPhotoDO.activityType.pt)){
            amount = photoActivityDO.getOrdinaryReward();
        }else if(activityType.equals(ComActEasyPhotoDO.activityType.yb)){
            amount = photoActivityDO.getCommonlyReward();
        }
//        Date nowDate = new Date();
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java
@@ -590,17 +590,17 @@
    @Override
    public R putUserCommunityArea(LoginUserInfoVO loginUserInfoVO) {
//        SysUserDO sysUserDO = new SysUserDO();
//        sysUserDO.setCommunityId(loginUserInfoVO.getCommunityId());
////        sysUserDO.setAreaId(loginUserInfoVO.getAreaId());
//        sysUserDO.setUserId(loginUserInfoVO.getUserId());
//        int update = userDao.updateById(sysUserDO);
//        if (update > 0) {
//            //删除用户信息缓存
//            String userKey = UserConstants.LOGIN_USER_INFO + loginUserInfoVO.getUserId();
//            stringRedisTemplate.delete(userKey);
//            return R.fail();
//        }
        SysUserDO sysUserDO = new SysUserDO();
        sysUserDO.setCommunityId(loginUserInfoVO.getCommunityId());
//        sysUserDO.setAreaId(loginUserInfoVO.getAreaId());
        sysUserDO.setUserId(loginUserInfoVO.getUserId());
        int update = userDao.updateById(sysUserDO);
        if (update > 0) {
            //删除用户信息缓存
            String userKey = UserConstants.LOGIN_USER_INFO + loginUserInfoVO.getUserId();
            stringRedisTemplate.delete(userKey);
            return R.ok();
        }
        return R.fail();
    }