修复专家和评测模块
This commit is contained in:
+1
-1
@@ -55,7 +55,7 @@ public class AppStoreEvaluationController {
|
|||||||
* 首页点击查询评测
|
* 首页点击查询评测
|
||||||
*/
|
*/
|
||||||
@AnonymousAccess
|
@AnonymousAccess
|
||||||
@GetMapping("/evaluation{id}")
|
@GetMapping("/evaluation/{id}")
|
||||||
@ApiOperation(value = "评测查询",notes = "产品评测")
|
@ApiOperation(value = "评测查询",notes = "产品评测")
|
||||||
public ApiResult<EvaluationDTO> getYxEvaluation(@PathVariable int id){
|
public ApiResult<EvaluationDTO> getYxEvaluation(@PathVariable int id){
|
||||||
EvaluationDTO evaluationDTO=yxEvaluationService.getEvaluationById(id);
|
EvaluationDTO evaluationDTO=yxEvaluationService.getEvaluationById(id);
|
||||||
|
|||||||
+6
-5
@@ -49,14 +49,15 @@ public interface YxEvaluationService extends BaseService<YxEvaluation> {
|
|||||||
*/
|
*/
|
||||||
void download(List<YxEvaluationDto> all, HttpServletResponse response) throws IOException;
|
void download(List<YxEvaluationDto> all, HttpServletResponse response) throws IOException;
|
||||||
|
|
||||||
/**
|
/***
|
||||||
* 后台获取评测列表
|
* app首页获取评测列表
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
List<EvaluationDTO> getList();
|
List<EvaluationDTO> getList();
|
||||||
|
|
||||||
/***
|
|
||||||
* app首页获取评测列表
|
/**
|
||||||
|
* 后台获取评测列表
|
||||||
|
* @return
|
||||||
*/
|
*/
|
||||||
List<YxEvaluationQueryVo> getList(int page, int limit);
|
List<YxEvaluationQueryVo> getList(int page, int limit);
|
||||||
|
|
||||||
|
|||||||
+9
-6
@@ -47,10 +47,8 @@ import org.springframework.transaction.annotation.Transactional;
|
|||||||
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.LinkedHashMap;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
/**
|
/**
|
||||||
* @author hupeng
|
* @author hupeng
|
||||||
* @date 2022-09-21
|
* @date 2022-09-21
|
||||||
@@ -133,12 +131,15 @@ public class YxEvaluationServiceImpl extends BaseServiceImpl<YxEvaluationMapper,
|
|||||||
list.forEach(evaluationDTO->{
|
list.forEach(evaluationDTO->{
|
||||||
YxStoreProduct yxStoreProduct = yxStoreProductService.getProductInfo(Long.valueOf(evaluationDTO.getProduct()));
|
YxStoreProduct yxStoreProduct = yxStoreProductService.getProductInfo(Long.valueOf(evaluationDTO.getProduct()));
|
||||||
evaluationDTO.setProductInfo(yxStoreProduct);
|
evaluationDTO.setProductInfo(yxStoreProduct);
|
||||||
|
evaluationDTO.setAccessibilityImageArr(Arrays.asList(evaluationDTO.getAccessibilityImage().split(",")));
|
||||||
|
evaluationDTO.setDisplayImageArr(Arrays.asList(evaluationDTO.getDisplayImage().split(",")));
|
||||||
|
evaluationDTO.setFeelImageArr(Arrays.asList(evaluationDTO.getFeelImage().split(",")));
|
||||||
});
|
});
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* app首页评测列表
|
*评测列表
|
||||||
* @return List
|
* @return List
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@@ -163,7 +164,9 @@ public class YxEvaluationServiceImpl extends BaseServiceImpl<YxEvaluationMapper,
|
|||||||
EvaluationDTO evaluationDTO=generator.convert(this.baseMapper.selectById(id), EvaluationDTO.class);
|
EvaluationDTO evaluationDTO=generator.convert(this.baseMapper.selectById(id), EvaluationDTO.class);
|
||||||
YxStoreProduct yxStoreProduct = yxStoreProductService.getProductInfo(Long.valueOf(evaluationDTO.getProduct()));
|
YxStoreProduct yxStoreProduct = yxStoreProductService.getProductInfo(Long.valueOf(evaluationDTO.getProduct()));
|
||||||
evaluationDTO.setProductInfo(yxStoreProduct);
|
evaluationDTO.setProductInfo(yxStoreProduct);
|
||||||
|
evaluationDTO.setAccessibilityImageArr(Arrays.asList(evaluationDTO.getAccessibilityImage().split(",")));
|
||||||
|
evaluationDTO.setDisplayImageArr(Arrays.asList(evaluationDTO.getDisplayImage().split(",")));
|
||||||
|
evaluationDTO.setFeelImageArr(Arrays.asList(evaluationDTO.getFeelImage().split(",")));
|
||||||
return evaluationDTO;
|
return evaluationDTO;
|
||||||
// return generator.convert(this.baseMapper.selectById(id), EvaluationDTO.class);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,9 +39,6 @@ public class YxStoreExpert implements Serializable {
|
|||||||
@ApiModelProperty(value = "排序")
|
@ApiModelProperty(value = "排序")
|
||||||
private Integer sort;
|
private Integer sort;
|
||||||
|
|
||||||
/** 商户Id(0为总后台管理员创建,不为0的时候是商户后台创建) */
|
|
||||||
private Integer merId;
|
|
||||||
|
|
||||||
|
|
||||||
/** 专家人像大图 */
|
/** 专家人像大图 */
|
||||||
@NotBlank
|
@NotBlank
|
||||||
|
|||||||
@@ -24,10 +24,6 @@ public class YxStoreExpertDto implements Serializable {
|
|||||||
/** 专家id */
|
/** 专家id */
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
/** 商户Id(0为总后台管理员创建,不为0的时候是商户后台创建) */
|
|
||||||
|
|
||||||
private Integer merId;
|
|
||||||
|
|
||||||
/** 专家人像大图 */
|
/** 专家人像大图 */
|
||||||
private String image;
|
private String image;
|
||||||
|
|
||||||
|
|||||||
-2
@@ -64,7 +64,6 @@ public class YxStoreExpertServiceImpl extends BaseServiceImpl<YxStoreExpertMappe
|
|||||||
wrapper.eq(YxStoreExpert::getIsShow, ShopCommonEnum.SHOW_1.getValue())
|
wrapper.eq(YxStoreExpert::getIsShow, ShopCommonEnum.SHOW_1.getValue())
|
||||||
.orderByAsc(YxStoreExpert::getSort);
|
.orderByAsc(YxStoreExpert::getSort);
|
||||||
List<ExpertDTO> list = generator.convert(baseMapper.selectList(wrapper),ExpertDTO.class);
|
List<ExpertDTO> list = generator.convert(baseMapper.selectList(wrapper),ExpertDTO.class);
|
||||||
// return TreeUtil.list2TreeConverter(list,0); //没有父类,不需要树形
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -81,7 +80,6 @@ public class YxStoreExpertServiceImpl extends BaseServiceImpl<YxStoreExpertMappe
|
|||||||
List<Map<String, Object>> list = new ArrayList<>();
|
List<Map<String, Object>> list = new ArrayList<>();
|
||||||
for (YxStoreExpertDto yxStoreExpert : all) {
|
for (YxStoreExpertDto yxStoreExpert : all) {
|
||||||
Map<String,Object> map = new LinkedHashMap<>();
|
Map<String,Object> map = new LinkedHashMap<>();
|
||||||
map.put("商户Id(0为总后台管理员创建,不为0的时候是商户后台创建)", yxStoreExpert.getMerId());
|
|
||||||
map.put("专家人像大图", yxStoreExpert.getImage());
|
map.put("专家人像大图", yxStoreExpert.getImage());
|
||||||
map.put("专家名称", yxStoreExpert.getExpertName());
|
map.put("专家名称", yxStoreExpert.getExpertName());
|
||||||
map.put("专家简介", yxStoreExpert.getExpertInfo());
|
map.put("专家简介", yxStoreExpert.getExpertInfo());
|
||||||
|
|||||||
@@ -53,9 +53,11 @@ public class EvaluationDTO implements Serializable {
|
|||||||
private String summary;
|
private String summary;
|
||||||
|
|
||||||
|
|
||||||
/** 产品展示图集 */
|
/** 产品展示图 */
|
||||||
private String displayImage;
|
private String displayImage;
|
||||||
|
|
||||||
|
/** 产品展示图集 */
|
||||||
|
private List<String> displayImageArr;
|
||||||
|
|
||||||
/** 产品展示文字 */
|
/** 产品展示文字 */
|
||||||
private String displaySynopsis;
|
private String displaySynopsis;
|
||||||
@@ -63,6 +65,8 @@ public class EvaluationDTO implements Serializable {
|
|||||||
|
|
||||||
/** 实用体验感受图 */
|
/** 实用体验感受图 */
|
||||||
private String feelImage;
|
private String feelImage;
|
||||||
|
/** 实用体验感受图集 */
|
||||||
|
private List<String> feelImageArr;
|
||||||
|
|
||||||
|
|
||||||
/** 使用体验感受文字 */
|
/** 使用体验感受文字 */
|
||||||
@@ -71,7 +75,8 @@ public class EvaluationDTO implements Serializable {
|
|||||||
|
|
||||||
/** 易用性体验图 */
|
/** 易用性体验图 */
|
||||||
private String accessibilityImage;
|
private String accessibilityImage;
|
||||||
|
/** 易用性体验图 */
|
||||||
|
private List<String> accessibilityImageArr;
|
||||||
|
|
||||||
/** 易用性体验文字 */
|
/** 易用性体验文字 */
|
||||||
private String accessibilitySynopsis;
|
private String accessibilitySynopsis;
|
||||||
|
|||||||
Reference in New Issue
Block a user