master:生产需求模板BUG修复;

pull/1121/head
liujiang 2025-11-17 15:32:15 +08:00
parent 1b4203b8e5
commit c990142499
2 changed files with 5 additions and 0 deletions

View File

@ -56,6 +56,7 @@ public class StoreProductDemandTemplateServiceImpl implements IStoreProductDeman
StoreProductDemandTemplate template = Optional.ofNullable(this.templateMapper.selectOne(new LambdaQueryWrapper<StoreProductDemandTemplate>()
.eq(StoreProductDemandTemplate::getStoreId, storeId).eq(StoreProductDemandTemplate::getDelFlag, Constants.UNDELETED)))
.orElse(new StoreProductDemandTemplate());
template.setStoreId(storeId);
// 设置初始化值为未选中
template.setSelectSize30(UNSELECTED).setSelectSize31(UNSELECTED).setSelectSize32(UNSELECTED).setSelectSize33(UNSELECTED)
.setSelectSize41(UNSELECTED).setSelectSize42(UNSELECTED).setSelectSize43(UNSELECTED)

View File

@ -118,6 +118,10 @@ public class StoreServiceImpl implements IStoreService {
@Override
@Transactional
public Integer updateDelFlag(StoreUpdateDelFlagDTO delFlagDTO) {
// 是否为超级管理员
if (!SecurityUtils.isAdmin()) {
throw new ServiceException("当前用户非管理员账号,无权限操作!", HttpStatus.ERROR);
}
Store store = Optional.ofNullable(this.storeMapper.selectOne(new LambdaQueryWrapper<Store>()
.eq(Store::getId, delFlagDTO.getStoreId())))
.orElseThrow(() -> new ServiceException("档口不存在!", HttpStatus.ERROR));