wwl 4 роки тому
батько
коміт
75db7ee2a2

+ 97 - 0
zzjs-admin/src/main/java/com/miaxis/pc/controller/topic/TopicInfoController.java

@@ -0,0 +1,97 @@
+package com.miaxis.pc.controller.topic;
+
+import com.miaxis.common.annotation.Log;
+import com.miaxis.common.core.controller.BaseController;
+import com.miaxis.common.core.domain.Response;
+import com.miaxis.common.core.page.ResponsePageInfo;
+import com.miaxis.common.enums.BusinessTypeEnum;
+import com.miaxis.topic.domain.TopicInfo;
+import com.miaxis.topic.dto.TopicInfoDto;
+import com.miaxis.topic.service.ITopicInfoService;
+import io.swagger.annotations.*;
+import lombok.RequiredArgsConstructor;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * 【专题管理】Controller
+ *
+ * @author miaxis
+ * @date 2021-03-11
+ */
+@RestController
+@RequiredArgsConstructor
+@RequestMapping("/topic/info")
+@Api(tags={"【pc-专题管理】"})
+public class TopicInfoController extends BaseController{
+
+    private final ITopicInfoService topicInfoService;
+
+    /**
+     * 查询专题列表
+     */
+    @PreAuthorize("@ss.hasPermi('topic:info:list')")
+    @GetMapping("/list")
+    @ApiOperation("查询专题列表")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "pageNum",value = "当前页码" ,dataType = "int", paramType = "query", required = false),
+            @ApiImplicitParam(name = "pageSize",value = "每页数据量" , dataType = "int", paramType = "query", required = false),
+    })
+    public ResponsePageInfo<TopicInfo> list(@ModelAttribute TopicInfo topicInfo){
+        startPage();
+        List<TopicInfo> list = topicInfoService.selectTopicInfoList(topicInfo);
+        return toResponsePageInfo(list);
+    }
+
+
+    /**
+     * 获取专题详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('topic:info:query')")
+    @GetMapping(value = "/{id}")
+    @ApiOperation("获取专题详细信息")
+    public Response<TopicInfo> getInfo(
+            @ApiParam(name = "id", value = "专题参数", required = true)
+            @PathVariable("id") Long id
+    ){
+        return Response.success(topicInfoService.getById(id));
+    }
+
+    /**
+     * 新增专题
+     */
+    @PreAuthorize("@ss.hasPermi('topic:info:add')")
+    @Log(title = "专题", businessType = BusinessTypeEnum.INSERT)
+    @PostMapping
+    @ApiOperation("新增专题")
+    public Response<Integer> add(@RequestBody TopicInfoDto topicInfoDto){
+        return topicInfoService.addTopic(topicInfoDto);
+    }
+
+    /**
+     * 修改专题
+     */
+    @PreAuthorize("@ss.hasPermi('topic:info:edit')")
+    @Log(title = "专题", businessType = BusinessTypeEnum.UPDATE)
+    @PutMapping
+    @ApiOperation("修改专题")
+    public Response<Integer> edit(@RequestBody TopicInfo topicInfo){
+        return toResponse(topicInfoService.updateById(topicInfo) ? 1 : 0);
+    }
+
+    /**
+     * 删除专题
+     */
+    @PreAuthorize("@ss.hasPermi('topic:info:remove')")
+    @Log(title = "专题", businessType = BusinessTypeEnum.DELETE)
+	@PutMapping("/{ids}")
+    @ApiOperation("删除专题")
+    public  Response<Integer> remove(
+            @ApiParam(name = "ids", value = "专题ids参数", required = true)
+            @PathVariable Long[] ids
+    ){
+        return topicInfoService.removeTopicByIds(ids);
+    }
+}

+ 5 - 7
zzjs-service/src/main/java/com/miaxis/carousel/service/impl/CarouselChartInfoServiceImpl.java

