lidongdong
2022-10-24 bd927f5c9f26d5ae89a272e56a4b3bd655bd148f
Merge remote-tracking branch 'origin/huacheng_test' into huacheng_test
22个文件已修改
1个文件已添加
432 ■■■■■ 已修改文件
flower_city/src/main/java/com/dg/core/api/TransactionEventAppletsController.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
flower_city/src/main/java/com/dg/core/controller/TransactionEventController.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
flower_city/src/main/java/com/dg/core/service/ITransactionEventService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
flower_city/src/main/java/com/dg/core/service/impl/GuideRepairOrderServiceImpl.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
flower_city/src/main/java/com/dg/core/service/impl/TransactionEventImpl.java 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComActActivityVO.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/partybuilding/PartyBuildingComPbDynVO.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/partybuilding/west/PartyBuildingComPbDynVO.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/WxXCXTempSend.java 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComEventTransferRecordMapper.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/message/AcidMessage.java 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComActDO.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActActivityServiceImpl.java 27 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComBatteryCommodityOrderBargainServiceImpl.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComBatteryCommodityOrderCollageTeamServiceImpl.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComBatteryCommodityOrderServiceImpl.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComEventServiceImpl.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActActivityMapper.xml 21 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComEventTransferRecordMapper.xml 150 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/test/java/com/panzhihua/service_community/service/impl/ComEventServiceImplTest.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/dao/ComPbDynDAO.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/impl/ComPbMemberWestServiceImpl.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/resources/mapper/ComPbDynMapper.xml 71 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
flower_city/src/main/java/com/dg/core/api/TransactionEventAppletsController.java
@@ -50,9 +50,9 @@
     */
    @ApiOperation(value = "导办事物列表(不分页)",response = TransactionEvent.class)
    @GetMapping("/selectList")
    public TableDataInfo selectList()
    public TableDataInfo selectList(@RequestParam(value = "keyWord",required = false) String keyWord)
    {
        return getDataTable(iTransactionEventService.selectList());
        return getDataTable(iTransactionEventService.selectList(keyWord));
    }
