Эх сурвалжийг харах

Merge remote-tracking branch 'origin/master'

小么熊🐻 4 жил өмнө
parent
commit
339e6a423c
19 өөрчлөгдсөн 1101 нэмэгдсэн , 0 устгасан
  1. 76 0
      zzjs-admin/src/main/java/com/miaxis/pc/controller/carousel/CarouselChartInfoController.java
  2. 127 0
      zzjs-admin/src/main/java/com/miaxis/pc/controller/customer/CustomerInfoController.java
  3. 96 0
      zzjs-admin/src/main/java/com/miaxis/pc/controller/product/ProductTypeInfoController.java
  4. 48 0
      zzjs-service/src/main/java/com/miaxis/carousel/domain/CarouselChartInfo.java
  5. 23 0
      zzjs-service/src/main/java/com/miaxis/carousel/mapper/CarouselChartInfoMapper.java
  6. 30 0
      zzjs-service/src/main/java/com/miaxis/carousel/service/ICarouselChartInfoService.java
  7. 57 0
      zzjs-service/src/main/java/com/miaxis/carousel/service/impl/CarouselChartInfoServiceImpl.java
  8. 39 0
      zzjs-service/src/main/java/com/miaxis/carousel/vo/CarouselChartInfoVo.java
  9. 174 0
      zzjs-service/src/main/java/com/miaxis/customer/domain/CustomerInfo.java
  10. 23 0
      zzjs-service/src/main/java/com/miaxis/customer/mapper/CustomerInfoMapper.java
  11. 39 0
      zzjs-service/src/main/java/com/miaxis/customer/service/ICustomerInfoService.java
  12. 75 0
      zzjs-service/src/main/java/com/miaxis/customer/service/impl/CustomerInfoServiceImpl.java
  13. 53 0
      zzjs-service/src/main/java/com/miaxis/product/domain/ProductTypeInfo.java
  14. 22 0
      zzjs-service/src/main/java/com/miaxis/product/mapper/ProductTypeInfoMapper.java
  15. 30 0
      zzjs-service/src/main/java/com/miaxis/product/service/IProductTypeInfoService.java
  16. 55 0
      zzjs-service/src/main/java/com/miaxis/product/service/impl/ProductTypeInfoServiceImpl.java
  17. 35 0
      zzjs-service/src/main/resources/mapper/carousel/CarouselChartInfoMapper.xml
  18. 68 0
      zzjs-service/src/main/resources/mapper/customer/CustomerInfoMapper.xml
  19. 31 0
      zzjs-service/src/main/resources/mapper/product/ProductTypeInfoMapper.xml

+ 76 - 0
zzjs-admin/src/main/java/com/miaxis/pc/controller/carousel/CarouselChartInfoController.java

@@ -0,0 +1,76 @@
+package com.miaxis.pc.controller.carousel;
+
+import com.miaxis.carousel.domain.CarouselChartInfo;
+import com.miaxis.carousel.service.ICarouselChartInfoService;
+import com.miaxis.carousel.vo.CarouselChartInfoVo;
+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 io.swagger.annotations.*;
+import lombok.RequiredArgsConstructor;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+import java.util.stream.Collectors;
+
+/**
+ * 【轮播图】Controller
+ *
+ * @author miaxis
+ * @date 2021-03-11
+ */
+@RestController
+@RequiredArgsConstructor
+@RequestMapping("/pc/carousel")
+@Api(tags={"【pc-轮播图】"})
+public class CarouselChartInfoController extends BaseController{
+
+    private final ICarouselChartInfoService carouselChartInfoService;
+
+    /**
+     * 查询轮播图列表
+     */
+    @PreAuthorize("@ss.hasPermi('carousel:carousel: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<CarouselChartInfoVo> list(@ModelAttribute CarouselChartInfo carouselChartInfo){
+        startPage();
+        List<CarouselChartInfoVo> list = carouselChartInfoService.selectCarouselChartInfoList(carouselChartInfo);
+        return toResponsePageInfo(list);
+    }
+
+
+    /**
+     * 新增轮播图
+     */
+    @PreAuthorize("@ss.hasPermi('carousel:carousel:add')")
+    @Log(title = "轮播图", businessType = BusinessTypeEnum.INSERT)
+    @PostMapping
+    @ApiOperation("新增轮播图")
+    public Response<Integer> add(@RequestBody List<CarouselChartInfo> carouselChartInfo){
+        List<CarouselChartInfo> collect = carouselChartInfo.stream().filter(c -> c.getId() == null).collect(Collectors.toList());
+        return toResponse(carouselChartInfoService.saveBatch(collect) ? 1 : 0);
+    }
+
+
+    /**
+     * 删除轮播图(伪删除)
+     */
+    @PreAuthorize("@ss.hasPermi('carousel:carousel:remove')")
+    @Log(title = "轮播图", businessType = BusinessTypeEnum.UPDATE)
+	@PutMapping("/{ids}")
+    @ApiOperation("删除轮播图")
+    public  Response<Integer> remove(
+            @ApiParam(name = "ids", value = "轮播图ids参数", required = true)
+            @PathVariable Long[] ids
+    ){
+        return carouselChartInfoService.removeCarouselByIds(ids);
+    }
+}

