This commit is contained in:
Carl 2022-01-29 19:40:10 +08:00
parent 990743412a
commit 801ac2979c

View File

@ -52,6 +52,7 @@ public class OrderService {
@Transactional
public int generateOrder(OrdersEntity ordersEntity, JSONArray listJson) throws Exception {
AddOrSaveEntity addOrSaveEntity = new AddOrSaveEntity();
try {
if (ordersEntity.getCouponCode() != "" && null != ordersEntity.getCouponCode()) {
CouponCosumeEntity couponCosumeEntity = new CouponCosumeEntity();
couponCosumeEntity.setCouponCode(ordersEntity.getCouponCode());
@ -95,6 +96,7 @@ public class OrderService {
addOrSaveEntity.setAddressProvinceName(orderAddress.getAddressProvinceName());
addOrSaveEntity.setAddressUserName(orderAddress.getAddressUserName());
JSONObject jsonObject = JSONObject.parseObject(addOrSave(addOrSaveEntity));
if (jsonObject.getString("code").equals("1"))
return 1;
else
@ -102,6 +104,11 @@ public class OrderService {
} else {
return 0;
}
}catch (Exception e){
System.out.println(e.getMessage()
);
}
return 0;
}
public int checkNotify(String orderNumber){