合并代码
This commit is contained in:
parent
dda2589474
commit
3676737a7b
|
|
@ -2,8 +2,6 @@ package com.bonus.core.order.controller;
|
|||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.bonus.core.order.domain.dto.CustQueryDTO;
|
||||
import com.bonus.common.log.enums.OperaType;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
|
|
@ -36,15 +34,6 @@ public class OrderInfoController extends BaseController {
|
|||
@Autowired
|
||||
private IOrderInfoService orderInfoService;
|
||||
|
||||
/**
|
||||
* 获取订单详细信息
|
||||
*/
|
||||
@ApiOperation(value = "获取支付二维码")
|
||||
@PostMapping(value = "/getOrderQRCode")
|
||||
public AjaxResult getOrderQRCode(@RequestBody CustQueryDTO custQueryDTO) {
|
||||
return success(orderInfoService.getOrderQRCode("1", String.valueOf(custQueryDTO.getCustId())));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询订单列表
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -57,6 +57,4 @@ public interface IOrderInfoService {
|
|||
* @return 结果
|
||||
*/
|
||||
public int deleteOrderInfoByOrderId(Long orderId);
|
||||
|
||||
public String getOrderQRCode(String sourceType, String paramValue);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -97,16 +97,4 @@ public class OrderInfoServiceImpl implements IOrderInfoService {
|
|||
return orderInfoMapper.deleteOrderInfoByOrderId(orderId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除订单信息
|
||||
*
|
||||
* @param sourceType
|
||||
* @param paramValue
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public String getOrderQRCode(String sourceType, String paramValue) {
|
||||
String stime = String.valueOf(System.currentTimeMillis() / 1000L);
|
||||
return "xnzn{\"s\":" + sourceType + ",\"y\":" + LeCodeUseSceneEnum.PAY.key() + ",\"p\":\"" + paramValue + "\",\"t\":" + stime + "}";
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,11 +7,23 @@ import com.alipay.api.DefaultAlipayClient;
|
|||
import com.alipay.api.domain.AlipayTradeWapPayModel;
|
||||
import com.alipay.api.request.AlipayTradeWapPayRequest;
|
||||
import com.alipay.api.response.AlipayTradeWapPayResponse;
|
||||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.core.order.domain.dto.CustQueryDTO;
|
||||
import com.bonus.core.pay.domain.PayResDTO;
|
||||
import com.bonus.core.pay.service.IPayService;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
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;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
import static com.bonus.common.core.web.domain.AjaxResult.success;
|
||||
|
||||
@RestController
|
||||
@RequestMapping({"/leopen"})
|
||||
@Slf4j
|
||||
|
|
@ -35,6 +47,17 @@ public class PayController {
|
|||
@Value("${alipay.ALIPAY_PUBLIC_KEY}")
|
||||
private String ALIPAY_PUBLIC_KEY;
|
||||
|
||||
@Autowired
|
||||
IPayService payService;
|
||||
|
||||
/**
|
||||
* 获取订单详细信息
|
||||
*/
|
||||
@ApiOperation(value = "获取支付二维码")
|
||||
@PostMapping(value = "/getOrderQRCode")
|
||||
public AjaxResult getOrderQRCode(@RequestBody CustQueryDTO custQueryDTO) {
|
||||
return success(payService.getOrderQRCode("1", String.valueOf(custQueryDTO.getCustId())));
|
||||
}
|
||||
|
||||
// @ApiOperation("钱包余额查询")
|
||||
// @PostMapping({"/account/balance/query"})
|
||||
|
|
@ -45,7 +68,6 @@ public class PayController {
|
|||
// return LeniuApiUtil.callLeniuApi(api, bodyMap).body();
|
||||
// }
|
||||
//
|
||||
//
|
||||
// @ApiOperation("钱包充值")
|
||||
// @PostMapping({"/account/charge"})
|
||||
// public String getAccountCharge(@RequestBody RechargeResDTO rechargeResDTO) {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,16 @@
|
|||
package com.bonus.core.pay.service;
|
||||
|
||||
import com.bonus.core.order.domain.OrderInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Service接口
|
||||
*
|
||||
* @author xsheng
|
||||
* @date 2025-01-14
|
||||
*/
|
||||
public interface IPayService {
|
||||
|
||||
public String getOrderQRCode(String sourceType, String paramValue);
|
||||
}
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
package com.bonus.core.pay.service.impl;
|
||||
|
||||
import com.bonus.common.core.exception.ServiceException;
|
||||
import com.bonus.core.common.Enum.LeCodeUseSceneEnum;
|
||||
import com.bonus.core.order.domain.OrderInfo;
|
||||
import com.bonus.core.order.mapper.OrderInfoMapper;
|
||||
import com.bonus.core.pay.service.IPayService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 订单Service业务层处理
|
||||
*
|
||||
* @author xsheng
|
||||
* @date 2025-01-14
|
||||
*/
|
||||
@Service
|
||||
public class PayServiceImpl implements IPayService {
|
||||
@Autowired
|
||||
private OrderInfoMapper orderInfoMapper;
|
||||
|
||||
/**
|
||||
* 支付二维码
|
||||
*
|
||||
* @param sourceType
|
||||
* @param paramValue
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public String getOrderQRCode(String sourceType, String paramValue) {
|
||||
String stime = String.valueOf(System.currentTimeMillis() / 1000L);
|
||||
return "xnzn{\"s\":" + sourceType + ",\"y\":" + LeCodeUseSceneEnum.PAY.key() + ",\"p\":\"" + paramValue + "\",\"t\":" + stime + "}";
|
||||
}
|
||||
}
|
||||
Reference in New Issue