+ 127 - 0
zzjs-admin/src/main/java/com/miaxis/pc/controller/customer/CustomerInfoController.java

@@ -0,0 +1,127 @@
+package com.miaxis.pc.controller.customer;
+
+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.common.utils.poi.ExcelUtil;
+import com.miaxis.customer.domain.CustomerInfo;
+import com.miaxis.customer.service.ICustomerInfoService;
+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-10
+ */
+@RestController
+// @RequiredArgsConstructor 代替@AutoWired注解,注意在注入时需要用final定义,或者使用@notnull注解
+@RequiredArgsConstructor
+@RequestMapping("/pc/customer")
+@Api(tags = {"【pc-客户信息】"})
+public class CustomerInfoController extends BaseController {
+
+    private final ICustomerInfoService customerInfoService;
+
+    /**
+     * 查询客户信息列表
+     */
+    @PreAuthorize("@ss.hasPermi('customer:customer: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<CustomerInfo> list(@ModelAttribute CustomerInfo customerInfo) {
+        startPage();
+        List<CustomerInfo> list = customerInfoService.selectCustomerInfoList(customerInfo);
+        return toResponsePageInfo(list);
+    }
+
+    /**
+     * 导出客户信息列表
+     */
+    @PreAuthorize("@ss.hasPermi('customer:customer:export')")
+    @Log(title = "客户信息", businessType = BusinessTypeEnum.EXPORT)
+    @GetMapping("/export")
+    @ApiOperation("导出客户信息列表Excel")
+    public Response<String> export(@ModelAttribute CustomerInfo customerInfo) {
+        List<CustomerInfo> list = customerInfoService.selectCustomerInfoList(customerInfo);
+        ExcelUtil<CustomerInfo> util = new ExcelUtil<CustomerInfo>(CustomerInfo.class);
+        return util.exportExcel(list, "customer");
+    }
+
+    /**
+     * 获取客户信息详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('customer:customer:query')")
+    @GetMapping(value = "/{id}")
+    @ApiOperation("获取客户信息详细信息")
+    public Response<CustomerInfo> getInfo(
+            @ApiParam(name = "id", value = "客户信息参数", required = true)
+            @PathVariable("id") Long id
+    ) {
+        return Response.success(customerInfoService.getById(id));
+    }
+
+    /**
+     * 新增客户信息
+     */
+    @PreAuthorize("@ss.hasPermi('customer:customer:add')")
+    @Log(title = "客户信息", businessType = BusinessTypeEnum.INSERT)
+    @PostMapping
+    @ApiOperation("新增客户信息")
+    public Response<Integer> add(@RequestBody CustomerInfo customerInfo) {
+        return toResponse(customerInfoService.save(customerInfo) ? 1 : 0);
+    }
+
+    /**
+     * 修改客户信息
+     */
+    @PreAuthorize("@ss.hasPermi('customer:customer:edit')")
+    @Log(title = "客户信息", businessType = BusinessTypeEnum.UPDATE)
+    @PutMapping
+    @ApiOperation("修改客户信息")
+    public Response<Integer> edit(@RequestBody CustomerInfo customerInfo) {
+        return toResponse(customerInfoService.updateById(customerInfo) ? 1 : 0);
+    }
+
+    /**
+     * 更新 0:上架 / 1:下架
+     */
+    @PreAuthorize("@ss.hasPermi('customer:customer:updateShelfStatus')")
+    @Log(title = "客户信息", businessType = BusinessTypeEnum.UPDATE)
+    @PutMapping("/updateShelfStatus")
+    @ApiOperation("上架、下架")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "ids", value = "客户信息ids参数", dataType = "List", required = true),
+            @ApiImplicitParam(name = "shelfStatus", value = "上架状态  0:上架、1:下架", dataType = "int", required = true),
+    })
+    public Response updateShelfStatus(Long[] ids,Integer shelfStatus) {
+        return customerInfoService.updateShelfStatus(ids,shelfStatus);
+    }
+
+
+    /**
+     * 删除客户信息(伪删除)
+     */
+    @PreAuthorize("@ss.hasPermi('customer:customer:remove')")
+    @Log(title = "客户信息", businessType = BusinessTypeEnum.UPDATE)
+    @PutMapping("/{ids}")
+    @ApiOperation("删除客户信息")
+    public Response remove(
+            @ApiParam(name = "ids", value = "客户信息ids参数", required = true)
+            @PathVariable Long[] ids
+    ) {
+        return customerInfoService.removeCustomerByIds(ids);
+    }
+
+}

+ 96 - 0
zzjs-admin/src/main/java/com/miaxis/pc/controller/product/ProductTypeInfoController.java

