支付
订单列表
This commit is contained in:
@@ -1,11 +1,19 @@
|
||||
package com.czg;
|
||||
|
||||
import org.apache.dubbo.config.spring.context.annotation.EnableDubbo;
|
||||
import org.mybatis.spring.annotation.MapperScan;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
|
||||
import org.springframework.transaction.annotation.EnableTransactionManagement;
|
||||
|
||||
/**
|
||||
* @author ww
|
||||
*/
|
||||
@EnableDiscoveryClient
|
||||
@EnableTransactionManagement
|
||||
@MapperScan("com.czg.service.*.mapper")
|
||||
@EnableDubbo
|
||||
@SpringBootApplication
|
||||
public class OrderApplication {
|
||||
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
package com.czg.controller.admin;
|
||||
|
||||
import com.czg.entity.resp.*;
|
||||
import com.czg.resp.CzgResult;
|
||||
import com.czg.service.order.dto.OrderPayParamDTO;
|
||||
import com.czg.service.order.service.PayService;
|
||||
import com.czg.utils.ServletUtil;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* 支付
|
||||
*
|
||||
* @author ww
|
||||
* @description
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/admin/pay")
|
||||
public class PayController {
|
||||
@Resource
|
||||
private PayService payService;
|
||||
|
||||
/**
|
||||
* h5支付
|
||||
*/
|
||||
@PostMapping("h5Pay")
|
||||
CzgResult<CzgH5PayResp> h5PayOrder(HttpServletRequest request, @Validated @RequestBody OrderPayParamDTO payParam) {
|
||||
return payService.h5PayOrder(ServletUtil.getClientIPByHeader(request), payParam);
|
||||
}
|
||||
|
||||
/**
|
||||
* js支付
|
||||
* <p>
|
||||
* payType 必填 支付方式,aliPay 支付宝,wechatPay 微信
|
||||
* openId 必填
|
||||
*/
|
||||
@PostMapping("jsPay")
|
||||
CzgResult<CzgJsPayResp> jsPayOrder(HttpServletRequest request, @Validated @RequestBody OrderPayParamDTO payParam) {
|
||||
return payService.jsPayOrder(ServletUtil.getClientIPByHeader(request), payParam);
|
||||
}
|
||||
|
||||
/**
|
||||
* 小程序支付
|
||||
* payType 必填 支付方式,aliPay 支付宝,wechatPay 微信
|
||||
* openId 必填
|
||||
*/
|
||||
@PostMapping("ltPayOrder")
|
||||
CzgResult<CzgLtPayResp> ltPayOrder(HttpServletRequest request, @Validated @RequestBody OrderPayParamDTO payParam) {
|
||||
return payService.ltPayOrder(ServletUtil.getClientIPByHeader(request), payParam);
|
||||
}
|
||||
|
||||
/**
|
||||
* 正扫
|
||||
*/
|
||||
@PostMapping("scanPay")
|
||||
CzgResult<CzgScanPayResp> scanPayOrder(HttpServletRequest request, @Validated @RequestBody OrderPayParamDTO payParam) {
|
||||
return payService.scanPayOrder(ServletUtil.getClientIPByHeader(request), payParam);
|
||||
}
|
||||
|
||||
/**
|
||||
* 反扫
|
||||
* authCode 必填 扫描码
|
||||
*/
|
||||
@PostMapping("microPay")
|
||||
CzgResult<CzgMicroPayResp> microPayOrder(@Validated @RequestBody OrderPayParamDTO payParam) {
|
||||
return payService.microPayOrder(payParam);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.czg.controller.user;
|
||||
|
||||
import com.czg.order.dto.OrderInfoQueryDTO;
|
||||
import com.czg.order.service.OrderInfoService;
|
||||
import com.czg.order.vo.OrderInfoVo;
|
||||
import com.czg.resp.CzgResult;
|
||||
import com.mybatisflex.core.paginate.Page;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
|
||||
/**
|
||||
* 订单管理
|
||||
* @author ww
|
||||
* @description
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/user/order")
|
||||
public class OrderController {
|
||||
|
||||
@Resource
|
||||
private OrderInfoService orderInfoService;
|
||||
|
||||
/**
|
||||
* 订单列表
|
||||
*/
|
||||
@GetMapping
|
||||
public CzgResult<Page<OrderInfoVo>> get(OrderInfoQueryDTO queryDTO) {
|
||||
return CzgResult.success(orderInfoService.getOrderByPage(queryDTO));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user