flower_city/src/main/java/com/dg/core/controller/TransactionEventController.java
@@ -80,9 +80,9 @@
     */
    @ApiOperation(value = "导办事物列表(不分页)",response = TransactionEvent.class)
    @GetMapping("/selectList")
    public TableDataInfo selectList()
    public TableDataInfo selectList(@RequestParam(value = "keyWord",required = false) String keyWord)
    {
        return getDataTable(iTransactionEventService.selectList());
        return getDataTable(iTransactionEventService.selectList(keyWord));
    }
    /**
flower_city/src/main/java/com/dg/core/service/ITransactionEventService.java
@@ -122,7 +122,7 @@
     * 导办事物列表(不分页)
     * @return
     */
    List<TransactionEvent> selectList();
    List<TransactionEvent> selectList(String keyWord);
    /**
     * 智能咨询
flower_city/src/main/java/com/dg/core/service/impl/GuideRepairOrderServiceImpl.java
@@ -315,7 +315,7 @@
                DateTime dateTime = td.nextWeekDay(dateTimeUser);
                Calendar calendar = dateTime.toCalendar();
                LocalDateTime localDateTime = LocalDateTime.of(calendar.get(Calendar.YEAR),
                        calendar.get(Calendar.MONTH), calendar.get(Calendar.DATE),
                        calendar.get(Calendar.MONTH)+1, calendar.get(Calendar.DATE),
                        9 + automessageSysSettings.getTimeoutNotificationNum(), 0);//设置时间为下一个工作日时间的9点+设置超时时间
                guideRepairOrder.setTimeoutTime(localDateTime);
            }
@@ -324,7 +324,7 @@
            DateTime dateTime = td.nextWeekDay(dateTimeUser);
            Calendar calendar = dateTime.toCalendar();
            LocalDateTime localDateTime = LocalDateTime.of(calendar.get(Calendar.YEAR),
                    calendar.get(Calendar.MONTH), calendar.get(Calendar.DATE),
                    calendar.get(Calendar.MONTH)+1, calendar.get(Calendar.DATE),
                    9 + automessageSysSettings.getTimeoutNotificationNum(), 0);//设置时间为下一个工作日时间的9点+设置超时时间
            guideRepairOrder.setTimeoutTime(localDateTime);
        }
flower_city/src/main/java/com/dg/core/service/impl/TransactionEventImpl.java
@@ -229,7 +229,12 @@
    }
    @Override
    public List<TransactionEvent> selectList() {
    public List<TransactionEvent> selectList(String keyWord) {
        if (keyWord!=null&&keyWord!=""){
            return baseMapper.selectList(new QueryWrapper<TransactionEvent>().lambda().like(TransactionEvent::getMatterName,keyWord));
        }
        else {
        return baseMapper.selectList(new QueryWrapper<TransactionEvent>().lambda());
        }
    }
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComActActivityVO.java
@@ -158,6 +158,9 @@
    @ApiModelProperty(value = "社区id", hidden = true)
    private Long communityId;
    @ApiModelProperty(value = "社区id集合", hidden = true)
    private List<Long> communityIds;
    @ApiModelProperty(value = "社区名称")
    private String communityName;
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/partybuilding/PartyBuildingComPbDynVO.java
@@ -1,6 +1,7 @@
package com.panzhihua.common.model.vos.partybuilding;
import java.util.Date;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonFormat;
@@ -70,6 +71,9 @@
    @ApiModelProperty("社区id")
    private Long communityId;
    @ApiModelProperty("社区id集合")
    private List<Long> communityIds;
    @ApiModelProperty("动态内容富文本--纯文本")
    private String contentText;
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/partybuilding/west/PartyBuildingComPbDynVO.java
@@ -8,6 +8,7 @@
import lombok.Data;
import java.util.Date;
import java.util.List;
/**
 * @program: springcloud_k8s_panzhihuazhihuishequ
@@ -70,6 +71,11 @@
    @JsonSerialize(using = ToStringSerializer.class)
    private Long communityId;
    @ApiModelProperty("社区id集合")
    @JsonSerialize(using = ToStringSerializer.class)
    private List<Long> communityIds;
    @ApiModelProperty("动态内容富文本--纯文本")
    private String contentText;
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/WxXCXTempSend.java
@@ -155,6 +155,35 @@
        }
        return accessToken;
    }
    /**
     * 发布消息时重新设置access_token 防止过期
     * @param appId
     * @param appSecret
     * @throws Exception
     */
    public void setAppAccessTokenToCache(String appId,String appSecret) throws Exception{
        String accessToken = "0";
        try {
            log.info("获取微信token参数:appid=" + appId + ",appSecret=" + appSecret);
            String accessTokenUrl = ACCESS_TOKEN_URL + "&appid=" + appId + "&secret=" + appSecret;
            String result = HttpClientUtil.httpGet(accessTokenUrl, null, null);
            Map<String, Object> resultMap = JSON.parseObject(result, Map.class);
            if (resultMap.containsKey("access_token")) {
                accessToken = resultMap.get("access_token").toString();
                wxXCXTempSend.stringRedisTemplate.opsForValue().set("access_token:access_token:" + appId, accessToken, EXPIRE_TIME,TimeUnit.HOURS);
            }
        } catch (IOException ioe) {
            log.error("小程序http请求异常");
            ioe.printStackTrace();
        }
    }
    public String getAccessTokenNoValid(String appId) throws Exception {
        String accessToken = "";
        accessToken=wxXCXTempSend.stringRedisTemplate.boundValueOps("access_token:access_token:"+appId).get();
        return accessToken;
    }
    public String getWsAccessToken() throws Exception {
        String accessToken = "0";
        try {
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComEventTransferRecordMapper.java
@@ -41,5 +41,5 @@
    List<ComEventTransferRecord> listByComEventTransferRecord(@Param("comEventTransferRecord") ComEventTransferRecord comEventTransferRecord);
    int insertSelective(ComEventTransferRecord comEventTransferRecord);
    int insertSelective(@Param("comEventTransferRecord") ComEventTransferRecord comEventTransferRecord);
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/message/AcidMessage.java
@@ -114,14 +114,22 @@
    }
    @RabbitListener(queues = ACID_MESSAGE_QUEUE)
    public void sendMessage(ComActDynVO comActDynVO){
        List<String> openIds=sysUserDao.selectOpenId();
        WxXCXTempSend wxXCXTempSend=new WxXCXTempSend();
        for(String openId:openIds){
            try {
                WxUtil.sendLongTimeTemplate(openId,wxXCXTempSend.getAccessToken("wx118de8a734d269f0"),"疫情快讯",comActDynVO.getTitle().length()>10?comActDynVO.getTitle().substring(0,10)+"..":comActDynVO.getTitle(),"/pages/community_child/community/detail?id="+comActDynVO.getId()+"&title=疫情快讯详情");
            } catch (Exception e) {
                e.printStackTrace();
        try{
            List<String> openIds=sysUserDao.selectOpenId();
            String appId = "wx118de8a734d269f0";
            String appSecret = "0264342daefde5cd70a6adada09ee5b1";
            WxXCXTempSend wxXCXTempSend=new WxXCXTempSend();
            wxXCXTempSend.setAppAccessTokenToCache(appId,appSecret);
            for(String openId:openIds){
                try {
                    WxUtil.sendLongTimeTemplate(openId,wxXCXTempSend.getAccessTokenNoValid(appId),"疫情快讯",comActDynVO.getTitle().length()>10?comActDynVO.getTitle().substring(0,10)+"..":comActDynVO.getTitle(),"/pages/community_child/community/detail?id="+comActDynVO.getId()+"&title=疫情快讯详情");
                } catch (Exception e) {
                    e.printStackTrace();
                }
            }
        }catch (Exception e){
            e.printStackTrace();
        }
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComActDO.java
@@ -117,6 +117,7 @@
    private String appId;
    @TableField(exist = false)
    private String solvePhone;
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActActivityServiceImpl.java
@@ -19,6 +19,7 @@
import javax.annotation.Resource;
import cn.hutool.core.collection.CollUtil;
import com.panzhihua.common.constants.HttpStatus;
import com.panzhihua.common.model.dtos.community.ActivityInviteDTO;
import com.panzhihua.service_community.dao.ComActNeighborCircleDAO;
@@ -306,14 +307,23 @@
        }
        page.setSize(pageSize);
        page.setCurrent(pageNum);
        Long communityId = comActActivityVO.getCommunityId();
        if (null != communityId){
            List<Long> communityIds = comActDAO.selectIds(communityId);
            if (CollUtil.isEmpty(communityIds)) {
                communityIds = new ArrayList<>();
                communityIds.add(communityId);
            }
            comActActivityVO.setCommunityIds(communityIds);
        }
        Integer type = comActActivityVO.getType();
        IPage<ComActActivityVO> iPage = null;
        if (nonNull(type) && type.equals(4)) {
            if (nonNull(comActActivityVO.getCommunityId())) {
                ComActDO comActDO = comActDAO.selectById(comActActivityVO.getCommunityId());
                if (nonNull(comActDO)) {
                    comActActivityVO.setStreetId(comActDO.getStreetId());
                }
                    ComActDO comActDO = comActDAO.selectById(comActActivityVO.getCommunityId());
                    if (nonNull(comActDO)) {
                        comActActivityVO.setStreetId(comActDO.getStreetId());
                    }
            }
            iPage = comActActivityDAO.pageProjectActivity(page, comActActivityVO);
        } else {
@@ -882,6 +892,15 @@
        }
        page.setSize(pageSize);
        page.setCurrent(pageNum);
        Long communityId = comActActivityVO.getCommunityId();
        if (null != communityId){
            List<Long> communityIds = comActDAO.selectIds(communityId);
            if (CollUtil.isEmpty(communityIds)) {
                communityIds = new ArrayList<>();
                communityIds.add(communityId);
            }
            comActActivityVO.setCommunityIds(communityIds);
        }
        IPage<ComActActivityVO> iPage = comActActivityDAO.pageActivityCommunityBack(page, comActActivityVO);
        iPage.getRecords().forEach(vo ->{
            List<ComActActEvaluateDO> comActActEvaluateDOList = comActActEvaluateDAO
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComBatteryCommodityOrderBargainServiceImpl.java
@@ -58,16 +58,14 @@
    private ComBatteryCommodityOrderBargainRecordMapper orderBargainRecordMapper;
    @Value("${min.app.isTest}")
    private Boolean isTest;
    @Value("${min.app.isRefundTest}")
    private Boolean isRefundTest;
    @Value("${min.app.appid}")
    private String appid;
    @Value("${min.app.payKey}")
    private String payKey;
    @Value("${min.app.mchId}")
    private String mchId;
    @Value("${min.app.currencyNotifyUrl}")
    private String currencyNotifyUrl;
//    @Value("${min.app.currencyNotifyUrl}")
//    private String currencyNotifyUrl;
    /**
     * description  queryByPage  分页查询
@@ -311,8 +309,8 @@
            money = BigDecimal.valueOf(0.01);
        }
        // 调用wx支付
        result = WxPayUtils.getUnifiedorder(appid, mchId, payKey, currencyNotifyUrl + PayCpmstant.BATTERY_STORE_ACTIVITY_PAY_NOTIFY_URL
                , remark, openId, orderNo, money,type);
//        result = WxPayUtils.getUnifiedorder(appid, mchId, payKey, currencyNotifyUrl + PayCpmstant.BATTERY_STORE_ACTIVITY_PAY_NOTIFY_URL
//                , remark, openId, orderNo, money,type);
        log.info("用户购买商品微信支付返回参数:" + result);
        return result;
    }
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComBatteryCommodityOrderCollageTeamServiceImpl.java
@@ -55,16 +55,14 @@
    private ComBatteryTradeOrderService tradeOrderService;
    @Value("${min.app.isTest}")
    private Boolean isTest;
    @Value("${min.app.isRefundTest}")
    private Boolean isRefundTest;
    @Value("${min.app.appid}")
    private String appid;
    @Value("${min.app.payKey}")
    private String payKey;
    @Value("${min.app.mchId}")
    private String mchId;
    @Value("${min.app.currencyNotifyUrl}")
    private String currencyNotifyUrl;
//    @Value("${min.app.currencyNotifyUrl}")
//    private String currencyNotifyUrl;
    @Resource
    private ComBatteryCommodityMapper commodityMapper;
    @Resource
@@ -326,8 +324,8 @@
            money = BigDecimal.valueOf(0.01);
        }
        // 调用wx支付
        result = WxPayUtils.getUnifiedorder(appid, mchId, payKey, currencyNotifyUrl + PayCpmstant.BATTERY_STORE_ACTIVITY_PAY_NOTIFY_URL
                , remark, openId, orderNo, money,type);
//        result = WxPayUtils.getUnifiedorder(appid, mchId, payKey, currencyNotifyUrl + PayCpmstant.BATTERY_STORE_ACTIVITY_PAY_NOTIFY_URL
//                , remark, openId, orderNo, money,type);
        log.info("用户购买商品微信支付返回参数:" + result);
        return result;
    }
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComBatteryCommodityOrderServiceImpl.java
@@ -58,16 +58,14 @@
    private ComBatteryTradeOrderService tradeOrderService;
    @Value("${min.app.isTest}")
    private Boolean isTest;
    @Value("${min.app.isRefundTest}")
    private Boolean isRefundTest;
    @Value("${min.app.appid}")
    private String appid;
    @Value("${min.app.payKey}")
    private String payKey;
    @Value("${min.app.mchId}")
    private String mchId;
    @Value("${min.app.currencyNotifyUrl}")
    private String currencyNotifyUrl;
//    @Value("${min.app.currencyNotifyUrl}")
//    private String currencyNotifyUrl;
    @Resource
    private ComBatteryCommodityOrderCollageTeamMapper orderCollageTeamMapper;
    @Resource
@@ -368,8 +366,8 @@
            money = BigDecimal.valueOf(0.01);
        }
        // 调用wx支付
        result = WxPayUtils.getUnifiedorder(appid, mchId, payKey, currencyNotifyUrl + PayCpmstant.BATTERY_STORE_PAY_NOTIFY_URL
                , remark, openId, orderNo, money,null);
//        result = WxPayUtils.getUnifiedorder(appid, mchId, payKey, currencyNotifyUrl + PayCpmstant.BATTERY_STORE_PAY_NOTIFY_URL
//                , remark, openId, orderNo, money,null);
        log.info("用户购买商品微信支付返回参数:" + result);
        return result;
    }
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComEventServiceImpl.java
@@ -617,7 +617,7 @@
            comEvent.setCurrentOrgId(community.getCommunityId().toString());
            comEvent.setCurrentProcessType(5);
        }
        if (!StringUtils.isEmpty(comEvent.getCenterId())) {
        if (!StringUtils.isEmpty(comEvent.getCenterId()))   {
            //创建时处理级别都是专家
            ComSanshuoIndustryCenter center = comSanShuoIndustryCenterService.getById(comEvent.getCenterId());
            comEvent.setCurrentOrgName(center.getName());
@@ -653,11 +653,10 @@
        return R.ok(ReturnMsgConstants.SAVE_SUCCESS);
    }
    public void sendMessage(Long expertId,ComEvent comEvent){
        //获取专家的openId
        ComSanshuoExpert expert = comSanShuoExpertService.getById(expertId);
        SysUser sysUser = sysUserDao.selectOne(new QueryWrapper<SysUser>().lambda().eq(SysUser::getPhone, expert.getPhone()).eq(SysUser::getType, 1));
        SysUser sysUser = sysUserDao.selectOne(new QueryWrapper<SysUser>().lambda().eq(SysUser::getPhone, expert.getPhone()).eq(SysUser::getType, 1).eq(SysUser::getAppId,"wx0cef797390444b75" ));
        SanShuoMessageVO vo=new SanShuoMessageVO();
        if (nonNull(sysUser)){
            if (isNull(sysUser.getOpenid())){
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActActivityMapper.xml
@@ -88,7 +88,13 @@
        <if test='comActActivityVO.type != null and comActActivityVO.type == 4'>
            left join  (select count(t.id) as socialCount,activity_id from   com_act_act_regist  t LEFT JOIN sys_user t1 on  t.user_id = t1.user_id LEFT JOIN com_act_social_worker t2 on t1.phone = t2.telephone where t2.id is not null GROUP BY t.activity_id) so on a.id = so.activity_id
        </if>
        WHERE  a.community_id=#{comActActivityVO.communityId}
        WHERE  1=1
        <if test="comActActivityVO.communityIds != null and comActActivityVO.communityIds.size() != 0">
            and a.community_id in
            <foreach collection="comActActivityVO.communityIds" item="item" open="(" separator="," close=")">
                #{item}
            </foreach>
        </if>
        <if test='comActActivityVO.type != null'>
            AND a.type = #{comActActivityVO.type}
        </if>
@@ -358,12 +364,19 @@
        LEFT JOIN ( SELECT * FROM com_act_act_sign WHERE `status` = 1 ) s ON a.id = s.activity_id
        LEFT JOIN com_act ca ON a.community_id = ca.community_id
        WHERE 1 = 1
        <if test ="comActActivityVO.communityId != null and comActActivityVO.communityId != 0">
        <if test ="comActActivityVO.communityIds != null and comActActivityVO.communityIds.size() != 0">
            <if test="comActActivityVO.checkUnitId != null">
                AND (a.community_id = ${comActActivityVO.communityId} OR a.check_unit_id = #{comActActivityVO.checkUnitId})
                AND (a.community_id in
                <foreach collection="comActActivityVO.communityIds" item="item" open="(" separator="," close=")">
                    #{item}
                </foreach>
                OR a.check_unit_id = #{comActActivityVO.checkUnitId})
            </if>
            <if test="comActActivityVO.checkUnitId == null">
                AND a.community_id = ${comActActivityVO.communityId}
                AND a.community_id in
                <foreach collection="comActActivityVO.communityIds" item="item" open="(" separator="," close=")">
                    #{item}
                </foreach>
                <if test="comActActivityVO.type == null">
                    AND a.`type` != 5
                </if>
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComEventTransferRecordMapper.xml
@@ -46,157 +46,157 @@
    <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.panzhihua.service_community.entity.ComEventTransferRecord">
    insert into com_sanshuo_event_transfer_record
    <trim prefix="(" suffix=")" suffixOverrides=",">
        <if test="id != null">
        <if test="comEventTransferRecord.id != null">
            id,
        </if>
        <if test="eventId != null">
        <if test="comEventTransferRecord.eventId != null">
            event_id,
        </if>
        <if test="parentsTransferEventId != null">
        <if test="comEventTransferRecord.parentsTransferEventId != null">
            parents_transfer_event_id,
        </if>
        <if test="fromType != null">
        <if test="comEventTransferRecord.fromType != null">
            from_type,
        </if>
        <if test="fromId != null">
        <if test="comEventTransferRecord.fromId != null">
            from_id,
        </if>
        <if test="fromName != null">
        <if test="comEventTransferRecord.fromName != null">
            from_name,
        </if>
        <if test="fromUserId != null">
        <if test="comEventTransferRecord.fromUserId != null">
            from_user_id,
        </if>
        <if test="toType != null">
        <if test="comEventTransferRecord.toType != null">
            to_type,
        </if>
        <if test="toId != null">
        <if test="comEventTransferRecord.toId != null">
            to_id,
        </if>
        <if test="toName != null">
        <if test="comEventTransferRecord.toName != null">
            to_name,
        </if>
        <if test="toUserId != null">
        <if test="comEventTransferRecord.toUserId != null">
            to_user_id,
        </if>
        <if test="save != null">
        <if test="comEventTransferRecord.save != null">
            `save`,
        </if>
        <if test="processResult != null">
        <if test="comEventTransferRecord.processResult != null">
            process_result,
        </if>
        <if test="processResultData != null">
        <if test="comEventTransferRecord.processResultData != null">
            process_result_data,
        </if>
        <if test="processDate != null">
        <if test="comEventTransferRecord.processDate != null">
            process_date,
        </if>
        <if test="processBy != null">
        <if test="comEventTransferRecord.processBy != null">
            process_by,
        </if>
        <if test="processByName != null">
        <if test="comEventTransferRecord.processByName != null">
            process_by_name,
        </if>
        <if test="processType != null">
        <if test="comEventTransferRecord.processType != null">
            process_type,
        </if>
        <if test="createAt != null">
        <if test="comEventTransferRecord.createAt != null">
            create_at,
        </if>
        <if test="specialistId != null">
        <if test="comEventTransferRecord.specialistId != null">
            specialist_id,
        </if>
        <if test="specialistOrg != null">
        <if test="comEventTransferRecord.specialistOrg != null">
            specialist_org,
        </if>
        <if test="specialistLevel != null">
        <if test="comEventTransferRecord.specialistLevel != null">
            specialist_level,
        </if>
        <if test="specialistName != null">
        <if test="comEventTransferRecord.specialistName != null">
            specialist_name,
        </if>
        <if test="eventResult != null">
        <if test="comEventTransferRecord.eventResult != null">
            event_result,
        </if>
        <if test="eventStatus != null">
        <if test="comEventTransferRecord.eventStatus != null">
            event_status,
        </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
        <if test="id != null">
            #{id,jdbcType=BIGINT},
        <if test="comEventTransferRecord.id != null">
            #{comEventTransferRecord.id,jdbcType=BIGINT},
        </if>
        <if test="eventId != null">
            #{eventId,jdbcType=BIGINT},
        <if test="comEventTransferRecord.eventId != null">
            #{comEventTransferRecord.eventId,jdbcType=BIGINT},
        </if>
        <if test="parentsTransferEventId != null">
            #{parentsTransferEventId,jdbcType=BIGINT},
        <if test="comEventTransferRecord.parentsTransferEventId != null">
            #{comEventTransferRecord.parentsTransferEventId,jdbcType=BIGINT},
        </if>
        <if test="fromType != null">
            #{fromType,jdbcType=TINYINT},
        <if test="comEventTransferRecord.fromType != null">
            #{comEventTransferRecord.fromType,jdbcType=TINYINT},
        </if>
        <if test="fromId != null">
            #{fromId,jdbcType=BIGINT},
        <if test="comEventTransferRecord.fromId != null">
            #{comEventTransferRecord.fromId,jdbcType=BIGINT},
        </if>
        <if test="fromName != null">
            #{fromName,jdbcType=VARCHAR},
        <if test="comEventTransferRecord.fromName != null">
            #{comEventTransferRecord.fromName,jdbcType=VARCHAR},
        </if>
        <if test="fromUserId != null">
            #{fromUserId,jdbcType=BIGINT},
        <if test="comEventTransferRecord.fromUserId != null">
            #{comEventTransferRecord.fromUserId,jdbcType=BIGINT},
        </if>
        <if test="toType != null">
            #{toType,jdbcType=TINYINT},
        <if test="comEventTransferRecord.toType != null">
            #{comEventTransferRecord.toType,jdbcType=TINYINT},
        </if>
        <if test="toId != null">
            #{toId,jdbcType=BIGINT},
        <if test="comEventTransferRecord.toId != null">
            #{comEventTransferRecord.toId,jdbcType=BIGINT},
        </if>
        <if test="toName != null">
            #{toName,jdbcType=VARCHAR},
        <if test="comEventTransferRecord.toName != null">
            #{comEventTransferRecord.toName,jdbcType=VARCHAR},
        </if>
        <if test="toUserId != null">
            #{toUserId,jdbcType=BIGINT},
        <if test="comEventTransferRecord.toUserId != null">
            #{comEventTransferRecord.toUserId,jdbcType=BIGINT},
        </if>
        <if test="save != null">
            #{save,jdbcType=BIT},
        <if test="comEventTransferRecord.save != null">
            #{comEventTransferRecord.save,jdbcType=BIT},
        </if>
        <if test="processResult != null">
            #{processResult,jdbcType=VARCHAR},
        <if test="comEventTransferRecord.processResult != null">
            #{comEventTransferRecord.processResult,jdbcType=VARCHAR},
        </if>
        <if test="processResultData != null">
            #{processResultData,jdbcType=VARCHAR},
        <if test="comEventTransferRecord.processResultData != null">
            #{comEventTransferRecord.processResultData,jdbcType=VARCHAR},
        </if>
        <if test="processDate != null">
            #{processDate,jdbcType=TIMESTAMP},
        <if test="comEventTransferRecord.processDate != null">
            #{comEventTransferRecord.processDate,jdbcType=TIMESTAMP},
        </if>
        <if test="processBy != null">
            #{processBy,jdbcType=BIGINT},
        <if test="comEventTransferRecord.processBy != null">
            #{comEventTransferRecord.processBy,jdbcType=BIGINT},
        </if>
        <if test="processByName != null">
            #{processByName,jdbcType=VARCHAR},
        <if test="comEventTransferRecord.processByName != null">
            #{comEventTransferRecord.processByName,jdbcType=VARCHAR},
        </if>
        <if test="processType != null">
            #{processType,jdbcType=INTEGER},
        <if test="comEventTransferRecord.processType != null">
            #{comEventTransferRecord.processType,jdbcType=INTEGER},
        </if>
        <if test="createAt != null">
            #{createAt,jdbcType=TIMESTAMP},
        <if test="comEventTransferRecord.createAt != null">
            #{comEventTransferRecord.createAt,jdbcType=TIMESTAMP},
        </if>
        <if test="specialistId != null">
            #{specialistId,jdbcType=BIGINT},
        <if test="comEventTransferRecord.specialistId != null">
            #{comEventTransferRecord.specialistId,jdbcType=BIGINT},
        </if>
        <if test="specialistOrg != null">
            #{specialistOrg,jdbcType=VARCHAR},
        <if test="comEventTransferRecord.specialistOrg != null">
            #{comEventTransferRecord.specialistOrg,jdbcType=VARCHAR},
        </if>
        <if test="specialistLevel != null">
            #{specialistLevel,jdbcType=VARCHAR},
        <if test="comEventTransferRecord.specialistLevel != null">
            #{comEventTransferRecord.specialistLevel,jdbcType=VARCHAR},
        </if>
        <if test="specialistName != null">
            #{specialistName,jdbcType=VARCHAR},
        <if test="comEventTransferRecord.specialistName != null">
            #{comEventTransferRecord.specialistName,jdbcType=VARCHAR},
        </if>
        <if test="eventResult != null">
            #{eventResult,jdbcType=TINYINT},
        <if test="comEventTransferRecord.eventResult != null">
            #{comEventTransferRecord.eventResult,jdbcType=TINYINT},
        </if>
        <if test="eventStatus != null">
            #{eventStatus,jdbcType=TINYINT},
        <if test="comEventTransferRecord.eventStatus != null">
            #{comEventTransferRecord.eventStatus,jdbcType=TINYINT},
        </if>
    </trim>
</insert>
springcloud_k8s_panzhihuazhihuishequ/service_community/src/test/java/com/panzhihua/service_community/service/impl/ComEventServiceImplTest.java
@@ -46,8 +46,8 @@
        ComEvent comEvent=new ComEvent();
     //   comEvent.setCreateBy(1l);
        comEvent.setKeyword("17345059081");
        R data = comEventService.pageByComEvent(comEvent, pagination);
        log.info(JSONObject.toJSONString(data));
//        R data = comEventService.pageByComEvent(comEvent, pagination);
//        log.info(JSONObject.toJSONString(data));
    }
    @Test
@@ -96,8 +96,8 @@
    @Test
    void calculate() {
        R data = comEventService.calculate();
        log.info(JSONObject.toJSONString(data));
//        R data = comEventService.calculate();
//        log.info(JSONObject.toJSONString(data));
    }
    @Test
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/dao/ComPbDynDAO.java
@@ -30,26 +30,6 @@
    // " </where>" +
    // "</script>")
    @Select("<script> " + "SELECT\n" + "d.id,\n" + "d.title, d.jump_url, d.jump_type,\n" + "COUNT( u.id ) readingVolume,\n" + "d.`status`,\n"
        + "d.publish_at,\n" + "d.content,\n" + "d.cover,\n" + "d.cover_mode,\n" + "d.dyn_type,\n" + "d.create_at,t.name as communityName,d.policy_type \n"
        + "FROM\n" + "com_pb_dyn d\n" + "LEFT JOIN com_pb_dyn_user u ON d.id = u.dyn_id  left join com_act t on d.community_id = t.community_id\n"
        + "where d.type=#{partyBuildingComPbDynVO.type}  \n"
            + "<if test='partyBuildingComPbDynVO.communityId != null and partyBuildingComPbDynVO.communityId != 0'>"
            + "and d.community_id = ${partyBuildingComPbDynVO.communityId} \n" + " </if> "
        + "<if test='partyBuildingComPbDynVO.dynType != null and partyBuildingComPbDynVO.dynType != 0'>"
        + "and d.dyn_type = #{partyBuildingComPbDynVO.dynType} \n" + " </if> "
        + "<if test='partyBuildingComPbDynVO.policyType != null and partyBuildingComPbDynVO.policyType != 0'>"
        + "and d.policy_type = #{partyBuildingComPbDynVO.policyType} \n" + " </if> "
        + "<if test='partyBuildingComPbDynVO.policyType == 0'>"
        + "and d.policy_type is not null \n" + " </if> "
        + "<if test='partyBuildingComPbDynVO.title != null and partyBuildingComPbDynVO.title.trim() != &quot;&quot;'>"
        + "and d.title like concat(#{partyBuildingComPbDynVO.title},'%')  \n" + " </if> "
        + "<if test='partyBuildingComPbDynVO.status != null and partyBuildingComPbDynVO.status != 0'>"
        + "AND d.`status` = #{partyBuildingComPbDynVO.status} \n" + " </if> "
        + "<if test='partyBuildingComPbDynVO.publishAtBegin != null '>"
        + "AND d.publish_at BETWEEN #{partyBuildingComPbDynVO.publishAtBegin} \n"
        + "AND #{partyBuildingComPbDynVO.publishAtEnd} \n" + " </if> " + "GROUP BY\n" + "d.id\n"
        + "ORDER BY d.publish_at <if test='partyBuildingComPbDynVO.sort !=null and partyBuildingComPbDynVO.sort !=&quot;&quot;'> asc </if> <if test='partyBuildingComPbDynVO.sort ==null'> desc</if>" + "</script>")
    IPage<PartyBuildingComPbDynVO> pageYnamic(Page page,
        @Param("partyBuildingComPbDynVO") PartyBuildingComPbDynVO partyBuildingComPbDynVO);
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/impl/ComPbMemberWestServiceImpl.java
@@ -9,6 +9,7 @@
import javax.annotation.Resource;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.IdcardUtil;
import com.google.common.collect.Lists;
import com.panzhihua.common.enums.ComPbMemberRoleTypeEnum;
@@ -72,6 +73,8 @@
    private CommunityWestService communityWestService;
    @Resource
    private UserService userService;
    @Resource
    private ComPbMemberDAO comPbMemberDAO;
    /**
     * 新增党员
@@ -554,6 +557,15 @@
        }
        page.setSize(pageSize);
        page.setCurrent(pageNum);
        Long communityId = partyBuildingComPbDynVO.getCommunityId();
        if (null != communityId){
            List<Long> communityIds = comPbMemberDAO.selectIds(communityId);
            if (CollUtil.isEmpty(communityIds)) {
                communityIds = new ArrayList<>();
                communityIds.add(communityId);
            }
            partyBuildingComPbDynVO.setCommunityIds(communityIds);
        }
        IPage<PartyBuildingComPbDynVO> iPage = comPbDynDAO.pageYnamic(page, partyBuildingComPbDynVO);
        List<PartyBuildingComPbDynVO> records = iPage.getRecords();
        if (!(ObjectUtils.isEmpty(records))) {
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/resources/mapper/ComPbDynMapper.xml
New file
@@ -0,0 +1,71 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.panzhihua.service_dangjian.dao.ComPbDynDAO">
    <resultMap type="com.panzhihua.service_dangjian.model.dos.ComPbDynDO" id="ComPbOrgMap">
        <result property="id" column="id" jdbcType="INTEGER"/>
        <result property="title" column="title"/>
        <result property="status" column="status"/>
        <result property="publishAt" column="publish_at"/>
        <result property="cover" column="cover"/>
        <result property="createAt" column="create_at"/>
        <result property="content" column="content"/>
        <result property="createBy" column="create_by"/>
        <result property="type" column="type"/>
        <result property="communityId" column="community_id"/>
        <result property="dynType" column="dyn_type"/>
        <result property="coverMode" column="cover_mode"/>
        <result property="jumpUrl" column="jump_url"/>
        <result property="jumpType" column="jump_type"/>
        <result property="policyType" column="policy_type"/>
    </resultMap>
    <select id="pageYnamic" resultType="com.panzhihua.common.model.vos.partybuilding.west.PartyBuildingComPbDynVO">
        SELECT
        d.id,
        d.title, d.jump_url, d.jump_type,
        COUNT( u.id ) readingVolume,
        d.`status`,
        d.publish_at,
        d.content,
        d.cover,
        d.cover_mode,
        d.dyn_type,
        d.create_at,t.name as communityName,d.policy_type
        FROM
        com_pb_dyn d
        LEFT JOIN com_pb_dyn_user u ON d.id = u.dyn_id left join com_act t on d.community_id = t.community_id
        where d.type=#{partyBuildingComPbDynVO.type}
        <if test='partyBuildingComPbDynVO.communityIds != null and partyBuildingComPbDynVO.communityIds.size() > 0 '>
            and d.community_id in
            <foreach item="item" collection="partyBuildingComPbDynVO.communityIds" separator="," open="(" close=")"
                     index="index">
                #{item}
            </foreach>
        </if>
        <if test='partyBuildingComPbDynVO.dynType != null and partyBuildingComPbDynVO.dynType != 0'>
            and d.dyn_type = #{partyBuildingComPbDynVO.dynType}
        </if>
        <if test='partyBuildingComPbDynVO.policyType != null and partyBuildingComPbDynVO.policyType != 0'>
            and d.policy_type = #{partyBuildingComPbDynVO.policyType}
        </if>
        <if test='partyBuildingComPbDynVO.policyType == 0'>
            and d.policy_type is not null
        </if>
        <if test='partyBuildingComPbDynVO.title != null and partyBuildingComPbDynVO.title.trim() != &quot;&quot;'>
            and d.title like concat(#{partyBuildingComPbDynVO.title},'%')
        </if>
        <if test='partyBuildingComPbDynVO.status != null and partyBuildingComPbDynVO.status != 0'>
            AND d.`status` = #{partyBuildingComPbDynVO.status}
        </if>
        <if test='partyBuildingComPbDynVO.publishAtBegin != null '>
            AND d.publish_at BETWEEN #{partyBuildingComPbDynVO.publishAtBegin} AND #{partyBuildingComPbDynVO.publishAtEnd}
        </if>
            GROUP BY d.id
            ORDER BY d.publish_at
        <if test="partyBuildingComPbDynVO.sort !=null and partyBuildingComPbDynVO.sort !=&quot;&quot;">asc</if>
        <if test='partyBuildingComPbDynVO.sort ==null'>desc</if>
    </select>
</mapper>