|
@@ -22,16 +22,13 @@ import org.dromara.service.api.domain.bo.RemoteStoreServiceBo;
|
|
|
import org.dromara.system.constants.StoreConstants;
|
|
import org.dromara.system.constants.StoreConstants;
|
|
|
import org.dromara.system.domain.SysAreaStation;
|
|
import org.dromara.system.domain.SysAreaStation;
|
|
|
import org.dromara.system.domain.SysUserStore;
|
|
import org.dromara.system.domain.SysUserStore;
|
|
|
-import org.dromara.system.domain.bo.SysStoreBanBo;
|
|
|
|
|
-import org.dromara.system.domain.bo.SysStorePageBo;
|
|
|
|
|
-import org.dromara.system.domain.bo.SysStoreRenewBo;
|
|
|
|
|
|
|
+import org.dromara.system.domain.bo.*;
|
|
|
import org.dromara.system.domain.vo.*;
|
|
import org.dromara.system.domain.vo.*;
|
|
|
import org.dromara.system.enums.AreaStationStatusEnum;
|
|
import org.dromara.system.enums.AreaStationStatusEnum;
|
|
|
import org.dromara.system.enums.SysStoreStatusEnum;
|
|
import org.dromara.system.enums.SysStoreStatusEnum;
|
|
|
import org.dromara.system.mapper.SysAreaStationMapper;
|
|
import org.dromara.system.mapper.SysAreaStationMapper;
|
|
|
import org.dromara.system.mapper.SysUserStoreMapper;
|
|
import org.dromara.system.mapper.SysUserStoreMapper;
|
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
-import org.dromara.system.domain.bo.SysStoreBo;
|
|
|
|
|
import org.dromara.system.domain.SysStore;
|
|
import org.dromara.system.domain.SysStore;
|
|
|
import org.dromara.system.mapper.SysStoreMapper;
|
|
import org.dromara.system.mapper.SysStoreMapper;
|
|
|
import org.dromara.system.service.ISysStoreService;
|
|
import org.dromara.system.service.ISysStoreService;
|
|
@@ -159,6 +156,7 @@ public class SysStoreServiceImpl implements ISysStoreService {
|
|
|
public Boolean insertByBo(SysStoreBo bo) {
|
|
public Boolean insertByBo(SysStoreBo bo) {
|
|
|
SysStore add = MapstructUtils.convert(bo, SysStore.class);
|
|
SysStore add = MapstructUtils.convert(bo, SysStore.class);
|
|
|
validEntityBeforeSave(add);
|
|
validEntityBeforeSave(add);
|
|
|
|
|
+ add.setStatus(SysStoreStatusEnum.IN_OPERATION.getValue());
|
|
|
boolean flag = baseMapper.insert(add) == 0;
|
|
boolean flag = baseMapper.insert(add) == 0;
|
|
|
if (flag) {
|
|
if (flag) {
|
|
|
throw new RuntimeException("插入失败");
|
|
throw new RuntimeException("插入失败");
|
|
@@ -312,7 +310,7 @@ public class SysStoreServiceImpl implements ISysStoreService {
|
|
|
return baseMapper.update(
|
|
return baseMapper.update(
|
|
|
Wrappers.lambdaUpdate(SysStore.class)
|
|
Wrappers.lambdaUpdate(SysStore.class)
|
|
|
.eq(SysStore::getId, bo.getId())
|
|
.eq(SysStore::getId, bo.getId())
|
|
|
- .set(SysStore::getEndBusinessTime, bo.getTo())
|
|
|
|
|
|
|
+ .set(SysStore::getValidity, bo.getTo())
|
|
|
.set(SysStore::getStatus, SysStoreStatusEnum.IN_OPERATION.getValue())
|
|
.set(SysStore::getStatus, SysStoreStatusEnum.IN_OPERATION.getValue())
|
|
|
) > 0;
|
|
) > 0;
|
|
|
}
|
|
}
|
|
@@ -348,4 +346,13 @@ public class SysStoreServiceImpl implements ISysStoreService {
|
|
|
|
|
|
|
|
return vos;
|
|
return vos;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public boolean enable(SysStoreEnableBo bo) {
|
|
|
|
|
+ return baseMapper.update(
|
|
|
|
|
+ Wrappers.lambdaUpdate(SysStore.class)
|
|
|
|
|
+ .eq(SysStore::getId, bo.getId())
|
|
|
|
|
+ .set(SysStore::getStatus, SysStoreStatusEnum.IN_OPERATION.getValue())
|
|
|
|
|
+ ) > 0;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|