fix: 店铺被拒绝后无法再次申请店铺问题修正。修改为店铺状态在申请中、开启、关闭状态时无法申请

This commit is contained in:
Chopper711 2023-03-23 16:45:14 +08:00
parent a21f4800ab
commit b95712aef3

View File

@ -342,10 +342,11 @@ public class StoreServiceImpl extends ServiceImpl<StoreMapper, Store> implements
*/
private void checkStoreStatus(Store store) {
//如果店铺状态为申请中或者已申请则正常走流程否则抛出异常
if (store.getStoreDisable().equals(StoreStatusEnum.APPLY.name()) || store.getStoreDisable().equals(StoreStatusEnum.APPLYING.name())) {
return;
} else {
//如果店铺状态为已开启已关闭申请中则抛出异常
if (store.getStoreDisable().equals(StoreStatusEnum.OPEN.name())
|| store.getStoreDisable().equals(StoreStatusEnum.CLOSED.name())
|| store.getStoreDisable().equals(StoreStatusEnum.APPLYING.name())
) {
throw new ServiceException(ResultCode.STORE_STATUS_ERROR);
}
@ -381,7 +382,7 @@ public class StoreServiceImpl extends ServiceImpl<StoreMapper, Store> implements
AuthUser currentUser = UserContext.getCurrentUser();
List<String> skuIdList = new ArrayList<>();
for (FootPrint footPrint : footprintService.list(new LambdaUpdateWrapper<FootPrint>().eq(FootPrint::getStoreId, currentUser.getStoreId()).eq(FootPrint::getMemberId, memberId))) {
if(footPrint.getSkuId() != null){
if (footPrint.getSkuId() != null) {
skuIdList.add(footPrint.getSkuId());
}
}