Merge remote-tracking branch 'origin/dev/dev' into develop

# Conflicts:
#	docker-compose.yml
This commit is contained in:
shahaibo
2023-12-13 17:26:48 +08:00
6 changed files with 27 additions and 8 deletions

View File

@@ -1,13 +1,13 @@
version: "3" version: "3"
services: services:
aida_back: aida_back:
container_name: stable-version-aida-back container_name: develop-version-aida-back
build: . build: .
volumes: volumes:
# 数据挂载 # 数据挂载
- /workspace/home/aida/file/:/workspace/home/aida/file/ - /workspace/home/aida/file/:/workspace/home/aida/file/
ports: ports:
- "10086:5567" - "10088:5567"
# mysql8.0: # mysql8.0:
# # 镜像名 # # 镜像名
# image: mysql:8.0.21 # image: mysql:8.0.21

View File

@@ -20,4 +20,6 @@ public class UserLikeChooseVO {
@ApiModelProperty("关联的collection") @ApiModelProperty("关联的collection")
private UserLikeCollectionVO collection; private UserLikeCollectionVO collection;
private String sex;
} }

View File

@@ -418,7 +418,7 @@ public class LibraryServiceImpl extends ServiceImpl<LibraryMapper, Library> impl
.map(Library::getId) .map(Library::getId)
.collect(Collectors.toList()); .collect(Collectors.toList());
List<Long> maleModelIds = librarys.stream() List<Long> maleModelIds = librarys.stream()
.filter(o -> o.getLevel1Type().equals(LibraryLevel1TypeEnum.MODELS.getRealName()) && o.getLevel2Type().equals(Sex.FEMALE.getValue())) .filter(o -> o.getLevel1Type().equals(LibraryLevel1TypeEnum.MODELS.getRealName()) && o.getLevel2Type().equals(Sex.MALE.getValue()))
.map(Library::getId) .map(Library::getId)
.collect(Collectors.toList()); .collect(Collectors.toList());
if (CollectionUtil.isNotEmpty(femaleModelIds)) { if (CollectionUtil.isNotEmpty(femaleModelIds)) {

View File

@@ -4,12 +4,12 @@ import cn.hutool.core.collection.CollectionUtil;
import com.ai.da.common.config.exception.BusinessException; import com.ai.da.common.config.exception.BusinessException;
import com.ai.da.common.utils.DateUtil; import com.ai.da.common.utils.DateUtil;
import com.ai.da.common.utils.MinioUtil; import com.ai.da.common.utils.MinioUtil;
import com.ai.da.mapper.TDesignPythonOutfitMapper; import com.ai.da.mapper.*;
import com.ai.da.mapper.UserLikeGroupMapper; import com.ai.da.mapper.entity.Design;
import com.ai.da.mapper.UserLikeMapper;
import com.ai.da.mapper.entity.TDesignPythonOutfit; import com.ai.da.mapper.entity.TDesignPythonOutfit;
import com.ai.da.mapper.entity.UserLike; import com.ai.da.mapper.entity.UserLike;
import com.ai.da.mapper.entity.UserLikeGroup; import com.ai.da.mapper.entity.UserLikeGroup;
import com.ai.da.model.enums.ModelType;
import com.ai.da.model.vo.*; import com.ai.da.model.vo.*;
import com.ai.da.service.AccountService; import com.ai.da.service.AccountService;
import com.ai.da.service.CollectionService; import com.ai.da.service.CollectionService;
@@ -53,6 +53,12 @@ public class UserLikeGroupServiceImpl extends ServiceImpl<UserLikeGroupMapper, U
@Resource @Resource
private TDesignPythonOutfitMapper designPythonOutfitMapper; private TDesignPythonOutfitMapper designPythonOutfitMapper;
@Resource
private DesignMapper designMapper;
@Resource
private SysFileMapper sysFileMapper;
@Resource
private LibraryMapper libraryMapper;
@Override @Override
public void deleteUserGroup(Long userGroupId) { public void deleteUserGroup(Long userGroupId) {
@@ -116,6 +122,16 @@ public class UserLikeGroupServiceImpl extends ServiceImpl<UserLikeGroupMapper, U
throw new BusinessException("history.not.found"); throw new BusinessException("history.not.found");
} }
List<UserLikeVO> userLikeVOS = userLikeService.getGroupDetail(userGroupId); List<UserLikeVO> userLikeVOS = userLikeService.getGroupDetail(userGroupId);
String sex = null;
if (CollectionUtil.isNotEmpty(userLikeVOS)) {
Long designId = userLikeVOS.get(0).getDesignId();
Design design = designMapper.selectById(designId);
if (design.getModelType().equals(ModelType.SYSTEM.getValue())) {
sex = sysFileMapper.selectById(design.getTemplateId()).getLevel2Type();
}else {
sex = libraryMapper.selectById(design.getTemplateId()).getLevel2Type();
}
}
userLikeVOS.forEach(o -> { userLikeVOS.forEach(o -> {
TDesignPythonOutfit tDesignPythonOutfit1 = designPythonOutfitMapper.selectById(o.getDesignOutfitId()); TDesignPythonOutfit tDesignPythonOutfit1 = designPythonOutfitMapper.selectById(o.getDesignOutfitId());
o.setUrl(tDesignPythonOutfit1.getDesignUrl()); o.setUrl(tDesignPythonOutfit1.getDesignUrl());
@@ -133,7 +149,7 @@ public class UserLikeGroupServiceImpl extends ServiceImpl<UserLikeGroupMapper, U
} }
}); });
UserLikeCollectionVO userLikeCollection = collectionService.chooseCollection(group.getCollectionId()); UserLikeCollectionVO userLikeCollection = collectionService.chooseCollection(group.getCollectionId());
return new UserLikeChooseVO(userGroupId, userLikeVOS, userLikeCollection); return new UserLikeChooseVO(userGroupId, userLikeVOS, userLikeCollection, sex);
} }
@Override @Override

