mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-08-14 10:11:53 +08:00
拼团活动:完善 TradeCombinationHandler
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
package cn.iocoder.yudao.module.promotion.api.bargain;
|
||||
|
||||
import cn.iocoder.yudao.module.promotion.api.bargain.dto.BargainRecordCreateReqDTO;
|
||||
import cn.iocoder.yudao.module.promotion.api.bargain.dto.BargainValidateJoinRespDTO;
|
||||
import cn.iocoder.yudao.module.promotion.service.bargain.BargainRecordService;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -18,9 +17,9 @@ public class BargainRecordApiImpl implements BargainRecordApi {
|
||||
@Resource
|
||||
private BargainRecordService bargainRecordService;
|
||||
|
||||
@Override
|
||||
public void createBargainRecord(BargainRecordCreateReqDTO reqDTO) {
|
||||
}
|
||||
//@Override
|
||||
//public void createBargainRecord(BargainRecordCreateReqDTO reqDTO) {
|
||||
//}
|
||||
|
||||
@Override
|
||||
public BargainValidateJoinRespDTO validateJoinBargain(Long userId, Long bargainRecordId, Long skuId) {
|
||||
|
@@ -77,12 +77,12 @@ public class BargainRecordServiceImpl implements BargainRecordService {
|
||||
|
||||
@Override
|
||||
public BargainValidateJoinRespDTO validateJoinBargain(Long userId, Long bargainRecordId, Long skuId) {
|
||||
// 1.1 拼团记录不存在
|
||||
// 1.1 砍价记录不存在
|
||||
BargainRecordDO record = bargainRecordMapper.selectByIdAndUserId(bargainRecordId, userId);
|
||||
if (record == null) {
|
||||
throw exception(BARGAIN_RECORD_NOT_EXISTS);
|
||||
}
|
||||
// 1.2 拼团记录未在进行中
|
||||
// 1.2 砍价记录未在进行中
|
||||
if (ObjUtil.notEqual(record.getStatus(), BargainRecordStatusEnum.IN_PROGRESS)) {
|
||||
throw exception(BARGAIN_JOIN_RECORD_NOT_SUCCESS);
|
||||
}
|
||||
|
Reference in New Issue
Block a user