lchao пре 5 месеци
родитељ
комит
aacf1c6bb6

+ 128 - 0
qmjszx-admin/src/main/java/beilv/web/controller/system/QmjsShoppingMallController.java

@@ -0,0 +1,128 @@
+package beilv.web.controller.system;
+
+import java.util.List;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+import beilv.common.annotation.Log;
+import beilv.common.enums.BusinessType;
+import beilv.system.domain.QmjsShoppingMall;
+import beilv.system.service.IQmjsShoppingMallService;
+import beilv.common.core.controller.BaseController;
+import beilv.common.core.domain.AjaxResult;
+import beilv.common.utils.poi.ExcelUtil;
+import beilv.common.core.page.TableDataInfo;
+
+/**
+ * 商城Controller
+ * 
+ * @author lc
+ * @date 2025-01-02
+ */
+@Controller
+@RequestMapping("/system/mall")
+public class QmjsShoppingMallController extends BaseController
+{
+    private String prefix = "system/mall";
+
+    @Autowired
+    private IQmjsShoppingMallService qmjsShoppingMallService;
+
+    @RequiresPermissions("system:mall:view")
+    @GetMapping()
+    public String mall()
+    {
+        return prefix + "/mall";
+    }
+
+    /**
+     * 查询商城列表
+     */
+    @RequiresPermissions("system:mall:list")
+    @PostMapping("/list")
+    @ResponseBody
+    public TableDataInfo list(QmjsShoppingMall qmjsShoppingMall)
+    {
+        startPage();
+        List<QmjsShoppingMall> list = qmjsShoppingMallService.selectQmjsShoppingMallList(qmjsShoppingMall);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出商城列表
+     */
+    @RequiresPermissions("system:mall:export")
+    @Log(title = "商城", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    @ResponseBody
+    public AjaxResult export(QmjsShoppingMall qmjsShoppingMall)
+    {
+        List<QmjsShoppingMall> list = qmjsShoppingMallService.selectQmjsShoppingMallList(qmjsShoppingMall);
+        ExcelUtil<QmjsShoppingMall> util = new ExcelUtil<QmjsShoppingMall>(QmjsShoppingMall.class);
+        return util.exportExcel(list, "商城数据");
+    }
+
+    /**
+     * 新增商城
+     */
+    @RequiresPermissions("system:mall:add")
+    @GetMapping("/add")
+    public String add()
+    {
+        return prefix + "/add";
+    }
+
+    /**
+     * 新增保存商城
+     */
+    @RequiresPermissions("system:mall:add")
+    @Log(title = "商城", businessType = BusinessType.INSERT)
+    @PostMapping("/add")
+    @ResponseBody
+    public AjaxResult addSave(QmjsShoppingMall qmjsShoppingMall)
+    {
+        return toAjax(qmjsShoppingMallService.insertQmjsShoppingMall(qmjsShoppingMall));
+    }
+
+    /**
+     * 修改商城
+     */
+    @RequiresPermissions("system:mall:edit")
+    @GetMapping("/edit/{id}")
+    public String edit(@PathVariable("id") Long id, ModelMap mmap)
+    {
+        QmjsShoppingMall qmjsShoppingMall = qmjsShoppingMallService.selectQmjsShoppingMallById(id);
+        mmap.put("qmjsShoppingMall", qmjsShoppingMall);
+        return prefix + "/edit";
+    }
+
+    /**
+     * 修改保存商城
+     */
+    @RequiresPermissions("system:mall:edit")
+    @Log(title = "商城", businessType = BusinessType.UPDATE)
+    @PostMapping("/edit")
+    @ResponseBody
+    public AjaxResult editSave(QmjsShoppingMall qmjsShoppingMall)
+    {
+        return toAjax(qmjsShoppingMallService.updateQmjsShoppingMall(qmjsShoppingMall));
+    }
+
+    /**
+     * 删除商城
+     */
+    @RequiresPermissions("system:mall:remove")
+    @Log(title = "商城", businessType = BusinessType.DELETE)
+    @PostMapping( "/remove")
+    @ResponseBody
+    public AjaxResult remove(String ids)
+    {
+        return toAjax(qmjsShoppingMallService.deleteQmjsShoppingMallByIds(ids));
+    }
+}

+ 138 - 0
qmjszx-admin/src/main/resources/templates/system/mall/add.html

@@ -0,0 +1,138 @@
+<!DOCTYPE html>
+<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
+<head>
+    <th:block th:include="include :: header('新增商城')" />
+    <th:block th:include="include :: bootstrap-fileinput-css"/>
+</head>
+<body class="white-bg">
+    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
+        <form class="form-horizontal m" id="form-mall-add">
+            <div class="col-xs-12">
+                <div class="form-group">
+                    <label class="col-sm-3 control-label">商品名称:</label>
+                    <div class="col-sm-8">
+                        <input name="goodsName" class="form-control" type="text">
+                    </div>
+                </div>
+            </div>
+            <div class="col-xs-12">
+                <div class="form-group">
+                    <label class="col-sm-3 control-label">商品条码:</label>
+                    <div class="col-sm-8">
+                        <input name="goodsCode" class="form-control" type="text">
+                    </div>
+                </div>
+            </div>
+            <div class="col-xs-12">
+                <div class="form-group">
+                    <label class="col-sm-3 control-label">商品种类:</label>
+                    <div class="col-sm-8">
+                        <select name="goodsType" class="form-control" th:with="type=${@dict.getType('goods_type')}">
+                            <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
+                        </select>
+                    </div>
+                </div>
+            </div>
+            <div class="col-xs-12">
+                <div class="form-group">
+                    <label class="col-sm-3 control-label">商品图片:</label>
+                    <div class="col-sm-8">
+                        <input type="hidden" name="goodsImg">
+                        <div class="file-loading">
+                            <input class="form-control file-upload" id="goodsImg" name="file" type="file">
+                        </div>
+                    </div>
+                </div>
+            </div>
+            <div class="col-xs-12">
+                <div class="form-group">
+                    <label class="col-sm-3 control-label">商品说明:</label>
+                    <div class="col-sm-8">
+                        <input name="goodsDescribe" class="form-control" type="text">
+                    </div>
+                </div>
+            </div>
+            <div class="col-xs-12">
+                <div class="form-group">
+                    <label class="col-sm-3 control-label">计量单位:</label>
+                    <div class="col-sm-8">
+                        <input name="goodsUnit" class="form-control" type="text">
+                    </div>
+                </div>
+            </div>
+            <div class="col-xs-12">
+                <div class="form-group">
+                    <label class="col-sm-3 control-label">时价商品:</label>
+                    <div class="col-sm-8">
+                        <input name="goodsCurrentPrice" class="form-control" type="text">
+                    </div>
+                </div>
+            </div>
+            <div class="col-xs-12">
+                <div class="form-group">
+                    <label class="col-sm-3 control-label">销售单价:</label>
+                    <div class="col-sm-8">
+                        <input name="salePrice" class="form-control" type="text">
+                    </div>
+                </div>
+            </div>
+            <div class="col-xs-12">
+                <div class="form-group">
+                    <label class="col-sm-3 control-label">建议售价:</label>
+                    <div class="col-sm-8">
+                        <input name="suggestionPrice" class="form-control" type="text">
+                    </div>
+                </div>
+            </div>
+            <div class="col-xs-12">
+                <div class="form-group">
+                    <label class="col-sm-3 control-label">商品库存:</label>
+                    <div class="col-sm-8">
+                        <input name="goodsInventory" class="form-control" type="text">
+                    </div>
+                </div>
+            </div>
+            <div class="col-xs-12">
+                <div class="form-group">
+                    <label class="col-sm-3 control-label">库存成本:</label>
+                    <div class="col-sm-8">
+                        <input name="inventoryCost" class="form-control" type="text">
+                    </div>
+                </div>
+            </div>
+            <div class="col-xs-12">
+                <div class="form-group">
+                    <label class="col-sm-3 control-label">商品状态(正常/禁用):</label>
+                    <div class="col-sm-8">
+                        <input name="goodsState" class="form-control" type="text">
+                    </div>
+                </div>
+            </div>
+        </form>
+    </div>
+    <th:block th:include="include :: footer" />
+    <th:block th:include="include :: bootstrap-fileinput-js"/>
+    <script th:inline="javascript">
+        var prefix = ctx + "system/mall"
+        $("#form-mall-add").validate({
+            focusCleanup: true
+        });
+
+        function submitHandler() {
+            if ($.validate.form()) {
+                $.operate.save(prefix + "/add", $('#form-mall-add').serialize());
+            }
+        }
+
+        $(".file-upload").fileinput({
+            uploadUrl: ctx + 'common/upload',
+            maxFileCount: 1,
+            autoReplace: true
+        }).on('fileuploaded', function (event, data, previewId, index) {
+            $("input[name='" + event.currentTarget.id + "']").val(data.response.url)
+        }).on('fileremoved', function (event, id, index) {
+            $("input[name='" + event.currentTarget.id + "']").val('')
+        })
+    </script>
+</body>
+</html>

+ 145 - 0
qmjszx-admin/src/main/resources/templates/system/mall/edit.html

@@ -0,0 +1,145 @@
+<!DOCTYPE html>
+<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
+<head>
+    <th:block th:include="include :: header('修改商城')" />
+    <th:block th:include="include :: bootstrap-fileinput-css"/>
+</head>
+<body class="white-bg">
+    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
+        <form class="form-horizontal m" id="form-mall-edit" th:object="${qmjsShoppingMall}">
+            <input name="id" th:field="*{id}" type="hidden">
+            <div class="col-xs-12">
+                <div class="form-group">
+                    <label class="col-sm-3 control-label">商品名称:</label>
+                    <div class="col-sm-8">
+                        <input name="goodsName" th:field="*{goodsName}" class="form-control" type="text">
+                    </div>
+                </div>
+            </div>
+            <div class="col-xs-12">
+                <div class="form-group">
+                    <label class="col-sm-3 control-label">商品条码:</label>
+                    <div class="col-sm-8">
+                        <input name="goodsCode" th:field="*{goodsCode}" class="form-control" type="text">
+                    </div>
+                </div>
+            </div>
+            <div class="col-xs-12">
+                <div class="form-group">
+                    <label class="col-sm-3 control-label">商品种类:</label>
+                    <div class="col-sm-8">
+                        <select name="goodsType" class="form-control" th:with="type=${@dict.getType('goods_type')}">
+                            <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{goodsType}"></option>
+                        </select>
+                    </div>
+                </div>
+            </div>
+            <div class="col-xs-12">
+                <div class="form-group">
+                    <label class="col-sm-3 control-label">商品图片:</label>
+                    <div class="col-sm-8">
+                        <input type="hidden" name="goodsImg" th:field="*{goodsImg}">
+                       <div class="file-loading">
+                            <input class="form-control file-upload" id="goodsImg" name="file" type="file">
+                        </div>
+                    </div>
+                </div>
+            </div>
+            <div class="col-xs-12">
+                <div class="form-group">
+                    <label class="col-sm-3 control-label">商品说明:</label>
+                    <div class="col-sm-8">
+                        <input name="goodsDescribe" th:field="*{goodsDescribe}" class="form-control" type="text">
+                    </div>
+                </div>
+            </div>
+            <div class="col-xs-12">
+                <div class="form-group">
+                    <label class="col-sm-3 control-label">计量单位:</label>
+                    <div class="col-sm-8">
+                        <input name="goodsUnit" th:field="*{goodsUnit}" class="form-control" type="text">
+                    </div>
+                </div>
+            </div>
+            <div class="col-xs-12">
+                <div class="form-group">
+                    <label class="col-sm-3 control-label">时价商品:</label>
+                    <div class="col-sm-8">
+                        <input name="goodsCurrentPrice" th:field="*{goodsCurrentPrice}" class="form-control" type="text">
+                    </div>
+                </div>
+            </div>
+            <div class="col-xs-12">
+                <div class="form-group">
+                    <label class="col-sm-3 control-label">销售单价:</label>
+                    <div class="col-sm-8">
+                        <input name="salePrice" th:field="*{salePrice}" class="form-control" type="text">
+                    </div>
+                </div>
+            </div>
+            <div class="col-xs-12">
+                <div class="form-group">
+                    <label class="col-sm-3 control-label">建议售价:</label>
+                    <div class="col-sm-8">
+                        <input name="suggestionPrice" th:field="*{suggestionPrice}" class="form-control" type="text">
+                    </div>
+                </div>
+            </div>
+            <div class="col-xs-12">
+                <div class="form-group">
+                    <label class="col-sm-3 control-label">商品库存:</label>
+                    <div class="col-sm-8">
+                        <input name="goodsInventory" th:field="*{goodsInventory}" class="form-control" type="text">
+                    </div>
+                </div>
+            </div>
+            <div class="col-xs-12">
+                <div class="form-group">
+                    <label class="col-sm-3 control-label">库存成本:</label>
+                    <div class="col-sm-8">
+                        <input name="inventoryCost" th:field="*{inventoryCost}" class="form-control" type="text">
+                    </div>
+                </div>
+            </div>
+            <div class="col-xs-12">
+                <div class="form-group">
+                    <label class="col-sm-3 control-label">商品状态(正常/禁用):</label>
+                    <div class="col-sm-8">
+                        <input name="goodsState" th:field="*{goodsState}" class="form-control" type="text">
+                    </div>
+                </div>
+            </div>
+        </form>
+    </div>
+    <th:block th:include="include :: footer" />
+    <th:block th:include="include :: bootstrap-fileinput-js"/>
+    <script th:inline="javascript">
+        var prefix = ctx + "system/mall";
+        $("#form-mall-edit").validate({
+            focusCleanup: true
+        });
+
+        function submitHandler() {
+            if ($.validate.form()) {
+                $.operate.save(prefix + "/edit", $('#form-mall-edit').serialize());
+            }
+        }
+
+        $(".file-upload").each(function (i) {
+            var val = $("input[name='" + this.id + "']").val()
+            $(this).fileinput({
+                'uploadUrl': ctx + 'common/upload',
+                initialPreviewAsData: true,
+                initialPreview: [val],
+                maxFileCount: 1,
+                autoReplace: true
+            }).on('fileuploaded', function (event, data, previewId, index) {
+                $("input[name='" + event.currentTarget.id + "']").val(data.response.url)
+            }).on('fileremoved', function (event, id, index) {
+                $("input[name='" + event.currentTarget.id + "']").val('')
+            })
+            $(this).fileinput('_initFileActions');
+        });
+    </script>
+</body>
+</html>

+ 147 - 0
qmjszx-admin/src/main/resources/templates/system/mall/mall.html

@@ -0,0 +1,147 @@
+<!DOCTYPE html>
+<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
+<head>
+    <th:block th:include="include :: header('商城列表')" />
+</head>
+<body class="gray-bg">
+     <div class="container-div">
+        <div class="row">
+            <div class="col-sm-12 search-collapse">
+                <form id="formId">
+                    <div class="select-list">
+                        <ul>
+                            <li>
+                                <label>商品名称:</label>
+                                <input type="text" name="goodsName"/>
+                            </li>
+                            <li>
+                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
+                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
+                            </li>
+                        </ul>
+                    </div>
+                </form>
+            </div>
+
+            <div class="btn-group-sm" id="toolbar" role="group">
+                <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:mall:add">
+                    <i class="fa fa-plus"></i> 添加
+                </a>
+                <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:mall:edit">
+                    <i class="fa fa-edit"></i> 修改
+                </a>
+                <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:mall:remove">
+                    <i class="fa fa-remove"></i> 删除
+                </a>
+                <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:mall:export">
+                    <i class="fa fa-download"></i> 导出
+                </a>
+            </div>
+            <div class="col-sm-12 select-table table-striped">
+                <table id="bootstrap-table"></table>
+            </div>
+        </div>
+    </div>
+    <th:block th:include="include :: footer" />
+    <script th:inline="javascript">
+        var editFlag = [[${@permission.hasPermi('system:mall:edit')}]];
+        var removeFlag = [[${@permission.hasPermi('system:mall:remove')}]];
+        var goodsTypeDatas = [[${@dict.getType('goods_type')}]];
+        var goodsCurrentPriceDatas = [[${@dict.getType('sys_yes_no')}]];
+        var goodsStateDatas = [[${@dict.getType('sys_normal_disable')}]];
+        var prefix = ctx + "system/mall";
+
+        $(function() {
+            var options = {
+                url: prefix + "/list",
+                createUrl: prefix + "/add",
+                updateUrl: prefix + "/edit/{id}",
+                removeUrl: prefix + "/remove",
+                exportUrl: prefix + "/export",
+                modalName: "商城",
+                columns: [{
+                    checkbox: true
+                },
+                {
+                    field: 'id',
+                    title: '主键id',
+                    visible: false
+                },
+                {
+                    field: 'goodsName',
+                    title: '商品名称'
+                },
+                {
+                    field: 'goodsCode',
+                    title: '商品条码'
+                },
+                {
+                    field: 'goodsType',
+                    title: '商品种类',
+                    formatter: function(value, row, index) {
+                       return $.table.selectDictLabel(goodsTypeDatas, value);
+                    }
+                },
+                {
+                    field: 'goodsImg',
+                    title: '商品图片',
+                    visible: false
+                },
+                {
+                    field: 'goodsDescribe',
+                    title: '商品说明',
+                    visible: false
+                },
+                {
+                    field: 'goodsUnit',
+                    title: '计量单位',
+                    visible: false
+                },
+                {
+                    field: 'goodsCurrentPrice',
+                    title: '时价商品',
+                    formatter: function(value, row, index) {
+                       return $.table.selectDictLabel(goodsCurrentPriceDatas, value);
+                    }
+                },
+                {
+                    field: 'salePrice',
+                    title: '销售单价'
+                },
+                {
+                    field: 'suggestionPrice',
+                    title: '建议售价',
+                    visible: false
+                },
+                {
+                    field: 'goodsInventory',
+                    title: '商品库存'
+                },
+                {
+                    field: 'inventoryCost',
+                    title: '库存成本',
+                    visible: false
+                },
+                {
+                    field: 'goodsState',
+                    title: '商品状态(正常/禁用)',
+                    formatter: function(value, row, index) {
+                       return $.table.selectDictLabel(goodsStateDatas, value);
+                    }
+                },
+                {
+                    title: '操作',
+                    align: 'center',
+                    formatter: function(value, row, index) {
+                        var actions = [];
+                        actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
+                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
+                        return actions.join('');
+                    }
+                }]
+            };
+            $.table.init(options);
+        });
+    </script>
+</body>
+</html>

+ 218 - 0
qmjszx-system/src/main/java/beilv/system/domain/QmjsShoppingMall.java

@@ -0,0 +1,218 @@
+package beilv.system.domain;
+
+import java.math.BigDecimal;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import beilv.common.annotation.Excel;
+import beilv.common.core.domain.BaseEntity;
+
+/**
+ * 商城对象 qmjs_shopping_mall
+ * 
+ * @author lc
+ * @date 2025-01-02
+ */
+public class QmjsShoppingMall extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 主键id */
+    private Long id;
+
+    /** 商品名称 */
+    @Excel(name = "商品名称")
+    private String goodsName;
+
+    /** 商品条码 */
+    @Excel(name = "商品条码")
+    private String goodsCode;
+
+    /** 商品种类 */
+    @Excel(name = "商品种类")
+    private String goodsType;
+
+    /** 商品图片 */
+    @Excel(name = "商品图片")
+    private String goodsImg;
+
+    /** 商品说明 */
+    @Excel(name = "商品说明")
+    private String goodsDescribe;
+
+    /** 计量单位 */
+    @Excel(name = "计量单位")
+    private String goodsUnit;
+
+    /** 时价商品(是/否) */
+    @Excel(name = "时价商品", readConverterExp = "是=/否")
+    private String goodsCurrentPrice;
+
+    /** 销售单价 */
+    @Excel(name = "销售单价")
+    private BigDecimal salePrice;
+
+    /** 建议售价 */
+    @Excel(name = "建议售价")
+    private BigDecimal suggestionPrice;
+
+    /** 商品库存 */
+    @Excel(name = "商品库存")
+    private String goodsInventory;
+
+    /** 库存成本 */
+    @Excel(name = "库存成本")
+    private BigDecimal inventoryCost;
+
+    /** 商品状态(正常/禁用) */
+    @Excel(name = "商品状态(正常/禁用)")
+    private String goodsState;
+
+    public void setId(Long id) 
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+
+    public void setGoodsName(String goodsName) 
+    {
+        this.goodsName = goodsName;
+    }
+
+    public String getGoodsName() 
+    {
+        return goodsName;
+    }
+
+    public void setGoodsCode(String goodsCode) 
+    {
+        this.goodsCode = goodsCode;
+    }
+
+    public String getGoodsCode() 
+    {
+        return goodsCode;
+    }
+
+    public void setGoodsType(String goodsType) 
+    {
+        this.goodsType = goodsType;
+    }
+
+    public String getGoodsType() 
+    {
+        return goodsType;
+    }
+
+    public void setGoodsImg(String goodsImg) 
+    {
+        this.goodsImg = goodsImg;
+    }
+
+    public String getGoodsImg() 
+    {
+        return goodsImg;
+    }
+
+    public void setGoodsDescribe(String goodsDescribe) 
+    {
+        this.goodsDescribe = goodsDescribe;
+    }
+
+    public String getGoodsDescribe() 
+    {
+        return goodsDescribe;
+    }
+
+    public void setGoodsUnit(String goodsUnit) 
+    {
+        this.goodsUnit = goodsUnit;
+    }
+
+    public String getGoodsUnit() 
+    {
+        return goodsUnit;
+    }
+
+    public void setGoodsCurrentPrice(String goodsCurrentPrice) 
+    {
+        this.goodsCurrentPrice = goodsCurrentPrice;
+    }
+
+    public String getGoodsCurrentPrice() 
+    {
+        return goodsCurrentPrice;
+    }
+
+    public void setSalePrice(BigDecimal salePrice) 
+    {
+        this.salePrice = salePrice;
+    }
+
+    public BigDecimal getSalePrice() 
+    {
+        return salePrice;
+    }
+
+    public void setSuggestionPrice(BigDecimal suggestionPrice) 
+    {
+        this.suggestionPrice = suggestionPrice;
+    }
+
+    public BigDecimal getSuggestionPrice() 
+    {
+        return suggestionPrice;
+    }
+
+    public void setGoodsInventory(String goodsInventory) 
+    {
+        this.goodsInventory = goodsInventory;
+    }
+
+    public String getGoodsInventory() 
+    {
+        return goodsInventory;
+    }
+
+    public void setInventoryCost(BigDecimal inventoryCost) 
+    {
+        this.inventoryCost = inventoryCost;
+    }
+
+    public BigDecimal getInventoryCost() 
+    {
+        return inventoryCost;
+    }
+
+    public void setGoodsState(String goodsState) 
+    {
+        this.goodsState = goodsState;
+    }
+
+    public String getGoodsState() 
+    {
+        return goodsState;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("goodsName", getGoodsName())
+            .append("goodsCode", getGoodsCode())
+            .append("goodsType", getGoodsType())
+            .append("goodsImg", getGoodsImg())
+            .append("goodsDescribe", getGoodsDescribe())
+            .append("goodsUnit", getGoodsUnit())
+            .append("goodsCurrentPrice", getGoodsCurrentPrice())
+            .append("salePrice", getSalePrice())
+            .append("suggestionPrice", getSuggestionPrice())
+            .append("goodsInventory", getGoodsInventory())
+            .append("inventoryCost", getInventoryCost())
+            .append("goodsState", getGoodsState())
+            .toString();
+    }
+}

+ 61 - 0
qmjszx-system/src/main/java/beilv/system/mapper/QmjsShoppingMallMapper.java

@@ -0,0 +1,61 @@
+package beilv.system.mapper;
+
+import java.util.List;
+import beilv.system.domain.QmjsShoppingMall;
+
+/**
+ * 商城Mapper接口
+ * 
+ * @author lc
+ * @date 2025-01-02
+ */
+public interface QmjsShoppingMallMapper 
+{
+    /**
+     * 查询商城
+     * 
+     * @param id 商城主键
+     * @return 商城
+     */
+    public QmjsShoppingMall selectQmjsShoppingMallById(Long id);
+
+    /**
+     * 查询商城列表
+     * 
+     * @param qmjsShoppingMall 商城
+     * @return 商城集合
+     */
+    public List<QmjsShoppingMall> selectQmjsShoppingMallList(QmjsShoppingMall qmjsShoppingMall);
+
+    /**
+     * 新增商城
+     * 
+     * @param qmjsShoppingMall 商城
+     * @return 结果
+     */
+    public int insertQmjsShoppingMall(QmjsShoppingMall qmjsShoppingMall);
+
+    /**
+     * 修改商城
+     * 
+     * @param qmjsShoppingMall 商城
+     * @return 结果
+     */
+    public int updateQmjsShoppingMall(QmjsShoppingMall qmjsShoppingMall);
+
+    /**
+     * 删除商城
+     * 
+     * @param id 商城主键
+     * @return 结果
+     */
+    public int deleteQmjsShoppingMallById(Long id);
+
+    /**
+     * 批量删除商城
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteQmjsShoppingMallByIds(String[] ids);
+}

+ 61 - 0
qmjszx-system/src/main/java/beilv/system/service/IQmjsShoppingMallService.java

@@ -0,0 +1,61 @@
+package beilv.system.service;
+
+import java.util.List;
+import beilv.system.domain.QmjsShoppingMall;
+
+/**
+ * 商城Service接口
+ * 
+ * @author lc
+ * @date 2025-01-02
+ */
+public interface IQmjsShoppingMallService 
+{
+    /**
+     * 查询商城
+     * 
+     * @param id 商城主键
+     * @return 商城
+     */
+    public QmjsShoppingMall selectQmjsShoppingMallById(Long id);
+
+    /**
+     * 查询商城列表
+     * 
+     * @param qmjsShoppingMall 商城
+     * @return 商城集合
+     */
+    public List<QmjsShoppingMall> selectQmjsShoppingMallList(QmjsShoppingMall qmjsShoppingMall);
+
+    /**
+     * 新增商城
+     * 
+     * @param qmjsShoppingMall 商城
+     * @return 结果
+     */
+    public int insertQmjsShoppingMall(QmjsShoppingMall qmjsShoppingMall);
+
+    /**
+     * 修改商城
+     * 
+     * @param qmjsShoppingMall 商城
+     * @return 结果
+     */
+    public int updateQmjsShoppingMall(QmjsShoppingMall qmjsShoppingMall);
+
+    /**
+     * 批量删除商城
+     * 
+     * @param ids 需要删除的商城主键集合
+     * @return 结果
+     */
+    public int deleteQmjsShoppingMallByIds(String ids);
+
+    /**
+     * 删除商城信息
+     * 
+     * @param id 商城主键
+     * @return 结果
+     */
+    public int deleteQmjsShoppingMallById(Long id);
+}

+ 94 - 0
qmjszx-system/src/main/java/beilv/system/service/impl/QmjsShoppingMallServiceImpl.java

@@ -0,0 +1,94 @@
+package beilv.system.service.impl;
+
+import java.util.List;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import beilv.system.mapper.QmjsShoppingMallMapper;
+import beilv.system.domain.QmjsShoppingMall;
+import beilv.system.service.IQmjsShoppingMallService;
+import beilv.common.core.text.Convert;
+
+/**
+ * 商城Service业务层处理
+ * 
+ * @author lc
+ * @date 2025-01-02
+ */
+@Service
+public class QmjsShoppingMallServiceImpl implements IQmjsShoppingMallService 
+{
+    @Autowired
+    private QmjsShoppingMallMapper qmjsShoppingMallMapper;
+
+    /**
+     * 查询商城
+     * 
+     * @param id 商城主键
+     * @return 商城
+     */
+    @Override
+    public QmjsShoppingMall selectQmjsShoppingMallById(Long id)
+    {
+        return qmjsShoppingMallMapper.selectQmjsShoppingMallById(id);
+    }
+
+    /**
+     * 查询商城列表
+     * 
+     * @param qmjsShoppingMall 商城
+     * @return 商城
+     */
+    @Override
+    public List<QmjsShoppingMall> selectQmjsShoppingMallList(QmjsShoppingMall qmjsShoppingMall)
+    {
+        return qmjsShoppingMallMapper.selectQmjsShoppingMallList(qmjsShoppingMall);
+    }
+
+    /**
+     * 新增商城
+     * 
+     * @param qmjsShoppingMall 商城
+     * @return 结果
+     */
+    @Override
+    public int insertQmjsShoppingMall(QmjsShoppingMall qmjsShoppingMall)
+    {
+        return qmjsShoppingMallMapper.insertQmjsShoppingMall(qmjsShoppingMall);
+    }
+
+    /**
+     * 修改商城
+     * 
+     * @param qmjsShoppingMall 商城
+     * @return 结果
+     */
+    @Override
+    public int updateQmjsShoppingMall(QmjsShoppingMall qmjsShoppingMall)
+    {
+        return qmjsShoppingMallMapper.updateQmjsShoppingMall(qmjsShoppingMall);
+    }
+
+    /**
+     * 批量删除商城
+     * 
+     * @param ids 需要删除的商城主键
+     * @return 结果
+     */
+    @Override
+    public int deleteQmjsShoppingMallByIds(String ids)
+    {
+        return qmjsShoppingMallMapper.deleteQmjsShoppingMallByIds(Convert.toStrArray(ids));
+    }
+
+    /**
+     * 删除商城信息
+     * 
+     * @param id 商城主键
+     * @return 结果
+     */
+    @Override
+    public int deleteQmjsShoppingMallById(Long id)
+    {
+        return qmjsShoppingMallMapper.deleteQmjsShoppingMallById(id);
+    }
+}

+ 112 - 0
qmjszx-system/src/main/resources/mapper/system/QmjsShoppingMallMapper.xml

@@ -0,0 +1,112 @@
+<?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="beilv.system.mapper.QmjsShoppingMallMapper">
+    
+    <resultMap type="QmjsShoppingMall" id="QmjsShoppingMallResult">
+        <result property="id"    column="id"    />
+        <result property="goodsName"    column="goods_name"    />
+        <result property="goodsCode"    column="goods_code"    />
+        <result property="goodsType"    column="goods_type"    />
+        <result property="goodsImg"    column="goods_img"    />
+        <result property="goodsDescribe"    column="goods_describe"    />
+        <result property="goodsUnit"    column="goods_unit"    />
+        <result property="goodsCurrentPrice"    column="goods_current_price"    />
+        <result property="salePrice"    column="sale_price"    />
+        <result property="suggestionPrice"    column="suggestion_price"    />
+        <result property="goodsInventory"    column="goods_inventory"    />
+        <result property="inventoryCost"    column="inventory_cost"    />
+        <result property="goodsState"    column="goods_state"    />
+    </resultMap>
+
+    <sql id="selectQmjsShoppingMallVo">
+        select id, goods_name, goods_code, goods_type, goods_img, goods_describe, goods_unit, goods_current_price, sale_price, suggestion_price, goods_inventory, inventory_cost, goods_state from qmjs_shopping_mall
+    </sql>
+
+    <select id="selectQmjsShoppingMallList" parameterType="QmjsShoppingMall" resultMap="QmjsShoppingMallResult">
+        <include refid="selectQmjsShoppingMallVo"/>
+        <where>  
+            <if test="goodsName != null  and goodsName != ''"> and goods_name like concat('%', #{goodsName}, '%')</if>
+            <if test="goodsCode != null  and goodsCode != ''"> and goods_code = #{goodsCode}</if>
+            <if test="goodsType != null  and goodsType != ''"> and goods_type = #{goodsType}</if>
+            <if test="goodsImg != null  and goodsImg != ''"> and goods_img = #{goodsImg}</if>
+            <if test="goodsDescribe != null  and goodsDescribe != ''"> and goods_describe = #{goodsDescribe}</if>
+            <if test="goodsUnit != null  and goodsUnit != ''"> and goods_unit = #{goodsUnit}</if>
+            <if test="goodsCurrentPrice != null  and goodsCurrentPrice != ''"> and goods_current_price = #{goodsCurrentPrice}</if>
+            <if test="salePrice != null "> and sale_price = #{salePrice}</if>
+            <if test="suggestionPrice != null "> and suggestion_price = #{suggestionPrice}</if>
+            <if test="goodsInventory != null  and goodsInventory != ''"> and goods_inventory = #{goodsInventory}</if>
+            <if test="inventoryCost != null "> and inventory_cost = #{inventoryCost}</if>
+            <if test="goodsState != null  and goodsState != ''"> and goods_state = #{goodsState}</if>
+        </where>
+    </select>
+    
+    <select id="selectQmjsShoppingMallById" parameterType="Long" resultMap="QmjsShoppingMallResult">
+        <include refid="selectQmjsShoppingMallVo"/>
+        where id = #{id}
+    </select>
+
+    <insert id="insertQmjsShoppingMall" parameterType="QmjsShoppingMall" useGeneratedKeys="true" keyProperty="id">
+        insert into qmjs_shopping_mall
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="goodsName != null">goods_name,</if>
+            <if test="goodsCode != null">goods_code,</if>
+            <if test="goodsType != null">goods_type,</if>
+            <if test="goodsImg != null">goods_img,</if>
+            <if test="goodsDescribe != null">goods_describe,</if>
+            <if test="goodsUnit != null">goods_unit,</if>
+            <if test="goodsCurrentPrice != null">goods_current_price,</if>
+            <if test="salePrice != null">sale_price,</if>
+            <if test="suggestionPrice != null">suggestion_price,</if>
+            <if test="goodsInventory != null">goods_inventory,</if>
+            <if test="inventoryCost != null">inventory_cost,</if>
+            <if test="goodsState != null">goods_state,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="goodsName != null">#{goodsName},</if>
+            <if test="goodsCode != null">#{goodsCode},</if>
+            <if test="goodsType != null">#{goodsType},</if>
+            <if test="goodsImg != null">#{goodsImg},</if>
+            <if test="goodsDescribe != null">#{goodsDescribe},</if>
+            <if test="goodsUnit != null">#{goodsUnit},</if>
+            <if test="goodsCurrentPrice != null">#{goodsCurrentPrice},</if>
+            <if test="salePrice != null">#{salePrice},</if>
+            <if test="suggestionPrice != null">#{suggestionPrice},</if>
+            <if test="goodsInventory != null">#{goodsInventory},</if>
+            <if test="inventoryCost != null">#{inventoryCost},</if>
+            <if test="goodsState != null">#{goodsState},</if>
+         </trim>
+    </insert>
+
+    <update id="updateQmjsShoppingMall" parameterType="QmjsShoppingMall">
+        update qmjs_shopping_mall
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="goodsName != null">goods_name = #{goodsName},</if>
+            <if test="goodsCode != null">goods_code = #{goodsCode},</if>
+            <if test="goodsType != null">goods_type = #{goodsType},</if>
+            <if test="goodsImg != null">goods_img = #{goodsImg},</if>
+            <if test="goodsDescribe != null">goods_describe = #{goodsDescribe},</if>
+            <if test="goodsUnit != null">goods_unit = #{goodsUnit},</if>
+            <if test="goodsCurrentPrice != null">goods_current_price = #{goodsCurrentPrice},</if>
+            <if test="salePrice != null">sale_price = #{salePrice},</if>
+            <if test="suggestionPrice != null">suggestion_price = #{suggestionPrice},</if>
+            <if test="goodsInventory != null">goods_inventory = #{goodsInventory},</if>
+            <if test="inventoryCost != null">inventory_cost = #{inventoryCost},</if>
+            <if test="goodsState != null">goods_state = #{goodsState},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteQmjsShoppingMallById" parameterType="Long">
+        delete from qmjs_shopping_mall where id = #{id}
+    </delete>
+
+    <delete id="deleteQmjsShoppingMallByIds" parameterType="String">
+        delete from qmjs_shopping_mall where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+
+</mapper>