摘要: 本日 and to_days(time) = to_days(CURDATE()) 本周(从周天开始算起) and WEEK(time) = WEEK(CURDATE()) // 从周天开始算起 and WEEK(time, 1) = WEEK(CURDATE(), 1) // 从周一开始算起 本月 阅读全文
posted @ 2024-01-12 10:03 卡农的忧伤ろ◆ 阅读(18) 评论(0) 推荐(0) 编辑
摘要: /** * 根据分钟获取时间(往前获取) * * @param minute 分钟(正数往前,负数往后) * @return */ public static String getBeforeTime(Integer minute) { Calendar beforeTime = Calendar. 阅读全文
posted @ 2023-11-06 10:56 卡农的忧伤ろ◆ 阅读(10) 评论(0) 推荐(0) 编辑
摘要: <if test="startTime != null"> AND datetime <![CDATA[ >= ]]> ( SELECT DATE_FORMAT( #{startTime}, '%Y-%m-%d 00:00:00' ))</if><if test="endTime != null"> 阅读全文
posted @ 2023-11-01 15:47 卡农的忧伤ろ◆ 阅读(207) 评论(0) 推荐(0) 编辑
摘要: 一、核心技术 Java提供了Executor框架来实现多线程任务的执行。我们可以通过创建ExecutorService对象来管理线程池,然后将任务提交给这个线程池执行。Executor框架的优点在于,它可以自动管理线程数量,以最大化利用CPU和内存资源。 二、具体实现方法 1、创建一个数据更新任务类 阅读全文
posted @ 2023-10-24 10:10 卡农的忧伤ろ◆ 阅读(777) 评论(0) 推荐(0) 编辑
摘要: 树形向上查询(前提:Mysql8.0才能用) WITH RECURSIVE temp as ( SELECT t.* FROM sys_depart t WHERE t.id = #{id} UNION ALL SELECT t.* FROM sys_depart t INNER JOIN temp 阅读全文
posted @ 2023-10-21 17:31 卡农的忧伤ろ◆ 阅读(97) 评论(0) 推荐(0) 编辑
摘要: /** * 导出订单统计Excel数据 * * @param order * @param title * @param createTime_begin * @param createTime_end * @return */ public ModelAndView exportExcelBySt 阅读全文
posted @ 2023-09-14 15:57 卡农的忧伤ろ◆ 阅读(395) 评论(0) 推荐(0) 编辑
摘要: QueryWrapper<SysUser> queryWrapper = new QueryWrapper<>(); // 查询上一个月的所有的订单数据 queryWrapper.and(wrapper -> wrapper.apply("DATE_FORMAT(create_time, 'YYYY 阅读全文
posted @ 2023-09-12 14:24 卡农的忧伤ろ◆ 阅读(371) 评论(0) 推荐(0) 编辑
摘要: 实体类 @Data public class Cost implements Serializable { /**主键*/ @ApiModelProperty(value = "主键") private String id; /**日期*/ @Excel(name = "日期", width = 1 阅读全文
posted @ 2023-09-09 10:48 卡农的忧伤ろ◆ 阅读(649) 评论(0) 推荐(0) 编辑
摘要: 第一步:新建代码库 第二步:复制仓库地址 第三步:在本地文件夹内右击,通过Git Bash Here进入命令窗口,克隆复制的仓库地址 第四步:将你的项目添加至该文件夹下,通过命令进行添加至仓库 主要命令 1:git init (初始化仓库) 2:git add . (这里的.表示添加所有文件,也可以 阅读全文
posted @ 2023-08-02 13:18 卡农的忧伤ろ◆ 阅读(1928) 评论(0) 推荐(1) 编辑
摘要: // 获取当月第一天数据 getCurrentMonthFirst() { let date = new Date() date.setDate(1) let month = parseInt(date.getMonth() + 1) let day = date.getDate() if (mon 阅读全文
posted @ 2023-08-02 12:44 卡农的忧伤ろ◆ 阅读(758) 评论(0) 推荐(0) 编辑