BUGFIX:aida;
This commit is contained in:
@@ -126,7 +126,11 @@ public class SavedCollectionController {
|
||||
userLikeGroupVO.setSketchCount(CollectionUtils.isEmpty(details) ? 0 : details.size());
|
||||
if (userLikeGroupVO.getOriginal() == 0) {
|
||||
userLikeGroupVO.setOriginalAccountName(accountService.getById(userLikeGroupVO.getOriginalAccountId()).getUserName());
|
||||
userLikeGroupVO.setOriginalPortfolioName(portfolioService.getById(userLikeGroupVO.getOriginalPortfolioId()).getPortfolioName());
|
||||
Portfolio byId = portfolioService.getByIdAll(userLikeGroupVO.getOriginalPortfolioId());
|
||||
if (Objects.nonNull(byId)) {
|
||||
String portfolioName = byId.getPortfolioName();
|
||||
userLikeGroupVO.setOriginalPortfolioName(portfolioName);
|
||||
}
|
||||
}
|
||||
return userLikeGroupVO;
|
||||
}
|
||||
|
||||
@@ -4,4 +4,5 @@ import com.ai.da.common.config.mybatis.plus.CommonMapper;
|
||||
import com.ai.da.mapper.primary.entity.Portfolio;
|
||||
|
||||
public interface PortfolioMapper extends CommonMapper<Portfolio> {
|
||||
Portfolio getByIdAll(Long originalPortfolioId);
|
||||
}
|
||||
|
||||
@@ -26,4 +26,6 @@ public class PortfolioVO extends Portfolio {
|
||||
private Integer isMine;
|
||||
|
||||
private Integer selected;
|
||||
|
||||
private Integer jumpable;
|
||||
}
|
||||
|
||||
@@ -39,4 +39,6 @@ public interface PortfolioService extends IService<Portfolio> {
|
||||
Boolean commentDelete(CommentDTO commentDTO);
|
||||
|
||||
Boolean delete(Long id);
|
||||
|
||||
Portfolio getByIdAll(Long originalPortfolioId);
|
||||
}
|
||||
|
||||
@@ -492,7 +492,16 @@ public class PortfolioServiceImpl extends ServiceImpl<PortfolioMapper, Portfolio
|
||||
vo.setUserName(accountMapper.selectById(vo.getAccountId()).getUserName());
|
||||
if (vo.getOriginal() == 0) {
|
||||
vo.setOriginalUserName(accountMapper.selectById(vo.getOriginalAccountId()).getUserName());
|
||||
vo.setOriginalPortfolioName(portfolioMapper.selectById(vo.getOriginalPortfolioId()).getPortfolioName());
|
||||
Portfolio byId = portfolioMapper.getByIdAll(vo.getOriginalPortfolioId());
|
||||
if (Objects.nonNull(byId)) {
|
||||
String portfolioName = byId.getPortfolioName();
|
||||
vo.setOriginalPortfolioName(portfolioName);
|
||||
if (byId.getIsDeleted() == 0) {
|
||||
vo.setJumpable(1);
|
||||
}else {
|
||||
vo.setJumpable(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (userHolder == null) {
|
||||
vo.setIsMine(0);
|
||||
@@ -882,6 +891,11 @@ public class PortfolioServiceImpl extends ServiceImpl<PortfolioMapper, Portfolio
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Portfolio getByIdAll(Long originalPortfolioId) {
|
||||
return portfolioMapper.getByIdAll(originalPortfolioId);
|
||||
}
|
||||
|
||||
private List<CommentVO> getChildCommentVOList(Long id) {
|
||||
QueryWrapper<Comment> qw = new QueryWrapper<>();
|
||||
qw.lambda().eq(Comment::getParentLevel1Id, id);
|
||||
|
||||
12
src/main/resources/mapper/primary/PortfolioMapper.xml
Normal file
12
src/main/resources/mapper/primary/PortfolioMapper.xml
Normal file
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ai.da.mapper.primary.PortfolioMapper">
|
||||
|
||||
|
||||
<select id="getByIdAll" resultType="com.ai.da.mapper.primary.entity.Portfolio">
|
||||
select
|
||||
*
|
||||
from portfolio
|
||||
where id = #{originalPortfolioId}
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -1,27 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ai.da.mapper.AccountMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.ai.da.mapper.entity.Account">
|
||||
<id column="id" property="id" />
|
||||
<result column="user_email" property="userEmail" />
|
||||
<result column="user_name" property="userName" />
|
||||
<result column="user_password" property="userPassword" />
|
||||
<result column="create_date" property="createDate" />
|
||||
</resultMap>
|
||||
<select id="findByPhoneList" resultType="com.ai.da.mapper.entity.Account">
|
||||
select id , user_email AS userEmail, user_Name AS userName,
|
||||
user_password AS userPassword from t_account
|
||||
where user_Name in
|
||||
<foreach collection="phoneList" item="phone" open="(" separator="," close=")">
|
||||
#{phone}
|
||||
</foreach>
|
||||
</select>
|
||||
<select id="findById" resultType="com.ai.da.mapper.entity.Account">
|
||||
select id ,user_email AS userEmail, user_phone AS userPhone,
|
||||
user_password AS userPassword from t_account
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user