|
@@ -1,6 +1,5 @@
|
|
|
package org.jeecg.modules.system.app.service.impl;
|
|
|
|
|
|
-import cn.hutool.core.util.StrUtil;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
@@ -24,8 +23,10 @@ import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
-import java.util.*;
|
|
|
-import java.util.stream.Collectors;
|
|
|
+import java.util.ArrayList;
|
|
|
+import java.util.HashMap;
|
|
|
+import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
|
|
|
import static org.jeecg.common.constant.CommonConstant.SC_INTERNAL_SERVER_ERROR_500;
|
|
|
|
|
@@ -89,26 +90,26 @@ public class AppSiteServiceImpl extends ServiceImpl<AppSiteMapper, AppSite> impl
|
|
|
@Override
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
public Boolean editSite(AppSiteDTO siteCuDTO) {
|
|
|
- String id = siteCuDTO.getId();
|
|
|
- if (StrUtil.isNotBlank(id)) {
|
|
|
- AppSite oldSite = baseMapper.selectById(id);
|
|
|
- //比较运动类目,做新增删除修改
|
|
|
- if (!oldSite.getCategoryId().equals(siteCuDTO.getCategoryId())) {
|
|
|
- List<String> oldList = Arrays.stream(oldSite.getCategoryId().split(",")).collect(Collectors.toList());
|
|
|
- List<String> newList = Arrays.stream(siteCuDTO.getCategoryId().split(",")).collect(Collectors.toList());
|
|
|
- List<String> diffList = listCompare(oldList, newList);
|
|
|
- if (ObjectUtils.isNotEmpty(diffList)) {
|
|
|
+// String id = siteCuDTO.getId();
|
|
|
+// if (StrUtil.isNotBlank(id)) {
|
|
|
+// AppSite oldSite = baseMapper.selectById(id);
|
|
|
+// //比较运动类目,做新增删除修改
|
|
|
+// if (!oldSite.getCategoryId().equals(siteCuDTO.getCategoryId())) {
|
|
|
+// List<String> oldList = Arrays.stream(oldSite.getCategoryId().split(",")).collect(Collectors.toList());
|
|
|
+// List<String> newList = Arrays.stream(siteCuDTO.getCategoryId().split(",")).collect(Collectors.toList());
|
|
|
+// List<String> diffList = listCompare(oldList, newList);
|
|
|
+// if (ObjectUtils.isNotEmpty(diffList)) {
|
|
|
// //删除
|
|
|
-// priceRulesMapper.delete(Wrappers.<AppSitePriceRules>lambdaQuery().eq(AppSitePriceRules::getSiteId, id).in(AppSitePriceRules::getCategoryId, diffList));
|
|
|
+// priceRulesMapper.delete(Wrappers.<AppSitePriceRules>lambdaQuery().eq(AppSitePriceRules::getSitePlaceId, id).in(AppSitePriceRules::getCategoryId, diffList));
|
|
|
// //新增
|
|
|
// for (String categoryId : newList) {
|
|
|
// AppSitePriceRules priceRules = new AppSitePriceRules();
|
|
|
// priceRules.setSiteId(id);
|
|
|
// priceRules.setCategoryId(categoryId);
|
|
|
// }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }
|
|
|
AppSite site = new AppSite();
|
|
|
BeanUtils.copyProperties(siteCuDTO, site);
|
|
|
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|