lidongdong
2024-09-20 1d146247715093d986db2ca550cccc6676af03c3
花城 新增社区活动  新双争双评需求问题清单自动更新未签退时间
13个文件已修改
248 ■■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/community/CommunityService.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/partybuilding/NewStriveForFeign.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComActAcidRecordApi.java 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActActRegistDAO.java 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComActActRegistService.java 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActActRegistServiceImpl.java 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActActRegistMapper.xml 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/api/NeedProblemClaimApi.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/dao/NeedProblemClaimDAO.java 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/NeedProblemClaimService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/impl/NeedProblemClaimServiceImpl.java 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/resources/mapper/NeedProblemClaimMapper.xml 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/timejob/src/main/java/com/panzhihua/timejob/jobhandler/UserJobHandler.java 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/community/CommunityService.java
@@ -11937,4 +11937,15 @@
    @DeleteMapping("/sys/conf/deleteCommunityPublicityData")
    public R deleteCommunityPublicityData(@RequestParam("communityId") String communityId);
    /**
     * 社区活动自动定时更新用户未签退时间
     * @return
     */
    @GetMapping("/comActAcidRecord/comActActRegistUpdateEndTime")
    public R comActActRegistUpdateEndTime();
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/partybuilding/NewStriveForFeign.java
@@ -641,5 +641,11 @@
                        @RequestParam(value = "endTime", required = false)String endTime);
    /**
     * 新双争双评需求问题清单 签退时间更新
     * @return
     */
    @GetMapping("/NeedClaim/upNewFightNeedProblemClaimEndTime")
    public R upNewFightNeedProblemClaimEndTime();
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComActAcidRecordApi.java
@@ -12,6 +12,7 @@
import com.panzhihua.common.utlis.StringUtils;
import com.panzhihua.service_community.entity.ComActAcidRecord;
import com.panzhihua.service_community.service.ComActAcidRecordService;
import com.panzhihua.service_community.service.ComActActRegistService;
import org.springframework.beans.BeanUtils;
import org.springframework.web.bind.annotation.*;
@@ -36,6 +37,10 @@
     */
    @Resource
    private ComActAcidRecordService comActAcidRecordService;
    @Resource
    private ComActActRegistService comActActRegistService;
    /**
     * 分页查询所有数据
@@ -187,4 +192,21 @@
    public R selectColorMarkGroup(){
        return this.comActAcidRecordService.selectColorMarkGroup();
    }
    /**
     * 社区活动自动定时更新用户未签退时间
     * @return
     */
    @GetMapping("/comActActRegistUpdateEndTime")
    public R comActActRegistUpdateEndTime(){
        return comActActRegistService.updateEndTime();
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActActRegistDAO.java
@@ -8,9 +8,11 @@
import com.panzhihua.common.model.vos.community.ComActActRegistVO;
import com.panzhihua.service_community.entity.JinhuiCoinGeneralTable;
import com.panzhihua.service_community.model.dos.ComActActRegistDO;
import com.panzhihua.service_community.model.dos.ComActActivityDO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.Date;
import java.util.List;
/**
@@ -50,4 +52,33 @@
    JinhuiCoinGeneralTable getDetails(@Param("userId") String userIdv);
    /**
     * 获取未签退的活动id
     * @return
     */
    List<String> getNotTimeActivityList();
    /**
     * 根据活动id获取没有签退的人员记录
     * @param activityId
     * @return
     */
    List<String> getNotTimeUser(@Param("activityId") String activityId);
    /**
     * 根据活动id获取活动结束时间
     * @param activityId
     * @return
     */
    ComActActivityDO getActivityEndTime(@Param("activityId") String activityId);
    /**
     * 更新签退时间
     * @param id
     * @param data
     * @return
     */
    int updateEndTime(@Param("id") String id, @Param("data") Date data);
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComActActRegistService.java
@@ -1,6 +1,8 @@
package com.panzhihua.service_community.service;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.extension.service.IService;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.service_community.model.dos.ComActActRegistDO;
/**
@@ -11,6 +13,7 @@
 * @author txb
 * @date 2021/8/24 10:21
 */
public interface ComActActRegistService extends IService<ComActActRegistDO> {
public interface ComActActRegistService extends IService<ComActActRegistDO>
{
    R updateEndTime();
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActActRegistServiceImpl.java
@@ -1,11 +1,16 @@
package com.panzhihua.service_community.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.service_community.dao.ComActActRegistDAO;
import com.panzhihua.service_community.model.dos.ComActActRegistDO;
import com.panzhihua.service_community.model.dos.ComActActivityDO;
import com.panzhihua.service_community.service.ComActActRegistService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import java.util.Date;
import java.util.List;
/**
 * title: ComActActRegistServiceImpl  社区》活动》活动签到表服务实现类
@@ -17,6 +22,32 @@
 */
@Slf4j
@Service
public class ComActActRegistServiceImpl extends ServiceImpl<ComActActRegistDAO, ComActActRegistDO> implements ComActActRegistService {
public class ComActActRegistServiceImpl extends ServiceImpl<ComActActRegistDAO, ComActActRegistDO> implements ComActActRegistService
{
    @Override
    public R updateEndTime()
    {
        //获取未签退的活动id
        List<String> activityList=baseMapper.getNotTimeActivityList();
        if(activityList!=null && activityList.size()>0)
        {
            for (String aId:activityList)
            {
                ComActActivityDO comActActivityDO=baseMapper.getActivityEndTime(aId);
                if(comActActivityDO.getEndAt().getTime()<new Date().getTime())
                {
                    List<String> timeList=baseMapper.getNotTimeUser(aId);
                    for (String user:timeList)
                    {
                        baseMapper.updateEndTime(user,comActActivityDO.getEndAt());
                    }
                }
            }
        }
        return R.ok();
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActActRegistMapper.xml
@@ -194,5 +194,12 @@
    </select>
    <update id="updateEndTime">
        update com_act_act_regist
        set end_time=#{data}
        where id = #{id}
    </update>
</mapper>
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/api/NeedProblemClaimApi.java
@@ -76,4 +76,16 @@
        return R.ok(claimService.needClaimSignIn(taskId,userId,type));
    }
    /**
     * 自动更新新双争双评需求问题清单未签退时间
     * @return
     */
    @GetMapping("/upNewFightNeedProblemClaimEndTime")
    public R upNewFightNeedProblemClaimEndTime()
    {
        return claimService.upNewFightNeedProblemClaimEndTime();
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/dao/NeedProblemClaimDAO.java
@@ -10,6 +10,7 @@
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.Date;
import java.util.List;
/**
@@ -54,4 +55,26 @@
    int addUserIntegralTrade(@Param("item") UserTrade item);
    /**
     * 获取未签退活动id数据
     */
    List<String> getNotTimeTaskList();
    /**
     * 根据活动id获取没有签退的人员
     */
    List<String> getNotTimeId(@Param("taskId") String taskId);
    NeedProblemInventoryDTO getActivityEndTime(@Param("taskId") String taskId);
    int updateEndTime(@Param("id") String id, @Param("data") Date data);
}
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/NeedProblemClaimService.java
@@ -33,7 +33,7 @@
    int needClaimSignIn(String taskId,String userId,String type);
    R upNewFightNeedProblemClaimEndTime();
}
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/impl/NeedProblemClaimServiceImpl.java
@@ -219,4 +219,33 @@
        }
        return baseMapper.editData(item);
    }
    @Override
    public R upNewFightNeedProblemClaimEndTime()
    {
        //获取未签退的活动id
        List<String> activityList=baseMapper.getNotTimeTaskList();
        if(activityList!=null && activityList.size()>0)
        {
            for (String aId:activityList)
            {
                NeedProblemInventoryDTO comActActivityDO=baseMapper.getActivityEndTime(aId);
                if(comActActivityDO.getNeedEndTime().getTime()<new Date().getTime())
                {
                    List<String> timeList=baseMapper.getNotTimeId(aId);
                    for (String user:timeList)
                    {
                        baseMapper.updateEndTime(user,comActActivityDO.getNeedEndTime());
                    }
                }
            }
        }
        return R.ok();
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/resources/mapper/NeedProblemClaimMapper.xml
@@ -516,6 +516,31 @@
    </insert>
    <!--  获取未签退活动id数据  -->
    <select id="getNotTimeTaskList" resultType="String">
        select task_id from new_fight_need_problem_claim where punch_start_time is not null and punch_end_time is null group by task_id
    </select>
    <!--  根据活动id获取没有签退的人员  -->
    <select id="getNotTimeId" resultType="String">
        select id from new_fight_need_problem_claim where punch_start_time is not null and punch_end_time is null and task_id =#{taskId}
    </select>
    <select id="getActivityEndTime" resultType="com.panzhihua.common.model.dtos.partybuilding.NeedProblemInventoryDTO">
        select id,need_end_time,need_start_time from new_fight_need_problem_inventory where id=#{taskId}
    </select>
    <update id="updateEndTime">
        update new_fight_need_problem_claim
        set punch_end_time=#{data}
        where id = #{id}
    </update>
</mapper>
springcloud_k8s_panzhihuazhihuishequ/timejob/src/main/java/com/panzhihua/timejob/jobhandler/UserJobHandler.java
@@ -2,6 +2,8 @@
import javax.annotation.Resource;
import com.panzhihua.common.service.community.CommunityService;
import com.panzhihua.common.service.partybuilding.NewStriveForFeign;
import org.springframework.stereotype.Component;
import com.panzhihua.common.model.vos.R;
@@ -24,6 +26,12 @@
    @Resource
    private UserService userService;
    @Resource
    private CommunityService communityService;
    @Resource
    private NewStriveForFeign newStriveForFeign;
    /**
     * 维护用户持续登录天数
     * 
@@ -39,4 +47,36 @@
        return ReturnT.SUCCESS;
    }
    /**
     * 社区活动自动定时更新用户未签退时间
     * @param param
     * @return
     * @throws Exception
     */
    @XxlJob("comActActRegistUpdateEndTime")
    public ReturnT<String> comActActRegistUpdateEndTime(String param) throws Exception {
        log.info("社区活动自动定时更新用户未签退时间");
        R r = communityService.comActActRegistUpdateEndTime();
        log.info("执行结果【{}】", r.toString());
        return ReturnT.SUCCESS;
    }
    /**
     * 自动更新新双争双评需求问题清单未签退时间
     * @param param
     * @return
     * @throws Exception
     */
    @XxlJob("upNewFightNeedProblemClaimEndTime")
    public ReturnT<String> upNewFightNeedProblemClaimEndTime(String param) throws Exception {
        log.info("社区活动自动定时更新用户未签退时间");
        R r = newStriveForFeign.upNewFightNeedProblemClaimEndTime();
        log.info("执行结果【{}】", r.toString());
        return ReturnT.SUCCESS;
    }
}