@@ -0,0 +1,96 @@
+package com.miaxis.pc.controller.product;
+
+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.product.domain.ProductTypeInfo;
+import com.miaxis.product.service.IProductTypeInfoService;
+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("/pc/product/info")
+@Api(tags={"【pc-品类管理】"})
+public class ProductTypeInfoController extends BaseController{
+
+    private final IProductTypeInfoService productTypeInfoService;
+
+    /**
+     * 查询品类列表
+     */
+    @PreAuthorize("@ss.hasPermi('product: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<ProductTypeInfo> list(@ModelAttribute ProductTypeInfo productTypeInfo){
+        startPage();
+        List<ProductTypeInfo> list = productTypeInfoService.selectProductTypeInfoList(productTypeInfo);
+        return toResponsePageInfo(list);
+    }
+
+
+    /**
+     * 获取品类详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('product:info:query')")
+    @GetMapping(value = "/{id}")
+    @ApiOperation("获取品类详细信息")
+    public Response<ProductTypeInfo> getInfo(
+            @ApiParam(name = "id", value = "品类参数", required = true)
+            @PathVariable("id") Long id
+    ){
+        return Response.success(productTypeInfoService.getById(id));
+    }
+
+    /**
+     * 新增品类
+     */
+    @PreAuthorize("@ss.hasPermi('product:info:add')")
+    @Log(title = "品类", businessType = BusinessTypeEnum.INSERT)
+    @PostMapping
+    @ApiOperation("新增品类")
+    public Response<Integer> add(@RequestBody ProductTypeInfo productTypeInfo){
+        return toResponse(productTypeInfoService.save(productTypeInfo) ? 1 : 0);
+    }
+
+    /**
+     * 修改品类
+     */
+    @PreAuthorize("@ss.hasPermi('product:info:edit')")
+    @Log(title = "品类", businessType = BusinessTypeEnum.UPDATE)
+    @PutMapping
+    @ApiOperation("修改品类")
+    public Response<Integer> edit(@RequestBody ProductTypeInfo productTypeInfo){
+        return toResponse(productTypeInfoService.updateById(productTypeInfo) ? 1 : 0);
+    }
+
+    /**
+     * 删除品类
+     */
+    @PreAuthorize("@ss.hasPermi('product:info:remove')")
+    @Log(title = "品类", businessType = BusinessTypeEnum.UPDATE)
+	@PutMapping("/{ids}")
+    @ApiOperation("删除品类")
+    public  Response<Integer> remove(
+            @ApiParam(name = "ids", value = "品类ids参数", required = true)
+            @PathVariable Long[] ids
+    ){
+        return productTypeInfoService.removeProductByIds(ids);
+    }
+}

+ 48 - 0
zzjs-service/src/main/java/com/miaxis/carousel/domain/CarouselChartInfo.java

@@ -0,0 +1,48 @@
+package com.miaxis.carousel.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;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+/**
+ * 轮播图对象 carousel_chart_info
+ *
+ * @author miaxis
+ * @date 2021-03-11
+ */
+@Data
+@TableName("carousel_chart_info")
+@ApiModel(value = "CarouselChartInfo", description = "轮播图对象 carousel_chart_info")
+public class CarouselChartInfo extends BaseBusinessEntity{
+    private static final long serialVersionUID = 1L;
+
+    /** 主键 */
+    @TableId(value = "id")
+    @ApiModelProperty(value = "主键")
+    private Long id;
+
+    /** 图片名称 */
+    @Excel(name = "图片名称")
+    @TableField("picture_name")
+    @ApiModelProperty(value = "图片名称")
+    private String pictureName;
+
+    /** 图片id--对应file_info的id */
+    @Excel(name = "图片id--对应file_info的id")
+    @TableField("file_id")
+    @ApiModelProperty(value = "图片id--对应file_info的id")
+    private Long fileId;
+
+    /** 状态  0:有效(默认)、1:失效 (伪删除) */
+    @Excel(name = "状态  0:有效(默认)、1:失效 (伪删除)", readConverterExp = "伪=删除")
+    @TableField("status")
+    @ApiModelProperty(value = "状态  0:有效(默认)、1:失效 (伪删除)")
+    private Integer status;
+
+}

+ 23 - 0
zzjs-service/src/main/java/com/miaxis/carousel/mapper/CarouselChartInfoMapper.java

@@ -0,0 +1,23 @@
+package com.miaxis.carousel.mapper;
+
+import java.util.List;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.miaxis.carousel.domain.CarouselChartInfo;
+import com.miaxis.carousel.vo.CarouselChartInfoVo;
+
+/**
+ * 轮播图Mapper接口
+ *
+ * @author miaxis
+ * @date 2021-03-11
+ */
+public interface CarouselChartInfoMapper extends BaseMapper<CarouselChartInfo> {
+    /**
+     * 查询轮播图列表
+     *
+     * @param carouselChartInfo 轮播图
+     * @return 轮播图集合
+     */
+    List<CarouselChartInfoVo> selectCarouselChartInfoList(CarouselChartInfo carouselChartInfo);
+
+}

