订单流程、退款基础API已接入
This commit is contained in:
parent
53c585bd47
commit
8f4d1f9207
|
@ -6,6 +6,7 @@ import java.util.List;
|
|||
import com.ruoyi.bst.pay.domain.Pay;
|
||||
import com.ruoyi.bst.pay.domain.PayQuery;
|
||||
import com.ruoyi.bst.pay.domain.PayVO;
|
||||
import com.ruoyi.bst.pay.domain.dto.PayRefundDTO;
|
||||
import com.ruoyi.bst.pay.domain.vo.DoPayVO;
|
||||
import com.ruoyi.bst.refund.domain.RefundVO;
|
||||
|
||||
|
@ -98,4 +99,11 @@ public interface PayService
|
|||
* 处理退款成功
|
||||
*/
|
||||
int handleRefundSuccess(RefundVO refund);
|
||||
|
||||
/**
|
||||
* 退款
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
int refund(PayRefundDTO dto);
|
||||
}
|
||||
|
|
|
@ -54,8 +54,7 @@ import lombok.extern.slf4j.Slf4j;
|
|||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class PayServiceImpl implements PayService
|
||||
{
|
||||
public class PayServiceImpl implements PayService {
|
||||
@Autowired
|
||||
private PayMapper payMapper;
|
||||
|
||||
|
@ -90,8 +89,7 @@ public class PayServiceImpl implements PayService
|
|||
* @return 支付订单
|
||||
*/
|
||||
@Override
|
||||
public PayVO selectPayById(Long id)
|
||||
{
|
||||
public PayVO selectPayById(Long id) {
|
||||
return payMapper.selectPayById(id);
|
||||
}
|
||||
|
||||
|
@ -102,8 +100,7 @@ public class PayServiceImpl implements PayService
|
|||
* @return 支付订单
|
||||
*/
|
||||
@Override
|
||||
public List<PayVO> selectPayList(PayQuery pay)
|
||||
{
|
||||
public List<PayVO> selectPayList(PayQuery pay) {
|
||||
return payMapper.selectPayList(pay);
|
||||
}
|
||||
|
||||
|
@ -114,8 +111,7 @@ public class PayServiceImpl implements PayService
|
|||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertPay(Pay pay)
|
||||
{
|
||||
public int insertPay(Pay pay) {
|
||||
pay.setCreateTime(DateUtils.getNowDate());
|
||||
pay.setNo(String.valueOf(SnowFlakeUtil.newId()));
|
||||
return payMapper.insertPay(pay);
|
||||
|
@ -128,8 +124,7 @@ public class PayServiceImpl implements PayService
|
|||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updatePay(Pay pay)
|
||||
{
|
||||
public int updatePay(Pay pay) {
|
||||
return payMapper.updatePay(pay);
|
||||
}
|
||||
|
||||
|
@ -140,8 +135,7 @@ public class PayServiceImpl implements PayService
|
|||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deletePayByIds(Long[] ids)
|
||||
{
|
||||
public int deletePayByIds(Long[] ids) {
|
||||
return payMapper.deletePayByIds(ids);
|
||||
}
|
||||
|
||||
|
@ -152,8 +146,7 @@ public class PayServiceImpl implements PayService
|
|||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deletePayById(Long id)
|
||||
{
|
||||
public int deletePayById(Long id) {
|
||||
return payMapper.deletePayById(id);
|
||||
}
|
||||
|
||||
|
@ -217,7 +210,7 @@ public class PayServiceImpl implements PayService
|
|||
}
|
||||
|
||||
private PayVO selectOne(PayQuery query) {
|
||||
PageHelper.startPage(1,1);
|
||||
PageHelper.startPage(1, 1);
|
||||
List<PayVO> payList = this.selectPayList(query);
|
||||
return CollectionUtils.firstElement(payList);
|
||||
}
|
||||
|
@ -391,6 +384,7 @@ public class PayServiceImpl implements PayService
|
|||
|
||||
/**
|
||||
* 刷新支付结果
|
||||
*
|
||||
* @param no 支付单号
|
||||
*/
|
||||
@Override
|
||||
|
@ -533,3 +527,4 @@ public class PayServiceImpl implements PayService
|
|||
|
||||
return result == null ? 0 : result;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user