nidapeng
2024-04-29 61e4855523392fc3f84e3d8745320c10d29bed4f
最新版本
已添加1个文件
已删除3个文件
已重命名2个文件
312 ■■■■■ 文件已修改
server/meeting/meeting_admin/src/main/java/com/doumee/Main.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/meeting/meeting_admin/src/main/java/com/doumee/task/ScheduleTool.java 143 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/system_timer/src/main/java/com/doumee/jobs/biz/VisitServiceJobBiz.java 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/system_timer/src/main/java/com/doumee/jobs/fegin/VisitServiceFegin.java 69 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/system_timer/src/main/java/com/doumee/jobs/visits/EmpowerFegin.java 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/admin_timer/src/main/java/com/doumee/api/WxTokenTimerController.java 48 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/meeting/meeting_admin/src/main/java/com/doumee/Main.java
ÎļþÒÑɾ³ý
server/meeting/meeting_admin/src/main/java/com/doumee/task/ScheduleTool.java
ÎļþÒÑɾ³ý
server/system_timer/src/main/java/com/doumee/jobs/biz/VisitServiceJobBiz.java
ÎļþÃû´Ó server/system_timer/src/main/java/com/doumee/jobs/visits/EmpowerJob.java ÐÞ¸Ä
@@ -1,23 +1,23 @@
package com.doumee.jobs.visits;
package com.doumee.jobs.biz;
import com.doumee.jobs.JobService;
import com.doumee.jobs.fegin.VisitServiceFegin;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import java.lang.reflect.Method;
/**
 * @author å…¬ä¼—号:知了一笑
 * @since 2023-07-26 11:44
 */