@@ -8,6 +8,7 @@ import com.miaxis.carousel.service.ICarouselChartInfoService;
 import com.miaxis.carousel.vo.CarouselChartInfoVo;
 import com.miaxis.common.core.domain.Response;
 import lombok.RequiredArgsConstructor;
+import lombok.SneakyThrows;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
@@ -42,16 +43,13 @@ public class CarouselChartInfoServiceImpl extends ServiceImpl<CarouselChartInfoM
      * @return
      */
     @Override
+    @SneakyThrows
     @Transactional(rollbackFor = Exception.class)
     public Response removeCarouselByIds(Long[] ids) {
-        try {
-            for (Long id : ids) {
-                this.update(new UpdateWrapper<CarouselChartInfo>().set("status",1).eq("id",id));
-            }
-            return Response.success();
-        }catch (Exception e){
-            throw new RuntimeException(e);
+        for (Long id : ids) {
+            this.update(new UpdateWrapper<CarouselChartInfo>().set("status",1).eq("id",id));
         }
+        return Response.success();
     }
 
 }

+ 9 - 14
zzjs-service/src/main/java/com/miaxis/customer/service/impl/CustomerInfoServiceImpl.java

@@ -8,6 +8,7 @@ import com.miaxis.customer.domain.CustomerInfo;
 import com.miaxis.customer.mapper.CustomerInfoMapper;
 import com.miaxis.customer.service.ICustomerInfoService;
 import lombok.RequiredArgsConstructor;
+import lombok.SneakyThrows;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
@@ -43,16 +44,13 @@ public class CustomerInfoServiceImpl extends ServiceImpl<CustomerInfoMapper, Cus
      * @return
      */
     @Override