+ 30 - 0
zzjs-service/src/main/java/com/miaxis/carousel/service/ICarouselChartInfoService.java

@@ -0,0 +1,30 @@
+package com.miaxis.carousel.service;
+
+import java.util.List;
+import com.miaxis.carousel.domain.CarouselChartInfo;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.miaxis.carousel.vo.CarouselChartInfoVo;
+import com.miaxis.common.core.domain.Response;
+
+/**
+ * 轮播图Service接口
+ *
+ * @author miaxis
+ * @date 2021-03-11
+ */
+public interface ICarouselChartInfoService extends IService<CarouselChartInfo>{
+    /**
+     * 查询轮播图列表
+     *
+     * @param carouselChartInfo 轮播图
+     * @return 轮播图集合
+     */
+    List<CarouselChartInfoVo> selectCarouselChartInfoList(CarouselChartInfo carouselChartInfo);
+
+    /**
+     * 删除轮播图(伪删除)
+     * @param ids
+     * @return
+     */
+    Response<Integer> removeCarouselByIds(Long[] ids);
+}

+ 57 - 0
zzjs-service/src/main/java/com/miaxis/carousel/service/impl/CarouselChartInfoServiceImpl.java

@@ -0,0 +1,57 @@
+package com.miaxis.carousel.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.miaxis.carousel.domain.CarouselChartInfo;
+import com.miaxis.carousel.mapper.CarouselChartInfoMapper;
+import com.miaxis.carousel.service.ICarouselChartInfoService;
+import com.miaxis.carousel.vo.CarouselChartInfoVo;
+import com.miaxis.common.core.domain.Response;
+import lombok.RequiredArgsConstructor;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.List;
+
+/**
+ * 轮播图Service业务层处理
+ *
+ * @author miaxis
+ * @date 2021-03-11
+ */
+@Service
+@RequiredArgsConstructor
+public class CarouselChartInfoServiceImpl extends ServiceImpl<CarouselChartInfoMapper, CarouselChartInfo> implements ICarouselChartInfoService {
+
+    private final CarouselChartInfoMapper carouselChartInfoMapper;
+
+    /**
+     * 查询轮播图列表
+     *
+     * @param carouselChartInfo 轮播图
+     * @return 轮播图
+     */
+    @Override
+    public List<CarouselChartInfoVo> selectCarouselChartInfoList(CarouselChartInfo carouselChartInfo){
+        return carouselChartInfoMapper.selectCarouselChartInfoList(carouselChartInfo);
+    }
+
+    /**
+     * 删除轮播图(伪删除)
+     * @param ids
+     * @return
+     */
+    @Override
+    @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);
+        }
+    }
+
+}

+ 39 - 0
zzjs-service/src/main/java/com/miaxis/carousel/vo/CarouselChartInfoVo.java

@@ -0,0 +1,39 @@
+package com.miaxis.carousel.vo;
+
+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;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+/**
+ * 轮播图对象返回参
+ *
+ * @author miaxis
+ * @date 2021-03-11
+ */
+@Data
+@ApiModel(value = "CarouselChartInfoVo", description = "轮播图对象返回参")
+public class CarouselChartInfoVo{
+
+    @ApiModelProperty(value = "主键")
+    private Long id;
+
+    /** 图片名称 */
+    @ApiModelProperty(value = "图片名称")
+    private String pictureName;
+
+    /** 图片id--对应file_info的id */
+    @ApiModelProperty(value = "图片访问地址")
+    private String fileUrl;
+
+    /** 状态  0:有效(默认)、1:失效 (伪删除) */
+    @ApiModelProperty(value = "状态  0:有效(默认)、1:失效 (伪删除)")
+    private Integer status;
+
+}

+ 174 - 0
zzjs-service/src/main/java/com/miaxis/customer/domain/CustomerInfo.java

