超市优化
This commit is contained in:
		| @ -31,10 +31,7 @@ import java.util.List; | ||||
| import java.util.concurrent.locks.Lock; | ||||
| import java.util.concurrent.locks.ReentrantLock; | ||||
|  | ||||
| import static cn.iocoder.yudao.framework.common.pojo.CommonResult.error; | ||||
| import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; | ||||
| import static cn.iocoder.yudao.module.member.enums.ErrorCodeConstants.ORDER_CANCEL_FAIL; | ||||
| import static cn.iocoder.yudao.module.member.enums.ErrorCodeConstants.ORDER_FAIL; | ||||
|  | ||||
| @Tag(name = "APP超市 - 商品订单") | ||||
| @RestController | ||||
| @ -80,8 +77,6 @@ public class AppStoreOrderController { | ||||
|            AddReqVO  addReqVO= storeOrderService.appCreate(dto); | ||||
|            //记录 | ||||
|            memberAsyncService.batchRecord(addReqVO); | ||||
|        }catch (Exception e){ | ||||
|           return error(ORDER_FAIL); | ||||
|        }finally { | ||||
|            createLock.unlock(); | ||||
|        } | ||||
| @ -114,8 +109,6 @@ public class AppStoreOrderController { | ||||
|             AddReqVO cancel = storeOrderService.cancel(orderId); | ||||
|             //记录 | ||||
|             memberAsyncService.batchRecord(cancel); | ||||
|         }catch (Exception e){ | ||||
|             return error(ORDER_CANCEL_FAIL); | ||||
|         }finally { | ||||
|             cancelLock.unlock(); | ||||
|         } | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 zengtao01
					zengtao01