Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -4,6 +4,7 @@ import com.alibaba.fastjson2.JSONObject;
|
||||
import com.czg.CzgPayUtils;
|
||||
import com.czg.entity.CzgBaseRespParams;
|
||||
import com.czg.order.service.OrderInfoService;
|
||||
import com.czg.task.StatisticTask;
|
||||
import com.czg.utils.AssertUtil;
|
||||
import jakarta.annotation.Resource;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -24,6 +25,9 @@ public class NotifyController {
|
||||
@Resource
|
||||
private OrderInfoService orderInfoService;
|
||||
|
||||
@Resource
|
||||
private StatisticTask statisticTask;
|
||||
|
||||
|
||||
@RequestMapping("/payCallBack")
|
||||
public String notifyCallBack(@RequestBody CzgBaseRespParams respParams){
|
||||
@@ -42,4 +46,9 @@ public class NotifyController {
|
||||
orderInfoService.refundCallBackOrder(czg.getString("mchOrderNo"), czg);
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
@RequestMapping("/test")
|
||||
public void test() {
|
||||
statisticTask.run();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -146,8 +146,7 @@ public class OrderPayController {
|
||||
* checkOrderPay.orderAmount 必填
|
||||
*/
|
||||
@PostMapping("/shopPayApi/js2Pay")
|
||||
public CzgResult<Map<String, Object>> js2PayOrder(@RequestHeader Long shopId, HttpServletRequest request, @RequestBody OrderPayParamDTO payParam) {
|
||||
payParam.setShopId(shopId);
|
||||
public CzgResult<Map<String, Object>> js2PayOrder(HttpServletRequest request, @RequestBody OrderPayParamDTO payParam) {
|
||||
return payService.js2PayOrder(ServletUtil.getClientIP(request), payParam);
|
||||
}
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ import com.czg.order.dto.OrderInfoQueryDTO;
|
||||
import com.czg.order.dto.OrderInfoRefundDTO;
|
||||
import com.czg.order.entity.OrderInfo;
|
||||
import com.czg.order.service.OrderInfoService;
|
||||
import com.czg.order.vo.HistoryOrderPrintVo;
|
||||
import com.czg.order.vo.HistoryOrderVo;
|
||||
import com.czg.order.vo.OrderInfoVo;
|
||||
import com.czg.resp.CzgResult;
|
||||
@@ -49,6 +50,11 @@ public class AdminOrderController {
|
||||
return orderInfoService.getOrderDetails(orderId);
|
||||
}
|
||||
|
||||
@GetMapping("/getOrderByIdPrint")
|
||||
public CzgResult<HistoryOrderPrintVo> getOrderByIdPrint(Long orderId) {
|
||||
return orderInfoService.getOrderByIdPrint(orderId);
|
||||
}
|
||||
|
||||
@GetMapping("/historyOrder")
|
||||
public CzgResult<HistoryOrderVo> historyOrder(
|
||||
@RequestParam(required = false) Long orderId,
|
||||
@@ -65,6 +71,16 @@ public class AdminOrderController {
|
||||
return CzgResult.success(orderInfoService.createOrder(addDto));
|
||||
}
|
||||
|
||||
// /**
|
||||
// * 合单
|
||||
// * @param refundDTO
|
||||
// * @return
|
||||
// */
|
||||
// @PostMapping("/mergeOrder")
|
||||
// public CzgResult<Object> mergeOrder(@Validated @RequestBody OrderInfoRefundDTO refundDTO) {
|
||||
//
|
||||
// }
|
||||
|
||||
/**
|
||||
* 订单全额退款 只传订单id
|
||||
* 部分退款 传参refundDetail
|
||||
|
||||
@@ -12,6 +12,7 @@ import com.czg.utils.AssertUtil;
|
||||
import com.czg.utils.ServletUtil;
|
||||
import com.mybatisflex.core.paginate.Page;
|
||||
import jakarta.annotation.Resource;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Map;
|
||||
@@ -23,6 +24,7 @@ import java.util.Map;
|
||||
* @author ww
|
||||
* @description
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/user/order")
|
||||
public class UserOrderController {
|
||||
@@ -58,7 +60,9 @@ public class UserOrderController {
|
||||
@PostMapping("/createOrder")
|
||||
public CzgResult<OrderInfo> createOrder(@RequestBody OrderInfoAddDTO addDto) {
|
||||
addDto.setPlatformType(ServletUtil.getHeaderIgnoreCase(ServletUtil.getRequest(), "platformType"));
|
||||
addDto.setUserId(StpKit.USER.getLoginIdAsLong());
|
||||
long loginIdAsLong = StpKit.USER.getLoginIdAsLong();
|
||||
log.info("获取到的用户Id为:{}", loginIdAsLong);
|
||||
// addDto.setUserId(StpKit.USER.getLoginIdAsLong());
|
||||
addDto.setShopId(StpKit.USER.getShopId());
|
||||
addDto.setOrderType("miniapp");
|
||||
return CzgResult.success(orderInfoService.createOrder(addDto));
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.czg.task;
|
||||
|
||||
import com.czg.order.service.ShopOrderStatisticService;
|
||||
import com.czg.order.service.ShopProdStatisticService;
|
||||
import com.czg.order.service.ShopTableOrderStatisticService;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* @author Administrator
|
||||
*/
|
||||
@Component
|
||||
public class StatisticTask {
|
||||
@Resource
|
||||
private ShopTableOrderStatisticService shopTableOrderStatisticService;
|
||||
@Resource
|
||||
private ShopProdStatisticService shopProdStatisticService;
|
||||
@Resource
|
||||
private ShopOrderStatisticService shopOrderStatisticService;
|
||||
|
||||
public void run() {
|
||||
shopOrderStatisticService.statistic();
|
||||
}
|
||||
}
|
||||
@@ -2,9 +2,9 @@
|
||||
<configuration scan="true" scanPeriod="30 seconds" debug="false">
|
||||
<contextName>order-server</contextName>
|
||||
<property name="log.charset" value="utf-8" />
|
||||
<property name="log.pattern" value="[order-server] %yellow(%d{yyyy-MM-dd HH:mm:ss.SSS}) %green([%thread]) %highlight(%-5level) %boldMagenta(%logger{36}) - %msg%n" />
|
||||
<property name="log.pattern" value="%yellow(%d{yyyy-MM-dd HH:mm:ss.SSS}) %green([%thread]) %highlight(%-5level) %boldMagenta(%logger{36}) - %msg%n" />
|
||||
<!--写入文件格式-->
|
||||
<property name="p_file" value="[order-server] %d | [%thread] %-5level %c [%L] - %msg %n"/>
|
||||
<property name="p_file" value="%d | [%thread] %-5level %c [%L] - %msg %n"/>
|
||||
<!--输出到控制台-->
|
||||
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<encoder>
|
||||
|
||||
Reference in New Issue
Block a user