From 9c28709556336488690699c9ae38de212f2fec18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E7=BB=8D=E6=98=A5?= <13768722834@163.com> Date: Tue, 10 Jun 2025 18:21:58 +0800 Subject: [PATCH] 123 --- .../com/ruoyi/bst/remind/domain/Remind.java | 77 ++++ .../ruoyi/bst/remind/domain/RemindQuery.java | 7 + .../com/ruoyi/bst/remind/domain/RemindVO.java | 7 + .../ruoyi/bst/remind/mapper/RemindMapper.java | 81 +++++ .../ruoyi/bst/remind/mapper/RemindMapper.xml | 336 ++++++++++++++++++ .../bst/remind/service/RemindService.java | 80 +++++ .../service/impl/RemindServiceImpl.java | 111 ++++++ .../common/constants/RemindConstants.java | 26 ++ .../main/java/com/ruoyi/task/RemindTask.java | 62 ++++ .../com/ruoyi/web/bst/RemindController.java | 107 ++++++ .../src/main/resources/application-druid.yml | 4 +- 11 files changed, 896 insertions(+), 2 deletions(-) create mode 100644 ruoyi-service/src/main/java/com/ruoyi/bst/remind/domain/Remind.java create mode 100644 ruoyi-service/src/main/java/com/ruoyi/bst/remind/domain/RemindQuery.java create mode 100644 ruoyi-service/src/main/java/com/ruoyi/bst/remind/domain/RemindVO.java create mode 100644 ruoyi-service/src/main/java/com/ruoyi/bst/remind/mapper/RemindMapper.java create mode 100644 ruoyi-service/src/main/java/com/ruoyi/bst/remind/mapper/RemindMapper.xml create mode 100644 ruoyi-service/src/main/java/com/ruoyi/bst/remind/service/RemindService.java create mode 100644 ruoyi-service/src/main/java/com/ruoyi/bst/remind/service/impl/RemindServiceImpl.java create mode 100644 ruoyi-service/src/main/java/com/ruoyi/common/constants/RemindConstants.java create mode 100644 ruoyi-web/src/main/java/com/ruoyi/task/RemindTask.java create mode 100644 ruoyi-web/src/main/java/com/ruoyi/web/bst/RemindController.java diff --git a/ruoyi-service/src/main/java/com/ruoyi/bst/remind/domain/Remind.java b/ruoyi-service/src/main/java/com/ruoyi/bst/remind/domain/Remind.java new file mode 100644 index 0000000..02903f9 --- /dev/null +++ b/ruoyi-service/src/main/java/com/ruoyi/bst/remind/domain/Remind.java @@ -0,0 +1,77 @@ +package com.ruoyi.bst.remind.domain; + +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.ruoyi.common.annotation.Excel; +import com.ruoyi.common.core.domain.BaseEntity; + +/** + * 定时提醒对象 bst_remind + * + * @author ruoyi + * @date 2025-06-10 + */ +@Data +public class Remind extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + private Long id; + + @Excel(name = "提醒模式", readConverterExp = "如=:每天、每月、每年、下一次提醒") + @ApiModelProperty("提醒模式") + private String reminderPattern; + + @Excel(name = "提醒时机", readConverterExp = "每=天x时,每月x日,每年x月x日,下次x年x月x日") + @ApiModelProperty("提醒时机") + private String reminderVal; + + @Excel(name = "项目类型(如:服务器、域名等)") + @ApiModelProperty("项目类型(如:服务器、域名等)") + private String projectType; + + @Excel(name = "备注") + @ApiModelProperty("备注") + private String notes; + + @Excel(name = "是否失效") + @ApiModelProperty("是否失效") + private Integer isInvalid; + + @Excel(name = "提醒次数") + @ApiModelProperty("提醒次数") + private Long reminderNumber; + + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @Excel(name = "最后提醒时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") + @ApiModelProperty("最后提醒时间") + private Date lastReminderTime; + + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @Excel(name = "下一次提醒日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") + @ApiModelProperty("下一次提醒日期") + private Date nextRemindTime; + + @Excel(name = "创建者") + @ApiModelProperty("创建者") + private Long createId; + + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") + @ApiModelProperty("创建时间") + private Date creataDate; + + @Excel(name = "更新者") + @ApiModelProperty("更新者") + private Long updateId; + + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @Excel(name = "跟新时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") + @ApiModelProperty("跟新时间") + private Date updateDate; + +} diff --git a/ruoyi-service/src/main/java/com/ruoyi/bst/remind/domain/RemindQuery.java b/ruoyi-service/src/main/java/com/ruoyi/bst/remind/domain/RemindQuery.java new file mode 100644 index 0000000..2088a7d --- /dev/null +++ b/ruoyi-service/src/main/java/com/ruoyi/bst/remind/domain/RemindQuery.java @@ -0,0 +1,7 @@ +package com.ruoyi.bst.remind.domain; + +import lombok.Data; + +@Data +public class RemindQuery extends RemindVO{ +} diff --git a/ruoyi-service/src/main/java/com/ruoyi/bst/remind/domain/RemindVO.java b/ruoyi-service/src/main/java/com/ruoyi/bst/remind/domain/RemindVO.java new file mode 100644 index 0000000..d9d3b9b --- /dev/null +++ b/ruoyi-service/src/main/java/com/ruoyi/bst/remind/domain/RemindVO.java @@ -0,0 +1,7 @@ +package com.ruoyi.bst.remind.domain; + +import lombok.Data; + +@Data +public class RemindVO extends Remind{ +} diff --git a/ruoyi-service/src/main/java/com/ruoyi/bst/remind/mapper/RemindMapper.java b/ruoyi-service/src/main/java/com/ruoyi/bst/remind/mapper/RemindMapper.java new file mode 100644 index 0000000..79c5947 --- /dev/null +++ b/ruoyi-service/src/main/java/com/ruoyi/bst/remind/mapper/RemindMapper.java @@ -0,0 +1,81 @@ +package com.ruoyi.bst.remind.mapper; + +import java.util.List; +import com.ruoyi.bst.remind.domain.Remind; +import com.ruoyi.bst.remind.domain.RemindVO; +import com.ruoyi.bst.remind.domain.RemindQuery; +import org.apache.ibatis.annotations.Param; + +/** + * 定时提醒Mapper接口 + * + * @author ruoyi + * @date 2025-06-10 + */ +public interface RemindMapper +{ + /** + * 查询定时提醒 + * + * @param id 定时提醒主键 + * @return 定时提醒 + */ + RemindVO selectRemindById(Long id); + + /** + * 查询定时提醒列表 + * + * @param query 定时提醒 + * @return 定时提醒集合 + */ + List selectRemindList(@Param("query")RemindQuery query); + + /** + * 新增定时提醒 + * + * @param remind 定时提醒 + * @return 结果 + */ + int insertRemind(Remind remind); + + /** + * 批量新增定时提醒 + */ + int batchInsert(@Param("list") List list); + + /** + * 批量修改定时提醒 + */ + int batchUpdate(@Param("list") List list); + + /** + * 修改定时提醒 + * + * @param remind 定时提醒 + * @return 结果 + */ + public int updateRemind(@Param("data") Remind remind); + + /** + * 删除定时提醒 + * + * @param id 定时提醒主键 + * @return 结果 + */ + int deleteRemindById(Long id); + + /** + * 批量删除定时提醒 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteRemindByIds(Long[] ids); + + /** + * 获取全部定时提醒任务 + * + * @return 结果 + */ + List selectAll(); +} diff --git a/ruoyi-service/src/main/java/com/ruoyi/bst/remind/mapper/RemindMapper.xml b/ruoyi-service/src/main/java/com/ruoyi/bst/remind/mapper/RemindMapper.xml new file mode 100644 index 0000000..939fde4 --- /dev/null +++ b/ruoyi-service/src/main/java/com/ruoyi/bst/remind/mapper/RemindMapper.xml @@ -0,0 +1,336 @@ + + + + + + + + + + + + + + + + + + + + + + select + id, + reminder_pattern, + reminder_val, + project_type, + notes, + is_invalid, + reminder_number, + last_reminder_time, + next_remind_time, + create_id, + creata_date, + update_id, + update_date + from bst_remind + + + + and reminder_pattern = #{query.reminderPattern} + and reminder_val = #{query.reminderVal} + and project_type = #{query.projectType} + and notes = #{query.notes} + and is_invalid = #{query.isInvalid} + and reminder_number = #{query.reminderNumber} + and last_reminder_time = #{query.lastReminderTime} + and next_remind_time = #{query.nextRemindTime} + and create_id = #{query.createId} + and creata_date = #{query.creataDate} + and update_id = #{query.updateId} + and update_date = #{query.updateDate} + ${query.params.dataScope} + + + + + + + + + + + + insert into bst_remind + + id, + reminder_pattern, + reminder_val, + project_type, + notes, + is_invalid, + reminder_number, + last_reminder_time, + next_remind_time, + create_id, + creata_date, + update_id, + update_date, + + + #{id}, + #{reminderPattern}, + #{reminderVal}, + #{projectType}, + #{notes}, + #{isInvalid}, + #{reminderNumber}, + #{lastReminderTime}, + #{nextRemindTime}, + #{createId}, + #{creataDate}, + #{updateId}, + #{updateDate}, + + + + + insert into bst_remind + + id, + reminder_pattern, + reminder_val, + project_type, + notes, + is_invalid, + reminder_number, + last_reminder_time, + next_remind_time, + create_id, + creata_date, + update_id, + update_date, + + values + + + #{i.id}, + default, + #{i.reminderPattern}, + default, + #{i.reminderVal}, + default, + #{i.projectType}, + default, + #{i.notes}, + default, + #{i.isInvalid}, + default, + #{i.reminderNumber}, + default, + #{i.lastReminderTime}, + default, + #{i.nextRemindTime}, + default, + #{i.createId}, + default, + #{i.creataDate}, + default, + #{i.updateId}, + default, + #{i.updateDate}, + default, + + + + + + update bst_remind + + + + + WHEN #{item.id} THEN #{item.id} + + + WHEN #{item.id} THEN `id` + + + + + + + WHEN #{item.id} THEN #{item.reminderPattern} + + + WHEN #{item.id} THEN `reminder_pattern` + + + + + + + WHEN #{item.id} THEN #{item.reminderVal} + + + WHEN #{item.id} THEN `reminder_val` + + + + + + + WHEN #{item.id} THEN #{item.projectType} + + + WHEN #{item.id} THEN `project_type` + + + + + + + WHEN #{item.id} THEN #{item.notes} + + + WHEN #{item.id} THEN `notes` + + + + + + + WHEN #{item.id} THEN #{item.isInvalid} + + + WHEN #{item.id} THEN `is_invalid` + + + + + + + WHEN #{item.id} THEN #{item.reminderNumber} + + + WHEN #{item.id} THEN `reminder_number` + + + + + + + WHEN #{item.id} THEN #{item.lastReminderTime} + + + WHEN #{item.id} THEN `last_reminder_time` + + + + + + + WHEN #{item.id} THEN #{item.nextRemindTime} + + + WHEN #{item.id} THEN `next_remind_time` + + + + + + + WHEN #{item.id} THEN #{item.createId} + + + WHEN #{item.id} THEN `create_id` + + + + + + + WHEN #{item.id} THEN #{item.creataDate} + + + WHEN #{item.id} THEN `creata_date` + + + + + + + WHEN #{item.id} THEN #{item.updateId} + + + WHEN #{item.id} THEN `update_id` + + + + + + + WHEN #{item.id} THEN #{item.updateDate} + + + WHEN #{item.id} THEN `update_date` + + + + + where id in + + #{item.id} + + + + + update bst_remind + + + + where id = #{data.id} + + + + reminder_pattern = #{data.reminderPattern}, + reminder_val = #{data.reminderVal}, + project_type = #{data.projectType}, + notes = #{data.notes}, + is_invalid = #{data.isInvalid}, + reminder_number = #{data.reminderNumber}, + last_reminder_time = #{data.lastReminderTime}, + next_remind_time = #{data.nextRemindTime}, + create_id = #{data.createId}, + creata_date = #{data.creataDate}, + update_id = #{data.updateId}, + update_date = #{data.updateDate}, + + + + delete from bst_remind where id = #{id} + + + + delete from bst_remind where id in + + #{id} + + + diff --git a/ruoyi-service/src/main/java/com/ruoyi/bst/remind/service/RemindService.java b/ruoyi-service/src/main/java/com/ruoyi/bst/remind/service/RemindService.java new file mode 100644 index 0000000..6b3928c --- /dev/null +++ b/ruoyi-service/src/main/java/com/ruoyi/bst/remind/service/RemindService.java @@ -0,0 +1,80 @@ +package com.ruoyi.bst.remind.service; + +import java.util.List; +import com.ruoyi.bst.remind.domain.Remind; +import com.ruoyi.bst.remind.domain.RemindVO; +import com.ruoyi.bst.remind.domain.RemindQuery; + +/** + * 定时提醒Service接口 + * + * @author ruoyi + * @date 2025-06-10 + */ +public interface RemindService +{ + /** + * 查询定时提醒 + * + * @param id 定时提醒主键 + * @return 定时提醒 + */ + public RemindVO selectRemindById(Long id); + + /** + * 查询定时提醒列表 + * + * @param remind 定时提醒 + * @return 定时提醒集合 + */ + public List selectRemindList(RemindQuery remind); + + /** + * 新增定时提醒 + * + * @param remind 定时提醒 + * @return 结果 + */ + public int insertRemind(Remind remind); + + /** + * 修改定时提醒 + * + * @param remind 定时提醒 + * @return 结果 + */ + public int updateRemind(Remind remind); + + /** + * 批量删除定时提醒 + * + * @param ids 需要删除的定时提醒主键集合 + * @return 结果 + */ + public int deleteRemindByIds(Long[] ids); + + /** + * 删除定时提醒信息 + * + * @param id 定时提醒主键 + * @return 结果 + */ + public int deleteRemindById(Long id); + + /** + * 获取每天的任务 + * + * @return 结果 + */ + public List selectEveryDay(); + + + /** + * 获取非每天的任务 + * + * @return 结果 + */ + public List selectNotEveryDay(); + + int batchInsert(List list); +} diff --git a/ruoyi-service/src/main/java/com/ruoyi/bst/remind/service/impl/RemindServiceImpl.java b/ruoyi-service/src/main/java/com/ruoyi/bst/remind/service/impl/RemindServiceImpl.java new file mode 100644 index 0000000..e4be069 --- /dev/null +++ b/ruoyi-service/src/main/java/com/ruoyi/bst/remind/service/impl/RemindServiceImpl.java @@ -0,0 +1,111 @@ +package com.ruoyi.bst.remind.service.impl; + +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.ruoyi.bst.remind.mapper.RemindMapper; +import com.ruoyi.bst.remind.domain.Remind; +import com.ruoyi.bst.remind.domain.RemindVO; +import com.ruoyi.bst.remind.domain.RemindQuery; +import com.ruoyi.bst.remind.service.RemindService; + +/** + * 定时提醒Service业务层处理 + * + * @author ruoyi + * @date 2025-06-10 + */ +@Service +public class RemindServiceImpl implements RemindService +{ + @Autowired + private RemindMapper remindMapper; + + /** + * 查询定时提醒 + * + * @param id 定时提醒主键 + * @return 定时提醒 + */ + @Override + public RemindVO selectRemindById(Long id) + { + return remindMapper.selectRemindById(id); + } + + /** + * 查询定时提醒列表 + * + * @param remind 定时提醒 + * @return 定时提醒 + */ + @Override + public List selectRemindList(RemindQuery remind) + { + return remindMapper.selectRemindList(remind); + } + + /** + * 新增定时提醒 + * + * @param remind 定时提醒 + * @return 结果 + */ + @Override + public int insertRemind(Remind remind) + { + return remindMapper.insertRemind(remind); + } + + /** + * 修改定时提醒 + * + * @param remind 定时提醒 + * @return 结果 + */ + @Override + public int updateRemind(Remind remind) + { + return remindMapper.updateRemind(remind); + } + + /** + * 批量删除定时提醒 + * + * @param ids 需要删除的定时提醒主键 + * @return 结果 + */ + @Override + public int deleteRemindByIds(Long[] ids) + { + return remindMapper.deleteRemindByIds(ids); + } + + /** + * 删除定时提醒信息 + * + * @param id 定时提醒主键 + * @return 结果 + */ + @Override + public int deleteRemindById(Long id) + { + return remindMapper.deleteRemindById(id); + } + + @Override + public List selectEveryDay() { + return null; + } + + @Override + public List selectNotEveryDay() { + return null; + } + + @Override + public int batchInsert(List list) { + return remindMapper.batchInsert(list); + } + +} diff --git a/ruoyi-service/src/main/java/com/ruoyi/common/constants/RemindConstants.java b/ruoyi-service/src/main/java/com/ruoyi/common/constants/RemindConstants.java new file mode 100644 index 0000000..9126fed --- /dev/null +++ b/ruoyi-service/src/main/java/com/ruoyi/common/constants/RemindConstants.java @@ -0,0 +1,26 @@ +package com.ruoyi.common.constants; + +/** + * 到期提醒模块常量 + */ +public class RemindConstants { + + // 每天 + public static final String EVERYDAY = "1"; + + // 每月 + public static final String MONTHLY = "2"; + + // 每年 + public static final String EVERYYEAR = "3"; + + // 下一次 + public static final String NEXTREMINDER = "4"; + + // 服务器 + public static final String SERVER = "1"; + + // 域名 + public static final String DOMAINNAME = "2"; + +} diff --git a/ruoyi-web/src/main/java/com/ruoyi/task/RemindTask.java b/ruoyi-web/src/main/java/com/ruoyi/task/RemindTask.java new file mode 100644 index 0000000..6734755 --- /dev/null +++ b/ruoyi-web/src/main/java/com/ruoyi/task/RemindTask.java @@ -0,0 +1,62 @@ +package com.ruoyi.task; + +import com.ruoyi.bst.message.domain.Message; +import com.ruoyi.bst.message.service.MessageService; +import com.ruoyi.bst.remind.domain.RemindVO; +import com.ruoyi.bst.remind.service.RemindService; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; +import sun.util.resources.LocaleData; + +import java.time.LocalDateTime; +import java.time.ZoneId; +import java.util.List; + +@Component +@Slf4j +public class RemindTask { + + @Autowired + private RemindService remindService; + + @Autowired + private MessageService messageService; + + /** + * 处理每天到期提醒功能 + * 到规定时间后,往消息表插入消息 + */ + public void handleEveryDayExpirationReminder() { + LocalDateTime now = LocalDateTime.now(); + for (RemindVO remindVO : ) { + LocalDateTime lastTime = remindVO.getLastReminderTime().toInstant() + .atZone(ZoneId.systemDefault()) + .toLocalDateTime(); + if (!now.isBefore(lastTime)) { + Message message = new Message(); + messageService.insertMessage(message); + LocalDateTime tomorrow = now.plusDays(1); + remindVO.setLastReminderTime(); + remindService.updateRemind() + } + } + List list = remindService.selectEveryDay(); + remindService.batchInsert(list); + + } + + /** + * 处理非每天到期提醒功能 + * 到规定时间后,往消息表插入消息 + */ + public void handleNotEveryDayExpirationReminder() { + for (RemindVO remindVO : remindService.selectNotEveryDay()) { +// if (remindVO.getReminderPattern().equals()) { +// +// } + } + + } + +} diff --git a/ruoyi-web/src/main/java/com/ruoyi/web/bst/RemindController.java b/ruoyi-web/src/main/java/com/ruoyi/web/bst/RemindController.java new file mode 100644 index 0000000..2820a1e --- /dev/null +++ b/ruoyi-web/src/main/java/com/ruoyi/web/bst/RemindController.java @@ -0,0 +1,107 @@ +package com.ruoyi.web.bst; + +import java.util.List; +import javax.servlet.http.HttpServletResponse; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import com.ruoyi.common.annotation.Log; +import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.common.enums.BusinessType; +import com.ruoyi.bst.remind.domain.Remind; +import com.ruoyi.bst.remind.domain.RemindVO; +import com.ruoyi.bst.remind.domain.RemindQuery; +import com.ruoyi.bst.remind.service.RemindService; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.common.core.page.TableDataInfo; + +/** + * 定时提醒Controller + * + * @author ruoyi + * @date 2025-06-10 + */ +@RestController +@RequestMapping("/bst/remind") +public class RemindController extends BaseController +{ + @Autowired + private RemindService remindService; + + /** + * 查询定时提醒列表 + */ + @PreAuthorize("@ss.hasPermi('bst:remind:list')") + @GetMapping("/list") + public TableDataInfo list(RemindQuery query) + { + startPage(); + startOrderBy(); + List list = remindService.selectRemindList(query); + return getDataTable(list); + } + + /** + * 导出定时提醒列表 + */ + @PreAuthorize("@ss.hasPermi('bst:remind:export')") + @Log(title = "定时提醒", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, RemindQuery query) + { + List list = remindService.selectRemindList(query); + ExcelUtil util = new ExcelUtil(RemindVO.class); + util.exportExcel(response, list, "定时提醒数据"); + } + + /** + * 获取定时提醒详细信息 + */ + @PreAuthorize("@ss.hasPermi('bst:remind:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return success(remindService.selectRemindById(id)); + } + + /** + * 新增定时提醒 + */ + @PreAuthorize("@ss.hasPermi('bst:remind:add')") + @Log(title = "定时提醒", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody Remind remind) + { + return toAjax(remindService.insertRemind(remind)); + } + + /** + * 修改定时提醒 + */ + @PreAuthorize("@ss.hasPermi('bst:remind:edit')") + @Log(title = "定时提醒", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody Remind remind) + { + return toAjax(remindService.updateRemind(remind)); + } + + /** + * 删除定时提醒 + */ + @PreAuthorize("@ss.hasPermi('bst:remind:remove')") + @Log(title = "定时提醒", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(remindService.deleteRemindByIds(ids)); + } +} diff --git a/ruoyi-web/src/main/resources/application-druid.yml b/ruoyi-web/src/main/resources/application-druid.yml index 309ceda..2d466a4 100644 --- a/ruoyi-web/src/main/resources/application-druid.yml +++ b/ruoyi-web/src/main/resources/application-druid.yml @@ -6,9 +6,9 @@ spring: druid: # 主库数据源 master: - url: jdbc:mysql://localhost:3306/project-manager?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 + url: jdbc:mysql://47.120.68.19:3306/project-manager?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 username: root - password: 123456 + password: d0dbe100b71c1d09 # 从库数据源 slave: # 从数据源开关/默认关闭