From 42d21106be9d113c3e938cf17f9bfc16fcc9cd30 Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 29 Mar 2024 17:23:55 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../muyu/common/core/domain/AjaxResult.java | 3 +- .../controller/ArgumentController.java | 16 +++ .../product/controller/ProductController.java | 41 ++++++ .../muyu/product/mapper/ArgumentMapper.java | 8 ++ .../muyu/product/mapper/ProductMapper.java | 8 ++ .../muyu/product/service/ArgumentService.java | 8 ++ .../service/impl/ArgumentServiceImpl.java | 12 ++ .../mapper/product/ArgumentMapper.xml | 2 + .../mapper/product/ProductBrandMapper.xml | 26 ---- .../mapper/product/ProductClassifyMapper.xml | 24 ---- .../mapper/product/ProductMapper.xml | 122 ++++++++---------- 11 files changed, 147 insertions(+), 123 deletions(-) create mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/ArgumentController.java create mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/ProductController.java create mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/ArgumentMapper.java create mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/ProductMapper.java create mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/ArgumentService.java create mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/ArgumentServiceImpl.java delete mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/ProductBrandMapper.xml delete mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/ProductClassifyMapper.xml diff --git a/muyu-common/muyu-common-core/src/main/java/com/muyu/common/core/domain/AjaxResult.java b/muyu-common/muyu-common-core/src/main/java/com/muyu/common/core/domain/AjaxResult.java index f886ebf..ff8ba49 100644 --- a/muyu-common/muyu-common-core/src/main/java/com/muyu/common/core/domain/AjaxResult.java +++ b/muyu-common/muyu-common-core/src/main/java/com/muyu/common/core/domain/AjaxResult.java @@ -1,13 +1,12 @@ package com.muyu.common.core.domain; - import com.muyu.common.core.constant.HttpStatus; import com.muyu.common.core.utils.StringUtils; - import java.util.HashMap; import java.util.Objects; + /** * 操作消息提醒 * diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/ArgumentController.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/ArgumentController.java new file mode 100644 index 0000000..338910a --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/ArgumentController.java @@ -0,0 +1,16 @@ +package com.muyu.product.controller; + +import io.swagger.annotations.Api; +import lombok.extern.log4j.Log4j2; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * @Author: wangxinyuan + * @Date: 2024/3/29 17:09 + */ +@RestController +@RequestMapping("argument") +@Api(value = "下拉框管理") +public class ArgumentController { +} diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/ProductController.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/ProductController.java new file mode 100644 index 0000000..fd8fd17 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/ProductController.java @@ -0,0 +1,41 @@ +package com.muyu.product.controller; + +import com.github.pagehelper.PageInfo; +import com.muyu.common.core.domain.AjaxResult; +import com.muyu.common.system.remote.RemoteFileService; +import com.muyu.product.domain.DTO.Product; +import com.muyu.product.domain.req.ProductReq; +import com.muyu.product.service.ProductService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiModelProperty; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import static com.muyu.common.core.domain.AjaxResult.success; + +/** + * @Author: wangxinyuan + * @Date: 2024/3/29 17:09 + */ +@RestController +@RequestMapping("/product") +@Api(value = "商品管理") +public class ProductController { + + @Autowired + private ProductService productService; + + @Autowired + private RemoteFileService remoteFileService; + + @ApiModelProperty("查询商品信息") + @GetMapping("/queryProduct") + public AjaxResult queryProduct(@RequestBody ProductReq req){ + PageInfo list = productService.queryProduct(req); + return success(list); + } + +} diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/ArgumentMapper.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/ArgumentMapper.java new file mode 100644 index 0000000..d6fccfa --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/ArgumentMapper.java @@ -0,0 +1,8 @@ +package com.muyu.product.mapper; + +/** + * @Author: wangxinyuan + * @Date: 2024/3/29 17:07 + */ +public interface ArgumentMapper { +} diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/ProductMapper.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/ProductMapper.java new file mode 100644 index 0000000..f6156f0 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/ProductMapper.java @@ -0,0 +1,8 @@ +package com.muyu.product.mapper; + +/** + * @Author: wangxinyuan + * @Date: 2024/3/29 17:06 + */ +public interface ProductMapper { +} diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/ArgumentService.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/ArgumentService.java new file mode 100644 index 0000000..4f5bda6 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/ArgumentService.java @@ -0,0 +1,8 @@ +package com.muyu.product.service; + +/** + * @Author: wangxinyuan + * @Date: 2024/3/29 17:05 + */ +public interface ArgumentService { +} diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/ArgumentServiceImpl.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/ArgumentServiceImpl.java new file mode 100644 index 0000000..deb9d50 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/ArgumentServiceImpl.java @@ -0,0 +1,12 @@ +package com.muyu.product.service.impl; + +import com.muyu.product.service.ArgumentService; +import org.springframework.stereotype.Service; + +/** + * @Author: wangxinyuan + * @Date: 2024/3/29 17:06 + */ +@Service +public class ArgumentServiceImpl implements ArgumentService { +} diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/ArgumentMapper.xml b/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/ArgumentMapper.xml index 941e90b..3131cc5 100644 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/ArgumentMapper.xml +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/ArgumentMapper.xml @@ -3,4 +3,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> + + diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/ProductBrandMapper.xml b/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/ProductBrandMapper.xml deleted file mode 100644 index a5bb961..0000000 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/ProductBrandMapper.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/ProductClassifyMapper.xml b/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/ProductClassifyMapper.xml deleted file mode 100644 index d7779b3..0000000 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/ProductClassifyMapper.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/ProductMapper.xml b/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/ProductMapper.xml index 93185c9..f7ba741 100644 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/ProductMapper.xml +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/ProductMapper.xml @@ -4,80 +4,60 @@ "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - INSERT INTO t_product (product_name, product_number, product_examine, brand_id, type_id, - product_subheading, product_information, product_unit, product_weight, product_sort, - promotion_id, product_points, product_growth, product_max_points, product_foreknow, - product_status, product_new, product_recommended, details_title, details_information, - details_key_word, details_remark, method_type, method_id, move_information, pc_information) - VALUES (#{productName}, #{productNumber}, #{productExamine}, #{brandId}, #{typeId}, #{productSubheading}, - #{productInformation}, #{productUnit}, #{productWeight}, #{productSort}, #{promotionId}, - #{productPoints}, #{productGrowth}, #{productMaxPoints}, #{productForeknow}, #{productStatus}, - #{productNew}, #{productRecommended}, #{detailsTitle}, #{detailsInformation}, #{detailsKeyWord}, - #{detailsRemark}, #{methodType}, #{methodId}, #{moveInformation}, #{pcInformation}) + + INSERT INTO `cargo`.`t_product` ( + `product_name`, + `product_number`, + `brand_id`, + `type_id`, + `product_subheading`, + `product_information`, + `product_unit`, + `product_weight`, + `product_sort`, + `product_points`, + `product_growth`, + `product_max_points`, + `product_foreknow`, + `product_staus`, + `product_new`, + `product_recommended`, + `details_title`, + `details_information`, + `details_key_word`, + `details_remark`, + `method_type`, + `create_by`, + `create_time` + ) + VALUES + ( + #{productName}, + #{productNumber}, + #{brandId}, + #{typeId}, + #{productSubheading}, + #{productInformation}, + #{productUnit}, + #{productWeight}, + #{productSort}, + #{productPoints}, + #{productGrowth}, + #{productForeknow}, + #{productStatus}, + #{productNew}, + #{productRecommended}, + #{detailsTitle}, + #{detailsInformation}, + #{detailsKeyWord}, + #{detailsRemark}, + #{methodType}, + #{createBy}, + now() + ); - - - - - - -