|
@@ -1716,7 +1716,10 @@ public class StoreOrderServiceImpl extends AbstractService<StoreOrder> implement
|
|
|
|
|
|
@Override
|
|
|
@Transactional(propagation = Propagation.REQUIRED)
|
|
|
- public Boolean goPay(GoPinkDTO dto) {
|
|
|
+ public com.txz.mall.core.Result goPay(GoPinkDTO dto) {
|
|
|
+ if (ObjectUtils.isEmpty(dto.getType())) {
|
|
|
+ throw new ServiceException(I18nUtil.get("participation.type.is.empty"));
|
|
|
+ }
|
|
|
StoreOrder storeOrder = findBy("orderId", dto.getOrderId());
|
|
|
if (ObjectUtils.isEmpty(storeOrder)) {
|
|
|
throw new ServiceException(I18nUtil.get("order.is.empty.orderid") + dto.getOrderId());
|
|
@@ -1738,13 +1741,16 @@ public class StoreOrderServiceImpl extends AbstractService<StoreOrder> implement
|
|
|
if (result.getCode().equals(ResultCode.SUCCESS.getCode())) {
|
|
|
AccountDTO accountDTO = JSONObject.parseObject(JSONObject.toJSONString(result.getData()), AccountDTO.class);
|
|
|
if (accountDTO.getBalance().compareTo(storeOrder.getPayPrice()) < 0) {
|
|
|
- throw new ServiceException(ResultCode.INSUFFICIENT_BALANCE);
|
|
|
+ // throw new ServiceException(ResultCode.INSUFFICIENT_BALANCE);
|
|
|
+ return ResultGenerator.genFailResult(ResultCode.INSUFFICIENT_BALANCE);
|
|
|
}
|
|
|
} else {
|
|
|
throw new ServiceException(I18nUtil.get("failed.to.obtain.user.wallet.account"));
|
|
|
}
|
|
|
|
|
|
|
|
|
+
|
|
|
+
|
|
|
if ("open".equals(dto.getType())) {
|
|
|
OpenParam openParam = new OpenParam();
|
|
|
openParam.setBizId(storeOrder.getId().toString());
|
|
@@ -1785,7 +1791,7 @@ public class StoreOrderServiceImpl extends AbstractService<StoreOrder> implement
|
|
|
log.info("storePinkService.pinkSuccess2 :" + storeOrder);
|
|
|
// goPink(dto);
|
|
|
}
|
|
|
- return true;
|
|
|
+ return ResultGenerator.genSuccessResult();
|
|
|
}
|
|
|
|
|
|
@Resource
|