View File

@@ -37,6 +37,7 @@ public class UserLikeServiceImpl extends ServiceImpl<UserLikeMapper, UserLike> i
public List<UserLikeVO> getGroupDetail(Long userGroupId) { public List<UserLikeVO> getGroupDetail(Long userGroupId) {
QueryWrapper<UserLike> queryWrapper = new QueryWrapper<>(); QueryWrapper<UserLike> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("user_like_group_id", userGroupId); queryWrapper.eq("user_like_group_id", userGroupId);
queryWrapper.orderByDesc("create_time");
List<UserLike> userLikes = userLikeMapper.selectList(queryWrapper); List<UserLike> userLikes = userLikeMapper.selectList(queryWrapper);
if (CollectionUtils.isEmpty(userLikes)) { if (CollectionUtils.isEmpty(userLikes)) {
return Lists.newArrayList(); return Lists.newArrayList();

View File

@@ -136,7 +136,7 @@ priority.cannot.be.repeated=priority cannot be repeated.
# 当用户输入不符合预设规则时,比如格式错误或者值的范围不正确,这种错误通常可以由用户自行更正。 # 当用户输入不符合预设规则时,比如格式错误或者值的范围不正确,这种错误通常可以由用户自行更正。
userName.does.not.exist=Username or password is incorrect. Please check your entry and try again. userName.does.not.exist=Username or password is incorrect. Please check your entry and try again.
password.error=Username or password is incorrect. Please check your entry and try again. password.error=Username or password is incorrect. Please check your entry and try again.
email.error=Email format is incorrect. Please enter a valid email address. email.error=Email is incorrect, please enter the correct bound email.
email.does.not.exist=Email address does not exist in our records. Please check and try again. email.does.not.exist=Email address does not exist in our records. Please check and try again.
the.verification.code.has.expired=Verification code has expired. Please request a new code to proceed. the.verification.code.has.expired=Verification code has expired. Please request a new code to proceed.
verification.code.error=Verification code entered is incorrect. Please check and try again. verification.code.error=Verification code entered is incorrect. Please check and try again.