From 2acc74b9935b2a87000dc3c3c81b43119987459f Mon Sep 17 00:00:00 2001 From: "mingxing.ai" Date: Sun, 20 Aug 2023 16:19:26 +0800 Subject: [PATCH] init --- pom.xml | 1 + .../controller/ProductCategoryController.java | 105 +++++++++++++ .../controller/ProductConfigController.java | 105 +++++++++++++ .../controller/ProductInfoController.java | 105 +++++++++++++ .../controller/ProductPriceController.java | 105 +++++++++++++ .../ruoyi/system/domain/ProductCategory.java | 84 +++++++++++ .../ruoyi/system/domain/ProductConfig.java | 140 ++++++++++++++++++ .../com/ruoyi/system/domain/ProductInfo.java | 140 ++++++++++++++++++ .../com/ruoyi/system/domain/ProductPrice.java | 124 ++++++++++++++++ .../system/mapper/ProductCategoryMapper.java | 61 ++++++++ .../system/mapper/ProductConfigMapper.java | 61 ++++++++ .../system/mapper/ProductInfoMapper.java | 61 ++++++++ .../system/mapper/ProductPriceMapper.java | 61 ++++++++ .../service/IProductCategoryService.java | 61 ++++++++ .../system/service/IProductConfigService.java | 61 ++++++++ .../system/service/IProductInfoService.java | 61 ++++++++ .../system/service/IProductPriceService.java | 61 ++++++++ .../impl/ProductCategoryServiceImpl.java | 96 ++++++++++++ .../impl/ProductConfigServiceImpl.java | 96 ++++++++++++ .../service/impl/ProductInfoServiceImpl.java | 95 ++++++++++++ .../service/impl/ProductPriceServiceImpl.java | 96 ++++++++++++ .../mapper/system/ProductCategoryMapper.xml | 88 +++++++++++ .../mapper/system/ProductConfigMapper.xml | 104 +++++++++++++ .../mapper/system/ProductInfoMapper.xml | 100 +++++++++++++ .../mapper/system/ProductPriceMapper.xml | 91 ++++++++++++ 25 files changed, 2163 insertions(+) create mode 100644 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/ProductCategoryController.java create mode 100644 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/ProductConfigController.java create mode 100644 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/ProductInfoController.java create mode 100644 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/ProductPriceController.java create mode 100644 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/ProductCategory.java create mode 100644 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/ProductConfig.java create mode 100644 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/ProductInfo.java create mode 100644 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/ProductPrice.java create mode 100644 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ProductCategoryMapper.java create mode 100644 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ProductConfigMapper.java create mode 100644 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ProductInfoMapper.java create mode 100644 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ProductPriceMapper.java create mode 100644 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/IProductCategoryService.java create mode 100644 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/IProductConfigService.java create mode 100644 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/IProductInfoService.java create mode 100644 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/IProductPriceService.java create mode 100644 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ProductCategoryServiceImpl.java create mode 100644 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ProductConfigServiceImpl.java create mode 100644 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ProductInfoServiceImpl.java create mode 100644 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ProductPriceServiceImpl.java create mode 100644 ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/ProductCategoryMapper.xml create mode 100644 ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/ProductConfigMapper.xml create mode 100644 ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/ProductInfoMapper.xml create mode 100644 ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/ProductPriceMapper.xml diff --git a/pom.xml b/pom.xml index 831a09307..437e2ef78 100644 --- a/pom.xml +++ b/pom.xml @@ -216,6 +216,7 @@ ruoyi-modules ruoyi-api ruoyi-common + ruoyi-modules/ruoyi-market pom diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/ProductCategoryController.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/ProductCategoryController.java new file mode 100644 index 000000000..34c4df276 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/ProductCategoryController.java @@ -0,0 +1,105 @@ +package com.ruoyi.system.controller; + +import java.util.List; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import com.ruoyi.common.log.annotation.Log; +import com.ruoyi.common.log.enums.BusinessType; +import com.ruoyi.common.security.annotation.RequiresPermissions; +import com.ruoyi.system.domain.ProductCategory; +import com.ruoyi.system.service.IProductCategoryService; +import com.ruoyi.common.core.web.controller.BaseController; +import com.ruoyi.common.core.web.domain.AjaxResult; +import com.ruoyi.common.core.utils.poi.ExcelUtil; +import com.ruoyi.common.core.web.page.TableDataInfo; + +/** + * 产品类别Controller + * + * @author ruoyi + * @date 2023-08-20 + */ +@RestController +@RequestMapping("/category") +public class ProductCategoryController extends BaseController +{ + @Autowired + private IProductCategoryService productCategoryService; + + /** + * 查询产品类别列表 + */ + @RequiresPermissions("system:category:list") + @GetMapping("/list") + public TableDataInfo list(ProductCategory productCategory) + { + startPage(); + List list = productCategoryService.selectProductCategoryList(productCategory); + return getDataTable(list); + } + + /** + * 导出产品类别列表 + */ + @RequiresPermissions("system:category:export") + @Log(title = "产品类别", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, ProductCategory productCategory) + { + List list = productCategoryService.selectProductCategoryList(productCategory); + ExcelUtil util = new ExcelUtil(ProductCategory.class); + util.exportExcel(response, list, "产品类别数据"); + } + + /** + * 获取产品类别详细信息 + */ + @RequiresPermissions("system:category:query") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return success(productCategoryService.selectProductCategoryById(id)); + } + + /** + * 新增产品类别 + */ + @RequiresPermissions("system:category:add") + @Log(title = "产品类别", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody ProductCategory productCategory) + { + return toAjax(productCategoryService.insertProductCategory(productCategory)); + } + + /** + * 修改产品类别 + */ + @RequiresPermissions("system:category:edit") + @Log(title = "产品类别", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody ProductCategory productCategory) + { + return toAjax(productCategoryService.updateProductCategory(productCategory)); + } + + /** + * 删除产品类别 + */ + @RequiresPermissions("system:category:remove") + @Log(title = "产品类别", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(productCategoryService.deleteProductCategoryByIds(ids)); + } +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/ProductConfigController.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/ProductConfigController.java new file mode 100644 index 000000000..3a373ebf0 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/ProductConfigController.java @@ -0,0 +1,105 @@ +package com.ruoyi.system.controller; + +import java.util.List; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import com.ruoyi.common.log.annotation.Log; +import com.ruoyi.common.log.enums.BusinessType; +import com.ruoyi.common.security.annotation.RequiresPermissions; +import com.ruoyi.system.domain.ProductConfig; +import com.ruoyi.system.service.IProductConfigService; +import com.ruoyi.common.core.web.controller.BaseController; +import com.ruoyi.common.core.web.domain.AjaxResult; +import com.ruoyi.common.core.utils.poi.ExcelUtil; +import com.ruoyi.common.core.web.page.TableDataInfo; + +/** + * 产品配置Controller + * + * @author ruoyi + * @date 2023-08-20 + */ +@RestController +@RequestMapping("/config") +public class ProductConfigController extends BaseController +{ + @Autowired + private IProductConfigService productConfigService; + + /** + * 查询产品配置列表 + */ + @RequiresPermissions("system:config:list") + @GetMapping("/list") + public TableDataInfo list(ProductConfig productConfig) + { + startPage(); + List list = productConfigService.selectProductConfigList(productConfig); + return getDataTable(list); + } + + /** + * 导出产品配置列表 + */ + @RequiresPermissions("system:config:export") + @Log(title = "产品配置", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, ProductConfig productConfig) + { + List list = productConfigService.selectProductConfigList(productConfig); + ExcelUtil util = new ExcelUtil(ProductConfig.class); + util.exportExcel(response, list, "产品配置数据"); + } + + /** + * 获取产品配置详细信息 + */ + @RequiresPermissions("system:config:query") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return success(productConfigService.selectProductConfigById(id)); + } + + /** + * 新增产品配置 + */ + @RequiresPermissions("system:config:add") + @Log(title = "产品配置", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody ProductConfig productConfig) + { + return toAjax(productConfigService.insertProductConfig(productConfig)); + } + + /** + * 修改产品配置 + */ + @RequiresPermissions("system:config:edit") + @Log(title = "产品配置", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody ProductConfig productConfig) + { + return toAjax(productConfigService.updateProductConfig(productConfig)); + } + + /** + * 删除产品配置 + */ + @RequiresPermissions("system:config:remove") + @Log(title = "产品配置", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(productConfigService.deleteProductConfigByIds(ids)); + } +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/ProductInfoController.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/ProductInfoController.java new file mode 100644 index 000000000..ff0d754c2 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/ProductInfoController.java @@ -0,0 +1,105 @@ +package com.ruoyi.system.controller; + +import java.util.List; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import com.ruoyi.common.log.annotation.Log; +import com.ruoyi.common.log.enums.BusinessType; +import com.ruoyi.common.security.annotation.RequiresPermissions; +import com.ruoyi.system.domain.ProductInfo; +import com.ruoyi.system.service.IProductInfoService; +import com.ruoyi.common.core.web.controller.BaseController; +import com.ruoyi.common.core.web.domain.AjaxResult; +import com.ruoyi.common.core.utils.poi.ExcelUtil; +import com.ruoyi.common.core.web.page.TableDataInfo; + +/** + * 产品信息Controller + * + * @author ruoyi + * @date 2023-08-20 + */ +@RestController +@RequestMapping("/info") +public class ProductInfoController extends BaseController +{ + @Autowired + private IProductInfoService productInfoService; + + /** + * 查询产品信息列表 + */ + @RequiresPermissions("system:info:list") + @GetMapping("/list") + public TableDataInfo list(ProductInfo productInfo) + { + startPage(); + List list = productInfoService.selectProductInfoList(productInfo); + return getDataTable(list); + } + + /** + * 导出产品信息列表 + */ + @RequiresPermissions("system:info:export") + @Log(title = "产品信息", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, ProductInfo productInfo) + { + List list = productInfoService.selectProductInfoList(productInfo); + ExcelUtil util = new ExcelUtil(ProductInfo.class); + util.exportExcel(response, list, "产品信息数据"); + } + + /** + * 获取产品信息详细信息 + */ + @RequiresPermissions("system:info:query") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return success(productInfoService.selectProductInfoById(id)); + } + + /** + * 新增产品信息 + */ + @RequiresPermissions("system:info:add") + @Log(title = "产品信息", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody ProductInfo productInfo) + { + return toAjax(productInfoService.insertProductInfo(productInfo)); + } + + /** + * 修改产品信息 + */ + @RequiresPermissions("system:info:edit") + @Log(title = "产品信息", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody ProductInfo productInfo) + { + return toAjax(productInfoService.updateProductInfo(productInfo)); + } + + /** + * 删除产品信息 + */ + @RequiresPermissions("system:info:remove") + @Log(title = "产品信息", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(productInfoService.deleteProductInfoByIds(ids)); + } +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/ProductPriceController.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/ProductPriceController.java new file mode 100644 index 000000000..a7c2ce47f --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/ProductPriceController.java @@ -0,0 +1,105 @@ +package com.ruoyi.system.controller; + +import java.util.List; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import com.ruoyi.common.log.annotation.Log; +import com.ruoyi.common.log.enums.BusinessType; +import com.ruoyi.common.security.annotation.RequiresPermissions; +import com.ruoyi.system.domain.ProductPrice; +import com.ruoyi.system.service.IProductPriceService; +import com.ruoyi.common.core.web.controller.BaseController; +import com.ruoyi.common.core.web.domain.AjaxResult; +import com.ruoyi.common.core.utils.poi.ExcelUtil; +import com.ruoyi.common.core.web.page.TableDataInfo; + +/** + * 大盘价格数据源Controller + * + * @author ruoyi + * @date 2023-08-20 + */ +@RestController +@RequestMapping("/price") +public class ProductPriceController extends BaseController +{ + @Autowired + private IProductPriceService productPriceService; + + /** + * 查询大盘价格数据源列表 + */ + @RequiresPermissions("system:price:list") + @GetMapping("/list") + public TableDataInfo list(ProductPrice productPrice) + { + startPage(); + List list = productPriceService.selectProductPriceList(productPrice); + return getDataTable(list); + } + + /** + * 导出大盘价格数据源列表 + */ + @RequiresPermissions("system:price:export") + @Log(title = "大盘价格数据源", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, ProductPrice productPrice) + { + List list = productPriceService.selectProductPriceList(productPrice); + ExcelUtil util = new ExcelUtil(ProductPrice.class); + util.exportExcel(response, list, "大盘价格数据源数据"); + } + + /** + * 获取大盘价格数据源详细信息 + */ + @RequiresPermissions("system:price:query") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return success(productPriceService.selectProductPriceById(id)); + } + + /** + * 新增大盘价格数据源 + */ + @RequiresPermissions("system:price:add") + @Log(title = "大盘价格数据源", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody ProductPrice productPrice) + { + return toAjax(productPriceService.insertProductPrice(productPrice)); + } + + /** + * 修改大盘价格数据源 + */ + @RequiresPermissions("system:price:edit") + @Log(title = "大盘价格数据源", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody ProductPrice productPrice) + { + return toAjax(productPriceService.updateProductPrice(productPrice)); + } + + /** + * 删除大盘价格数据源 + */ + @RequiresPermissions("system:price:remove") + @Log(title = "大盘价格数据源", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(productPriceService.deleteProductPriceByIds(ids)); + } +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/ProductCategory.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/ProductCategory.java new file mode 100644 index 000000000..308bfbf33 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/ProductCategory.java @@ -0,0 +1,84 @@ +package com.ruoyi.system.domain; + +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.ruoyi.common.core.annotation.Excel; +import com.ruoyi.common.core.web.domain.BaseEntity; + +/** + * 产品类别对象 mk_product_category + * + * @author ruoyi + * @date 2023-08-20 + */ +public class ProductCategory extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** $column.columnComment */ + private Long id; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private String channelCode; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private String channelName; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private String ext; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + public void setChannelCode(String channelCode) + { + this.channelCode = channelCode; + } + + public String getChannelCode() + { + return channelCode; + } + public void setChannelName(String channelName) + { + this.channelName = channelName; + } + + public String getChannelName() + { + return channelName; + } + public void setExt(String ext) + { + this.ext = ext; + } + + public String getExt() + { + return ext; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("channelCode", getChannelCode()) + .append("channelName", getChannelName()) + .append("remark", getRemark()) + .append("ext", getExt()) + .append("createTime", getCreateTime()) + .append("createBy", getCreateBy()) + .append("updateTime", getUpdateTime()) + .append("updateBy", getUpdateBy()) + .toString(); + } +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/ProductConfig.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/ProductConfig.java new file mode 100644 index 000000000..6ae5c0eda --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/ProductConfig.java @@ -0,0 +1,140 @@ +package com.ruoyi.system.domain; + +import java.math.BigDecimal; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.ruoyi.common.core.annotation.Excel; +import com.ruoyi.common.core.web.domain.BaseEntity; + +/** + * 产品配置对象 mk_product_config + * + * @author ruoyi + * @date 2023-08-20 + */ +public class ProductConfig extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** z */ + private Long id; + + /** 产品编码 */ + @Excel(name = "产品编码") + private String productCode; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private Long tradeFee; + + /** 最小张数 */ + @Excel(name = "最小张数") + private BigDecimal minimumSheet; + + /** 最大张数 */ + @Excel(name = "最大张数") + private BigDecimal maximunSheet; + + /** 保证金比例 */ + @Excel(name = "保证金比例") + private Long marginRate; + + /** 保证金类型 */ + @Excel(name = "保证金类型") + private String marginType; + + /** 开盘时间 */ + @Excel(name = "开盘时间") + private String tradePeriod; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + public void setProductCode(String productCode) + { + this.productCode = productCode; + } + + public String getProductCode() + { + return productCode; + } + public void setTradeFee(Long tradeFee) + { + this.tradeFee = tradeFee; + } + + public Long getTradeFee() + { + return tradeFee; + } + public void setMinimumSheet(BigDecimal minimumSheet) + { + this.minimumSheet = minimumSheet; + } + + public BigDecimal getMinimumSheet() + { + return minimumSheet; + } + public void setMaximunSheet(BigDecimal maximunSheet) + { + this.maximunSheet = maximunSheet; + } + + public BigDecimal getMaximunSheet() + { + return maximunSheet; + } + public void setMarginRate(Long marginRate) + { + this.marginRate = marginRate; + } + + public Long getMarginRate() + { + return marginRate; + } + public void setMarginType(String marginType) + { + this.marginType = marginType; + } + + public String getMarginType() + { + return marginType; + } + public void setTradePeriod(String tradePeriod) + { + this.tradePeriod = tradePeriod; + } + + public String getTradePeriod() + { + return tradePeriod; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("productCode", getProductCode()) + .append("tradeFee", getTradeFee()) + .append("minimumSheet", getMinimumSheet()) + .append("maximunSheet", getMaximunSheet()) + .append("marginRate", getMarginRate()) + .append("marginType", getMarginType()) + .append("tradePeriod", getTradePeriod()) + .append("createTime", getCreateTime()) + .append("createBy", getCreateBy()) + .append("updateTime", getUpdateTime()) + .append("updateBy", getUpdateBy()) + .toString(); + } +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/ProductInfo.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/ProductInfo.java new file mode 100644 index 000000000..0911f5d8a --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/ProductInfo.java @@ -0,0 +1,140 @@ +package com.ruoyi.system.domain; + +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.ruoyi.common.core.annotation.Excel; +import com.ruoyi.common.core.web.domain.BaseEntity; + +/** + * 产品信息对象 mk_product_info + * + * @author ruoyi + * @date 2023-08-20 + */ +public class ProductInfo extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** $column.columnComment */ + private Long id; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private String productCategory; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private String productCode; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private String productName; + + /** 产品图标 */ + @Excel(name = "产品图标") + private Long productIcon; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private String description; + + /** 状态(close/open) */ + @Excel(name = "状态", readConverterExp = "c=lose/open") + private String status; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private Date updateTim; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + public void setProductCategory(String productCategory) + { + this.productCategory = productCategory; + } + + public String getProductCategory() + { + return productCategory; + } + public void setProductCode(String productCode) + { + this.productCode = productCode; + } + + public String getProductCode() + { + return productCode; + } + public void setProductName(String productName) + { + this.productName = productName; + } + + public String getProductName() + { + return productName; + } + public void setProductIcon(Long productIcon) + { + this.productIcon = productIcon; + } + + public Long getProductIcon() + { + return productIcon; + } + public void setDescription(String description) + { + this.description = description; + } + + public String getDescription() + { + return description; + } + public void setStatus(String status) + { + this.status = status; + } + + public String getStatus() + { + return status; + } + public void setUpdateTim(Date updateTim) + { + this.updateTim = updateTim; + } + + public Date getUpdateTim() + { + return updateTim; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("productCategory", getProductCategory()) + .append("productCode", getProductCode()) + .append("productName", getProductName()) + .append("productIcon", getProductIcon()) + .append("description", getDescription()) + .append("status", getStatus()) + .append("createTime", getCreateTime()) + .append("createBy", getCreateBy()) + .append("updateTim", getUpdateTim()) + .append("updateBy", getUpdateBy()) + .toString(); + } +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/ProductPrice.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/ProductPrice.java new file mode 100644 index 000000000..162d9b9e6 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/ProductPrice.java @@ -0,0 +1,124 @@ +package com.ruoyi.system.domain; + +import java.math.BigDecimal; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.ruoyi.common.core.annotation.Excel; +import com.ruoyi.common.core.web.domain.BaseEntity; + +/** + * 大盘价格数据源对象 mk_product_price + * + * @author ruoyi + * @date 2023-08-20 + */ +public class ProductPrice extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** $column.columnComment */ + private Long id; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private String timestamp; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private String productCode; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private BigDecimal open; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private BigDecimal close; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private BigDecimal high; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private Long low; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + public void setTimestamp(String timestamp) + { + this.timestamp = timestamp; + } + + public String getTimestamp() + { + return timestamp; + } + public void setProductCode(String productCode) + { + this.productCode = productCode; + } + + public String getProductCode() + { + return productCode; + } + public void setOpen(BigDecimal open) + { + this.open = open; + } + + public BigDecimal getOpen() + { + return open; + } + public void setClose(BigDecimal close) + { + this.close = close; + } + + public BigDecimal getClose() + { + return close; + } + public void setHigh(BigDecimal high) + { + this.high = high; + } + + public BigDecimal getHigh() + { + return high; + } + public void setLow(Long low) + { + this.low = low; + } + + public Long getLow() + { + return low; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("timestamp", getTimestamp()) + .append("productCode", getProductCode()) + .append("open", getOpen()) + .append("close", getClose()) + .append("high", getHigh()) + .append("low", getLow()) + .append("createTime", getCreateTime()) + .append("updateTime", getUpdateTime()) + .toString(); + } +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ProductCategoryMapper.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ProductCategoryMapper.java new file mode 100644 index 000000000..0b53a5f53 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ProductCategoryMapper.java @@ -0,0 +1,61 @@ +package com.ruoyi.system.mapper; + +import java.util.List; +import com.ruoyi.system.domain.ProductCategory; + +/** + * 产品类别Mapper接口 + * + * @author ruoyi + * @date 2023-08-20 + */ +public interface ProductCategoryMapper +{ + /** + * 查询产品类别 + * + * @param id 产品类别主键 + * @return 产品类别 + */ + public ProductCategory selectProductCategoryById(Long id); + + /** + * 查询产品类别列表 + * + * @param productCategory 产品类别 + * @return 产品类别集合 + */ + public List selectProductCategoryList(ProductCategory productCategory); + + /** + * 新增产品类别 + * + * @param productCategory 产品类别 + * @return 结果 + */ + public int insertProductCategory(ProductCategory productCategory); + + /** + * 修改产品类别 + * + * @param productCategory 产品类别 + * @return 结果 + */ + public int updateProductCategory(ProductCategory productCategory); + + /** + * 删除产品类别 + * + * @param id 产品类别主键 + * @return 结果 + */ + public int deleteProductCategoryById(Long id); + + /** + * 批量删除产品类别 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteProductCategoryByIds(Long[] ids); +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ProductConfigMapper.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ProductConfigMapper.java new file mode 100644 index 000000000..784c1a9ab --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ProductConfigMapper.java @@ -0,0 +1,61 @@ +package com.ruoyi.system.mapper; + +import java.util.List; +import com.ruoyi.system.domain.ProductConfig; + +/** + * 产品配置Mapper接口 + * + * @author ruoyi + * @date 2023-08-20 + */ +public interface ProductConfigMapper +{ + /** + * 查询产品配置 + * + * @param id 产品配置主键 + * @return 产品配置 + */ + public ProductConfig selectProductConfigById(Long id); + + /** + * 查询产品配置列表 + * + * @param productConfig 产品配置 + * @return 产品配置集合 + */ + public List selectProductConfigList(ProductConfig productConfig); + + /** + * 新增产品配置 + * + * @param productConfig 产品配置 + * @return 结果 + */ + public int insertProductConfig(ProductConfig productConfig); + + /** + * 修改产品配置 + * + * @param productConfig 产品配置 + * @return 结果 + */ + public int updateProductConfig(ProductConfig productConfig); + + /** + * 删除产品配置 + * + * @param id 产品配置主键 + * @return 结果 + */ + public int deleteProductConfigById(Long id); + + /** + * 批量删除产品配置 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteProductConfigByIds(Long[] ids); +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ProductInfoMapper.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ProductInfoMapper.java new file mode 100644 index 000000000..6d96c27bf --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ProductInfoMapper.java @@ -0,0 +1,61 @@ +package com.ruoyi.system.mapper; + +import java.util.List; +import com.ruoyi.system.domain.ProductInfo; + +/** + * 产品信息Mapper接口 + * + * @author ruoyi + * @date 2023-08-20 + */ +public interface ProductInfoMapper +{ + /** + * 查询产品信息 + * + * @param id 产品信息主键 + * @return 产品信息 + */ + public ProductInfo selectProductInfoById(Long id); + + /** + * 查询产品信息列表 + * + * @param productInfo 产品信息 + * @return 产品信息集合 + */ + public List selectProductInfoList(ProductInfo productInfo); + + /** + * 新增产品信息 + * + * @param productInfo 产品信息 + * @return 结果 + */ + public int insertProductInfo(ProductInfo productInfo); + + /** + * 修改产品信息 + * + * @param productInfo 产品信息 + * @return 结果 + */ + public int updateProductInfo(ProductInfo productInfo); + + /** + * 删除产品信息 + * + * @param id 产品信息主键 + * @return 结果 + */ + public int deleteProductInfoById(Long id); + + /** + * 批量删除产品信息 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteProductInfoByIds(Long[] ids); +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ProductPriceMapper.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ProductPriceMapper.java new file mode 100644 index 000000000..503fe7cbb --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ProductPriceMapper.java @@ -0,0 +1,61 @@ +package com.ruoyi.system.mapper; + +import java.util.List; +import com.ruoyi.system.domain.ProductPrice; + +/** + * 大盘价格数据源Mapper接口 + * + * @author ruoyi + * @date 2023-08-20 + */ +public interface ProductPriceMapper +{ + /** + * 查询大盘价格数据源 + * + * @param id 大盘价格数据源主键 + * @return 大盘价格数据源 + */ + public ProductPrice selectProductPriceById(Long id); + + /** + * 查询大盘价格数据源列表 + * + * @param productPrice 大盘价格数据源 + * @return 大盘价格数据源集合 + */ + public List selectProductPriceList(ProductPrice productPrice); + + /** + * 新增大盘价格数据源 + * + * @param productPrice 大盘价格数据源 + * @return 结果 + */ + public int insertProductPrice(ProductPrice productPrice); + + /** + * 修改大盘价格数据源 + * + * @param productPrice 大盘价格数据源 + * @return 结果 + */ + public int updateProductPrice(ProductPrice productPrice); + + /** + * 删除大盘价格数据源 + * + * @param id 大盘价格数据源主键 + * @return 结果 + */ + public int deleteProductPriceById(Long id); + + /** + * 批量删除大盘价格数据源 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteProductPriceByIds(Long[] ids); +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/IProductCategoryService.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/IProductCategoryService.java new file mode 100644 index 000000000..af1090fbc --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/IProductCategoryService.java @@ -0,0 +1,61 @@ +package com.ruoyi.system.service; + +import java.util.List; +import com.ruoyi.system.domain.ProductCategory; + +/** + * 产品类别Service接口 + * + * @author ruoyi + * @date 2023-08-20 + */ +public interface IProductCategoryService +{ + /** + * 查询产品类别 + * + * @param id 产品类别主键 + * @return 产品类别 + */ + public ProductCategory selectProductCategoryById(Long id); + + /** + * 查询产品类别列表 + * + * @param productCategory 产品类别 + * @return 产品类别集合 + */ + public List selectProductCategoryList(ProductCategory productCategory); + + /** + * 新增产品类别 + * + * @param productCategory 产品类别 + * @return 结果 + */ + public int insertProductCategory(ProductCategory productCategory); + + /** + * 修改产品类别 + * + * @param productCategory 产品类别 + * @return 结果 + */ + public int updateProductCategory(ProductCategory productCategory); + + /** + * 批量删除产品类别 + * + * @param ids 需要删除的产品类别主键集合 + * @return 结果 + */ + public int deleteProductCategoryByIds(Long[] ids); + + /** + * 删除产品类别信息 + * + * @param id 产品类别主键 + * @return 结果 + */ + public int deleteProductCategoryById(Long id); +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/IProductConfigService.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/IProductConfigService.java new file mode 100644 index 000000000..38490fb77 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/IProductConfigService.java @@ -0,0 +1,61 @@ +package com.ruoyi.system.service; + +import java.util.List; +import com.ruoyi.system.domain.ProductConfig; + +/** + * 产品配置Service接口 + * + * @author ruoyi + * @date 2023-08-20 + */ +public interface IProductConfigService +{ + /** + * 查询产品配置 + * + * @param id 产品配置主键 + * @return 产品配置 + */ + public ProductConfig selectProductConfigById(Long id); + + /** + * 查询产品配置列表 + * + * @param productConfig 产品配置 + * @return 产品配置集合 + */ + public List selectProductConfigList(ProductConfig productConfig); + + /** + * 新增产品配置 + * + * @param productConfig 产品配置 + * @return 结果 + */ + public int insertProductConfig(ProductConfig productConfig); + + /** + * 修改产品配置 + * + * @param productConfig 产品配置 + * @return 结果 + */ + public int updateProductConfig(ProductConfig productConfig); + + /** + * 批量删除产品配置 + * + * @param ids 需要删除的产品配置主键集合 + * @return 结果 + */ + public int deleteProductConfigByIds(Long[] ids); + + /** + * 删除产品配置信息 + * + * @param id 产品配置主键 + * @return 结果 + */ + public int deleteProductConfigById(Long id); +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/IProductInfoService.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/IProductInfoService.java new file mode 100644 index 000000000..b531ab986 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/IProductInfoService.java @@ -0,0 +1,61 @@ +package com.ruoyi.system.service; + +import java.util.List; +import com.ruoyi.system.domain.ProductInfo; + +/** + * 产品信息Service接口 + * + * @author ruoyi + * @date 2023-08-20 + */ +public interface IProductInfoService +{ + /** + * 查询产品信息 + * + * @param id 产品信息主键 + * @return 产品信息 + */ + public ProductInfo selectProductInfoById(Long id); + + /** + * 查询产品信息列表 + * + * @param productInfo 产品信息 + * @return 产品信息集合 + */ + public List selectProductInfoList(ProductInfo productInfo); + + /** + * 新增产品信息 + * + * @param productInfo 产品信息 + * @return 结果 + */ + public int insertProductInfo(ProductInfo productInfo); + + /** + * 修改产品信息 + * + * @param productInfo 产品信息 + * @return 结果 + */ + public int updateProductInfo(ProductInfo productInfo); + + /** + * 批量删除产品信息 + * + * @param ids 需要删除的产品信息主键集合 + * @return 结果 + */ + public int deleteProductInfoByIds(Long[] ids); + + /** + * 删除产品信息信息 + * + * @param id 产品信息主键 + * @return 结果 + */ + public int deleteProductInfoById(Long id); +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/IProductPriceService.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/IProductPriceService.java new file mode 100644 index 000000000..b2ff1db19 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/IProductPriceService.java @@ -0,0 +1,61 @@ +package com.ruoyi.system.service; + +import java.util.List; +import com.ruoyi.system.domain.ProductPrice; + +/** + * 大盘价格数据源Service接口 + * + * @author ruoyi + * @date 2023-08-20 + */ +public interface IProductPriceService +{ + /** + * 查询大盘价格数据源 + * + * @param id 大盘价格数据源主键 + * @return 大盘价格数据源 + */ + public ProductPrice selectProductPriceById(Long id); + + /** + * 查询大盘价格数据源列表 + * + * @param productPrice 大盘价格数据源 + * @return 大盘价格数据源集合 + */ + public List selectProductPriceList(ProductPrice productPrice); + + /** + * 新增大盘价格数据源 + * + * @param productPrice 大盘价格数据源 + * @return 结果 + */ + public int insertProductPrice(ProductPrice productPrice); + + /** + * 修改大盘价格数据源 + * + * @param productPrice 大盘价格数据源 + * @return 结果 + */ + public int updateProductPrice(ProductPrice productPrice); + + /** + * 批量删除大盘价格数据源 + * + * @param ids 需要删除的大盘价格数据源主键集合 + * @return 结果 + */ + public int deleteProductPriceByIds(Long[] ids); + + /** + * 删除大盘价格数据源信息 + * + * @param id 大盘价格数据源主键 + * @return 结果 + */ + public int deleteProductPriceById(Long id); +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ProductCategoryServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ProductCategoryServiceImpl.java new file mode 100644 index 000000000..a19d5e9d3 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ProductCategoryServiceImpl.java @@ -0,0 +1,96 @@ +package com.ruoyi.system.service.impl; + +import java.util.List; +import com.ruoyi.common.core.utils.DateUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.ruoyi.system.mapper.ProductCategoryMapper; +import com.ruoyi.system.domain.ProductCategory; +import com.ruoyi.system.service.IProductCategoryService; + +/** + * 产品类别Service业务层处理 + * + * @author ruoyi + * @date 2023-08-20 + */ +@Service +public class ProductCategoryServiceImpl implements IProductCategoryService +{ + @Autowired + private ProductCategoryMapper productCategoryMapper; + + /** + * 查询产品类别 + * + * @param id 产品类别主键 + * @return 产品类别 + */ + @Override + public ProductCategory selectProductCategoryById(Long id) + { + return productCategoryMapper.selectProductCategoryById(id); + } + + /** + * 查询产品类别列表 + * + * @param productCategory 产品类别 + * @return 产品类别 + */ + @Override + public List selectProductCategoryList(ProductCategory productCategory) + { + return productCategoryMapper.selectProductCategoryList(productCategory); + } + + /** + * 新增产品类别 + * + * @param productCategory 产品类别 + * @return 结果 + */ + @Override + public int insertProductCategory(ProductCategory productCategory) + { + productCategory.setCreateTime(DateUtils.getNowDate()); + return productCategoryMapper.insertProductCategory(productCategory); + } + + /** + * 修改产品类别 + * + * @param productCategory 产品类别 + * @return 结果 + */ + @Override + public int updateProductCategory(ProductCategory productCategory) + { + productCategory.setUpdateTime(DateUtils.getNowDate()); + return productCategoryMapper.updateProductCategory(productCategory); + } + + /** + * 批量删除产品类别 + * + * @param ids 需要删除的产品类别主键 + * @return 结果 + */ + @Override + public int deleteProductCategoryByIds(Long[] ids) + { + return productCategoryMapper.deleteProductCategoryByIds(ids); + } + + /** + * 删除产品类别信息 + * + * @param id 产品类别主键 + * @return 结果 + */ + @Override + public int deleteProductCategoryById(Long id) + { + return productCategoryMapper.deleteProductCategoryById(id); + } +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ProductConfigServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ProductConfigServiceImpl.java new file mode 100644 index 000000000..f6d33d1c4 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ProductConfigServiceImpl.java @@ -0,0 +1,96 @@ +package com.ruoyi.system.service.impl; + +import java.util.List; +import com.ruoyi.common.core.utils.DateUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.ruoyi.system.mapper.ProductConfigMapper; +import com.ruoyi.system.domain.ProductConfig; +import com.ruoyi.system.service.IProductConfigService; + +/** + * 产品配置Service业务层处理 + * + * @author ruoyi + * @date 2023-08-20 + */ +@Service +public class ProductConfigServiceImpl implements IProductConfigService +{ + @Autowired + private ProductConfigMapper productConfigMapper; + + /** + * 查询产品配置 + * + * @param id 产品配置主键 + * @return 产品配置 + */ + @Override + public ProductConfig selectProductConfigById(Long id) + { + return productConfigMapper.selectProductConfigById(id); + } + + /** + * 查询产品配置列表 + * + * @param productConfig 产品配置 + * @return 产品配置 + */ + @Override + public List selectProductConfigList(ProductConfig productConfig) + { + return productConfigMapper.selectProductConfigList(productConfig); + } + + /** + * 新增产品配置 + * + * @param productConfig 产品配置 + * @return 结果 + */ + @Override + public int insertProductConfig(ProductConfig productConfig) + { + productConfig.setCreateTime(DateUtils.getNowDate()); + return productConfigMapper.insertProductConfig(productConfig); + } + + /** + * 修改产品配置 + * + * @param productConfig 产品配置 + * @return 结果 + */ + @Override + public int updateProductConfig(ProductConfig productConfig) + { + productConfig.setUpdateTime(DateUtils.getNowDate()); + return productConfigMapper.updateProductConfig(productConfig); + } + + /** + * 批量删除产品配置 + * + * @param ids 需要删除的产品配置主键 + * @return 结果 + */ + @Override + public int deleteProductConfigByIds(Long[] ids) + { + return productConfigMapper.deleteProductConfigByIds(ids); + } + + /** + * 删除产品配置信息 + * + * @param id 产品配置主键 + * @return 结果 + */ + @Override + public int deleteProductConfigById(Long id) + { + return productConfigMapper.deleteProductConfigById(id); + } +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ProductInfoServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ProductInfoServiceImpl.java new file mode 100644 index 000000000..4c8607ef0 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ProductInfoServiceImpl.java @@ -0,0 +1,95 @@ +package com.ruoyi.system.service.impl; + +import java.util.List; +import com.ruoyi.common.core.utils.DateUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.ruoyi.system.mapper.ProductInfoMapper; +import com.ruoyi.system.domain.ProductInfo; +import com.ruoyi.system.service.IProductInfoService; + +/** + * 产品信息Service业务层处理 + * + * @author ruoyi + * @date 2023-08-20 + */ +@Service +public class ProductInfoServiceImpl implements IProductInfoService +{ + @Autowired + private ProductInfoMapper productInfoMapper; + + /** + * 查询产品信息 + * + * @param id 产品信息主键 + * @return 产品信息 + */ + @Override + public ProductInfo selectProductInfoById(Long id) + { + return productInfoMapper.selectProductInfoById(id); + } + + /** + * 查询产品信息列表 + * + * @param productInfo 产品信息 + * @return 产品信息 + */ + @Override + public List selectProductInfoList(ProductInfo productInfo) + { + return productInfoMapper.selectProductInfoList(productInfo); + } + + /** + * 新增产品信息 + * + * @param productInfo 产品信息 + * @return 结果 + */ + @Override + public int insertProductInfo(ProductInfo productInfo) + { + productInfo.setCreateTime(DateUtils.getNowDate()); + return productInfoMapper.insertProductInfo(productInfo); + } + + /** + * 修改产品信息 + * + * @param productInfo 产品信息 + * @return 结果 + */ + @Override + public int updateProductInfo(ProductInfo productInfo) + { + return productInfoMapper.updateProductInfo(productInfo); + } + + /** + * 批量删除产品信息 + * + * @param ids 需要删除的产品信息主键 + * @return 结果 + */ + @Override + public int deleteProductInfoByIds(Long[] ids) + { + return productInfoMapper.deleteProductInfoByIds(ids); + } + + /** + * 删除产品信息信息 + * + * @param id 产品信息主键 + * @return 结果 + */ + @Override + public int deleteProductInfoById(Long id) + { + return productInfoMapper.deleteProductInfoById(id); + } +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ProductPriceServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ProductPriceServiceImpl.java new file mode 100644 index 000000000..9e4b45254 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ProductPriceServiceImpl.java @@ -0,0 +1,96 @@ +package com.ruoyi.system.service.impl; + +import java.util.List; +import com.ruoyi.common.core.utils.DateUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.ruoyi.system.mapper.ProductPriceMapper; +import com.ruoyi.system.domain.ProductPrice; +import com.ruoyi.system.service.IProductPriceService; + +/** + * 大盘价格数据源Service业务层处理 + * + * @author ruoyi + * @date 2023-08-20 + */ +@Service +public class ProductPriceServiceImpl implements IProductPriceService +{ + @Autowired + private ProductPriceMapper productPriceMapper; + + /** + * 查询大盘价格数据源 + * + * @param id 大盘价格数据源主键 + * @return 大盘价格数据源 + */ + @Override + public ProductPrice selectProductPriceById(Long id) + { + return productPriceMapper.selectProductPriceById(id); + } + + /** + * 查询大盘价格数据源列表 + * + * @param productPrice 大盘价格数据源 + * @return 大盘价格数据源 + */ + @Override + public List selectProductPriceList(ProductPrice productPrice) + { + return productPriceMapper.selectProductPriceList(productPrice); + } + + /** + * 新增大盘价格数据源 + * + * @param productPrice 大盘价格数据源 + * @return 结果 + */ + @Override + public int insertProductPrice(ProductPrice productPrice) + { + productPrice.setCreateTime(DateUtils.getNowDate()); + return productPriceMapper.insertProductPrice(productPrice); + } + + /** + * 修改大盘价格数据源 + * + * @param productPrice 大盘价格数据源 + * @return 结果 + */ + @Override + public int updateProductPrice(ProductPrice productPrice) + { + productPrice.setUpdateTime(DateUtils.getNowDate()); + return productPriceMapper.updateProductPrice(productPrice); + } + + /** + * 批量删除大盘价格数据源 + * + * @param ids 需要删除的大盘价格数据源主键 + * @return 结果 + */ + @Override + public int deleteProductPriceByIds(Long[] ids) + { + return productPriceMapper.deleteProductPriceByIds(ids); + } + + /** + * 删除大盘价格数据源信息 + * + * @param id 大盘价格数据源主键 + * @return 结果 + */ + @Override + public int deleteProductPriceById(Long id) + { + return productPriceMapper.deleteProductPriceById(id); + } +} diff --git a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/ProductCategoryMapper.xml b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/ProductCategoryMapper.xml new file mode 100644 index 000000000..ff2b1a770 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/ProductCategoryMapper.xml @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + + + + + select id, channel_code, channel_name, remark, ext, create_time, create_by, update_time, update_by from mk_product_category + + + + + + + + insert into mk_product_category + + id, + channel_code, + channel_name, + remark, + ext, + create_time, + create_by, + update_time, + update_by, + + + #{id}, + #{channelCode}, + #{channelName}, + #{remark}, + #{ext}, + #{createTime}, + #{createBy}, + #{updateTime}, + #{updateBy}, + + + + + update mk_product_category + + channel_code = #{channelCode}, + channel_name = #{channelName}, + remark = #{remark}, + ext = #{ext}, + create_time = #{createTime}, + create_by = #{createBy}, + update_time = #{updateTime}, + update_by = #{updateBy}, + + where id = #{id} + + + + delete from mk_product_category where id = #{id} + + + + delete from mk_product_category where id in + + #{id} + + + \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/ProductConfigMapper.xml b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/ProductConfigMapper.xml new file mode 100644 index 000000000..996b1800d --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/ProductConfigMapper.xml @@ -0,0 +1,104 @@ + + + + + + + + + + + + + + + + + + + + + select id, product_code, trade_fee, minimum_sheet, maximun_sheet, margin_rate, margin_type, trade_period, create_time, create_by, update_time, update_by from mk_product_config + + + + + + + + insert into mk_product_config + + id, + product_code, + trade_fee, + minimum_sheet, + maximun_sheet, + margin_rate, + margin_type, + trade_period, + create_time, + create_by, + update_time, + update_by, + + + #{id}, + #{productCode}, + #{tradeFee}, + #{minimumSheet}, + #{maximunSheet}, + #{marginRate}, + #{marginType}, + #{tradePeriod}, + #{createTime}, + #{createBy}, + #{updateTime}, + #{updateBy}, + + + + + update mk_product_config + + product_code = #{productCode}, + trade_fee = #{tradeFee}, + minimum_sheet = #{minimumSheet}, + maximun_sheet = #{maximunSheet}, + margin_rate = #{marginRate}, + margin_type = #{marginType}, + trade_period = #{tradePeriod}, + create_time = #{createTime}, + create_by = #{createBy}, + update_time = #{updateTime}, + update_by = #{updateBy}, + + where id = #{id} + + + + delete from mk_product_config where id = #{id} + + + + delete from mk_product_config where id in + + #{id} + + + \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/ProductInfoMapper.xml b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/ProductInfoMapper.xml new file mode 100644 index 000000000..0cf67fe0b --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/ProductInfoMapper.xml @@ -0,0 +1,100 @@ + + + + + + + + + + + + + + + + + + + + select id, product_category, product_code, product_name, product_icon, description, status, create_time, create_by, update_tim, update_by from mk_product_info + + + + + + + + insert into mk_product_info + + id, + product_category, + product_code, + product_name, + product_icon, + description, + status, + create_time, + create_by, + update_tim, + update_by, + + + #{id}, + #{productCategory}, + #{productCode}, + #{productName}, + #{productIcon}, + #{description}, + #{status}, + #{createTime}, + #{createBy}, + #{updateTim}, + #{updateBy}, + + + + + update mk_product_info + + product_category = #{productCategory}, + product_code = #{productCode}, + product_name = #{productName}, + product_icon = #{productIcon}, + description = #{description}, + status = #{status}, + create_time = #{createTime}, + create_by = #{createBy}, + update_tim = #{updateTim}, + update_by = #{updateBy}, + + where id = #{id} + + + + delete from mk_product_info where id = #{id} + + + + delete from mk_product_info where id in + + #{id} + + + \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/ProductPriceMapper.xml b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/ProductPriceMapper.xml new file mode 100644 index 000000000..6c305b630 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/ProductPriceMapper.xml @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + select id, timestamp, product_code, open, close, high, low, create_time, update_time from mk_product_price + + + + + + + + insert into mk_product_price + + id, + timestamp, + product_code, + open, + close, + high, + low, + create_time, + update_time, + + + #{id}, + #{timestamp}, + #{productCode}, + #{open}, + #{close}, + #{high}, + #{low}, + #{createTime}, + #{updateTime}, + + + + + update mk_product_price + + timestamp = #{timestamp}, + product_code = #{productCode}, + open = #{open}, + close = #{close}, + high = #{high}, + low = #{low}, + create_time = #{createTime}, + update_time = #{updateTime}, + + where id = #{id} + + + + delete from mk_product_price where id = #{id} + + + + delete from mk_product_price where id in + + #{id} + + + \ No newline at end of file