|
@@ -19,6 +19,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import com.cyksj.common.AliPayCommon;
|
|
import com.cyksj.common.AliPayCommon;
|
|
|
import com.cyksj.common.EnvCommonService;
|
|
import com.cyksj.common.EnvCommonService;
|
|
|
|
|
+import com.cyksj.common.I18nMessageUtil;
|
|
|
import com.cyksj.common.constant.TemplateEnum;
|
|
import com.cyksj.common.constant.TemplateEnum;
|
|
|
import com.cyksj.common.exception.BusinessRuntimeException;
|
|
import com.cyksj.common.exception.BusinessRuntimeException;
|
|
|
import com.cyksj.common.snowflake.Sequence;
|
|
import com.cyksj.common.snowflake.Sequence;
|
|
@@ -160,7 +161,7 @@ public class OrderDonServiceImpl extends ServiceImpl<OrderDonMapper, OrderDon> i
|
|
|
GoodsDon goodsDon = goodsDonMapper.selectById(sku.getGoodsId());
|
|
GoodsDon goodsDon = goodsDonMapper.selectById(sku.getGoodsId());
|
|
|
Boolean isNew = false;
|
|
Boolean isNew = false;
|
|
|
if (goodsDon == null || !goodsDon.getStatus()) {
|
|
if (goodsDon == null || !goodsDon.getStatus()) {
|
|
|
- throw new BusinessRuntimeException("商品已下架");
|
|
|
|
|
|
|
+ throw new BusinessRuntimeException(I18nValue);
|
|
|
}
|
|
}
|
|
|
String payOpenId = user.getOpenId();
|
|
String payOpenId = user.getOpenId();
|
|
|
|
|
|
|
@@ -172,7 +173,7 @@ public class OrderDonServiceImpl extends ServiceImpl<OrderDonMapper, OrderDon> i
|
|
|
if (payRequest.getRelationId() != null && payRequest.getRelationId() > 0) {
|
|
if (payRequest.getRelationId() != null && payRequest.getRelationId() > 0) {
|
|
|
relation = groupsRelationMapper.selectById(payRequest.getRelationId());
|
|
relation = groupsRelationMapper.selectById(payRequest.getRelationId());
|
|
|
if (relation == null) {
|
|
if (relation == null) {
|
|
|
- throw new BusinessRuntimeException(GROUP_INDEX_NOT_FIND.getCode(), GROUP_INDEX_NOT_FIND.getMsg());
|
|
|
|
|
|
|
+ throw new BusinessRuntimeException(GROUP_INDEX_NOT_FIND.getCode(), I18nMessageUtil.getI18nMsg("parking_space_not_exist"));
|
|
|
}
|
|
}
|
|
|
if (relation.getUserId() != null && relation.getUserId() > 0L) {
|
|
if (relation.getUserId() != null && relation.getUserId() > 0L) {
|
|
|
throw new BusinessRuntimeException(GROUP_INDEX_ALREADY_BE_USER.getCode(), GROUP_INDEX_ALREADY_BE_USER.getMsg());
|
|
throw new BusinessRuntimeException(GROUP_INDEX_ALREADY_BE_USER.getCode(), GROUP_INDEX_ALREADY_BE_USER.getMsg());
|
|
@@ -236,7 +237,7 @@ public class OrderDonServiceImpl extends ServiceImpl<OrderDonMapper, OrderDon> i
|
|
|
orderDon.setOrderNo(donNo);
|
|
orderDon.setOrderNo(donNo);
|
|
|
orderDon.setOpenId(payOpenId);
|
|
orderDon.setOpenId(payOpenId);
|
|
|
if (sku.getPrice() != null && payRequest.getDonMoney().compareTo(sku.getPrice()) < 0) {
|
|
if (sku.getPrice() != null && payRequest.getDonMoney().compareTo(sku.getPrice()) < 0) {
|
|
|
- throw BusinessRuntimeException.getInstance("车位所付金额错误");
|
|
|
|
|
|
|
+ throw BusinessRuntimeException.getInstance(I18nMessageUtil.getI18nMsg("sys_error"));
|
|
|
}
|
|
}
|
|
|
orderDon.setMoney(payRequest.getDonMoney());
|
|
orderDon.setMoney(payRequest.getDonMoney());
|
|
|
orderDon.setRealMoney(payRequest.getDonMoney());
|
|
orderDon.setRealMoney(payRequest.getDonMoney());
|
|
@@ -278,7 +279,7 @@ public class OrderDonServiceImpl extends ServiceImpl<OrderDonMapper, OrderDon> i
|
|
|
if (relationId != 0) {
|
|
if (relationId != 0) {
|
|
|
Long gtSkuId = groupsRelationMapper.getGroupTripsSkuIdByRelationId(relationId);
|
|
Long gtSkuId = groupsRelationMapper.getGroupTripsSkuIdByRelationId(relationId);
|
|
|
if (!gtSkuId.equals(orderDon.getSkuId())) {
|
|
if (!gtSkuId.equals(orderDon.getSkuId())) {
|
|
|
- throw BusinessRuntimeException.getInstance("车位与车队规格不一致");
|
|
|
|
|
|
|
+ throw BusinessRuntimeException.getInstance(I18nMessageUtil.getI18nMsg("sys_error"));
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
this.saveOrUpdate(orderDon);
|
|
this.saveOrUpdate(orderDon);
|