@@ -0,0 +1,174 @@
+package com.miaxis.customer.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;
+
+/**
+ * 客户信息对象 customer_info
+ *
+ * @author miaxis
+ * @date 2021-03-10
+ */
+@Data
+@TableName("customer_info")
+@ApiModel(value = "CustomerInfo", description = "客户信息对象")
+public class CustomerInfo extends BaseBusinessEntity{
+    private static final long serialVersionUID = 1L;
+
+    /** 主键 */
+    @TableId(value = "id")
+    @ApiModelProperty(value = "主键")
+    private Long id;
+
+    /** 公司名称 */
+    @Excel(name = "公司名称")
+    @TableField("corporate_name")
+    @ApiModelProperty(value = "公司名称")
+    private String corporateName;
+
+    /** 业务类型  0:内部小程序、1:外部小程序 */
+    @Excel(name = "业务类型  0:内部小程序、1:外部小程序")
+    @TableField("business_type")
+    @ApiModelProperty(value = "业务类型  0:内部小程序、1:外部小程序")
+    private Integer businessType;
+
+    /** 公司LOGO图片--(对应file_info的id) */
+    @Excel(name = "公司LOGO图片--(对应file_info的id)", readConverterExp = "对=应file_info的id")
+    @TableField("corporate_logo")
+    @ApiModelProperty(value = "公司LOGO图片--(对应file_info的id)")
+    private Long corporateLogo;
+
+    /** 客户来源  0:电话营销、1:主动来电、2:客户介绍、3:朋友介绍、4:销售推广、5:网络搜索、6:广告杂志、7:展会促销、8:其他 */
+    @Excel(name = "客户来源  0:电话营销、1:主动来电、2:客户介绍、3:朋友介绍、4:销售推广、5:网络搜索、6:广告杂志、7:展会促销、8:其他")
+    @TableField("customer_source")
+    @ApiModelProperty(value = "客户来源  0:电话营销、1:主动来电、2:客户介绍、3:朋友介绍、4:销售推广、5:网络搜索、6:广告杂志、7:展会促销、8:其他")
+    private Integer customerSource;
+
+    /** 所在城市编码(对应城市表) */
+    @Excel(name = "所在城市编码(对应城市表)", readConverterExp = "对=应城市表")
+    @TableField("city_code")
+    @ApiModelProperty(value = "所在城市编码(对应城市表)")
+    private String cityCode;
+
+    /** 归属人员--关联用户表 */
+    @Excel(name = "归属人员--关联用户表")
+    @TableField("attributed_personnel")
+    @ApiModelProperty(value = "归属人员--关联用户表")
+    private Long attributedPersonnel;
+
+    /** 详细地址 */
+    @Excel(name = "详细地址")
+    @TableField("detailed_address")
+    @ApiModelProperty(value = "详细地址")
+    private String detailedAddress;
+
+    /** 行业类型---关联product_type_info 品类表 */
+    @Excel(name = "行业类型---关联product_type_info 品类表")
+    @TableField("industry_type")
+    @ApiModelProperty(value = "行业类型---关联product_type_info 品类表")
+    private Long industryType;
+
+    /** 公司电话 */
+    @Excel(name = "公司电话")
+    @TableField("corporate_phone")
+    @ApiModelProperty(value = "公司电话")
+    private String corporatePhone;
+
+    /** 公司联系人 */
+    @Excel(name = "公司联系人")
+    @TableField("corporate_contacts")
+    @ApiModelProperty(value = "公司联系人")
+    private String corporateContacts;
+
+    /** 手机号码 */
+    @Excel(name = "手机号码")
+    @TableField("phone")
+    @ApiModelProperty(value = "手机号码")
+    private String phone;
+
+    /** 客户星级  1:一星、2:二星、3:三星、4:四星、5:五星 */
+    @Excel(name = "客户星级  1:一星、2:二星、3:三星、4:四星、5:五星")
+    @TableField("customer_star")
+    @ApiModelProperty(value = "客户星级  1:一星、2:二星、3:三星、4:四星、5:五星")
+    private Integer customerStar;
+
+    /** 企业税号 */
+    @Excel(name = "企业税号")
+    @TableField("enterprise_tax_number")
+    @ApiModelProperty(value = "企业税号")
+    private String enterpriseTaxNumber;
+
+    /** 发票抬头 */
+    @Excel(name = "发票抬头")
+    @TableField("invoice_title")
+    @ApiModelProperty(value = "发票抬头")
+    private String invoiceTitle;
+
+    /** 开户银行 */
+    @Excel(name = "开户银行")
+    @TableField("bank_of_deposit")
+    @ApiModelProperty(value = "开户银行")
+    private String bankOfDeposit;
+
+    /** 银行帐户 */
+    @Excel(name = "银行帐户")
+    @TableField("bank_account")
+    @ApiModelProperty(value = "银行帐户")
+    private String bankAccount;
+
+    /** 财务电话号码 */
+    @Excel(name = "财务电话号码")
+    @TableField("finance_phone")
+    @ApiModelProperty(value = "财务电话号码")
+    private String financePhone;
+
+    /** 传真号码 */
+    @Excel(name = "传真号码")
+    @TableField("fax_number")
+    @ApiModelProperty(value = "传真号码")
+    private String faxNumber;
+
+    /** 小程序地址 */
+    @Excel(name = "小程序地址")
+    @TableField("applet_address")
+    @ApiModelProperty(value = "小程序地址")
+    private String appletAddress;
+
+    /** 小程序图标---(对应file_info的id) */
+    @Excel(name = "小程序图标---(对应file_info的id)", readConverterExp = "对=应file_info的id")
+    @TableField("applet_logo")
+    @ApiModelProperty(value = "小程序图标---(对应file_info的id)")
+    private Long appletLogo;
+
+    /** 小程序二维码---(对应file_info的id) */
+    @Excel(name = "小程序二维码---(对应file_info的id)", readConverterExp = "对=应file_info的id")
+    @TableField("applet_qr_code")
+    @ApiModelProperty(value = "小程序二维码---(对应file_info的id)")
+    private Long appletQrCode;
+
+    /** 小程序介绍 */
+    @Excel(name = "小程序介绍")
+    @TableField("applet_introduce")
+    @ApiModelProperty(value = "小程序介绍")
+    private String appletIntroduce;
+
+    /** 上架状态  0:已上架、1:未上架 */
+    @Excel(name = "上架状态  0:已上架、1:未上架")
+    @TableField("shelf_status")
+    @ApiModelProperty(value = "上架状态  0:已上架、1:未上架")
+    private Integer shelfStatus;
+
+    /** 状态  0:有效(默认)、1:失效 (伪删除) */
+    @Excel(name = "状态  0:有效(默认)、1:失效 (伪删除)", readConverterExp = "伪=删除")
+    @TableField("status")
+    @ApiModelProperty(value = "状态  0:有效(默认)、1:失效 (伪删除)")
+    private Integer status;
+
+
+}

