lidongdong
2023-11-20 db39a15d28bd092704fc3acc1e5c4bb0d0d83d53
修改任务积分获取报错
3个文件已修改
81 ■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/CommunityActivityApi.java 78 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/impl/NewFightShoppingOrderServiceImpl.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/resources/mapper/NewStriveIntegratingTaskMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/CommunityActivityApi.java
@@ -20,11 +20,13 @@
import javax.annotation.Resource;
import javax.validation.Valid;
import com.panzhihua.common.model.dtos.partybuilding.NewFightIntegral;
import com.panzhihua.common.model.dtos.property.CommonPage;
import com.panzhihua.common.model.vos.community.*;
import com.panzhihua.common.model.vos.community.ComActActivityTypeVO;
import com.panzhihua.common.model.vos.neighbor.ActivityAnalysisVO;
import com.panzhihua.common.model.vos.user.SysTemplateConfigVO;
import com.panzhihua.common.service.partybuilding.NewStriveForFeign;
import io.swagger.annotations.*;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.util.ObjectUtils;
@@ -921,6 +923,10 @@
        return communityService.detailMicroWish(id, userId);
    }
    @Resource
    private NewStriveForFeign newStriveForFeign;
    @ApiOperation(value = "审核、分配、反馈心愿")
    @PutMapping("putmicrowish")
    public R putlMicroWish(@RequestBody ComActMicroWishVO comActMicroWishVO) {
@@ -1005,23 +1011,45 @@
                        }
                    }
//                    if (type.equals(1)) {// 审核通过给用户增加积分
                    if (type.equals(1)) {// 审核通过给用户增加积分
                        //以前的逻辑
//                        communityService.addIntegralTradeAdmin(
//                            new AddComActIntegralUserDTO(id, AddComActIntegralUserDTO.integralType.fbwxy,
//                                this.getCommunityId(), comActMicroWishVO1.getSponsorId()));
//                        if (R.isOk(userResult)) {
//                            String openid = userResult.getData().toString();
//                            WxXCXTempSend util = new WxXCXTempSend();
//                            R<SysTemplateConfigVO> sysTemplateConfigVO=userService.selectTemplate(this.getAreaCode(),4);
//                            try {
//                                WxUtil.sendSubscribeSHZT(openid, util.getAccessToken(), "微心愿",
//                                    DateUtils.format(comActMicroWishVO1.getExamineAt(), DateUtils.ymdhms_format),
//                                    "审核通过",sysTemplateConfigVO.getData().getTemplateId());
//                            } catch (Exception e) {
//                                log.error("消息推送失败,失败原因:" + e.getMessage());
//                            }
//                        }
//                    }
                        // 2023/11/20 新逻辑
                        NewFightIntegral integral=new NewFightIntegral();
                        integral.setRemark("微心愿上传通过审核");
                        if(comActMicroWishVO.getCommunityId()<=0)
                        {
                            integral.setCommunityId(getCommunityId()+"");
                        }
                        else
                        {
                            integral.setCommunityId(comActMicroWishVO.getCommunityId()+"");
                        }
                        integral.setType("18");
                        integral.setUserId(comActMicroWishVO.getSponsorId()+"");
                        newStriveForFeign.upIntegral(integral);
                        if (R.isOk(userResult)) {
                            String openid = userResult.getData().toString();
                            WxXCXTempSend util = new WxXCXTempSend();
                            R<SysTemplateConfigVO> sysTemplateConfigVO=userService.selectTemplate(this.getAreaCode(),4);
                            try {
                                WxUtil.sendSubscribeSHZT(openid, util.getAccessToken(), "微心愿",
                                    DateUtils.format(comActMicroWishVO1.getExamineAt(), DateUtils.ymdhms_format),
                                    "审核通过",sysTemplateConfigVO.getData().getTemplateId());
                            } catch (Exception e) {
                                log.error("消息推送失败,失败原因:" + e.getMessage());
                            }
                        }
                    }
                }
            }
        }
@@ -1119,9 +1147,25 @@
                }
                if (type.equals(1)) {// 审核通过给用户增加积分
                    communityService.addIntegralTradeAdmin(
                        new AddComActIntegralUserDTO(id, AddComActIntegralUserDTO.integralType.fbssp,
                            this.getCommunityId(), comActEasyPhotoVO1.getSponsorId()));
//                    communityService.addIntegralTradeAdmin(
//                        new AddComActIntegralUserDTO(id, AddComActIntegralUserDTO.integralType.fbssp,
//                            this.getCommunityId(), comActEasyPhotoVO1.getSponsorId()));
                    // 2023/11/20 新逻辑
                    NewFightIntegral integral=new NewFightIntegral();
                    integral.setRemark("微心愿上传通过审核");
                    if(comActEasyPhotoVO.getCommunityId()<=0)
                    {
                        integral.setCommunityId(getCommunityId()+"");
                    }
                    else
                    {
                        integral.setCommunityId(comActEasyPhotoVO.getCommunityId()+"");
                    }
                    integral.setType("18");
                    integral.setUserId(comActEasyPhotoVO.getSponsorId()+"");
                    newStriveForFeign.upIntegral(integral);
                    // 审核通过发送订阅消息给用户
                    if (R.isOk(userResult)) {
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/impl/NewFightShoppingOrderServiceImpl.java
@@ -7,7 +7,6 @@
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.vos.community.building.NewFightShoppingOrderVO;
import com.panzhihua.common.utlis.Snowflake;
import com.panzhihua.service_dangjian.dao.ComActIntegralUsersMapper;
import com.panzhihua.service_dangjian.dao.NewFightShoppingOrderDao;
import com.panzhihua.service_dangjian.entity.ComActIntegralUser;
import com.panzhihua.service_dangjian.entity.NewFightShopping;
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/resources/mapper/NewStriveIntegratingTaskMapper.xml
@@ -104,7 +104,7 @@
    <update id="editData">
        update new_fight_shopping_order
        update new_strive_integrating_task
        <set>
            <if test="item.id != null and item.id != '' ">
                id=#{item.id},