摘要: (一) mybatis-plus自带map下划线转驼峰配置类 我们只需要在yml中配置一下object-wrapper-factory指定MybatisMapWrapperFactory就可以了 mybatis-plus: mapper-locations: classpath:mapper/*Ma 阅读全文
posted @ 2022-07-21 08:45 格 阅读(1033) 评论(0) 推荐(0) 编辑
摘要: 我这里提供的是mybatis plus 和 xml配置文件结合的方式:直接从service层开始写: service //这是service层,多表分页的简单逻辑处理,重点是IPage 和 Map, // IPage 就是分页,把分页的参数传进来进行使用 // Map 是用来传参数使用的,携带你需要 阅读全文
posted @ 2022-07-20 16:06 格 阅读(3389) 评论(1) 推荐(0) 编辑
摘要: @Mapper public interface DeptMapper { /** * 分步查询员工 * 及员工所对应的部门 * 分步查询第二步: * 通过部门查询员工所对应的部门 */ Dept getEmpAndDeptByTwo(@Param("did") Integer did); /** 阅读全文
posted @ 2022-07-20 16:06 格 阅读(60) 评论(0) 推荐(0) 编辑
摘要: RequestHttp.POST( "/charge/cost/sign/downLoadZip", para, "", `arraybuffer` //一定要写 ) .then(res => { console.info(res); var blob = new Blob([res.data], 阅读全文
posted @ 2022-07-20 11:32 格 阅读(540) 评论(0) 推荐(0) 编辑
摘要: 集合转为数组 List<Long> chargeIds =new ArrayList<Long>(); Long [] ids=(Long[])chargeIds.toArray(); List<Map<String,Object>>转List<T> list map对象转list对象 List<M 阅读全文
posted @ 2022-07-20 11:31 格 阅读(1914) 评论(0) 推荐(0) 编辑
摘要: 把返回类型(responseType: 'blob')写在接口定义的地方 studentchargeitemExport(params) { return axios({ url: `/charge-system/cs/cost/studentchargeitem/export`, response 阅读全文
posted @ 2022-07-18 14:39 格 阅读(169) 评论(0) 推荐(0) 编辑
摘要: java8中时间的各种转换(LocalDateTime) 1.将LocalDateTime转为自定义的时间格式的字符串 public static String getDateTimeAsString(LocalDateTime localDateTime, String format) { Dat 阅读全文
posted @ 2022-07-18 08:50 格 阅读(5302) 评论(0) 推荐(0) 编辑
摘要: 以下为您演示MySQL常用的日期分组统计方法: 按月统计(一) SELECT date_format( r.pay_time, '%Y-%m' ) pay_time, r.pay_time, SUM( r.actual_payment ) AS actual_payment, r.org_id, r 阅读全文
posted @ 2022-07-18 08:50 格 阅读(1320) 评论(0) 推荐(0) 编辑
摘要: 1多个用户同时操作数据库的同一条数据时候 场景(问题)描述如下: 0,用户A、B同时打开一个页面,页面显示,客户表T_user字段(nname、age)姓名:张三,年龄:25 1,A 将姓名“张三”改为“张三1”,然后保存 2,B 将年龄“25”改为“30”,然后保存 这样A的操作就被覆盖了,姓名又 阅读全文
posted @ 2022-07-14 14:03 格 阅读(53) 评论(0) 推荐(0) 编辑
摘要: /** * 四舍五入 * @param {数字} num * @param {保留小数位数} i * @returns */ export function rounded(num, i) { var total2 = 0; var yn = String(num).indexOf(".") + 1 阅读全文
posted @ 2022-07-14 11:12 格 阅读(37) 评论(0) 推荐(0) 编辑