+    @SneakyThrows
     @Transactional(rollbackFor = Exception.class)
     public Response updateShelfStatus(Long[] ids, Integer shelfStatus) {
-        try {
-            for (Long id : ids) {
-                this.update(new UpdateWrapper<CustomerInfo>().set("shelf_status",shelfStatus).eq("id",id));
-            }
-            return Response.success();
-        }catch (Exception e){
-            throw new RuntimeException(e);
+        for (Long id : ids) {
+            this.update(new UpdateWrapper<CustomerInfo>().set("shelf_status",shelfStatus).eq("id",id));
         }
+        return Response.success();
     }
 
     /**
@@ -61,15 +59,12 @@ public class CustomerInfoServiceImpl extends ServiceImpl<CustomerInfoMapper, Cus
      * @return
      */
     @Override
+    @SneakyThrows
     @Transactional(rollbackFor = Exception.class)
     public Response removeCustomerByIds(Long[] ids) {
-        try {
-            for (Long id : ids) {
-                this.update(new UpdateWrapper<CustomerInfo>().set("status",1).eq("id",id));
-            }
-            return Response.success();
-        }catch (Exception e){
-            throw new RuntimeException(e);
+        for (Long id : ids) {
+            this.update(new UpdateWrapper<CustomerInfo>().set("status",1).eq("id",id));
         }
+        return Response.success();
     }
 }

+ 70 - 0
zzjs-service/src/main/java/com/miaxis/goods/domain/GoodsInfo.java

@@ -0,0 +1,70 @@
+package com.miaxis.goods.domain;
+
+import java.math.BigDecimal;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.miaxis.common.annotation.Excel;
+import com.miaxis.common.core.domain.BaseEntity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.miaxis.common.core.domain.BaseBusinessEntity;
+import lombok.Data;
+/**
+ * 商品对象 goods_info
+ *
+ * @author miaxis
+ * @date 2021-03-11
+ */
+@Data
+@TableName("goods_info")
+@ApiModel(value = "GoodsInfo", description = "商品对象 goods_info")
+public class GoodsInfo extends BaseBusinessEntity{
+    private static final long serialVersionUID = 1L;
+
+    /** 主键 */
+    @TableId(value = "id")
+    @ApiModelProperty(value = "主键")
+    private Long id;
+
+    /** 商品名称 */
+    @Excel(name = "商品名称")
+    @TableField("goods_name")
+    @ApiModelProperty(value = "商品名称")
+    private String goodsName;
+
+    /** 商品价格 */
+    @Excel(name = "商品价格")
+    @TableField("goods_price")
+    @ApiModelProperty(value = "商品价格")
+    private BigDecimal goodsPrice;
+
+    /** 商品链接 */
+    @Excel(name = "商品链接")
+    @TableField("goods_link")
+    @ApiModelProperty(value = "商品链接")
+    private String goodsLink;
+
+    /** 商品描述 */
+    @Excel(name = "商品描述")
+    @TableField("goods_describe")
+    @ApiModelProperty(value = "商品描述")
+    private String goodsDescribe;
+
+    /** 商品图片---对应file_info的id */
+    @Excel(name = "商品图片---对应file_info的id")
+    @TableField("goods_picture")
+    @ApiModelProperty(value = "商品图片---对应file_info的id")
+    private Long goodsPicture;
+
+    /** 状态  0:有效(默认)、1:失效 (伪删除) */
+    @Excel(name = "状态  0:有效(默认)、1:失效 (伪删除)", readConverterExp = "伪=删除")
+    @TableField("status")
+    @ApiModelProperty(value = "状态  0:有效(默认)、1:失效 (伪删除)")
+    private Integer status;
+
+
+}

+ 22 - 0
zzjs-service/src/main/java/com/miaxis/goods/mapper/GoodsInfoMapper.java

@@ -0,0 +1,22 @@
+package com.miaxis.goods.mapper;
+
+import java.util.List;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.miaxis.goods.domain.GoodsInfo;
+
+/**
+ * 商品Mapper接口
+ *
+ * @author miaxis
+ * @date 2021-03-11
+ */
+public interface GoodsInfoMapper extends BaseMapper<GoodsInfo> {
+    /**
+     * 查询商品列表
+     *
+     * @param goodsInfo 商品
+     * @return 商品集合
+     */
+    List<GoodsInfo> selectGoodsInfoList(GoodsInfo goodsInfo);
+
+}

+ 21 - 0
zzjs-service/src/main/java/com/miaxis/goods/service/IGoodsInfoService.java

@@ -0,0 +1,21 @@
+package com.miaxis.goods.service;
+
+import java.util.List;
+import com.miaxis.goods.domain.GoodsInfo;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * 商品Service接口
+ *
+ * @author miaxis
+ * @date 2021-03-11
+ */
+public interface IGoodsInfoService extends IService<GoodsInfo>{
+    /**
+     * 查询商品列表
+     *
+     * @param goodsInfo 商品
+     * @return 商品集合
+     */
+    List<GoodsInfo> selectGoodsInfoList(GoodsInfo goodsInfo);
+}

+ 34 - 0
zzjs-service/src/main/java/com/miaxis/goods/service/impl/GoodsInfoServiceImpl.java

@@ -0,0 +1,34 @@
+package com.miaxis.goods.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.miaxis.goods.domain.GoodsInfo;
+import com.miaxis.goods.mapper.GoodsInfoMapper;
+import com.miaxis.goods.service.IGoodsInfoService;
+import lombok.RequiredArgsConstructor;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * 商品Service业务层处理
+ *
+ * @author miaxis
+ * @date 2021-03-11
+ */
+@Service
+@RequiredArgsConstructor
+public class GoodsInfoServiceImpl extends ServiceImpl<GoodsInfoMapper, GoodsInfo> implements IGoodsInfoService {
+
+    private final GoodsInfoMapper goodsInfoMapper;
+
+    /**
+     * 查询商品列表
+     *
+     * @param goodsInfo 商品
+     * @return 商品
+     */
+    @Override
+    public List<GoodsInfo> selectGoodsInfoList(GoodsInfo goodsInfo){
+        return goodsInfoMapper.selectGoodsInfoList(goodsInfo);
+    }
+}

+ 5 - 7
zzjs-service/src/main/java/com/miaxis/product/service/impl/ProductTypeInfoServiceImpl.java

@@ -7,6 +7,7 @@ import com.miaxis.product.domain.ProductTypeInfo;
 import com.miaxis.product.mapper.ProductTypeInfoMapper;
 import com.miaxis.product.service.IProductTypeInfoService;
 import lombok.RequiredArgsConstructor;
+import lombok.SneakyThrows;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
@@ -41,15 +42,12 @@ public class ProductTypeInfoServiceImpl extends ServiceImpl<ProductTypeInfoMappe
      * @return
      */
     @Override
+    @SneakyThrows
     @Transactional(rollbackFor = Exception.class)
     public Response<Integer> removeProductByIds(Long[] ids) {
-        try {
-            for (Long id : ids) {
-                this.update(new UpdateWrapper<ProductTypeInfo>().set("status",1).eq("id",id));
-            }
-            return Response.success();
-        }catch (Exception e){
-            throw new RuntimeException(e);
+        for (Long id : ids) {
+            this.update(new UpdateWrapper<ProductTypeInfo>().set("status",1).eq("id",id));
         }
+        return Response.success();
     }
 }

+ 78 - 0
zzjs-service/src/main/java/com/miaxis/topic/domain/TopicInfo.java

@@ -0,0 +1,78 @@
+package com.miaxis.topic.domain;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.miaxis.common.annotation.Excel;
+import com.miaxis.common.core.domain.BaseBusinessEntity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+/**
+ * 专题对象 topic_info
+ *
+ * @author miaxis
+ * @date 2021-03-11
+ */
+@Data
+@TableName("topic_info")
+@ApiModel(value = "TopicInfo", description = "专题对象 topic_info")
+public class TopicInfo extends BaseBusinessEntity{
+
+    /** 主键 */
+    @TableId(value = "id")
+    @ApiModelProperty(value = "主键")
+    private Long id;
+
+    /** 专题名称 */
+    @TableField("topic_name")
+    @ApiModelProperty(value = "专题名称")
+    private String topicName;
+
+    /** 专题插图--对应file_info的id */
+    @TableField("topic_illustration")
+    @ApiModelProperty(value = "专题插图--对应file_info的id")
+    private Long topicIllustration;
+
+    /** 商品id---对应goods_info商品表 */
+    @TableField("goods_id")
+    @ApiModelProperty(value = "商品id---对应goods_info商品表")
+    private String goodsId;
+
+    /** 是否允许分享   0:是 、1:否 */
+    @TableField("sharing_status")
+    @ApiModelProperty(value = "是否允许分享   0:是 、1:否")
+    private Integer sharingStatus;
+
+    /** 是否显示分享数量    0:是 、1:否 */
+    @TableField("sharing_number_status")
+    @ApiModelProperty(value = "是否显示分享数量    0:是 、1:否")
+    private Integer sharingNumberStatus;
+
+    /** 是否允许评论   0:是 、1:否 */
+    @TableField("comment_status")
+    @ApiModelProperty(value = "是否允许评论   0:是 、1:否")
+    private Integer commentStatus;
+
+    /** 是否显示评论数量    0:是 、1:否 */
+    @TableField("comment_number_status")
+    @ApiModelProperty(value = "是否显示评论数量    0:是 、1:否")
+    private Integer commentNumberStatus;
+
+    /** 是否显示收藏数量   0:是 、1:否 */
+    @TableField("collection_number_status")
+    @ApiModelProperty(value = "是否显示收藏数量   0:是 、1:否")
+    private Integer collectionNumberStatus;
+
+    /** 专题内容 */
+    @TableField("topic_content")
+    @ApiModelProperty(value = "专题内容")
+    private String topicContent;
+
+    /** 状态  0:有效(默认)、1:失效 (伪删除) */
+    @TableField("status")
+    @ApiModelProperty(value = "状态  0:有效(默认)、1:失效 (伪删除)")
+    private Integer status;
+
+
+}

+ 64 - 0
zzjs-service/src/main/java/com/miaxis/topic/dto/TopicInfoDto.java

@@ -0,0 +1,64 @@
+package com.miaxis.topic.dto;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.miaxis.common.annotation.Excel;
+import com.miaxis.common.core.domain.BaseBusinessEntity;
+import com.miaxis.goods.domain.GoodsInfo;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * 专题对象入参
+ *
+ * @author miaxis
+ * @date 2021-03-11
+ */
+@Data
+@ApiModel(value = "TopicInfoDto", description = "专题对象入参")
+public class TopicInfoDto extends BaseBusinessEntity{
+    private static final long serialVersionUID = 1L;
+
+    /** 主键 */
+    @TableId(value = "id")
+    @ApiModelProperty(value = "主键")
+    private Long id;
+
+    @ApiModelProperty(value = "专题名称")
+    private String topicName;
+
+    @ApiModelProperty(value = "专题插图--对应file_info的id")
+    private Long topicIllustration;
+
+    @ApiModelProperty(value = "商品id---对应goods_info商品表")
+    private String goodsId;
+
+    @ApiModelProperty(value = "是否允许分享   0:是 、1:否")
+    private Integer sharingStatus;
+
+    @ApiModelProperty(value = "是否显示分享数量    0:是 、1:否")
+    private Integer sharingNumberStatus;
+
+    @ApiModelProperty(value = "是否允许评论   0:是 、1:否")
+    private Integer commentStatus;
+
+    @ApiModelProperty(value = "是否显示评论数量    0:是 、1:否")
+    private Integer commentNumberStatus;
+
+    @ApiModelProperty(value = "是否显示收藏数量   0:是 、1:否")
+    private Integer collectionNumberStatus;
+
+    @ApiModelProperty(value = "专题内容")
+    private String topicContent;
+
+    @ApiModelProperty(value = "状态  0:有效(默认)、1:失效 (伪删除)")
+    private Integer status;
+
+    @ApiModelProperty(value = "商品集合")
+    private List<GoodsInfo> goodsInfoList;
+
+}

+ 22 - 0
zzjs-service/src/main/java/com/miaxis/topic/mapper/TopicInfoMapper.java

@@ -0,0 +1,22 @@
+package com.miaxis.topic.mapper;
+
+import java.util.List;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.miaxis.topic.domain.TopicInfo;
+
+/**
+ * 专题Mapper接口
+ *
+ * @author miaxis
+ * @date 2021-03-11
+ */
+public interface TopicInfoMapper extends BaseMapper<TopicInfo> {
+    /**
+     * 查询专题列表
+     *
+     * @param topicInfo 专题
+     * @return 专题集合
+     */
+    List<TopicInfo> selectTopicInfoList(TopicInfo topicInfo);
+
+}

+ 39 - 0
zzjs-service/src/main/java/com/miaxis/topic/service/ITopicInfoService.java

@@ -0,0 +1,39 @@
+package com.miaxis.topic.service;
+
+import java.util.List;
+
+import com.miaxis.common.core.domain.Response;
+import com.miaxis.topic.domain.TopicInfo;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.miaxis.topic.dto.TopicInfoDto;
+
+/**
+ * 专题Service接口
+ *
+ * @author miaxis
+ * @date 2021-03-11
+ */
+public interface ITopicInfoService extends IService<TopicInfo>{
+
+    /**
+     * 查询专题列表
+     *
+     * @param topicInfo 专题
+     * @return 专题集合
+     */
+    List<TopicInfo> selectTopicInfoList(TopicInfo topicInfo);
+
+    /**
+     * 新增专题
+     * @param topicInfoDto
+     * @return
+     */
+    Response<Integer> addTopic(TopicInfoDto topicInfoDto);
+
+    /**
+     * 删除专题
+     * @param ids
+     * @return
+     */
+    Response<Integer> removeTopicByIds(Long[] ids);
+}

+ 102 - 0
zzjs-service/src/main/java/com/miaxis/topic/service/impl/TopicInfoServiceImpl.java

@@ -0,0 +1,102 @@
+package com.miaxis.topic.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.miaxis.common.core.domain.Response;
+import com.miaxis.common.utils.bean.BeanUtils;
+import com.miaxis.goods.domain.GoodsInfo;
+import com.miaxis.goods.service.IGoodsInfoService;
+import com.miaxis.topic.domain.TopicInfo;
+import com.miaxis.topic.dto.TopicInfoDto;
+import com.miaxis.topic.mapper.TopicInfoMapper;
+import com.miaxis.topic.service.ITopicInfoService;
+import lombok.RequiredArgsConstructor;
+import lombok.SneakyThrows;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.stream.Collectors;
+
+/**
+ * 专题Service业务层处理
+ *
+ * @author miaxis
+ * @date 2021-03-11
+ */
+@Service
+@RequiredArgsConstructor
+public class TopicInfoServiceImpl extends ServiceImpl<TopicInfoMapper, TopicInfo> implements ITopicInfoService {
+
+    private final TopicInfoMapper topicInfoMapper;
+
+    private final IGoodsInfoService goodsInfoService;
+
+    /**
+     * 查询专题列表
+     *
+     * @param topicInfo 专题
+     * @return 专题
+     */
+    @Override
+    public List<TopicInfo> selectTopicInfoList(TopicInfo topicInfo){
+        return topicInfoMapper.selectTopicInfoList(topicInfo);
+    }
+
+    /**
+     * 新增专题
+     * @param topicInfoDto
+     * @return
+     */
+    @Override
+    @SneakyThrows
+    @Transactional(rollbackFor = Exception.class)
+    public Response<Integer> addTopic(TopicInfoDto topicInfoDto) {
+
+        //保存商品信息
+        List<GoodsInfo> goodsInfoList = topicInfoDto.getGoodsInfoList();
+        goodsInfoService.saveBatch(goodsInfoList);
+
+        //保存专题信息
+        TopicInfo topicInfo = new TopicInfo();
+        BeanUtils.copyProperties(topicInfoDto,topicInfo);
+        String s1 = goodsInfoList.stream()
+                .map(g -> g.getId() + ",")
+                .collect(Collectors.toList())
+                .toString()
+                .replace("[","")
+                .replace("]","");
+        topicInfo.setGoodsId(s1);
+        this.save(topicInfo);
+
+        return Response.success();
+    }
+
+    /**
+     * 删除专题
+     * @param ids
+     * @return
+     */
+    @Override
+    @SneakyThrows
+    @Transactional(rollbackFor = Exception.class)
+    public Response<Integer> removeTopicByIds(Long[] ids) {
+
+        for (Long id : ids) {
+            //首先删除专题对应商品
+            String goodsIds = this.getById(id).getGoodsId();
+            if (goodsIds.indexOf(",") != -1){
+                for (String goodsId : Arrays.asList(goodsIds.split(","))) {
+                    goodsInfoService.update(new UpdateWrapper<GoodsInfo>().set("status",1).eq("id",goodsId));
+                }
+            }else {
+                goodsInfoService.update(new UpdateWrapper<GoodsInfo>().set("status",1).eq("id",goodsIds));
+            }
+            //删除专题
+            this.update(new UpdateWrapper<TopicInfo>().set("status",1).eq("id",id));
+        }
+        return Response.success();
+    }
+
+}

+ 35 - 0
zzjs-service/src/main/resources/mapper/goods/GoodsInfoMapper.xml

@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.miaxis.goods.mapper.GoodsInfoMapper">
+
+    <resultMap type="GoodsInfo" id="GoodsInfoResult">
+        <result property="id"    column="id"    />
+        <result property="goodsName"    column="goods_name"    />
+        <result property="goodsPrice"    column="goods_price"    />
+        <result property="goodsLink"    column="goods_link"    />
+        <result property="goodsDescribe"    column="goods_describe"    />
+        <result property="goodsPicture"    column="goods_picture"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="status"    column="status"    />
+    </resultMap>
+
+    <sql id="selectGoodsInfoVo">
+        select id, goods_name, goods_price, goods_link, goods_describe, goods_picture, create_time, update_time, status from goods_info
+    </sql>
+
+    <select id="selectGoodsInfoList" parameterType="GoodsInfo" resultMap="GoodsInfoResult">
+        <include refid="selectGoodsInfoVo"/>
+        <where>
+            <if test="goodsName != null  and goodsName != ''"> and goods_name like concat('%', #{goodsName}, '%')</if>
+            <if test="goodsPrice != null "> and goods_price = #{goodsPrice}</if>
+            <if test="goodsLink != null  and goodsLink != ''"> and goods_link = #{goodsLink}</if>
+            <if test="goodsDescribe != null  and goodsDescribe != ''"> and goods_describe = #{goodsDescribe}</if>
+            <if test="goodsPicture != null "> and goods_picture = #{goodsPicture}</if>
+            <if test="status != null "> and status = #{status}</if>
+        </where>
+    </select>
+
+</mapper>

+ 43 - 0
zzjs-service/src/main/resources/mapper/topic/TopicInfoMapper.xml

@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.miaxis.topic.mapper.TopicInfoMapper">
+
+    <resultMap type="TopicInfo" id="TopicInfoResult">
+        <result property="id"    column="id"    />
+        <result property="topicName"    column="topic_name"    />
+        <result property="topicIllustration"    column="topic_illustration"    />
+        <result property="goodsId"    column="goods_id"    />
+        <result property="sharingStatus"    column="sharing_status"    />
+        <result property="sharingNumberStatus"    column="sharing_number_status"    />
+        <result property="commentStatus"    column="comment_status"    />
+        <result property="commentNumberStatus"    column="comment_number_status"    />
+        <result property="collectionNumberStatus"    column="collection_number_status"    />
+        <result property="topicContent"    column="topic_content"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="status"    column="status"    />
+    </resultMap>
+
+    <sql id="selectTopicInfoVo">
+        select id, topic_name, topic_illustration, goods_id, sharing_status, sharing_number_status, comment_status, comment_number_status, collection_number_status, topic_content, create_time, update_time, status from topic_info
+    </sql>
+
+    <select id="selectTopicInfoList" parameterType="TopicInfo" resultMap="TopicInfoResult">
+        <include refid="selectTopicInfoVo"/>
+        <where>
+            <if test="topicName != null  and topicName != ''"> and topic_name like concat('%', #{topicName}, '%')</if>
+            <if test="topicIllustration != null "> and topic_illustration = #{topicIllustration}</if>
+            <if test="goodsId != null  and goodsId != ''"> and goods_id = #{goodsId}</if>
+            <if test="sharingStatus != null "> and sharing_status = #{sharingStatus}</if>
+            <if test="sharingNumberStatus != null "> and sharing_number_status = #{sharingNumberStatus}</if>
+            <if test="commentStatus != null "> and comment_status = #{commentStatus}</if>
+            <if test="commentNumberStatus != null "> and comment_number_status = #{commentNumberStatus}</if>
+            <if test="collectionNumberStatus != null "> and collection_number_status = #{collectionNumberStatus}</if>
+            <if test="topicContent != null  and topicContent != ''"> and topic_content = #{topicContent}</if>
+            <if test="status != null "> and status = #{status}</if>
+        </where>
+    </select>
+
+</mapper>