+ 23 - 0
zzjs-service/src/main/java/com/miaxis/customer/mapper/CustomerInfoMapper.java

@@ -0,0 +1,23 @@
+package com.miaxis.customer.mapper;
+
+import java.util.List;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.miaxis.customer.domain.CustomerInfo;
+
+/**
+ * 客户信息Mapper接口
+ *
+ * @author miaxis
+ * @date 2021-03-10
+ */
+public interface CustomerInfoMapper extends BaseMapper<CustomerInfo> {
+
+    /**
+     * 查询客户信息列表
+     *
+     * @param customerInfo 客户信息
+     * @return 客户信息集合
+     */
+    List<CustomerInfo> selectCustomerInfoList(CustomerInfo customerInfo);
+
+}

+ 39 - 0
zzjs-service/src/main/java/com/miaxis/customer/service/ICustomerInfoService.java

@@ -0,0 +1,39 @@
+package com.miaxis.customer.service;
+
+import java.util.List;
+
+import com.miaxis.common.core.domain.Response;
+import com.miaxis.customer.domain.CustomerInfo;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * 客户信息Service接口
+ *
+ * @author miaxis
+ * @date 2021-03-10
+ */
+public interface ICustomerInfoService extends IService<CustomerInfo>{
+    /**
+     * 查询客户信息列表
+     *
+     * @param customerInfo 客户信息
+     * @return 客户信息集合
+     */
+    List<CustomerInfo> selectCustomerInfoList(CustomerInfo customerInfo);
+
+    /**
+     * 更新 0:上架 / 1:下架
+     * @param ids
+     * @param shelfStatus
+     * @return
+     */
+    Response updateShelfStatus(Long[] ids, Integer shelfStatus);
+
+
+    /**
+     * 删除客户信息(伪删除)
+     * @param ids
+     * @return
+     */
+    Response removeCustomerByIds(Long[] ids);
+}

+ 75 - 0
zzjs-service/src/main/java/com/miaxis/customer/service/impl/CustomerInfoServiceImpl.java

@@ -0,0 +1,75 @@
+package com.miaxis.customer.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+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.customer.domain.CustomerInfo;
+import com.miaxis.customer.mapper.CustomerInfoMapper;
+import com.miaxis.customer.service.ICustomerInfoService;
+import lombok.RequiredArgsConstructor;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.List;
+
+/**
+ * 客户信息Service业务层处理
+ *
+ * @author miaxis
+ * @date 2021-03-10
+ */
+@Service
+@RequiredArgsConstructor
+public class CustomerInfoServiceImpl extends ServiceImpl<CustomerInfoMapper, CustomerInfo> implements ICustomerInfoService {
+
+    private final CustomerInfoMapper customerInfoMapper;
+
+    /**
+     * 查询客户信息列表
+     *
+     * @param customerInfo 客户信息
+     * @return 客户信息
+     */
+    @Override
+    public List<CustomerInfo> selectCustomerInfoList(CustomerInfo customerInfo){
+        return customerInfoMapper.selectCustomerInfoList(customerInfo);
+    }
+
+    /**
+     * 更新 0:上架 / 1:下架
+     * @param ids
+     * @param shelfStatus
+     * @return
+     */
+    @Override
+    @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);
+        }
+    }
+
+    /**
+     * 删除客户信息(伪删除)
+     * @param ids
+     * @return
+     */
+    @Override
+    @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);
+        }
+    }
+}

+ 53 - 0
zzjs-service/src/main/java/com/miaxis/product/domain/ProductTypeInfo.java

