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 create(@Validated @RequestBody YxStoreEntry resources){ + return new ResponseEntity<>(yxStoreEntryService.save(resources),HttpStatus.CREATED); + } + + @PutMapping + @Log("修改 商品词条") + @ApiOperation("修改 商品词条") +// @PreAuthorize("@ss.hasAnyPermissions('admin','yxStoreExpert:edit')") + public ResponseEntity update(@Validated @RequestBody YxStoreEntry resources){ + yxStoreEntryService.updateById(resources); + return new ResponseEntity<>(HttpStatus.NO_CONTENT); + } + + @Log("删除 商品词条") + @ApiOperation("删除 商品词条") +// @PreAuthorize("@ss.hasAnyPermissions ('admin','yxStoreExpert:del')") + @DeleteMapping + public ResponseEntity deleteAll(@RequestBody Long[] ids) { + Arrays.asList(ids).forEach(id->{ + yxStoreEntryService.removeById(id); + }); + return new ResponseEntity<>(HttpStatus.OK); + } +} \ No newline at end of file diff --git a/zsw-bxg/src/main/java/co/yixiang/modules/entry/service/YxStoreEntryService.java b/zsw-bxg/src/main/java/co/yixiang/modules/entry/service/YxStoreEntryService.java new file mode 100644 index 00000000..82944309 --- /dev/null +++ b/zsw-bxg/src/main/java/co/yixiang/modules/entry/service/YxStoreEntryService.java @@ -0,0 +1,53 @@ +/** +* Copyright (C) 2018-2020 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.entry.service; + +import co.yixiang.common.service.BaseService; +import co.yixiang.domain.PageResult; +import co.yixiang.modules.entry.domain.YxStoreEntry; +import co.yixiang.modules.entry.service.dto.YxStoreEntryDto; +import co.yixiang.modules.entry.service.dto.YxStoreEntryQueryCriteria; +import co.yixiang.modules.product.vo.ProductVo; +import co.yixiang.utils.EntryDTO; +import org.springframework.data.domain.Pageable; + +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.util.List; +/** +* @author sj +* @date 2022-09-27 +*/ +public interface YxStoreEntryService extends BaseService { + + /** + * 查询数据分页 + * @param criteria 条件 + * @param pageable 分页参数 + * @return Map + */ + PageResult queryAll(YxStoreEntryQueryCriteria criteria, Pageable pageable); + + /** + * 查询所有数据不分页 + * @param criteria 条件参数 + * @return List + */ + List queryAll(YxStoreEntryQueryCriteria criteria); + + /** + * 导出数据 + * @param all 待导出的数据 + * @param response / + * @throws IOException / + */ + void download(List all, HttpServletResponse response) throws IOException; + + EntryDTO getEntry(int id); +} diff --git a/zsw-bxg/src/main/java/co/yixiang/modules/entry/service/dto/YxStoreEntryDto.java b/zsw-bxg/src/main/java/co/yixiang/modules/entry/service/dto/YxStoreEntryDto.java new file mode 100644 index 00000000..f2ecf773 --- /dev/null +++ b/zsw-bxg/src/main/java/co/yixiang/modules/entry/service/dto/YxStoreEntryDto.java @@ -0,0 +1,42 @@ +/** +* Copyright (C) 2018-2020 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.entry.service.dto; + +import lombok.Data; +import java.sql.Timestamp; +import java.io.Serializable; + +/** +* @author sj +* @date 2022-09-27 +*/ +@Data +public class YxStoreEntryDto implements Serializable { + + /** 词条id */ + private Long id; + + /** 租户id */ + private Long tenantId; + + /** 词条名称 */ + private String entryName; + + /** 词条讲解 */ + private String entryInfo; + + /** 添加时间 */ + private Timestamp createTime; + + /** 更新时间 */ + private Timestamp updateTime; + + /** 是否删除 */ + private Integer isDel; +} diff --git a/zsw-bxg/src/main/java/co/yixiang/modules/entry/service/dto/YxStoreEntryQueryCriteria.java b/zsw-bxg/src/main/java/co/yixiang/modules/entry/service/dto/YxStoreEntryQueryCriteria.java new file mode 100644 index 00000000..1736cd59 --- /dev/null +++ b/zsw-bxg/src/main/java/co/yixiang/modules/entry/service/dto/YxStoreEntryQueryCriteria.java @@ -0,0 +1,19 @@ +/** +* Copyright (C) 2018-2020 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.entry.service.dto; + +import lombok.Data; + +/** +* @author sj +* @date 2022-09-27 +*/ +@Data +public class YxStoreEntryQueryCriteria{ +} diff --git a/zsw-bxg/src/main/java/co/yixiang/modules/entry/service/impl/YxStoreEntryServiceImpl.java b/zsw-bxg/src/main/java/co/yixiang/modules/entry/service/impl/YxStoreEntryServiceImpl.java new file mode 100644 index 00000000..ad9108f7 --- /dev/null +++ b/zsw-bxg/src/main/java/co/yixiang/modules/entry/service/impl/YxStoreEntryServiceImpl.java @@ -0,0 +1,103 @@ +/** +* Copyright (C) 2018-2020 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.entry.service.impl; + +import co.yixiang.common.service.impl.BaseServiceImpl; +import co.yixiang.common.utils.QueryHelpPlus; +import co.yixiang.domain.PageResult; +import co.yixiang.dozer.service.IGenerator; +import co.yixiang.enums.CommonEnum; +import co.yixiang.modules.entry.domain.YxStoreEntry; +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.service.mapper.YxStoreEntryMapper; +import co.yixiang.modules.product.domain.YxStoreProduct; +import co.yixiang.modules.product.service.YxStoreProductService; +import co.yixiang.utils.EntryDTO; +import co.yixiang.utils.FileUtil; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.github.pagehelper.PageInfo; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import lombok.AllArgsConstructor; +import org.springframework.data.domain.Pageable; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Propagation; +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; +/** +* @author sj +* @date 2022-09-27 +*/ +@Service +@AllArgsConstructor +//@CacheConfig(cacheNames = "yxStoreEntry") +@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) +public class YxStoreEntryServiceImpl extends BaseServiceImpl implements YxStoreEntryService { + + private final IGenerator generator; + private final YxStoreEntryMapper yxStoreEntryMapper; + + @Override + //@Cacheable + public PageResult queryAll(YxStoreEntryQueryCriteria criteria, Pageable pageable) { + getPage(pageable); + PageInfo page = new PageInfo<>(queryAll(criteria)); + return generator.convertPageInfo(page,YxStoreEntryDto.class); + } + + + @Override + //@Cacheable + public List queryAll(YxStoreEntryQueryCriteria criteria){ + return baseMapper.selectList(QueryHelpPlus.getPredicate(YxStoreEntry.class, criteria)); + } + + + @Override + public void download(List all, HttpServletResponse response) throws IOException { + List> list = new ArrayList<>(); + for (YxStoreEntryDto yxStoreEntry : all) { + Map map = new LinkedHashMap<>(); + map.put("租户id", yxStoreEntry.getTenantId()); + map.put("词条名称", yxStoreEntry.getEntryName()); + map.put("词条讲解", yxStoreEntry.getEntryInfo()); + map.put("添加时间", yxStoreEntry.getCreateTime()); + map.put("更新时间", yxStoreEntry.getUpdateTime()); + map.put("是否删除", yxStoreEntry.getIsDel()); + list.add(map); + } + FileUtil.downloadExcel(list, response); + } + + + @Override + @ApiImplicitParams({ + @ApiImplicitParam(name = "id", value = "词条ID", paramType = "query", dataType = "int",dataTypeClass = Integer.class) + }) + public EntryDTO getEntry(int id) { + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(YxStoreEntry::getIsDel, CommonEnum.DEL_STATUS_0.getValue()).eq(YxStoreEntry::getId, id); + YxStoreEntry yxStoreEntry=yxStoreEntryMapper.selectOne(wrapper); + EntryDTO entryDTO=new EntryDTO(); + //取出需要的属性 + entryDTO.setEntryName(yxStoreEntry.getEntryName()); + entryDTO.setEntryInfo(yxStoreEntry.getEntryInfo()); + return entryDTO; + } + + +} diff --git a/zsw-bxg/src/main/java/co/yixiang/modules/entry/service/mapper/YxStoreEntryMapper.java b/zsw-bxg/src/main/java/co/yixiang/modules/entry/service/mapper/YxStoreEntryMapper.java new file mode 100644 index 00000000..80fa2642 --- /dev/null +++ b/zsw-bxg/src/main/java/co/yixiang/modules/entry/service/mapper/YxStoreEntryMapper.java @@ -0,0 +1,25 @@ +/** +* Copyright (C) 2018-2020 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.entry.service.mapper; + +import co.yixiang.common.mapper.CoreMapper; +import co.yixiang.modules.entry.domain.YxStoreEntry; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import org.springframework.stereotype.Repository; + +import java.util.List; + +/** +* @author sj +* @date 2022-09-27 +*/ +@Repository +public interface YxStoreEntryMapper extends CoreMapper { + +} diff --git a/zsw-bxg/src/main/java/co/yixiang/modules/expert/domain/YxStoreExpert.java b/zsw-bxg/src/main/java/co/yixiang/modules/expert/domain/YxStoreExpert.java index 3852ef07..6e93c37b 100644 --- a/zsw-bxg/src/main/java/co/yixiang/modules/expert/domain/YxStoreExpert.java +++ b/zsw-bxg/src/main/java/co/yixiang/modules/expert/domain/YxStoreExpert.java @@ -20,7 +20,7 @@ import java.sql.Timestamp; import java.io.Serializable; /** -* @author hupeng +* @author sj * @date 2022-09-17 */ @Data diff --git a/zsw-bxg/src/main/java/co/yixiang/modules/expert/rest/YxStoreExpertController.java b/zsw-bxg/src/main/java/co/yixiang/modules/expert/rest/YxStoreExpertController.java index 6ce711ed..8b3ac15c 100644 --- a/zsw-bxg/src/main/java/co/yixiang/modules/expert/rest/YxStoreExpertController.java +++ b/zsw-bxg/src/main/java/co/yixiang/modules/expert/rest/YxStoreExpertController.java @@ -29,11 +29,11 @@ import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.util.Arrays; /** -* @author hupeng +* @author ssj * @date 2022-09-17 */ @AllArgsConstructor -@Api(tags = " ss管理") +@Api(tags = " 专家管理") @RestController @RequestMapping("/api/yxStoreExpert") public class YxStoreExpertController { diff --git a/zsw-bxg/src/main/java/co/yixiang/modules/expert/service/YxStoreExpertService.java b/zsw-bxg/src/main/java/co/yixiang/modules/expert/service/YxStoreExpertService.java index 07df535d..1d5bf53f 100644 --- a/zsw-bxg/src/main/java/co/yixiang/modules/expert/service/YxStoreExpertService.java +++ b/zsw-bxg/src/main/java/co/yixiang/modules/expert/service/YxStoreExpertService.java @@ -20,7 +20,7 @@ import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.util.List; /** -* @author hupeng +* @author sj * @date 2022-09-17 */ public interface YxStoreExpertService extends BaseService { diff --git a/zsw-bxg/src/main/java/co/yixiang/modules/expert/service/dto/YxStoreExpertDto.java b/zsw-bxg/src/main/java/co/yixiang/modules/expert/service/dto/YxStoreExpertDto.java index bb89ff60..f10769b4 100644 --- a/zsw-bxg/src/main/java/co/yixiang/modules/expert/service/dto/YxStoreExpertDto.java +++ b/zsw-bxg/src/main/java/co/yixiang/modules/expert/service/dto/YxStoreExpertDto.java @@ -15,7 +15,7 @@ import java.sql.Timestamp; import java.io.Serializable; /** -* @author hupeng +* @author sj * @date 2022-09-17 */ @Data diff --git a/zsw-bxg/src/main/java/co/yixiang/modules/expert/service/dto/YxStoreExpertQueryCriteria.java b/zsw-bxg/src/main/java/co/yixiang/modules/expert/service/dto/YxStoreExpertQueryCriteria.java index 3f3e2d64..a6ea4331 100644 --- a/zsw-bxg/src/main/java/co/yixiang/modules/expert/service/dto/YxStoreExpertQueryCriteria.java +++ b/zsw-bxg/src/main/java/co/yixiang/modules/expert/service/dto/YxStoreExpertQueryCriteria.java @@ -11,7 +11,7 @@ package co.yixiang.modules.expert.service.dto; import lombok.Data; /** -* @author hupeng +* @author sj * @date 2022-09-17 */ @Data diff --git a/zsw-bxg/src/main/java/co/yixiang/modules/expert/service/mapper/YxStoreExpertMapper.java b/zsw-bxg/src/main/java/co/yixiang/modules/expert/service/mapper/YxStoreExpertMapper.java index b2aef19c..e02aa4e3 100644 --- a/zsw-bxg/src/main/java/co/yixiang/modules/expert/service/mapper/YxStoreExpertMapper.java +++ b/zsw-bxg/src/main/java/co/yixiang/modules/expert/service/mapper/YxStoreExpertMapper.java @@ -13,7 +13,7 @@ import co.yixiang.modules.expert.domain.YxStoreExpert; import org.springframework.stereotype.Repository; /** -* @author hupeng +* @author sj * @date 2022-09-17 */ @Repository diff --git a/zsw-bxg/src/main/java/co/yixiang/modules/product/domain/YxStoreProduct.java b/zsw-bxg/src/main/java/co/yixiang/modules/product/domain/YxStoreProduct.java index 0c423860..139e156e 100644 --- a/zsw-bxg/src/main/java/co/yixiang/modules/product/domain/YxStoreProduct.java +++ b/zsw-bxg/src/main/java/co/yixiang/modules/product/domain/YxStoreProduct.java @@ -90,8 +90,8 @@ public class YxStoreProduct extends BaseDomain { @ApiModelProperty(value = "分类id") private String cateId; - /** 品牌id (默认无品牌)*/ - @JsonProperty("brand_id") + /** 品牌id */ + @ApiModelProperty(value = "品牌id") private String brandId; /** 商品价格 */ diff --git a/zsw-bxg/src/main/java/co/yixiang/modules/product/service/dto/ProductDto.java b/zsw-bxg/src/main/java/co/yixiang/modules/product/service/dto/ProductDto.java index 397045ba..1c12de4a 100644 --- a/zsw-bxg/src/main/java/co/yixiang/modules/product/service/dto/ProductDto.java +++ b/zsw-bxg/src/main/java/co/yixiang/modules/product/service/dto/ProductDto.java @@ -53,6 +53,10 @@ public class ProductDto @JsonProperty("cate_id") private String cateId; + /** 品牌id */ + @JsonProperty("brand_id") + private String brandId; + /** 商品价格 */ private Double price; diff --git a/zsw-bxg/src/main/java/co/yixiang/utils/EntryDTO.java b/zsw-bxg/src/main/java/co/yixiang/utils/EntryDTO.java new file mode 100644 index 00000000..026aadcd --- /dev/null +++ b/zsw-bxg/src/main/java/co/yixiang/utils/EntryDTO.java @@ -0,0 +1,13 @@ +package co.yixiang.utils; + +import lombok.Data; + +import java.io.Serializable; +@Data +public class EntryDTO implements Serializable { + /** 词条名称 */ + private String entryName; + + /** 词条讲解 */ + private String entryInfo; +}