From 5bb10fe9883dc9d45ed106aef44461468e4e616b Mon Sep 17 00:00:00 2001
From: sj <1304317391@qq.com>
Date: Thu, 29 Sep 2022 11:43:54 +0800
Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=B0=8F=E7=A8=8B=E5=BA=8F?=
=?UTF-8?q?=E8=AF=B7=E6=B1=82=E5=95=86=E5=93=81=E8=AF=8D=E6=9D=A1=E6=8E=A5?=
=?UTF-8?q?=E5=8F=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../entry/rest/AppStoreEntryController.java | 46 ++++++++
.../modules/entry/domain/YxStoreEntry.java | 66 +++++++++++
.../entry/rest/YxStoreEntryController.java | 88 +++++++++++++++
.../entry/service/YxStoreEntryService.java | 53 +++++++++
.../entry/service/dto/YxStoreEntryDto.java | 42 +++++++
.../dto/YxStoreEntryQueryCriteria.java | 19 ++++
.../service/impl/YxStoreEntryServiceImpl.java | 103 ++++++++++++++++++
.../service/mapper/YxStoreEntryMapper.java | 25 +++++
.../modules/expert/domain/YxStoreExpert.java | 2 +-
.../expert/rest/YxStoreExpertController.java | 4 +-
.../expert/service/YxStoreExpertService.java | 2 +-
.../expert/service/dto/YxStoreExpertDto.java | 2 +-
.../dto/YxStoreExpertQueryCriteria.java | 2 +-
.../service/mapper/YxStoreExpertMapper.java | 2 +-
.../product/domain/YxStoreProduct.java | 4 +-
.../product/service/dto/ProductDto.java | 4 +
.../main/java/co/yixiang/utils/EntryDTO.java | 13 +++
17 files changed, 468 insertions(+), 9 deletions(-)
create mode 100644 zsw-bxg/src/main/java/co/yixiang/app/modules/entry/rest/AppStoreEntryController.java
create mode 100644 zsw-bxg/src/main/java/co/yixiang/modules/entry/domain/YxStoreEntry.java
create mode 100644 zsw-bxg/src/main/java/co/yixiang/modules/entry/rest/YxStoreEntryController.java
create mode 100644 zsw-bxg/src/main/java/co/yixiang/modules/entry/service/YxStoreEntryService.java
create mode 100644 zsw-bxg/src/main/java/co/yixiang/modules/entry/service/dto/YxStoreEntryDto.java
create mode 100644 zsw-bxg/src/main/java/co/yixiang/modules/entry/service/dto/YxStoreEntryQueryCriteria.java
create mode 100644 zsw-bxg/src/main/java/co/yixiang/modules/entry/service/impl/YxStoreEntryServiceImpl.java
create mode 100644 zsw-bxg/src/main/java/co/yixiang/modules/entry/service/mapper/YxStoreEntryMapper.java
create mode 100644 zsw-bxg/src/main/java/co/yixiang/utils/EntryDTO.java
diff --git a/zsw-bxg/src/main/java/co/yixiang/app/modules/entry/rest/AppStoreEntryController.java b/zsw-bxg/src/main/java/co/yixiang/app/modules/entry/rest/AppStoreEntryController.java
new file mode 100644
index 00000000..f93abd9f
--- /dev/null
+++ b/zsw-bxg/src/main/java/co/yixiang/app/modules/entry/rest/AppStoreEntryController.java
@@ -0,0 +1,46 @@
+package co.yixiang.app.modules.entry.rest;
+
+import cn.iocoder.yudao.framework.common.pojo.ApiResult;
+import co.yixiang.annotation.AnonymousAccess;
+import co.yixiang.modules.entry.service.YxStoreEntryService;
+import co.yixiang.utils.EntryDTO;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+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.PathVariable;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ *
+ * 商品评测控制器
+ *
+ *
+ * @author ssj
+ * @since 2022-9-27
+ */
+@Slf4j
+@RestController
+@Api(value = "查询词条讲解", tags = "商城:商品词条")
+@RequiredArgsConstructor(onConstructor = @__(@Autowired))
+public class AppStoreEntryController {
+
+ private final YxStoreEntryService yxStoreEntryService;
+
+
+ /**
+ * 查询词条讲解
+ */
+ @AnonymousAccess
+ @GetMapping("/entry{id}")
+ @ApiOperation(value = "词条查询",notes = "词条")
+ public ApiResult getYxEntry(@PathVariable int id){
+ EntryDTO entryDTO=yxStoreEntryService.getEntry(id);
+ return ApiResult.ok(entryDTO);
+ }
+
+}
\ No newline at end of file
diff --git a/zsw-bxg/src/main/java/co/yixiang/modules/entry/domain/YxStoreEntry.java b/zsw-bxg/src/main/java/co/yixiang/modules/entry/domain/YxStoreEntry.java
new file mode 100644
index 00000000..dff29051
--- /dev/null
+++ b/zsw-bxg/src/main/java/co/yixiang/modules/entry/domain/YxStoreEntry.java
@@ -0,0 +1,66 @@
+/**
+* Copyright (C) 2018-2020
+* All rights reserved, Designed By www.yixiang.co
+* 注意:
+* 本软件为www.yixiang.co开发研制,未经购买不得使用
+* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台)
+* 一经发现盗用、分享等行为,将追究法律责任,后果自负
+*/
+package co.yixiang.modules.entry.domain;
+import com.baomidou.mybatisplus.annotation.FieldFill;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import lombok.Data;
+import com.baomidou.mybatisplus.annotation.TableName;
+import cn.hutool.core.bean.BeanUtil;
+import cn.hutool.core.bean.copier.CopyOptions;
+import javax.validation.constraints.*;
+import java.sql.Timestamp;
+import java.io.Serializable;
+
+/**
+* @author sj
+* @date 2022-09-27
+*/
+@Data
+@TableName("yx_store_entry")
+public class YxStoreEntry implements Serializable {
+
+ /** 词条id */
+ @TableId
+ private Long id;
+
+
+ /** 租户id */
+ @NotNull
+ private Long tenantId;
+
+
+ /** 词条名称 */
+ @NotBlank
+ private String entryName;
+
+
+ /** 词条讲解 */
+ @NotBlank
+ private String entryInfo;
+
+
+ /** 添加时间 */
+ @TableField(fill= FieldFill.INSERT)
+ private Timestamp createTime;
+
+
+ /** 更新时间 */
+ @TableField(fill= FieldFill.INSERT_UPDATE)
+ private Timestamp updateTime;
+
+
+ /** 是否删除 */
+ private Integer isDel;
+
+
+ public void copy(YxStoreEntry source){
+ BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
+ }
+}
diff --git a/zsw-bxg/src/main/java/co/yixiang/modules/entry/rest/YxStoreEntryController.java b/zsw-bxg/src/main/java/co/yixiang/modules/entry/rest/YxStoreEntryController.java
new file mode 100644
index 00000000..cc4151d9
--- /dev/null
+++ b/zsw-bxg/src/main/java/co/yixiang/modules/entry/rest/YxStoreEntryController.java
@@ -0,0 +1,88 @@
+/**
+* Copyright (C) 2018-2020
+* All rights reserved, Designed By www.yixiang.co
+* 注意:
+* 本软件为www.yixiang.co开发研制,未经购买不得使用
+* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台)
+* 一经发现盗用、分享等行为,将追究法律责任,后果自负
+*/
+package co.yixiang.modules.entry.rest;
+
+import co.yixiang.domain.PageResult;
+import co.yixiang.dozer.service.IGenerator;
+import co.yixiang.logging.aop.log.Log;
+import co.yixiang.modules.entry.service.YxStoreEntryService;
+import co.yixiang.modules.entry.service.dto.YxStoreEntryDto;
+import co.yixiang.modules.entry.service.dto.YxStoreEntryQueryCriteria;
+import co.yixiang.modules.entry.domain.YxStoreEntry;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.AllArgsConstructor;
+import org.springframework.data.domain.Pageable;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.util.Arrays;
+/**
+* @author ssj
+* @date 2022-09-27
+*/
+
+@AllArgsConstructor
+@Api(tags = " 商品词条管理")
+@RestController
+@RequestMapping("/api/yxStoreEntry")
+public class YxStoreEntryController {
+
+ private final YxStoreEntryService yxStoreEntryService;
+ private final IGenerator generator;
+
+
+ @Log("导出数据")
+ @ApiOperation("导出数据")
+ @GetMapping(value = "/download")
+// @PreAuthorize("@ss.hasAnyPermissions('admin','yxStoreExpert:list')")
+ public void download(HttpServletResponse response, YxStoreEntryQueryCriteria criteria) throws IOException {
+ yxStoreEntryService.download(generator.convert(yxStoreEntryService.queryAll(criteria), YxStoreEntryDto.class), response);
+ }
+
+ @GetMapping
+ @Log("查询 商品词条")
+ @ApiOperation("查询 商品词条")
+// @PreAuthorize("@ss.hasAnyPermissions('admin','yxStoreExpert:list')")
+ public ResponseEntity> getYxStoreEntrys(YxStoreEntryQueryCriteria criteria, Pageable pageable){
+ return new ResponseEntity<>(yxStoreEntryService.queryAll(criteria,pageable),HttpStatus.OK);
+ }
+
+ @PostMapping
+ @Log("新增 商品词条")
+ @ApiOperation("新增 商品词条")
+// @PreAuthorize("ss.hasAnyPermissions('admin','yxStoreExpert:add')")
+ public ResponseEntity