|
@@ -8,15 +8,8 @@ import com.minpay.common.exception.BusinessCodeException;
|
|
|
import com.minpay.common.service.IOrderService;
|
|
|
import com.minpay.common.service.IPublicService;
|
|
|
import com.minpay.common.util.DateUtil;
|
|
|
-import com.minpay.db.table.mapper.VmEquipmentInfMapper;
|
|
|
-import com.minpay.db.table.mapper.VmOrderDetailsMapper;
|
|
|
-import com.minpay.db.table.mapper.VmOrderInfMapper;
|
|
|
-import com.minpay.db.table.mapper.VmProEquRelMapper;
|
|
|
-import com.minpay.db.table.model.VmEquipmentInf;
|
|
|
-import com.minpay.db.table.model.VmOrderDetails;
|
|
|
-import com.minpay.db.table.model.VmOrderInf;
|
|
|
-import com.minpay.db.table.model.VmPersonInf;
|
|
|
-import com.minpay.db.table.model.VmProEquRel;
|
|
|
+import com.minpay.db.table.mapper.*;
|
|
|
+import com.minpay.db.table.model.*;
|
|
|
import com.startup.minpay.frame.exception.MINBusinessException;
|
|
|
import com.startup.minpay.frame.service.base.IMINDataBaseService;
|
|
|
import com.startup.minpay.frame.service.base.Service;
|
|
@@ -161,6 +154,13 @@ public class OrderServiceImpl implements IOrderService {
|
|
|
proPrice = String.valueOf(proInf.getGamePrice());
|
|
|
}
|
|
|
}
|
|
|
+ //查询商品详情
|
|
|
+ VmProductInf vmProductInf = Service.lookup(IMINDataBaseService.class).getMybatisMapper(VmProductInfMapper.class).selectByPrimaryKey(proInf.getProductId());
|
|
|
+ if(proInf == null) {
|
|
|
+ throw new MINBusinessException("无此货");
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
// 计算总金额
|
|
|
String amount = CommonUtil.multiply(proPrice, proNumsAndPayNum);
|
|
|
//初始化订单详情信息
|
|
@@ -172,7 +172,7 @@ public class OrderServiceImpl implements IOrderService {
|
|
|
ordetInf.setProductId(proInf.getProductId()); //商品编号
|
|
|
ordetInf.setCargoWay(cargoWay); //商品所在售货机货道编号
|
|
|
ordetInf.setProType(proType); //商品类型:00正常商品01抽奖商品
|
|
|
- ordetInf.setProName(map.get("proName")); //尚品名称
|
|
|
+ ordetInf.setProName(vmProductInf.getName()); //尚品名称
|
|
|
ordetInf.setProPrice(proPrice); //商品单价
|
|
|
ordetInf.setProNums(proNums); //下单数量
|
|
|
ordetInf.setAmount(amount); //总金额
|