TASK:AiDA模块化
This commit is contained in:
@@ -26,4 +26,6 @@ public class DesignLikeDTO {
|
|||||||
@NotBlank(message = "timeZone.cannot.be.empty")
|
@NotBlank(message = "timeZone.cannot.be.empty")
|
||||||
@ApiModelProperty("本地时区,比如 'Asia/Tokyo' 东京时间 , 'Asia/Shanghai' 北京时间 由js本地获取")
|
@ApiModelProperty("本地时区,比如 'Asia/Tokyo' 东京时间 , 'Asia/Shanghai' 北京时间 由js本地获取")
|
||||||
private String timeZone;
|
private String timeZone;
|
||||||
|
|
||||||
|
private Long projectId;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,13 +1,11 @@
|
|||||||
package com.ai.da.service;
|
package com.ai.da.service;
|
||||||
|
|
||||||
import com.ai.da.common.response.PageBaseResponse;
|
|
||||||
import com.ai.da.mapper.primary.entity.*;
|
import com.ai.da.mapper.primary.entity.*;
|
||||||
import com.ai.da.model.dto.*;
|
import com.ai.da.model.dto.*;
|
||||||
import com.ai.da.model.vo.*;
|
import com.ai.da.model.vo.*;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
@@ -25,7 +23,7 @@ public interface UserLikeGroupService extends IService<UserLikeGroup> {
|
|||||||
|
|
||||||
HistoryUpdateVO updateUserGroupName(Long userGroupId, String userGroupName, String timeZone);
|
HistoryUpdateVO updateUserGroupName(Long userGroupId, String userGroupName, String timeZone);
|
||||||
|
|
||||||
Long insertUserGroup(Long userId, Long collectionId, String timeZone);
|
Long insertUserGroup(Long userId, Long collectionId, String timeZone, Long projectId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* choose
|
* choose
|
||||||
|
|||||||
@@ -1129,16 +1129,16 @@ public class DesignServiceImpl extends ServiceImpl<DesignMapper, Design> impleme
|
|||||||
// if (CollectionUtil.isEmpty(oldElements)) {
|
// if (CollectionUtil.isEmpty(oldElements)) {
|
||||||
// throw new BusinessException("old.elements.not.found");
|
// throw new BusinessException("old.elements.not.found");
|
||||||
// }
|
// }
|
||||||
List<DesignItemDetail> designItemDetails = designItemDetailService.selectByDesignItemId(designLikeDTO.getDesignItemId());
|
// List<DesignItemDetail> designItemDetails = designItemDetailService.selectByDesignItemId(designLikeDTO.getDesignItemId());
|
||||||
if (CollectionUtil.isEmpty(designItemDetails)) {
|
// if (CollectionUtil.isEmpty(designItemDetails)) {
|
||||||
throw new BusinessException("new.designItemDetails.not.found");
|
// throw new BusinessException("new.designItemDetails.not.found");
|
||||||
}
|
// }
|
||||||
//判断老的element合并到新的是否满足 数量不超过15
|
//判断老的element合并到新的是否满足 数量不超过15
|
||||||
List<Long> newElementIds = validateMergeElement(oldElements, designItemDetails);
|
// List<Long> newElementIds = validateMergeElement(oldElements, designItemDetails);
|
||||||
//合并,关联新的element到collection
|
//合并,关联新的element到collection
|
||||||
collectionElementService.relationCollection(newElementIds, userLikeGroup.getCollectionId());
|
// collectionElementService.relationCollection(newElementIds, userLikeGroup.getCollectionId());
|
||||||
//处理关联关系,修复element覆盖得情况
|
//处理关联关系,修复element覆盖得情况
|
||||||
handleCollectionElementRelation(userLikeGroup.getCollectionId(), false, newElementIds);
|
// handleCollectionElementRelation(userLikeGroup.getCollectionId(), false, newElementIds);
|
||||||
|
|
||||||
QueryWrapper<TDesignPythonOutfit> qw = new QueryWrapper<>();
|
QueryWrapper<TDesignPythonOutfit> qw = new QueryWrapper<>();
|
||||||
qw.lambda().eq(TDesignPythonOutfit::getDesignItemId, designLikeDTO.getDesignItemId());
|
qw.lambda().eq(TDesignPythonOutfit::getDesignItemId, designLikeDTO.getDesignItemId());
|
||||||
@@ -1151,7 +1151,7 @@ public class DesignServiceImpl extends ServiceImpl<DesignMapper, Design> impleme
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
//第一次like
|
//第一次like
|
||||||
userGroupId = userLikeGroupService.insertUserGroup(userInfo.getId(), designItem.getCollectionId(), designLikeDTO.getTimeZone());
|
userGroupId = userLikeGroupService.insertUserGroup(userInfo.getId(), designItem.getCollectionId(), designLikeDTO.getTimeZone(), designLikeDTO.getProjectId());
|
||||||
QueryWrapper<TDesignPythonOutfit> qw = new QueryWrapper<>();
|
QueryWrapper<TDesignPythonOutfit> qw = new QueryWrapper<>();
|
||||||
qw.lambda().eq(TDesignPythonOutfit::getDesignItemId, designLikeDTO.getDesignItemId());
|
qw.lambda().eq(TDesignPythonOutfit::getDesignItemId, designLikeDTO.getDesignItemId());
|
||||||
List<TDesignPythonOutfit> tDesignPythonOutfits = designPythonOutfitMapper.selectList(qw);
|
List<TDesignPythonOutfit> tDesignPythonOutfits = designPythonOutfitMapper.selectList(qw);
|
||||||
|
|||||||
@@ -157,7 +157,7 @@ public class UserLikeGroupServiceImpl extends ServiceImpl<UserLikeGroupMapper, U
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Long insertUserGroup(Long userId, Long collectionId, String timeZone) {
|
public Long insertUserGroup(Long userId, Long collectionId, String timeZone, Long projectId) {
|
||||||
UserLikeGroup userLikeGroup = new UserLikeGroup();
|
UserLikeGroup userLikeGroup = new UserLikeGroup();
|
||||||
//默认当前时间
|
//默认当前时间
|
||||||
userLikeGroup.setName(DateUtil.dateToStr(new Date(), DateUtil.YYYY_MM_DD_HH_MM_SS));
|
userLikeGroup.setName(DateUtil.dateToStr(new Date(), DateUtil.YYYY_MM_DD_HH_MM_SS));
|
||||||
@@ -166,6 +166,7 @@ public class UserLikeGroupServiceImpl extends ServiceImpl<UserLikeGroupMapper, U
|
|||||||
userLikeGroup.setAccountId(userId);
|
userLikeGroup.setAccountId(userId);
|
||||||
userLikeGroup.setCollectionId(collectionId);
|
userLikeGroup.setCollectionId(collectionId);
|
||||||
userLikeGroup.setOriginal(1);
|
userLikeGroup.setOriginal(1);
|
||||||
|
userLikeGroup.setProjectId(projectId);
|
||||||
userLikeGroupMapper.insertUserLikeGroup(userLikeGroup);
|
userLikeGroupMapper.insertUserLikeGroup(userLikeGroup);
|
||||||
return userLikeGroup.getId();
|
return userLikeGroup.getId();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user