|
@@ -80,7 +80,7 @@ public class SubmitServiceImpl implements SubmitService {
|
|
|
@Override
|
|
|
public ResponseJson<Map<String, Object>> verify(SubmitDto submitDto) {
|
|
|
|
|
|
- Map<String, Object> map = new HashMap<>();
|
|
|
+ /*Map<String, Object> map = new HashMap<>();
|
|
|
boolean bol = false;
|
|
|
// 机构一级分类
|
|
|
String firstClubType = baseMapper.firstClubTypeById(submitDto.getClubId());
|
|
@@ -90,8 +90,8 @@ public class SubmitServiceImpl implements SubmitService {
|
|
|
try {
|
|
|
ArrayList<Integer> list = new ArrayList<>();
|
|
|
JSONArray orderInfo = parseArray(submitDto.getOrderInfo());
|
|
|
- /*Object productInfo = orderInfo.get("productInfo");
|
|
|
- JSONArray jsonArray = parseArray(productInfo.toString());*/
|
|
|
+ *//*Object productInfo = orderInfo.get("productInfo");
|
|
|
+ JSONArray jsonArray = parseArray(productInfo.toString());*//*
|
|
|
for (Object infoObject : orderInfo) {
|
|
|
JSONObject productTemp = (JSONObject) infoObject;
|
|
|
JSONArray productArr = (JSONArray) productTemp.get("productInfo");
|
|
@@ -115,8 +115,8 @@ public class SubmitServiceImpl implements SubmitService {
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
return ResponseJson.error("商品验证失败",null);
|
|
|
- }
|
|
|
- return ResponseJson.success("验证成功", map);
|
|
|
+ }*/
|
|
|
+ return ResponseJson.success();
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -346,6 +346,7 @@ public class SubmitServiceImpl implements SubmitService {
|
|
|
orderParamBo.setAddressId(submitDto.getAddressId());
|
|
|
orderParamBo.setClubCouponId(submitDto.getClubCouponId());
|
|
|
orderParamBo.setOrderSeen(submitDto.getOrderSeen());
|
|
|
+ orderParamBo.setOrderMiniType(submitDto.getOrderMiniType());
|
|
|
/*
|
|
|
* 保存订单
|
|
|
*/
|
|
@@ -1622,6 +1623,14 @@ public class SubmitServiceImpl implements SubmitService {
|
|
|
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
|
|
return ResponseJson.error(-3, "您已有2个采购金额过小的订单,本次不能再进行采购。您可使用微信扫描以下二维码,进入采美旗下“呵呵商城”小程序购买小额商品");
|
|
|
}
|
|
|
+ if (orderParamBo.getOrderMiniType() == 0) {
|
|
|
+ if (mainOrderIds != null && mainOrderIds.size() <= 1) {
|
|
|
+ // 设置手动回滚事务
|
|
|
+ TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
|
|
+ return ResponseJson.error(-5, "采购金额过小,将扣除500采美豆,建议您使用微信扫描以下二维码,进入采美旗下“呵呵商城”小程序购买小额商品。");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ log.info("订单提交状态:"+orderParamBo.getOrderMiniType());
|
|
|
UserBeansHistoryPo beansHistory = new UserBeansHistoryPo();
|
|
|
beansHistory.setUserId(mainOrder.getUserId());
|
|
|
beansHistory.setOrderId(mainOrder.getOrderId());
|
|
@@ -1635,6 +1644,27 @@ public class SubmitServiceImpl implements SubmitService {
|
|
|
productService.updateUserBeans(beansHistory, beans, "【价格低于1000,倒扣500采美豆】");
|
|
|
}
|
|
|
}
|
|
|
+ if (orderParamBo.getOrderMiniType() != 2) {
|
|
|
+ boolean bol = false;
|
|
|
+ // 机构一级分类
|
|
|
+ String firstClubType = baseMapper.firstClubTypeById(orderParamBo.getClubId());
|
|
|
+ if (!StringUtils.isNotBlank(firstClubType)) {
|
|
|
+ firstClubType = "0";
|
|
|
+ }
|
|
|
+ // 获取订单商品械字号类型
|
|
|
+ List<String> machineType = baseMapper.machineTypeByID(skuIdList);
|
|
|
+ for (String str : machineType) {
|
|
|
+ if ("3".equals(str)) {
|
|
|
+ bol = true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (!"1".equals(firstClubType) && bol) {
|
|
|
+// map.put("code", -1);
|
|
|
+ // 设置手动回滚事务
|
|
|
+ TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
|
|
+ return ResponseJson.error(-6, "订单内存在械字号三类商品,需要拥有医疗执业许可证的医美机构才能购买。建议升级医美机构后再下单,否则会导致订单退款或影响发货。");
|
|
|
+ }
|
|
|
+ }
|
|
|
} catch (ParseException e) {
|
|
|
log.info("自主下单价格低于1000,倒扣500采美豆", e);
|
|
|
}
|