@@ -0,0 +1,53 @@
+package com.miaxis.product.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;
+/**
+ * 品类对象 product_type_info
+ *
+ * @author miaxis
+ * @date 2021-03-11
+ */
+@Data
+@TableName("product_type_info")
+@ApiModel(value = "ProductTypeInfo", description = "品类对象 product_type_info")
+public class ProductTypeInfo extends BaseBusinessEntity{
+    private static final long serialVersionUID = 1L;
+
+    /** 主键 */
+    @TableId(value = "id")
+    @ApiModelProperty(value = "主键")
+    private Long id;
+
+    /** 分类名称 */
+    @Excel(name = "分类名称")
+    @TableField("product_name")
+    @ApiModelProperty(value = "分类名称")
+    private String productName;
+
+    /** 父节点(预留) */
+    @Excel(name = "父节点(预留)", readConverterExp = "预=留")
+    @TableField("pid")
+    @ApiModelProperty(value = "父节点(预留)")
+    private Long pid;
+
+    /** 分类描述,该分类名称的描述 */
+    @Excel(name = "分类描述,该分类名称的描述")
+    @TableField("product_describe")
+    @ApiModelProperty(value = "分类描述,该分类名称的描述")
+    private String productDescribe;
+
+    /** 状态  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/product/mapper/ProductTypeInfoMapper.java

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

+ 30 - 0
zzjs-service/src/main/java/com/miaxis/product/service/IProductTypeInfoService.java

@@ -0,0 +1,30 @@
+package com.miaxis.product.service;
+
+import java.util.List;
+
+import com.miaxis.common.core.domain.Response;
+import com.miaxis.product.domain.ProductTypeInfo;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * 品类Service接口
+ *
+ * @author miaxis
+ * @date 2021-03-11
+ */
+public interface IProductTypeInfoService extends IService<ProductTypeInfo>{
+    /**
+     * 查询品类列表
+     *
+     * @param productTypeInfo 品类
+     * @return 品类集合
+     */
+    List<ProductTypeInfo> selectProductTypeInfoList(ProductTypeInfo productTypeInfo);
+
+    /**
+     * 删除品类
+     * @param ids
+     * @return
+     */
+    Response<Integer> removeProductByIds(Long[] ids);
+}

+ 55 - 0
zzjs-service/src/main/java/com/miaxis/product/service/impl/ProductTypeInfoServiceImpl.java

@@ -0,0 +1,55 @@
+package com.miaxis.product.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.product.domain.ProductTypeInfo;
+import com.miaxis.product.mapper.ProductTypeInfoMapper;
+import com.miaxis.product.service.IProductTypeInfoService;
+import lombok.RequiredArgsConstructor;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.List;
+
+/**
+ * 品类Service业务层处理
+ *
+ * @author miaxis
+ * @date 2021-03-11
+ */
+@Service
+@RequiredArgsConstructor
+public class ProductTypeInfoServiceImpl extends ServiceImpl<ProductTypeInfoMapper, ProductTypeInfo> implements IProductTypeInfoService {
+
+    private final ProductTypeInfoMapper productTypeInfoMapper;
+
+    /**
+     * 查询品类列表
+     *
+     * @param productTypeInfo 品类
+     * @return 品类
+     */
+    @Override
+    public List<ProductTypeInfo> selectProductTypeInfoList(ProductTypeInfo productTypeInfo){
+        return productTypeInfoMapper.selectProductTypeInfoList(productTypeInfo);
+    }
+
+    /**
+     * 删除品类
+     * @param ids
+     * @return
+     */
+    @Override
+    @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);
+        }
+    }
+}

