Browse Source

修复专家和评测模块

zyj
sj 2 years ago
parent
commit
49d46c391a
  1. 2
      zsw-bxg/src/main/java/co/yixiang/app/modules/evaluation/rest/AppStoreEvaluationController.java
  2. 11
      zsw-bxg/src/main/java/co/yixiang/modules/evaluation/service/YxEvaluationService.java
  3. 15
      zsw-bxg/src/main/java/co/yixiang/modules/evaluation/service/impl/YxEvaluationServiceImpl.java
  4. 3
      zsw-bxg/src/main/java/co/yixiang/modules/expert/domain/YxStoreExpert.java
  5. 4
      zsw-bxg/src/main/java/co/yixiang/modules/expert/service/dto/YxStoreExpertDto.java
  6. 2
      zsw-bxg/src/main/java/co/yixiang/modules/expert/service/impl/YxStoreExpertServiceImpl.java
  7. 9
      zsw-bxg/src/main/java/co/yixiang/utils/EvaluationDTO.java

2
zsw-bxg/src/main/java/co/yixiang/app/modules/evaluation/rest/AppStoreEvaluationController.java

@ -55,7 +55,7 @@ public class AppStoreEvaluationController {
* 首页点击查询评测
*/
@AnonymousAccess
@GetMapping("/evaluation{id}")
@GetMapping("/evaluation/{id}")
@ApiOperation(value = "评测查询",notes = "产品评测")
public ApiResult<EvaluationDTO> getYxEvaluation(@PathVariable int id){
EvaluationDTO evaluationDTO=yxEvaluationService.getEvaluationById(id);

11
zsw-bxg/src/main/java/co/yixiang/modules/evaluation/service/YxEvaluationService.java

@ -49,14 +49,15 @@ public interface YxEvaluationService extends BaseService<YxEvaluation> {
*/
void download(List<YxEvaluationDto> all, HttpServletResponse response) throws IOException;
/**
* 后台获取评测列表
* @return
/***
* app首页获取评测列表
*/
List<EvaluationDTO> getList();
/***
* app首页获取评测列表
/**
* 后台获取评测列表
* @return
*/
List<YxEvaluationQueryVo> getList(int page, int limit);

15
zsw-bxg/src/main/java/co/yixiang/modules/evaluation/service/impl/YxEvaluationServiceImpl.java

@ -47,10 +47,8 @@ import org.springframework.transaction.annotation.Transactional;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.*;
/**
* @author hupeng
* @date 2022-09-21
@ -133,12 +131,15 @@ public class YxEvaluationServiceImpl extends BaseServiceImpl<YxEvaluationMapper,
list.forEach(evaluationDTO->{
YxStoreProduct yxStoreProduct = yxStoreProductService.getProductInfo(Long.valueOf(evaluationDTO.getProduct()));
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;
}
/**
* app首页评测列表
*评测列表
* @return List
*/
@Override
@ -163,7 +164,9 @@ public class YxEvaluationServiceImpl extends BaseServiceImpl<YxEvaluationMapper,
EvaluationDTO evaluationDTO=generator.convert(this.baseMapper.selectById(id), EvaluationDTO.class);
YxStoreProduct yxStoreProduct = yxStoreProductService.getProductInfo(Long.valueOf(evaluationDTO.getProduct()));
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 generator.convert(this.baseMapper.selectById(id), EvaluationDTO.class);
}
}

3
zsw-bxg/src/main/java/co/yixiang/modules/expert/domain/YxStoreExpert.java

@ -39,9 +39,6 @@ public class YxStoreExpert implements Serializable {
@ApiModelProperty(value = "排序")
private Integer sort;
/** 商户Id(0为总后台管理员创建,不为0的时候是商户后台创建) */
private Integer merId;
/** 专家人像大图 */
@NotBlank

4
zsw-bxg/src/main/java/co/yixiang/modules/expert/service/dto/YxStoreExpertDto.java

@ -24,10 +24,6 @@ public class YxStoreExpertDto implements Serializable {
/** 专家id */
private Long id;
/** 商户Id(0为总后台管理员创建,不为0的时候是商户后台创建) */
private Integer merId;
/** 专家人像大图 */
private String image;

2
zsw-bxg/src/main/java/co/yixiang/modules/expert/service/impl/YxStoreExpertServiceImpl.java

@ -64,7 +64,6 @@ public class YxStoreExpertServiceImpl extends BaseServiceImpl<YxStoreExpertMappe
wrapper.eq(YxStoreExpert::getIsShow, ShopCommonEnum.SHOW_1.getValue())
.orderByAsc(YxStoreExpert::getSort);
List<ExpertDTO> list = generator.convert(baseMapper.selectList(wrapper),ExpertDTO.class);
// return TreeUtil.list2TreeConverter(list,0); //没有父类,不需要树形
return list;
}
@ -81,7 +80,6 @@ public class YxStoreExpertServiceImpl extends BaseServiceImpl<YxStoreExpertMappe
List<Map<String, Object>> list = new ArrayList<>();
for (YxStoreExpertDto yxStoreExpert : all) {
Map<String,Object> map = new LinkedHashMap<>();
map.put("商户Id(0为总后台管理员创建,不为0的时候是商户后台创建)", yxStoreExpert.getMerId());
map.put("专家人像大图", yxStoreExpert.getImage());
map.put("专家名称", yxStoreExpert.getExpertName());
map.put("专家简介", yxStoreExpert.getExpertInfo());

9
zsw-bxg/src/main/java/co/yixiang/utils/EvaluationDTO.java

@ -53,9 +53,11 @@ public class EvaluationDTO implements Serializable {
private String summary;
/** 产品展示图 */
/** 产品展示图 */
private String displayImage;
/** 产品展示图集 */
private List<String> displayImageArr;
/** 产品展示文字 */
private String displaySynopsis;
@ -63,6 +65,8 @@ public class EvaluationDTO implements Serializable {
/** 实用体验感受图 */
private String feelImage;
/** 实用体验感受图集 */
private List<String> feelImageArr;
/** 使用体验感受文字 */
@ -71,7 +75,8 @@ public class EvaluationDTO implements Serializable {
/** 易用性体验图 */
private String accessibilityImage;
/** 易用性体验图 */
private List<String> accessibilityImageArr;
/** 易用性体验文字 */
private String accessibilitySynopsis;

Loading…
Cancel
Save