sj
2 years ago
8 changed files with 190 additions and 3 deletions
@ -0,0 +1,54 @@
|
||||
/** |
||||
* Copyright (C) 2018-2022 |
||||
* All rights reserved, Designed By www.yixiang.co |
||||
* 注意: |
||||
* 本软件为www.yixiang.co开发研制,未经购买不得使用 |
||||
* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) |
||||
* 一经发现盗用、分享等行为,将追究法律责任,后果自负 |
||||
*/ |
||||
package co.yixiang.app.modules.evaluation.rest; |
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.ApiResult; |
||||
import co.yixiang.annotation.AnonymousAccess; |
||||
import co.yixiang.modules.evaluation.service.YxEvaluationService; |
||||
import co.yixiang.utils.location.EvaluationDTO; |
||||
import co.yixiang.utils.location.ExpertDTO; |
||||
import io.swagger.annotations.Api; |
||||
import io.swagger.annotations.ApiOperation; |
||||
import lombok.RequiredArgsConstructor; |
||||
import lombok.extern.slf4j.Slf4j; |
||||
import org.springframework.beans.factory.annotation.Autowired; |
||||
import org.springframework.web.bind.annotation.GetMapping; |
||||
import org.springframework.web.bind.annotation.RestController; |
||||
|
||||
import java.util.List; |
||||
|
||||
/** |
||||
* <p> |
||||
* 商品评测控制器 |
||||
* </p> |
||||
* |
||||
* @author ssj |
||||
* @since 2022-9-20 |
||||
*/ |
||||
@Slf4j |
||||
@RestController |
||||
@Api(value = "产品评测", tags = "商城:评测") |
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired)) |
||||
public class AppStoreEvaluationController { |
||||
|
||||
private final YxEvaluationService yxEvaluationService; |
||||
|
||||
|
||||
/** |
||||
* 商品分类列表 |
||||
*/ |
||||
@AnonymousAccess |
||||
@GetMapping("/evaluation") |
||||
@ApiOperation(value = "评测列表",notes = "产品评测") |
||||
public ApiResult<List<EvaluationDTO>> getYxEvaluationPageList(){ |
||||
return ApiResult.ok(yxEvaluationService.getList()); |
||||
} |
||||
|
||||
} |
||||
|
@ -0,0 +1,104 @@
|
||||
package co.yixiang.utils.location; |
||||
|
||||
import com.baomidou.mybatisplus.annotation.FieldFill; |
||||
import com.baomidou.mybatisplus.annotation.TableField; |
||||
import com.baomidou.mybatisplus.annotation.TableId; |
||||
|
||||
import javax.validation.constraints.NotBlank; |
||||
import javax.validation.constraints.NotNull; |
||||
import java.io.Serializable; |
||||
import java.sql.Timestamp; |
||||
import java.util.ArrayList; |
||||
import java.util.List; |
||||
|
||||
/** |
||||
* <p> |
||||
* 商城商品评测 |
||||
* </p> |
||||
* |
||||
* @author sj |
||||
* @since 2022-09-26 |
||||
*/ |
||||
public class EvaluationDTO implements Serializable { |
||||
|
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
|
||||
/** 评测ID */ |
||||
@TableId |
||||
private Integer id; |
||||
|
||||
|
||||
/** 在列表里面的首页图 */ |
||||
private String homeImage; |
||||
|
||||
|
||||
/** 评测介绍 */ |
||||
private String synopsis; |
||||
|
||||
|
||||
/** 评测视频 */ |
||||
@NotBlank |
||||
private String videoInput; |
||||
|
||||
|
||||
|
||||
/** 关联商品信息 */ |
||||
@NotNull |
||||
private String product; |
||||
|
||||
/** 评测总结 */ |
||||
private String summary; |
||||
|
||||
|
||||
/** 产品展示图集 */ |
||||
private String displayImage; |
||||
|
||||
|
||||
/** 产品展示文字 */ |
||||
private String displaySynopsis; |
||||
|
||||
|
||||
/** 实用体验感受图 */ |
||||
private String feelImage; |
||||
|
||||
|
||||
/** 使用体验感受文字 */ |
||||
private String feelSynopsis; |
||||
|
||||
|
||||
/** 易用性体验图 */ |
||||
private String accessibilityImage; |
||||
|
||||
|
||||
/** 易用性体验文字 */ |
||||
private String accessibilitySynopsis; |
||||
|
||||
|
||||
/** 添加时间 */ |
||||
@TableField(fill= FieldFill.INSERT) |
||||
private Timestamp createTime; |
||||
|
||||
|
||||
/** 更新时间 */ |
||||
@TableField(fill= FieldFill.INSERT_UPDATE) |
||||
private Timestamp updateTime; |
||||
|
||||
|
||||
/** 是否删除 */ |
||||
private Integer isDel; |
||||
|
||||
|
||||
/** 是否展示 */ |
||||
private Integer isShow; |
||||
|
||||
|
||||
/** 排序 */ |
||||
@NotNull |
||||
private Integer sort; |
||||
|
||||
|
||||
private Long tenantId; |
||||
|
||||
private List<EvaluationDTO> children = new ArrayList<>(); |
||||
} |
Loading…
Reference in new issue