@Component("visitEmpowerJob")
public class EmpowerJob implements JobService {
@Component("visitServiceJob")
public class VisitServiceJobBiz implements JobService {
    @Autowired
    private EmpowerFegin fegin;
    private static final Logger log = LoggerFactory.getLogger(EmpowerJob.class);
    private VisitServiceFegin fegin;
    private static final Logger log = LoggerFactory.getLogger(VisitServiceJobBiz.class);
    @Override
    public void run(String params,String module) {
@@ -25,7 +25,7 @@
        try {
            method = fegin.getClass().getDeclaredMethod(module);
            method.invoke(fegin);
            log.info("\n ======== å®šæ—¶ä»»åŠ¡å·²æ‰§è¡Œï¼švisitEmpowerJob.========"+module);
            log.info("\n ======== å®šæ—¶ä»»åŠ¡å·²æ‰§è¡Œï¼švisitServiceJob.========"+module);
        } catch (Exception e) {
           e.printStackTrace();
        }
server/system_timer/src/main/java/com/doumee/jobs/fegin/VisitServiceFegin.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,69 @@
package com.doumee.jobs.fegin;
import com.doumee.core.model.ApiResponse;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
/**
 * @author jiangping
 */
@Component("visitServiceJob")
@FeignClient(value = "visitsTimer")
public interface VisitServiceFegin {
    @ApiOperation("【访客系统】定时查询人员设备授权结果")
    @GetMapping("/timer/empower/syncEmpowerDetailData")
    ApiResponse syncEmpowerDetailData();
    @ApiOperation("【访客系统】定时查询人员设备授权下载进度")
    @GetMapping("/timer/empower/syncEmpowerResultData")
     ApiResponse syncEmpowerResultData() ;
    @ApiOperation("【访客系统】定时重新下发失败的授权数据")
    @GetMapping("/timer/empower/syncEmpowerFailData")
     ApiResponse syncEmpowerFailData();
    @ApiOperation("【访客系统】定时刷新人员设备授权")
    @GetMapping("/timer/empower/syncEmpowerData")
     ApiResponse syncEmpowerData();
    @ApiOperation("【访客系统】定时查询设备状态")
    @GetMapping("/timer/device/getAscDeviceStatus")
     ApiResponse getAscDeviceStatus() ;
    @ApiOperation("【访客系统】定时下载海康系统图片数据")
    @GetMapping("/timer/image/downHKImgs")
     ApiResponse downHKImgs();
    @ApiOperation("【访客系统】定时接口日志清理")
    @GetMapping("/timer/log/clearThreeMonthLog")
     ApiResponse clearThreeMonthLog();
    @ApiOperation("【访客系统】定时车辆包期授权")
    @GetMapping("/timer/park/syncParkBookData")
     ApiResponse syncParkBookData();
    @ApiOperation("【访客系统】定时查询车辆查询")
    @GetMapping("/timer/park/syncVehicleUpdateData")
     ApiResponse syncVehicleUpdateData() ;
    @ApiOperation("【访客系统】定时同步海康组织数据")
    @GetMapping("/timer/orguser/syncOrgData")
     ApiResponse syncOrgData() ;
    @ApiOperation("【访客系统】定时重新下发删除人员数据")
    @GetMapping("/timer/orguser/syncMemberDelData")
     ApiResponse syncMemberDelData() ;
    @ApiOperation("【访客系统】定时同步海康人员数据")
    @GetMapping("/timer/orguser/syncUserData")
     ApiResponse syncUserData();
    @ApiOperation("【访客系统】定时冻结人员")
    @GetMapping("/timer/orguser/memberFreeze")
     ApiResponse memberFreeze();
    @ApiOperation("【访客系统】定时下发访客预约申请")
    @GetMapping("/timer/visit/syncVisitData")
     ApiResponse syncVisitData() ;
    @ApiOperation("【访客系统】定时查询访客预约状态")
    @GetMapping("/timer/visit/getOutTimeVisitRecord")
     ApiResponse getOutTimeVisitRecord();
    @ApiOperation("【访客系统】定时今日的访客预约数据")
    @GetMapping("/timer/visit/syncVistAppointData")
    ApiResponse syncVistAppointData() ;
    @ApiOperation("【访客系统】定时更新微信公众号accesstoken")
    @GetMapping("/timer/wxtoken/updateWxAccessToken")
    public ApiResponse updateWxAccessToken();
}
server/system_timer/src/main/java/com/doumee/jobs/visits/EmpowerFegin.java
ÎļþÒÑɾ³ý
server/visits/admin_timer/src/main/java/com/doumee/api/WxTokenTimerController.java
ÎļþÃû´Ó server/visits/dmvisit_web/src/main/java/com/doumee/api/ScheduleTool.java ÐÞ¸Ä
@@ -1,45 +1,37 @@
package com.doumee.api;
import com.alibaba.fastjson.JSONObject;
import com.doumee.biz.system.SystemDictDataBiz;
import com.doumee.core.model.ApiResponse;
import com.doumee.core.utils.Constants;
import com.doumee.core.utils.HttpsUtil;
import com.doumee.core.wx.WXConstant;
import com.doumee.dao.system.model.SystemDictData;
import com.doumee.service.business.impl.hksync.HkSyncVisitServiceImpl;
import com.doumee.service.business.impl.hksync.fhk.HkSyncVisitFromHKServiceImpl;
import com.doumee.service.system.SystemDictDataService;
import lombok.extern.slf4j.Slf4j;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.utils.URIBuilder;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.util.EntityUtils;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.mgt.DefaultSecurityManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.io.IOException;
import java.net.URI;
import java.util.Date;
import java.util.Map;
import java.util.Objects;
/**
 * å®šæ—¶ä»»åŠ¡
 * @author jiangping
 * @date 2021-10-10 14:40:35
 * https://www.bejson.com/othertools/cron/  cron è¡¨è¾¾å¼ç”Ÿæˆåœ°å€
 * @author æ±Ÿè¹„蹄
 * @date 2023/11/30 15:33
 */
//@Component
//@EnableScheduling
@Slf4j
public class ScheduleTool {
@Api(tags = "微信token定时器接口")
@RestController
@RequestMapping("/timer/wxtoken")
public class WxTokenTimerController extends BaseController {
    @Autowired
    private SystemDictDataBiz systemDictDataBiz;
@@ -50,13 +42,9 @@
     */
    @Value("${debug_model}")
    private Boolean timing;
    /**
     * æ›´æ–°å¾®ä¿¡å…¬ä¼—号 ACCESS_TOKEN
     * @throws Exception
     */
    @Scheduled(fixedDelay=1000 * 60 * 90)
    public void updAccessToken(){
    @ApiOperation("开启定时更新微信公众号accesstoken")
    @GetMapping("/updateWxAccessToken")
    public ApiResponse updateWxAccessToken() {
        DefaultSecurityManager securityManager = new DefaultSecurityManager();
        SecurityUtils.setSecurityManager(securityManager);
@@ -72,8 +60,8 @@
            systemDictData.setCode(json.getString("access_token"));
            systemDictData.setUpdateTime(new Date());
            systemDictDataService.updateById(systemDictData);
            log.info(" æ›´æ–°å¾®ä¿¡å…¬ä¼—号 ACCESS_TOKEN =========> " + systemDictData.getCode() );
        }
        return ApiResponse.success("开启定时更新微信公众号accesstoken成功");
    }