|
|
@@ -56,7 +56,6 @@ import org.springframework.transaction.annotation.Transactional;
|
|
|
import javax.annotation.Resource;
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
-import java.io.IOException;
|
|
|
import java.math.BigDecimal;
|
|
|
import java.math.RoundingMode;
|
|
|
import java.text.SimpleDateFormat;
|
|
|
@@ -476,12 +475,11 @@ public class OrderServiceImpl extends ServiceImpl<AppOrderMapper, AppOrder> impl
|
|
|
/**
|
|
|
* 创建订单
|
|
|
*
|
|
|
- * @param createOrderForm
|
|
|
* @return 支付订单对象
|
|
|
*/
|
|
|
@Override
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
- public UserPayForm createOrder(CreateOrderForm createOrderForm) throws IOException {
|
|
|
+ public UserPayForm createOrder(CreateOrderForm createOrderForm){
|
|
|
//获取登录用户
|
|
|
LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
|
|
|
|
|
@@ -511,8 +509,8 @@ public class OrderServiceImpl extends ServiceImpl<AppOrderMapper, AppOrder> impl
|
|
|
|
|
|
List<AppCoursesVerificationRecord> appCoursesVerificationRecordList = new ArrayList<>();
|
|
|
|
|
|
- String productKey = ""; // ORDER_TYPE_1_PRODUCT_N001
|
|
|
- String stockKey = ""; // ORDER_TYPE_1_PRODUCT_STOCK_N001
|
|
|
+ String productKey; // ORDER_TYPE_1_PRODUCT_N001
|
|
|
+ String stockKey; // ORDER_TYPE_1_PRODUCT_STOCK_N001
|
|
|
|
|
|
//订单内容
|
|
|
switch (createOrderForm.getType()) {
|
|
|
@@ -702,10 +700,8 @@ public class OrderServiceImpl extends ServiceImpl<AppOrderMapper, AppOrder> impl
|
|
|
|
|
|
//订单总价(商品的售价总和)
|
|
|
BigDecimal sumPrice = BigDecimal.ZERO;
|
|
|
- ;
|
|
|
//团购优惠
|
|
|
BigDecimal tDiscounts = BigDecimal.ZERO;
|
|
|
- ;
|
|
|
|
|
|
for (int i = 1; i <= createOrderForm.getAmount(); i++) {
|
|
|
|
|
|
@@ -1401,8 +1397,8 @@ public class OrderServiceImpl extends ServiceImpl<AppOrderMapper, AppOrder> impl
|
|
|
|
|
|
List<AppCoursesVerificationRecord> appCoursesVerificationRecordList = new ArrayList<>();
|
|
|
|
|
|
- String productKey = ""; // ORDER_TYPE_1_PRODUCT_N001
|
|
|
- String stockKey = ""; // ORDER_TYPE_1_PRODUCT_STOCK_N001
|
|
|
+ String productKey; // ORDER_TYPE_1_PRODUCT_N001
|
|
|
+ String stockKey; // ORDER_TYPE_1_PRODUCT_STOCK_N001
|
|
|
|
|
|
//订单内容
|
|
|
switch (createOrderForm.getType()) {
|
|
|
@@ -1613,10 +1609,8 @@ public class OrderServiceImpl extends ServiceImpl<AppOrderMapper, AppOrder> impl
|
|
|
|
|
|
//订单总价(商品的售价总和)
|
|
|
BigDecimal sumPrice = BigDecimal.ZERO;
|
|
|
- ;
|
|
|
//团购优惠
|
|
|
BigDecimal tDiscounts = BigDecimal.ZERO;
|
|
|
- ;
|
|
|
|
|
|
for (int i = 1; i <= createOrderForm.getAmount(); i++) {
|
|
|
|
|
|
@@ -2726,7 +2720,6 @@ public class OrderServiceImpl extends ServiceImpl<AppOrderMapper, AppOrder> impl
|
|
|
**/
|
|
|
@Transactional
|
|
|
public AppOrder createOrder(List<String> id, int type, String userId, String userIds) {
|
|
|
- //todo 保险 闸机待接入
|
|
|
//订单类型;0场地1赛事2课程
|
|
|
AppOrder appOrder = new AppOrder();
|
|
|
switch (type) {
|