From 268f9d1a8d376cc451b3293b779a1cba6b6c5aa9 Mon Sep 17 00:00:00 2001 From: ymnets Date: Fri, 15 Nov 2024 18:01:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hc/business/dto/OrderRefundAllDto.java | 4 +- .../business/mapper/OrderUserLogMapper.java | 2 +- .../business/service/OrderUserLogService.java | 2 +- .../service/impl/OrderUserLogServiceImpl.java | 4 +- .../resources/mapper/OrderUserLogMapper.xml | 8 ++++ .../java/com/hc/web/aspect/AppUserAspect.java | 46 +++++++++---------- .../com/hc/web/aspect/BackUserAspect.java | 46 +++++++++---------- .../com/hc/web/aspect/FrontUserAspect.java | 46 +++++++++---------- .../back/BackOrderRefundController.java | 2 +- .../back/BackOrderUserLogController.java | 3 +- .../src/main/resources/application.yml | 2 +- 11 files changed, 87 insertions(+), 78 deletions(-) diff --git a/JAVA_MYSQL_HCJXJY/jxjy-business/src/main/java/com/hc/business/dto/OrderRefundAllDto.java b/JAVA_MYSQL_HCJXJY/jxjy-business/src/main/java/com/hc/business/dto/OrderRefundAllDto.java index 051bcb2..58a4bb2 100644 --- a/JAVA_MYSQL_HCJXJY/jxjy-business/src/main/java/com/hc/business/dto/OrderRefundAllDto.java +++ b/JAVA_MYSQL_HCJXJY/jxjy-business/src/main/java/com/hc/business/dto/OrderRefundAllDto.java @@ -70,11 +70,11 @@ public class OrderRefundAllDto { @ExcelProperty(value = "财务处理时间", index =16) private String fincalTimeStr; - @ExcelProperty(value = "业务处理时间", index =16) + @ExcelProperty(value = "业务处理时间", index =17) private String yewuTimeStr; - @ExcelProperty(value = "退费备注", index =17) + @ExcelProperty(value = "退费备注", index =18) private String remarks; ///////////////////////// diff --git a/JAVA_MYSQL_HCJXJY/jxjy-business/src/main/java/com/hc/business/mapper/OrderUserLogMapper.java b/JAVA_MYSQL_HCJXJY/jxjy-business/src/main/java/com/hc/business/mapper/OrderUserLogMapper.java index 54d4389..4c26663 100644 --- a/JAVA_MYSQL_HCJXJY/jxjy-business/src/main/java/com/hc/business/mapper/OrderUserLogMapper.java +++ b/JAVA_MYSQL_HCJXJY/jxjy-business/src/main/java/com/hc/business/mapper/OrderUserLogMapper.java @@ -46,5 +46,5 @@ public interface OrderUserLogMapper extends Mapper { List queryByUserIdAndOrderId(@Param("ordersId") Integer ordersId, @Param("userId") Integer userId); - List queryAllOrdersUser(Integer orderId, String orderNo, Integer status, Integer payType, Integer classId, Long begin, Long end); + List queryAllOrdersUser(Integer orderId, String orderNo, Integer status, Integer payType,Integer isPay, Integer classId, Long begin, Long end); } \ No newline at end of file diff --git a/JAVA_MYSQL_HCJXJY/jxjy-business/src/main/java/com/hc/business/service/OrderUserLogService.java b/JAVA_MYSQL_HCJXJY/jxjy-business/src/main/java/com/hc/business/service/OrderUserLogService.java index fcfb7e7..8983e9b 100644 --- a/JAVA_MYSQL_HCJXJY/jxjy-business/src/main/java/com/hc/business/service/OrderUserLogService.java +++ b/JAVA_MYSQL_HCJXJY/jxjy-business/src/main/java/com/hc/business/service/OrderUserLogService.java @@ -76,6 +76,6 @@ public interface OrderUserLogService { */ List queryUserLogByOrderId(Integer orderId); - List queryAllOrdersUser(Integer orderId, String orderNo, Integer status, Integer payType, Integer classId, Long begin, Long end); + List queryAllOrdersUser(Integer orderId, String orderNo, Integer status, Integer payType,Integer isPay, Integer classId, Long begin, Long end); } \ No newline at end of file diff --git a/JAVA_MYSQL_HCJXJY/jxjy-business/src/main/java/com/hc/business/service/impl/OrderUserLogServiceImpl.java b/JAVA_MYSQL_HCJXJY/jxjy-business/src/main/java/com/hc/business/service/impl/OrderUserLogServiceImpl.java index b261e0b..02c7ed2 100644 --- a/JAVA_MYSQL_HCJXJY/jxjy-business/src/main/java/com/hc/business/service/impl/OrderUserLogServiceImpl.java +++ b/JAVA_MYSQL_HCJXJY/jxjy-business/src/main/java/com/hc/business/service/impl/OrderUserLogServiceImpl.java @@ -108,8 +108,8 @@ public class OrderUserLogServiceImpl implements OrderUserLogService { } @Override - public List queryAllOrdersUser(Integer orderId,String orderNo,Integer status,Integer payType,Integer classId,Long begin,Long end) { - List users = this.orderUserLogMapper.queryAllOrdersUser(orderId, orderNo,status,payType,classId,begin,end); + public List queryAllOrdersUser(Integer orderId,String orderNo,Integer status,Integer payType,Integer isPay,Integer classId,Long begin,Long end) { + List users = this.orderUserLogMapper.queryAllOrdersUser(orderId, orderNo,status,payType,isPay,classId,begin,end); for (OrdersAllUserDto record : users) { record.setOrderStatusName(ResultUtils.getOrderStatusName(record.getOrderStatus())); record.setTypeName(ResultUtils.getTypeName(record.getType())); diff --git a/JAVA_MYSQL_HCJXJY/jxjy-business/src/main/resources/mapper/OrderUserLogMapper.xml b/JAVA_MYSQL_HCJXJY/jxjy-business/src/main/resources/mapper/OrderUserLogMapper.xml index f776c4e..6867063 100644 --- a/JAVA_MYSQL_HCJXJY/jxjy-business/src/main/resources/mapper/OrderUserLogMapper.xml +++ b/JAVA_MYSQL_HCJXJY/jxjy-business/src/main/resources/mapper/OrderUserLogMapper.xml @@ -81,6 +81,14 @@ AND a.type = #{payType} + + + AND (select count(1) from order_attachment where order_id=a.orders_id)>0 + + + AND (select count(1) from order_attachment where order_id=a.orders_id)=0 + + AND a.class_id = #{classId} diff --git a/JAVA_MYSQL_HCJXJY/jxjy-web/src/main/java/com/hc/web/aspect/AppUserAspect.java b/JAVA_MYSQL_HCJXJY/jxjy-web/src/main/java/com/hc/web/aspect/AppUserAspect.java index 9d6a009..58bf0ee 100644 --- a/JAVA_MYSQL_HCJXJY/jxjy-web/src/main/java/com/hc/web/aspect/AppUserAspect.java +++ b/JAVA_MYSQL_HCJXJY/jxjy-web/src/main/java/com/hc/web/aspect/AppUserAspect.java @@ -54,28 +54,28 @@ public class AppUserAspect { //获取请求信息 -// ServletRequestAttributes attributes = -// (ServletRequestAttributes) RequestContextHolder.getRequestAttributes(); -// HttpServletRequest request = Objects.requireNonNull(attributes).getRequest(); -// -// //从请求头中获取token -// String token = request.getHeader("token"); -// -// if (!Objects.isNull(token)) { -// -// //身份识别 已取消 -// -// //获取redis中的token 查看token是否过期 -// if (Verification.verificationString((String) redisUtil.get(token))) { -// log.info("app 请求-token正常"); -// } else { -// log.info("app 请求-redis中的token已过期,请重新登录"); -// throw new ResponseException(-1, "front token is expired"); -// } -// -// } else { -// log.info("app request-token is null"); -// throw new ResponseException(-1, "app request-token is null"); -// } + ServletRequestAttributes attributes = + (ServletRequestAttributes) RequestContextHolder.getRequestAttributes(); + HttpServletRequest request = Objects.requireNonNull(attributes).getRequest(); + + //从请求头中获取token + String token = request.getHeader("token"); + + if (!Objects.isNull(token)) { + + //身份识别 已取消 + + //获取redis中的token 查看token是否过期 + if (Verification.verificationString((String) redisUtil.get(token))) { + log.info("app 请求-token正常"); + } else { + log.info("app 请求-redis中的token已过期,请重新登录"); + throw new ResponseException(-1, "front token is expired"); + } + + } else { + log.info("app request-token is null"); + throw new ResponseException(-1, "app request-token is null"); + } } } diff --git a/JAVA_MYSQL_HCJXJY/jxjy-web/src/main/java/com/hc/web/aspect/BackUserAspect.java b/JAVA_MYSQL_HCJXJY/jxjy-web/src/main/java/com/hc/web/aspect/BackUserAspect.java index 933e128..7f3e747 100644 --- a/JAVA_MYSQL_HCJXJY/jxjy-web/src/main/java/com/hc/web/aspect/BackUserAspect.java +++ b/JAVA_MYSQL_HCJXJY/jxjy-web/src/main/java/com/hc/web/aspect/BackUserAspect.java @@ -42,29 +42,29 @@ public class BackUserAspect { public void doVerify() { //获取请求信息 -// ServletRequestAttributes attributes = -// (ServletRequestAttributes) RequestContextHolder.getRequestAttributes(); -// HttpServletRequest request = Objects.requireNonNull(attributes).getRequest(); -// -// //从请求头中获取token -// String token = request.getHeader("token"); -// -// if (!Objects.isNull(token)) { -// -// //身份识别 已取消 -// -// //获取redis中的token 查看token是否过期 -// if (Verification.verificationString((String) redisUtil.get(token))) { -// log.info("back 请求-token正常"); -// } else { -// log.info("back 请求-redis中的token已过期,请重新登录"); -// throw new ResponseException(-1, "Back request-token is expired"); -// } -// -// } else { -// log.info("Back request-token is null"); -// throw new ResponseException(-1, "Back request-token is null"); -// } + ServletRequestAttributes attributes = + (ServletRequestAttributes) RequestContextHolder.getRequestAttributes(); + HttpServletRequest request = Objects.requireNonNull(attributes).getRequest(); + + //从请求头中获取token + String token = request.getHeader("token"); + + if (!Objects.isNull(token)) { + + //身份识别 已取消 + + //获取redis中的token 查看token是否过期 + if (Verification.verificationString((String) redisUtil.get(token))) { + log.info("back 请求-token正常"); + } else { + log.info("back 请求-redis中的token已过期,请重新登录"); + throw new ResponseException(-1, "Back request-token is expired"); + } + + } else { + log.info("Back request-token is null"); + throw new ResponseException(-1, "Back request-token is null"); + } } } diff --git a/JAVA_MYSQL_HCJXJY/jxjy-web/src/main/java/com/hc/web/aspect/FrontUserAspect.java b/JAVA_MYSQL_HCJXJY/jxjy-web/src/main/java/com/hc/web/aspect/FrontUserAspect.java index c51a7c3..202c68e 100644 --- a/JAVA_MYSQL_HCJXJY/jxjy-web/src/main/java/com/hc/web/aspect/FrontUserAspect.java +++ b/JAVA_MYSQL_HCJXJY/jxjy-web/src/main/java/com/hc/web/aspect/FrontUserAspect.java @@ -62,29 +62,29 @@ public class FrontUserAspect { // //获取请求信息 -// ServletRequestAttributes attributes = -// (ServletRequestAttributes) RequestContextHolder.getRequestAttributes(); -// HttpServletRequest request = Objects.requireNonNull(attributes).getRequest(); -// -// //从请求头中获取token -// String token = request.getHeader("token"); -// -// if (!Objects.isNull(token)) { -// -// //身份识别 已取消 -// -// //获取redis中的token 查看token是否过期 -// if (Verification.verificationString((String) redisUtil.get(token))) { -// log.info("front 请求-token正常"); -// } else { -// log.info("front 请求-redis中的token已过期,请重新登录"); -// throw new ResponseException(-1, "front token is expired"); -// } -// -// } else { -// log.info("front request-token is null"); -// throw new ResponseException(-1, "front request-token is null"); -// } + ServletRequestAttributes attributes = + (ServletRequestAttributes) RequestContextHolder.getRequestAttributes(); + HttpServletRequest request = Objects.requireNonNull(attributes).getRequest(); + + //从请求头中获取token + String token = request.getHeader("token"); + + if (!Objects.isNull(token)) { + + //身份识别 已取消 + + //获取redis中的token 查看token是否过期 + if (Verification.verificationString((String) redisUtil.get(token))) { + log.info("front 请求-token正常"); + } else { + log.info("front 请求-redis中的token已过期,请重新登录"); + throw new ResponseException(-1, "front token is expired"); + } + + } else { + log.info("front request-token is null"); + throw new ResponseException(-1, "front request-token is null"); + } } } diff --git a/JAVA_MYSQL_HCJXJY/jxjy-web/src/main/java/com/hc/web/controller/browser/back/BackOrderRefundController.java b/JAVA_MYSQL_HCJXJY/jxjy-web/src/main/java/com/hc/web/controller/browser/back/BackOrderRefundController.java index dc07cc4..9adde14 100644 --- a/JAVA_MYSQL_HCJXJY/jxjy-web/src/main/java/com/hc/web/controller/browser/back/BackOrderRefundController.java +++ b/JAVA_MYSQL_HCJXJY/jxjy-web/src/main/java/com/hc/web/controller/browser/back/BackOrderRefundController.java @@ -138,7 +138,7 @@ public class BackOrderRefundController { } catch (FileNotFoundException e) { throw new RuntimeException(e); } - List strList = Arrays.asList("payType", "payTime", "refundTime", "fincalTime", "syncStatus","invoicesNo","invoicesBank","status"); + List strList = Arrays.asList("payType", "payTime", "refundTime", "fincalTime","yewuTime", "syncStatus","invoicesNo","invoicesBank","status"); EasyExcel.write(outputStream, OrderRefundAllDto.class).excludeColumnFieldNames(strList).registerWriteHandler(new ExcelWidthStyleStrategy()).sheet("财务退费导出").doWrite(dataList); return Result.success("/jxjyfile/" + newName); } diff --git a/JAVA_MYSQL_HCJXJY/jxjy-web/src/main/java/com/hc/web/controller/browser/back/BackOrderUserLogController.java b/JAVA_MYSQL_HCJXJY/jxjy-web/src/main/java/com/hc/web/controller/browser/back/BackOrderUserLogController.java index c7f6a97..dcd9320 100644 --- a/JAVA_MYSQL_HCJXJY/jxjy-web/src/main/java/com/hc/web/controller/browser/back/BackOrderUserLogController.java +++ b/JAVA_MYSQL_HCJXJY/jxjy-web/src/main/java/com/hc/web/controller/browser/back/BackOrderUserLogController.java @@ -68,6 +68,7 @@ public class BackOrderUserLogController { @ApiParam(value = "班次id") @RequestParam(required = false) Integer classId, @ApiParam(value = "0未支付 1,成功 2退费 3部分退费 null查全部") @RequestParam(required = false) Integer status, @ApiParam(value = "支付类型0123,0支付宝,1微信,2微信移动端,3线下汇款 null查全部") @RequestParam(required = false) Integer payType, + @ApiParam(value = "是否付款过 0否 1 是 null 全部") @RequestParam(required = false) Integer isPay, @ApiParam(value = "创建时间开始毫秒时间戳,默认3个月") @RequestParam(required = false) Long begin, @ApiParam(value = "创建时间结束毫秒时间戳,默认3个月") @RequestParam(required = false) Long end) { @@ -83,7 +84,7 @@ public class BackOrderUserLogController { folder.mkdirs(); } - List dataList = this.orderUserLogService.queryAllOrdersUser(orderId, orderNo, status, payType, classId, begin, end); + List dataList = this.orderUserLogService.queryAllOrdersUser(orderId, orderNo, status, payType,isPay, classId, begin, end); // 对上传的文件重命名,避免文件重名 String newName = format + UUID.randomUUID() + "订单-学员导出.xlsx"; FileOutputStream outputStream = null; diff --git a/JAVA_MYSQL_HCJXJY/jxjy-web/src/main/resources/application.yml b/JAVA_MYSQL_HCJXJY/jxjy-web/src/main/resources/application.yml index 0d5ab10..e472878 100644 --- a/JAVA_MYSQL_HCJXJY/jxjy-web/src/main/resources/application.yml +++ b/JAVA_MYSQL_HCJXJY/jxjy-web/src/main/resources/application.yml @@ -5,7 +5,7 @@ spring: resources: static-locations: classpath:/static/,classpath:/resources/ profiles: - active: dev + active: pro datasource: type: com.alibaba.druid.pool.DruidDataSource driver-class-name: com.mysql.cj.jdbc.Driver