收款人订单列表、0元下单提交
This commit is contained in:
parent
cc9be65fb1
commit
d9021c7a34
|
@ -331,6 +331,12 @@ public class TransactionBillServiceImpl implements TransactionBillService {
|
|||
ServiceUtil.assertion(suit == null, "套餐不存在");
|
||||
order.setSuitName(suit.getName());
|
||||
|
||||
// 用户信息
|
||||
SmUserVo user = userService.selectSmUserByUserId(data.getUserId());
|
||||
ServiceUtil.assertion(user == null, "用户不存在");
|
||||
ServiceUtil.assertion(user.getWxOpenId() == null, "用户微信openId为空");
|
||||
order.setAccountNo(user.getWxOpenId());
|
||||
|
||||
// 支付过期时间
|
||||
long expireTime = TimeUnit.MILLISECONDS.convert(Constants.BILL_UNPAID_TIMEOUT, Constants.BILL_UNPAID_TIMEUNIT) + System.currentTimeMillis();
|
||||
order.setExpireTime(new Date(expireTime));
|
||||
|
|
|
@ -109,9 +109,9 @@ public class WxPayService implements IWxPayService {
|
|||
ServiceUtil.assertion(!TransactionBillStatus.UNPAID.getStatus().equals(bill.getStatus()), "只能支付未支付的订单");
|
||||
ServiceUtil.assertion(!TransactionBillType.RECHARGE.getType().equals(bill.getType()), "只能支付充值订单");
|
||||
|
||||
SmUserVo user = smUserService.selectSmUserByUserId(bill.getUserId());
|
||||
ServiceUtil.assertion(user == null, "用户不存在");
|
||||
ServiceUtil.assertion(user.getWxOpenId() == null, "用户微信openId为空");
|
||||
// SmUserVo user = smUserService.selectSmUserByUserId(bill.getUserId());
|
||||
// ServiceUtil.assertion(user == null, "用户不存在");
|
||||
// ServiceUtil.assertion(user.getWxOpenId() == null, "用户微信openId为空");
|
||||
|
||||
// 获取JSAPI所需参数
|
||||
// PrepayRequest request = new PrepayRequest();
|
||||
|
|
|
@ -106,6 +106,19 @@ public class AppTransactionBillController extends BaseController
|
|||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@ApiOperation("查询本人收款的订单列表")
|
||||
@GetMapping("/incomeList")
|
||||
@JsonView(JsonViewProfile.AppMch.class)
|
||||
public TableDataInfo incomeList(TransactionBillQuery smTransactionBill)
|
||||
{
|
||||
startPage();
|
||||
smTransactionBill.setMchId(getUserId());
|
||||
smTransactionBill.setType(TransactionBillType.RECHARGE.getType());
|
||||
List<TransactionBillVo> list = smTransactionBillService.selectSmTransactionBillList(smTransactionBill);
|
||||
transactionAssembler.assembleChannelName(list);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@ApiOperation("获取订单详情")
|
||||
@GetMapping("/{billId}")
|
||||
@JsonView(JsonViewProfile.AppUser.class)
|
||||
|
|
Loading…
Reference in New Issue
Block a user