| | |
| | | import com.doumee.service.system.SystemDictDataService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | 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.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | |
| | | * @date 2023/11/30 15:33 |
| | | */ |
| | | @Api(tags = "微信token定时器接口") |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/timer/wxtoken") |
| | | public class WxTokenTimerController extends BaseController { |
| | |
| | | @Value("${debug_model}") |
| | | private Boolean timing; |
| | | // @ApiOperation("开启定时更新微信公众号accesstoken") |
| | | // @GetMapping("/updateWxAccessToken") |
| | | // @PostMapping("/updateWxAccessToken") |
| | | // public ApiResponse updateWxAccessToken() { |
| | | // DefaultSecurityManager securityManager = new DefaultSecurityManager(); |
| | | // SecurityUtils.setSecurityManager(securityManager); |
| | |
| | | // return ApiResponse.success("开启定时更新微信公众号accesstoken成功"); |
| | | // } |
| | | @ApiOperation("开启定时更新微信公众号accesstoken") |
| | | @GetMapping("/updateWxAccessTokenOrigin") |
| | | @PostMapping("/updateWxAccessTokenOrigin") |
| | | public ApiResponse updateWxAccessTokenOrigin() { |
| | | log.info("定时任务执行开始:updateWxAccessTokenOrigin-更新微信token"); |
| | | DefaultSecurityManager securityManager = new DefaultSecurityManager(); |
| | | SecurityUtils.setSecurityManager(securityManager); |
| | | |