+ 35 - 0
zzjs-service/src/main/resources/mapper/carousel/CarouselChartInfoMapper.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.carousel.mapper.CarouselChartInfoMapper">
+
+    <resultMap type="CarouselChartInfo" id="CarouselChartInfoResult">
+        <result property="id"    column="id"    />
+        <result property="pictureName"    column="picture_name"    />
+        <result property="fileId"    column="file_id"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="status"    column="status"    />
+    </resultMap>
+
+    <sql id="selectCarouselChartInfoVo">
+        select id, picture_name, file_id, create_time, update_time, status from carousel_chart_info
+    </sql>
+
+    <select id="selectCarouselChartInfoList" resultType="com.miaxis.carousel.vo.CarouselChartInfoVo">
+        select
+        ci.id,
+        ci.picture_name as pictureName,
+        f.file_url as fileUrl,
+        ci.status
+        from carousel_chart_info ci
+        LEFT JOIN file_info f on f.file_id = ci.file_id
+        <where>
+            <if test="pictureName != null  and pictureName != ''"> and picture_name like concat('%', #{pictureName}, '%')</if>
+            <if test="fileId != null "> and file_id = #{fileId}</if>
+            <if test="status != null "> and status = #{status}</if>
+        </where>
+    </select>
+
+</mapper>

+ 68 - 0
zzjs-service/src/main/resources/mapper/customer/CustomerInfoMapper.xml

@@ -0,0 +1,68 @@
+<?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.customer.mapper.CustomerInfoMapper">
+
+    <resultMap type="CustomerInfo" id="CustomerInfoResult">
+        <result property="id"    column="id"    />
+        <result property="corporateName"    column="corporate_name"    />
+        <result property="businessType"    column="business_type"    />
+        <result property="corporateLogo"    column="corporate_logo"    />
+        <result property="customerSource"    column="customer_source"    />
+        <result property="cityCode"    column="city_code"    />
+        <result property="attributedPersonnel"    column="attributed_personnel"    />
+        <result property="detailedAddress"    column="detailed_address"    />
+        <result property="industryType"    column="industry_type"    />
+        <result property="corporatePhone"    column="corporate_phone"    />
+        <result property="corporateContacts"    column="corporate_contacts"    />
+        <result property="phone"    column="phone"    />
+        <result property="customerStar"    column="customer_star"    />
+        <result property="enterpriseTaxNumber"    column="enterprise_tax_number"    />
+        <result property="invoiceTitle"    column="invoice_title"    />
+        <result property="bankOfDeposit"    column="bank_of_deposit"    />
+        <result property="bankAccount"    column="bank_account"    />
+        <result property="financePhone"    column="finance_phone"    />
+        <result property="faxNumber"    column="fax_number"    />
+        <result property="appletAddress"    column="applet_address"    />
+        <result property="appletLogo"    column="applet_logo"    />
+        <result property="appletQrCode"    column="applet_qr_code"    />
+        <result property="appletIntroduce"    column="applet_introduce"    />
+        <result property="shelfStatus"    column="shelf_status"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="status"    column="status"    />
+    </resultMap>
+
+    <sql id="selectCustomerInfoVo">
+        select id, corporate_name, business_type, corporate_logo, customer_source, city_code, attributed_personnel, detailed_address, industry_type, corporate_phone, corporate_contacts, phone, customer_star, enterprise_tax_number, invoice_title, bank_of_deposit, bank_account, finance_phone, fax_number, applet_address, applet_logo, applet_qr_code, applet_introduce, shelf_status, create_time, update_time, status from customer_info
+    </sql>
+
+    <select id="selectCustomerInfoList" parameterType="CustomerInfo" resultMap="CustomerInfoResult">
+        <include refid="selectCustomerInfoVo"/>
+        <where>
+            <if test="corporateName != null  and corporateName != ''"> and corporate_name like concat('%', #{corporateName}, '%')</if>
+            <if test="businessType != null "> and business_type = #{businessType}</if>
+            <if test="corporateLogo != null "> and corporate_logo = #{corporateLogo}</if>
+            <if test="customerSource != null "> and customer_source = #{customerSource}</if>
+            <if test="cityCode != null  and cityCode != ''"> and city_code = #{cityCode}</if>
+            <if test="attributedPersonnel != null "> and attributed_personnel = #{attributedPersonnel}</if>
+            <if test="detailedAddress != null  and detailedAddress != ''"> and detailed_address = #{detailedAddress}</if>
+            <if test="industryType != null "> and industry_type = #{industryType}</if>
+            <if test="corporatePhone != null  and corporatePhone != ''"> and corporate_phone = #{corporatePhone}</if>
+            <if test="corporateContacts != null  and corporateContacts != ''"> and corporate_contacts = #{corporateContacts}</if>
+            <if test="phone != null  and phone != ''"> and phone = #{phone}</if>
+            <if test="customerStar != null "> and customer_star = #{customerStar}</if>
+            <if test="enterpriseTaxNumber != null  and enterpriseTaxNumber != ''"> and enterprise_tax_number = #{enterpriseTaxNumber}</if>
+            <if test="invoiceTitle != null  and invoiceTitle != ''"> and invoice_title = #{invoiceTitle}</if>
+            <if test="bankOfDeposit != null  and bankOfDeposit != ''"> and bank_of_deposit = #{bankOfDeposit}</if>
+            <if test="bankAccount != null  and bankAccount != ''"> and bank_account = #{bankAccount}</if>
+            <if test="financePhone != null  and financePhone != ''"> and finance_phone = #{financePhone}</if>
+            <if test="appletAddress != null  and appletAddress != ''"> and applet_address = #{appletAddress}</if>
+            <if test="shelfStatus != null "> and shelf_status = #{shelfStatus}</if>
+            <if test="status != null "> and status = #{status}</if>
+        </where>
+    </select>
+
+
+</mapper>

+ 31 - 0
zzjs-service/src/main/resources/mapper/product/ProductTypeInfoMapper.xml

@@ -0,0 +1,31 @@
+<?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.product.mapper.ProductTypeInfoMapper">
+
+    <resultMap type="ProductTypeInfo" id="ProductTypeInfoResult">
+        <result property="id"    column="id"    />
+        <result property="productName"    column="product_name"    />
+        <result property="pid"    column="pid"    />
+        <result property="productDescribe"    column="product_describe"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="status"    column="status"    />
+    </resultMap>
+
+    <sql id="selectProductTypeInfoVo">
+        select id, product_name, pid, product_describe, create_time, update_time, status from product_type_info
+    </sql>
+
+    <select id="selectProductTypeInfoList" parameterType="ProductTypeInfo" resultMap="ProductTypeInfoResult">
+        <include refid="selectProductTypeInfoVo"/>
+        <where>
+            <if test="productName != null  and productName != ''"> and product_name like concat('%', #{productName}, '%')</if>
+            <if test="pid != null "> and pid = #{pid}</if>
+            <if test="productDescribe != null  and productDescribe != ''"> and product_describe = #{describe}</if>
+            <if test="status != null "> and status = #{status}</if>
+        </where>
+    </select>
+
+</mapper>