From ba87fd915abf01a6bcb6d6f0ea9d96c24eac0cc7 Mon Sep 17 00:00:00 2001 From: dongdingding <207595406@qq.com> Date: Mon, 25 Dec 2023 13:11:46 +0800 Subject: [PATCH 1/2] =?UTF-8?q?getInfo=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ruoyi/web/controller/system/SysLoginController.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java index 864f43b..0418ed3 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java @@ -82,11 +82,19 @@ public class SysLoginController public AjaxResult getInfo() { SysUser user = SecurityUtils.getLoginUser().getUser(); + // 角色集合 Set roles = permissionService.getRolePermission(user); // 权限集合 Set permissions = permissionService.getMenuPermission(user); AjaxResult ajax = AjaxResult.success(); + //判断密码是否为初始密码 + if (user.getPassword().equals("Yingji@123")){ + ajax.put("status",1); + }else{ + ajax.put("status",0); + } + ajax.put("user", user); ajax.put("roles", roles); ajax.put("permissions", permissions); From 5d3006036986eb7e5edb14ecc7a10da154950b13 Mon Sep 17 00:00:00 2001 From: dongdingding <207595406@qq.com> Date: Mon, 25 Dec 2023 13:13:43 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=AE=9A=E6=97=B6=E4=BB=BB=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../quartz/EnterpristQuartz.java | 36 +++++++++---------- 1 file changed, 16 insertions(+), 20 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/programManagement/quartz/EnterpristQuartz.java b/ruoyi-admin/src/main/java/com/ruoyi/programManagement/quartz/EnterpristQuartz.java index 962f50c..85f320f 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/programManagement/quartz/EnterpristQuartz.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/programManagement/quartz/EnterpristQuartz.java @@ -6,14 +6,10 @@ import com.ruoyi.programManagement.entity.BPlanEnterprise; import com.ruoyi.programManagement.mapper.BEnterpriseNewMapper; import com.ruoyi.programManagement.service.BPlanEnterpriseService; import com.ruoyi.programManagement.service.IBEnterpriseNewService; -import com.ruoyi.programManagement.service.ISzEnforExamineService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.transaction.annotation.Transactional; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.context.annotation.Configuration; +import org.springframework.scheduling.annotation.EnableScheduling; +import org.springframework.scheduling.annotation.Scheduled; import javax.annotation.Resource; import java.util.List; @@ -21,12 +17,12 @@ import java.util.List; /** * 定时任务更新企业新表 */ -//@Configuration -//@EnableScheduling -@Api(tags = "定时任务") -@RestController -@Transactional(rollbackFor = Exception.class) -@RequestMapping("/pharmaceuticals/quartz") +@Configuration +@EnableScheduling +//@Api(tags = "定时任务") +//@RestController +//@Transactional(rollbackFor = Exception.class) +//@RequestMapping("/pharmaceuticals/quartz") public class EnterpristQuartz { @@ -42,9 +38,9 @@ public class EnterpristQuartz { // 每周一早上五点5点执行一次任务 生成企业新表 -// @Scheduled(cron = "0 0 17 ? * SUN") - @GetMapping("/getList") - @ApiOperation(value = "定时任务") + @Scheduled(cron = "0 0 17 ? * SUN") +// @GetMapping("/getList") +// @ApiOperation(value = "定时任务") public AjaxResult updateInformationData() { //三表关联查询数据 List list = bEnterpriseNewMapper.seletAll(); @@ -55,12 +51,12 @@ public class EnterpristQuartz { } // 定时任务修改更新计划表的检查状态、检查id、检查时效字段 - // @Scheduled(cron = "0 0 1 * * ?") - @GetMapping("/updateExamine") - @ApiOperation(value = "定时任务修改更新计划表的检查状态、检查id、检查时效字段") + @Scheduled(cron = "0 0 1 * * ?") +// @GetMapping("/updateExamine") +// @ApiOperation(value = "定时任务修改更新计划表的检查状态、检查id、检查时效字段") public AjaxResult updateExamine() { //查询计划表中的所有数据 - List list =bPlanEnterpriseService.selectUpdateAll(); + List list = bPlanEnterpriseService.selectUpdateAll(); bPlanEnterpriseService.updateBatchById(list); return AjaxResult.success(); }