Browse Source

会员信息 积分流水

bihuisong 6 months ago
parent
commit
73d5718a83
23 changed files with 5339 additions and 1 deletions
  1. 132 0
      qmjszx-admin/src/main/java/beilv/web/controller/system/SysMemberController.java
  2. 111 0
      qmjszx-admin/src/main/java/beilv/web/controller/system/SysUserBillController.java
  3. 2923 1
      qmjszx-admin/src/main/resources/static/css/font-awesome.min.css
  4. 22 0
      qmjszx-admin/src/main/resources/static/ruoyi/js/ry-ui.js
  5. 97 0
      qmjszx-admin/src/main/resources/templates/system/bill/add.html
  6. 118 0
      qmjszx-admin/src/main/resources/templates/system/bill/bill.html
  7. 90 0
      qmjszx-admin/src/main/resources/templates/system/bill/edit.html
  8. 102 0
      qmjszx-admin/src/main/resources/templates/system/member/add.html
  9. 109 0
      qmjszx-admin/src/main/resources/templates/system/member/edit.html
  10. 46 0
      qmjszx-admin/src/main/resources/templates/system/member/exchange.html
  11. 120 0
      qmjszx-admin/src/main/resources/templates/system/member/member.html
  12. 5 0
      qmjszx-common/pom.xml
  13. 359 0
      qmjszx-system/src/main/java/beilv/system/domain/SysMember.java
  14. 227 0
      qmjszx-system/src/main/java/beilv/system/domain/SysUserBill.java
  15. 39 0
      qmjszx-system/src/main/java/beilv/system/domain/dto/SysMemberDTO.java
  16. 61 0
      qmjszx-system/src/main/java/beilv/system/mapper/SysMemberMapper.java
  17. 75 0
      qmjszx-system/src/main/java/beilv/system/mapper/SysUserBillMapper.java
  18. 71 0
      qmjszx-system/src/main/java/beilv/system/service/ISysMemberService.java
  19. 84 0
      qmjszx-system/src/main/java/beilv/system/service/ISysUserBillService.java
  20. 109 0
      qmjszx-system/src/main/java/beilv/system/service/impl/SysMemberServiceImpl.java
  21. 140 0
      qmjszx-system/src/main/java/beilv/system/service/impl/SysUserBillServiceImpl.java
  22. 172 0
      qmjszx-system/src/main/resources/mapper/system/SysMemberMapper.xml
  23. 127 0
      qmjszx-system/src/main/resources/mapper/system/SysUserBillMapper.xml

+ 132 - 0
qmjszx-admin/src/main/java/beilv/web/controller/system/SysMemberController.java

@@ -0,0 +1,132 @@
+package beilv.system.controller;
+
+import beilv.common.annotation.Log;
+import beilv.common.core.controller.BaseController;
+import beilv.common.core.domain.AjaxResult;
+import beilv.common.core.page.TableDataInfo;
+import beilv.common.enums.BusinessType;
+import beilv.common.utils.poi.ExcelUtil;
+import beilv.system.domain.SysMember;
+import beilv.system.domain.dto.SysMemberDTO;
+import beilv.system.service.ISysMemberService;
+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.*;
+
+import java.util.List;
+
+/**
+ * 会员用户信息Controller
+ *
+ * @author ruoyi
+ * @date 2025-01-02
+ */
+@Controller
+@RequestMapping("/system/member")
+public class SysMemberController extends BaseController {
+    private String prefix = "system/member";
+
+    @Autowired
+    private ISysMemberService sysMemberService;
+
+    @RequiresPermissions("system:member:view")
+    @GetMapping()
+    public String member() {
+        return prefix + "/member";
+    }
+
+    /**
+     * 查询会员用户信息列表
+     */
+    @PostMapping("/list")
+    @ResponseBody
+    public TableDataInfo list(SysMember sysMember) {
+        startPage();
+        List<SysMember> list = sysMemberService.selectSysMemberList(sysMember);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出会员用户信息列表
+     */
+    @Log(title = "会员用户信息", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    @ResponseBody
+    public AjaxResult export(SysMember sysMember) {
+        List<SysMember> list = sysMemberService.selectSysMemberList(sysMember);
+        ExcelUtil<SysMember> util = new ExcelUtil<SysMember>(SysMember.class);
+        return util.exportExcel(list, "会员用户信息数据");
+    }
+
+    /**
+     * 新增会员用户信息
+     */
+    @GetMapping("/add")
+    public String add() {
+        return prefix + "/add";
+    }
+
+    /**
+     * 新增保存会员用户信息
+     */
+    @Log(title = "会员用户信息", businessType = BusinessType.INSERT)
+    @PostMapping("/add")
+    @ResponseBody
+    public AjaxResult addSave(SysMember sysMember) {
+        return toAjax(sysMemberService.insertSysMember(sysMember));
+    }
+
+    /**
+     * 修改会员用户信息
+     */
+    @GetMapping("/edit/{id}")
+    public String edit(@PathVariable("id") Long id, ModelMap mmap) {
+        SysMember sysMember = sysMemberService.selectSysMemberById(id);
+        mmap.put("sysMember", sysMember);
+        return prefix + "/edit";
+    }
+
+    /**
+     * 修改保存会员用户信息
+     */
+    @Log(title = "会员用户信息", businessType = BusinessType.UPDATE)
+    @PostMapping("/edit")
+    @ResponseBody
+    public AjaxResult editSave(SysMember sysMember) {
+        return toAjax(sysMemberService.updateSysMember(sysMember));
+    }
+
+    /**
+     * 删除会员用户信息
+     */
+    @Log(title = "会员用户信息", businessType = BusinessType.DELETE)
+    @PostMapping("/remove")
+    @ResponseBody
+    public AjaxResult remove(String ids) {
+        return toAjax(sysMemberService.deleteSysMemberByIds(ids));
+    }
+
+
+    /**
+     * 用户积分兑换商品
+     */
+    @GetMapping("/exchange/{id}")
+    public String exchange(@PathVariable("id") Long id, ModelMap mmap) {
+        SysMemberDTO sysMemberDTO = new SysMemberDTO();
+        sysMemberDTO.setId(id);
+        mmap.put("sysMemberDTO", sysMemberDTO);
+        return prefix + "/exchange";
+    }
+
+    /**
+     * 用户积分兑换商品
+     */
+    @Log(title = "用户积分兑换商品", businessType = BusinessType.OTHER)
+    @PostMapping("/exchange")
+    @ResponseBody
+    public AjaxResult exchangeSave(SysMemberDTO dto) {
+        return toAjax(sysMemberService.exchange(dto));
+    }
+}

+ 111 - 0
qmjszx-admin/src/main/java/beilv/web/controller/system/SysUserBillController.java

@@ -0,0 +1,111 @@
+package beilv.web.controller.system;
+
+import beilv.common.annotation.Log;
+import beilv.common.core.controller.BaseController;
+import beilv.common.core.domain.AjaxResult;
+import beilv.common.core.page.TableDataInfo;
+import beilv.common.enums.BusinessType;
+import beilv.common.utils.poi.ExcelUtil;
+import beilv.system.domain.SysUserBill;
+import beilv.system.service.ISysUserBillService;
+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.*;
+
+import java.util.List;
+
+/**
+ * 用户积分流水Controller
+ *
+ * @author ruoyi
+ * @date 2024-12-31
+ */
+@Controller
+@RequestMapping("/system/bill")
+public class SysUserBillController extends BaseController {
+
+    private String prefix = "system/bill";
+
+    @Autowired
+    private ISysUserBillService sysUserBillService;
+
+    @RequiresPermissions("system:bill:view")
+    @GetMapping()
+    public String bill() {
+        return prefix + "/bill";
+    }
+
+    /**
+     * 查询用户积分流水列表
+     */
+    @PostMapping("/list")
+    @ResponseBody
+    public TableDataInfo list(SysUserBill sysUserBill) {
+        startPage();
+        List<SysUserBill> list = sysUserBillService.selectSysUserBillList(sysUserBill);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出用户积分流水列表
+     */
+    @Log(title = "用户积分流水", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    @ResponseBody
+    public AjaxResult export(SysUserBill sysUserBill) {
+        List<SysUserBill> list = sysUserBillService.selectSysUserBillList(sysUserBill);
+        ExcelUtil<SysUserBill> util = new ExcelUtil<SysUserBill>(SysUserBill.class);
+        return util.exportExcel(list, "用户积分流水数据");
+    }
+
+    /**
+     * 新增用户积分流水
+     */
+    @GetMapping("/add")
+    public String add() {
+        return prefix + "/add";
+    }
+
+    /**
+     * 新增保存用户积分流水
+     */
+    @Log(title = "用户积分流水", businessType = BusinessType.INSERT)
+    @PostMapping("/add")
+    @ResponseBody
+    public AjaxResult addSave(SysUserBill sysUserBill) {
+        return toAjax(sysUserBillService.insertSysUserBill(sysUserBill));
+    }
+
+    /**
+     * 修改用户积分流水
+     */
+    @GetMapping("/edit/{id}")
+    public String edit(@PathVariable("id") Long id, ModelMap mmap) {
+        SysUserBill sysUserBill = sysUserBillService.selectSysUserBillById(id);
+        mmap.put("sysUserBill", sysUserBill);
+        return prefix + "/edit";
+    }
+
+    /**
+     * 修改保存用户积分流水
+     */
+    @Log(title = "用户积分流水", businessType = BusinessType.UPDATE)
+    @PostMapping("/edit")
+    @ResponseBody
+    public AjaxResult editSave(SysUserBill sysUserBill) {
+        return toAjax(sysUserBillService.updateSysUserBill(sysUserBill));
+    }
+
+    /**
+     * 删除用户积分流水
+     */
+    @Log(title = "用户积分流水", businessType = BusinessType.DELETE)
+    @PostMapping("/remove")
+    @ResponseBody
+    public AjaxResult remove(String ids) {
+        return toAjax(sysUserBillService.deleteSysUserBillByIds(ids));
+    }
+
+}

File diff suppressed because it is too large
+ 2923 - 1
qmjszx-admin/src/main/resources/static/css/font-awesome.min.css


+ 22 - 0
qmjszx-admin/src/main/resources/static/ruoyi/js/ry-ui.js

@@ -1159,6 +1159,28 @@ var table = {
                 var url = $.common.isEmpty(id) ? table.options.createUrl.replace("{id}", "") : table.options.createUrl.replace("{id}", id);
                 return url;
             },
+            // 兑换礼品
+            exchange: function(id) {
+                table.set();
+                if ($.common.isEmpty(id) && table.options.type == table_type.bootstrapTreeTable) {
+                    var row = $("#" + table.options.id).bootstrapTreeTable('getSelections')[0];
+                    var url = table.options.exchangeUrl.replace("{id}", row[table.options.uniqueId]);
+                    $.modal.open("兑换" + table.options.modalName, url);
+                } else {
+                    $.modal.open("兑换" + table.options.modalName, $.operate.changeUrl(id));
+                }
+            },
+            // 兑换礼品访问地址
+            changeUrl: function(id) {
+                var url = "/404.html";
+                if ($.common.isNotEmpty(id)) {
+                    url = table.options.exchangeUrl.replace("{id}", id);
+                } else {
+                    var id = $.common.isEmpty(table.options.uniqueId) ? $.table.selectFirstColumns() : $.table.selectColumns(table.options.uniqueId);
+                    url = table.options.exchangeUrl.replace("{id}", id);
+                }
+                return url;
+            },
             // 修改信息
             edit: function(id) {
                 table.set();

+ 97 - 0
qmjszx-admin/src/main/resources/templates/system/bill/add.html

@@ -0,0 +1,97 @@
+<!DOCTYPE html>
+<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
+<head>
+    <th:block th:include="include :: header('新增用户积分流水')" />
+</head>
+<body class="white-bg">
+    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
+        <form class="form-horizontal m" id="form-bill-add">
+            <div class="col-xs-12">
+                <div class="form-group">
+                    <label class="col-sm-3 control-label is-required">用户uid:</label>
+                    <div class="col-sm-8">
+                        <input name="userId" class="form-control" type="text" required>
+                    </div>
+                </div>
+            </div>
+            <div class="col-xs-12">
+                <div class="form-group">
+                    <label class="col-sm-3 control-label is-required">0 = 支出 1 = 获得:</label>
+                    <div class="col-sm-8">
+                        <input name="pm" class="form-control" type="text" required>
+                    </div>
+                </div>
+            </div>
+            <div class="col-xs-12">
+                <div class="form-group">
+                    <label class="col-sm-3 control-label is-required">账单标题:</label>
+                    <div class="col-sm-8">
+                        <input name="title" class="form-control" type="text" required>
+                    </div>
+                </div>
+            </div>
+            <div class="col-xs-12">
+                <div class="form-group">
+                    <label class="col-sm-3 control-label is-required">明细数字:</label>
+                    <div class="col-sm-8">
+                        <input name="number" class="form-control" type="text" required>
+                    </div>
+                </div>
+            </div>
+            <div class="col-xs-12">
+                <div class="form-group">
+                    <label class="col-sm-3 control-label is-required">剩余:</label>
+                    <div class="col-sm-8">
+                        <input name="balance" class="form-control" type="text" required>
+                    </div>
+                </div>
+            </div>
+            <div class="col-xs-12">
+                <div class="form-group">
+                    <label class="col-sm-3 control-label is-required">积分剩余量:</label>
+                    <div class="col-sm-8">
+                        <input name="remainingNumber" class="form-control" type="text" required>
+                    </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="useCategory" class="form-control" type="text">
+                    </div>
+                </div>
+            </div>
+            <div class="col-xs-12">
+                <div class="form-group">
+                    <label class="col-sm-3 control-label is-required">备注:</label>
+                    <div class="col-sm-8">
+                        <textarea name="remark" class="form-control" required></textarea>
+                    </div>
+                </div>
+            </div>
+            <div class="col-xs-12">
+                <div class="form-group">
+                    <label class="col-sm-3 control-label">删除(0:正常;1:删除):</label>
+                    <div class="col-sm-8">
+                        <input name="delFlag" class="form-control" type="text">
+                    </div>
+                </div>
+            </div>
+        </form>
+    </div>
+    <th:block th:include="include :: footer" />
+    <script th:inline="javascript">
+        var prefix = ctx + "system/bill"
+        $("#form-bill-add").validate({
+            focusCleanup: true
+        });
+
+        function submitHandler() {
+            if ($.validate.form()) {
+                $.operate.save(prefix + "/add", $('#form-bill-add').serialize());
+            }
+        }
+    </script>
+</body>
+</html>

+ 118 - 0
qmjszx-admin/src/main/resources/templates/system/bill/bill.html

@@ -0,0 +1,118 @@
+<!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="title"/>
+                            </li>
+                            <li>
+                                <label>明细数字:</label>
+                                <input type="text" name="number"/>
+                            </li>
+                            <li>
+                                <label>剩余:</label>
+                                <input type="text" name="balance"/>
+                            </li>
+                            <li>
+                                <label>积分用途:</label>
+                                <input type="text" name="useCategory"/>
+                            </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()">
+                    <i class="fa fa-plus"></i> 添加
+                </a>
+                <a class="btn btn-primary single disabled" onclick="$.operate.edit()">
+                    <i class="fa fa-edit"></i> 修改
+                </a>
+                <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()">
+                    <i class="fa fa-remove"></i> 删除
+                </a>
+                <a class="btn btn-warning" onclick="$.table.exportExcel()">
+                    <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:bill:edit')}]];
+        var removeFlag = [[${@permission.hasPermi('system:bill:remove')}]];
+        var prefix = ctx + "system/bill";
+
+        $(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: 'userId',
+                    title: '用户uid'
+                },
+                {
+                    field: 'title',
+                    title: '账单标题'
+                },
+                {
+                    field: 'number',
+                    title: '明细数字'
+                },
+                {
+                    field: 'balance',
+                    title: '剩余'
+                },
+                {
+                    field: 'useCategory',
+                    title: '积分用途'
+                },
+                {
+                    field: 'remark',
+                    title: '备注'
+                },
+                {
+                    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>

+ 90 - 0
qmjszx-admin/src/main/resources/templates/system/bill/edit.html

@@ -0,0 +1,90 @@
+<!DOCTYPE html>
+<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
+<head>
+    <th:block th:include="include :: header('修改用户积分流水')" />
+</head>
+<body class="white-bg">
+    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
+        <form class="form-horizontal m" id="form-bill-edit" th:object="${sysUserBill}">
+            <input name="id" th:field="*{id}" type="hidden">
+            <div class="col-xs-12">
+                <div class="form-group">
+                    <label class="col-sm-3 control-label is-required">用户uid:</label>
+                    <div class="col-sm-8">
+                        <input name="userId" th:field="*{userId}" class="form-control" type="text" required>
+                    </div>
+                </div>
+            </div>
+            <div class="col-xs-12">
+                <div class="form-group">
+                    <label class="col-sm-3 control-label is-required">0 = 支出 1 = 获得:</label>
+                    <div class="col-sm-8">
+                        <input name="pm" th:field="*{pm}" class="form-control" type="text" required>
+                    </div>
+                </div>
+            </div>
+            <div class="col-xs-12">
+                <div class="form-group">
+                    <label class="col-sm-3 control-label is-required">账单标题:</label>
+                    <div class="col-sm-8">
+                        <input name="title" th:field="*{title}" class="form-control" type="text" required>
+                    </div>
+                </div>
+            </div>
+            <div class="col-xs-12">
+                <div class="form-group">
+                    <label class="col-sm-3 control-label is-required">明细数字:</label>
+                    <div class="col-sm-8">
+                        <input name="number" th:field="*{number}" class="form-control" type="text" required>
+                    </div>
+                </div>
+            </div>
+            <div class="col-xs-12">
+                <div class="form-group">
+                    <label class="col-sm-3 control-label is-required">剩余:</label>
+                    <div class="col-sm-8">
+                        <input name="balance" th:field="*{balance}" class="form-control" type="text" required>
+                    </div>
+                </div>
+            </div>
+            <div class="col-xs-12">
+                <div class="form-group">
+                    <label class="col-sm-3 control-label is-required">积分剩余量:</label>
+                    <div class="col-sm-8">
+                        <input name="remainingNumber" th:field="*{remainingNumber}" class="form-control" type="text" required>
+                    </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="useCategory" th:field="*{useCategory}" class="form-control" type="text">
+                    </div>
+                </div>
+            </div>
+            <div class="col-xs-12">
+                <div class="form-group">
+                    <label class="col-sm-3 control-label is-required">备注:</label>
+                    <div class="col-sm-8">
+                        <textarea name="remark" class="form-control" required>[[*{remark}]]</textarea>
+                    </div>
+                </div>
+            </div>
+        </form>
+    </div>
+    <th:block th:include="include :: footer" />
+    <script th:inline="javascript">
+        var prefix = ctx + "system/bill";
+        $("#form-bill-edit").validate({
+            focusCleanup: true
+        });
+
+        function submitHandler() {
+            if ($.validate.form()) {
+                $.operate.save(prefix + "/edit", $('#form-bill-edit').serialize());
+            }
+        }
+    </script>
+</body>
+</html>

+ 102 - 0
qmjszx-admin/src/main/resources/templates/system/member/add.html

@@ -0,0 +1,102 @@
+<!DOCTYPE html>
+<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
+<head>
+    <th:block th:include="include :: header('新增会员用户信息')" />
+    <th:block th:include="include :: datetimepicker-css" />
+    <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-member-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="username" 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="realName" 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">
+                        <div class="input-group date">
+                            <input name="birthday" class="form-control" placeholder="yyyy-MM-dd" type="text">
+                            <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
+                        </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="cardId" 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="mobile" class="form-control" type="text">
+                    </div>
+                </div>
+            </div>
+            <div class="col-xs-12">
+                <div class="form-group">
+                    <label class="col-sm-3 control-label is-required">用户剩余积分:</label>
+                    <div class="col-sm-8">
+                        <input name="integral" class="form-control" type="text" required>
+                    </div>
+                </div>
+            </div>
+        </form>
+    </div>
+    <th:block th:include="include :: footer" />
+    <th:block th:include="include :: datetimepicker-js" />
+    <th:block th:include="include :: bootstrap-fileinput-js"/>
+    <script th:inline="javascript">
+        var prefix = ctx + "system/member"
+        $("#form-member-add").validate({
+            focusCleanup: true
+        });
+
+        function submitHandler() {
+            if ($.validate.form()) {
+                $.operate.save(prefix + "/add", $('#form-member-add').serialize());
+            }
+        }
+
+        $("input[name='birthday']").datetimepicker({
+            format: "yyyy-mm-dd",
+            minView: "month",
+            autoclose: true
+        });
+
+        $("input[name='loginDate']").datetimepicker({
+            format: "yyyy-mm-dd",
+            minView: "month",
+            autoclose: true
+        });
+
+        $(".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>

+ 109 - 0
qmjszx-admin/src/main/resources/templates/system/member/edit.html

@@ -0,0 +1,109 @@
+<!DOCTYPE html>
+<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
+<head>
+    <th:block th:include="include :: header('修改会员用户信息')" />
+    <th:block th:include="include :: datetimepicker-css" />
+    <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-member-edit" th:object="${sysMember}">
+            <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="username" th:field="*{username}" 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="realName" th:field="*{realName}" 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">
+                        <div class="input-group date">
+                            <input name="birthday" th:value="${#dates.format(sysMember.birthday, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
+                            <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
+                        </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="cardId" th:field="*{cardId}" 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="mobile" th:field="*{mobile}" class="form-control" type="text">
+                    </div>
+                </div>
+            </div>
+            <div class="col-xs-12">
+                <div class="form-group">
+                    <label class="col-sm-3 control-label is-required">用户剩余积分:</label>
+                    <div class="col-sm-8">
+                        <input name="integral" th:field="*{integral}" class="form-control" type="text" required>
+                    </div>
+                </div>
+            </div>
+        </form>
+    </div>
+    <th:block th:include="include :: footer" />
+    <th:block th:include="include :: datetimepicker-js" />
+    <th:block th:include="include :: bootstrap-fileinput-js"/>
+    <script th:inline="javascript">
+        var prefix = ctx + "system/member";
+        $("#form-member-edit").validate({
+            focusCleanup: true
+        });
+
+        function submitHandler() {
+            if ($.validate.form()) {
+                $.operate.save(prefix + "/edit", $('#form-member-edit').serialize());
+            }
+        }
+
+        $("input[name='birthday']").datetimepicker({
+            format: "yyyy-mm-dd",
+            minView: "month",
+            autoclose: true
+        });
+
+        $("input[name='loginDate']").datetimepicker({
+            format: "yyyy-mm-dd",
+            minView: "month",
+            autoclose: true
+        });
+
+        $(".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>

+ 46 - 0
qmjszx-admin/src/main/resources/templates/system/member/exchange.html

@@ -0,0 +1,46 @@
+<!DOCTYPE html>
+<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
+<head>
+    <th:block th:include="include :: header('兑换礼品')" />
+    <th:block th:include="include :: datetimepicker-css" />
+    <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-member-exchange" th:object="${sysMemberDTO}">
+        <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="integral" th:field="*{integral}" 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="giftName" th:field="*{giftName}" class="form-control" type="text">
+                </div>
+            </div>
+        </div>
+    </form>
+</div>
+<th:block th:include="include :: footer" />
+<th:block th:include="include :: datetimepicker-js" />
+<th:block th:include="include :: bootstrap-fileinput-js"/>
+<script th:inline="javascript">
+    var prefix = ctx + "system/member"
+    $("#form-member-exchange").validate({
+        focusCleanup: true
+    });
+
+    function submitHandler() {
+        if ($.validate.form()) {
+            $.operate.save(prefix + "/exchange", $('#form-member-exchange').serialize());
+        }
+    }
+</script>
+</body>
+</html>

+ 120 - 0
qmjszx-admin/src/main/resources/templates/system/member/member.html

@@ -0,0 +1,120 @@
+<!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="realName"/>
+                            </li>
+                            <li>
+                                <label>手机号码:</label>
+                                <input type="text" name="mobile"/>
+                            </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()">-->
+<!--                    <i class="fa fa-plus"></i> 添加-->
+<!--                </a>-->
+<!--                <a class="btn btn-primary single disabled" onclick="$.operate.edit()">-->
+<!--                    <i class="fa fa-edit"></i> 修改-->
+<!--                </a>-->
+<!--                <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()">-->
+<!--                    <i class="fa fa-remove"></i> 删除-->
+<!--                </a>-->
+<!--                <a class="btn btn-warning" onclick="$.table.exportExcel()">-->
+<!--                    <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:member:edit')}]];
+        var removeFlag = [[${@permission.hasPermi('system:member:remove')}]];
+        var prefix = ctx + "system/member";
+
+        $(function() {
+            var options = {
+                url: prefix + "/list",
+                createUrl: prefix + "/add",
+                updateUrl: prefix + "/edit/{id}",
+                removeUrl: prefix + "/remove",
+                exportUrl: prefix + "/export",
+                exchangeUrl: prefix + "/exchange/{id}",
+                modalName: "会员用户信息",
+                columns: [{
+                    checkbox: true
+                },
+                {
+                    field: 'id',
+                    title: '用户id',
+                    visible: false
+                },
+                {
+                    field: 'username',
+                    title: '用户账户'
+                },
+                {
+                    field: 'realName',
+                    title: '真实姓名'
+                },
+                {
+                    field: 'sex',
+                    title: '性别'
+                },
+                {
+                    field: 'birthday',
+                    title: '生日'
+                },
+                {
+                    field: 'cardId',
+                    title: '身份证号码'
+                },
+                {
+                    field: 'mobile',
+                    title: '手机号码'
+                },
+                {
+                    field: 'integral',
+                    title: '用户剩余积分'
+                },
+                {
+                    field: 'userType',
+                    title: '用户类型'
+                },
+                {
+                    title: '操作',
+                    align: 'center',
+                    formatter: function(value, row, index) {
+                        var actions = [];
+                        // actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
+                        actions.push('<a class="btn btn-warning btn-xs" href="javascript:void(0)" onclick="$.operate.exchange(\'' + row.id + '\')"><i class="fa fa-exchange"></i>兑换</a>');
+                        // actions.push('<a class="btn btn-danger btn-xs" 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>

+ 5 - 0
qmjszx-common/pom.xml

@@ -95,6 +95,11 @@
             <artifactId>javax.servlet-api</artifactId>
         </dependency>
 
+        <dependency>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok</artifactId>
+            <version>1.18.26</version>
+        </dependency>
     </dependencies>
 
 </project>

+ 359 - 0
qmjszx-system/src/main/java/beilv/system/domain/SysMember.java

@@ -0,0 +1,359 @@
+package beilv.system.domain;
+
+import beilv.common.annotation.Excel;
+import beilv.common.core.domain.BaseEntity;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * 会员用户信息对象 sys_member
+ *
+ * @author ruoyi
+ * @date 2025-01-02
+ */
+public class SysMember extends BaseEntity {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 用户id
+     */
+    private Long id;
+
+    /**
+     * 用户账户(跟accout一样)
+     */
+    @Excel(name = "用户账户(跟accout一样)")
+    private String username;
+
+    /**
+     * 用户密码(跟pwd)
+     */
+    @Excel(name = "用户密码", readConverterExp = "跟=pwd")
+    private String password;
+
+    /**
+     * 真实姓名
+     */
+    @Excel(name = "真实姓名")
+    private String realName;
+
+    /**
+     * 性别
+     */
+    @Excel(name = "性别")
+    private Integer sex;
+
+    /**
+     * 生日
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    @Excel(name = "生日", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date birthday;
+
+    /**
+     * 身份证号码
+     */
+    @Excel(name = "身份证号码")
+    private String cardId;
+
+    /**
+     * 用户头像
+     */
+    @Excel(name = "用户头像")
+    private String avatar;
+
+    /**
+     * 手机号码
+     */
+    @Excel(name = "手机号码")
+    private String mobile;
+
+    /**
+     * $column.columnComment
+     */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    private Date loginDate;
+
+    /**
+     * $column.columnComment
+     */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    private String loginIp;
+
+    /**
+     * 注册ip
+     */
+    @Excel(name = "注册ip")
+    private String registerIp;
+
+    /**
+     * 添加ip
+     */
+    @Excel(name = "添加ip")
+    private String addIp;
+
+    /**
+     * 最后一次登录ip
+     */
+    @Excel(name = "最后一次登录ip")
+    private String lastIp;
+
+    /**
+     * 用户剩余积分
+     */
+    @Excel(name = "用户剩余积分")
+    private BigDecimal integral;
+
+    /**
+     * 0为正常,1为禁止
+     */
+    @Excel(name = "0为正常,1为禁止")
+    private Integer status;
+
+    /**
+     * 用户类型
+     */
+    @Excel(name = "用户类型")
+    private String userType;
+
+    /**
+     * 用户登陆类型,h5,wechat,routine
+     */
+    @Excel(name = "用户登陆类型,h5,wechat,routine")
+    private String loginType;
+
+    /**
+     * 微信用户json信息
+     */
+    @Excel(name = "微信用户json信息")
+    private String wxProfile;
+
+    /**
+     * 删除
+     */
+    private Integer delFlag;
+
+    /**
+     * 公众号openid
+     */
+    @Excel(name = "公众号openid")
+    private String openId;
+
+    /**
+     * 小程序openid
+     */
+    @Excel(name = "小程序openid")
+    private String routineOpenId;
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setUsername(String username) {
+        this.username = username;
+    }
+
+    public String getUsername() {
+        return username;
+    }
+
+    public void setPassword(String password) {
+        this.password = password;
+    }
+
+    public String getPassword() {
+        return password;
+    }
+
+    public void setRealName(String realName) {
+        this.realName = realName;
+    }
+
+    public String getRealName() {
+        return realName;
+    }
+
+    public void setSex(Integer sex) {
+        this.sex = sex;
+    }
+
+    public Integer getSex() {
+        return sex;
+    }
+
+    public void setBirthday(Date birthday) {
+        this.birthday = birthday;
+    }
+
+    public Date getBirthday() {
+        return birthday;
+    }
+
+    public void setCardId(String cardId) {
+        this.cardId = cardId;
+    }
+
+    public String getCardId() {
+        return cardId;
+    }
+
+    public void setAvatar(String avatar) {
+        this.avatar = avatar;
+    }
+
+    public String getAvatar() {
+        return avatar;
+    }
+
+    public void setMobile(String mobile) {
+        this.mobile = mobile;
+    }
+
+    public String getMobile() {
+        return mobile;
+    }
+
+    public void setLoginDate(Date loginDate) {
+        this.loginDate = loginDate;
+    }
+
+    public Date getLoginDate() {
+        return loginDate;
+    }
+
+    public void setLoginIp(String loginIp) {
+        this.loginIp = loginIp;
+    }
+
+    public String getLoginIp() {
+        return loginIp;
+    }
+
+    public void setRegisterIp(String registerIp) {
+        this.registerIp = registerIp;
+    }
+
+    public String getRegisterIp() {
+        return registerIp;
+    }
+
+    public void setAddIp(String addIp) {
+        this.addIp = addIp;
+    }
+
+    public String getAddIp() {
+        return addIp;
+    }
+
+    public void setLastIp(String lastIp) {
+        this.lastIp = lastIp;
+    }
+
+    public String getLastIp() {
+        return lastIp;
+    }
+
+    public void setIntegral(BigDecimal integral) {
+        this.integral = integral;
+    }
+
+    public BigDecimal getIntegral() {
+        return integral;
+    }
+
+    public void setStatus(Integer status) {
+        this.status = status;
+    }
+
+    public Integer getStatus() {
+        return status;
+    }
+
+    public void setUserType(String userType) {
+        this.userType = userType;
+    }
+
+    public String getUserType() {
+        return userType;
+    }
+
+    public void setLoginType(String loginType) {
+        this.loginType = loginType;
+    }
+
+    public String getLoginType() {
+        return loginType;
+    }
+
+    public void setWxProfile(String wxProfile) {
+        this.wxProfile = wxProfile;
+    }
+
+    public String getWxProfile() {
+        return wxProfile;
+    }
+
+    public void setDelFlag(Integer delFlag) {
+        this.delFlag = delFlag;
+    }
+
+    public Integer getDelFlag() {
+        return delFlag;
+    }
+
+    public void setOpenId(String openId) {
+        this.openId = openId;
+    }
+
+    public String getOpenId() {
+        return openId;
+    }
+
+    public void setRoutineOpenId(String routineOpenId) {
+        this.routineOpenId = routineOpenId;
+    }
+
+    public String getRoutineOpenId() {
+        return routineOpenId;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
+                .append("id", getId())
+                .append("username", getUsername())
+                .append("password", getPassword())
+                .append("realName", getRealName())
+                .append("sex", getSex())
+                .append("birthday", getBirthday())
+                .append("cardId", getCardId())
+                .append("avatar", getAvatar())
+                .append("mobile", getMobile())
+                .append("loginDate", getLoginDate())
+                .append("loginIp", getLoginIp())
+                .append("registerIp", getRegisterIp())
+                .append("addIp", getAddIp())
+                .append("createBy", getCreateBy())
+                .append("createTime", getCreateTime())
+                .append("updateBy", getUpdateBy())
+                .append("updateTime", getUpdateTime())
+                .append("lastIp", getLastIp())
+                .append("integral", getIntegral())
+                .append("status", getStatus())
+                .append("userType", getUserType())
+                .append("loginType", getLoginType())
+                .append("wxProfile", getWxProfile())
+                .append("delFlag", getDelFlag())
+                .append("openId", getOpenId())
+                .append("routineOpenId", getRoutineOpenId())
+                .toString();
+    }
+}

+ 227 - 0
qmjszx-system/src/main/java/beilv/system/domain/SysUserBill.java

@@ -0,0 +1,227 @@
+package beilv.system.domain;
+
+import beilv.common.annotation.Excel;
+import beilv.common.core.domain.BaseEntity;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.NoArgsConstructor;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * 用户积分流水对象 sys_user_bill
+ *
+ * @author ruoyi
+ * @date 2024-12-31
+ */
+@Builder
+@NoArgsConstructor
+@AllArgsConstructor
+public class SysUserBill {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 用户账单id
+     */
+    private Long id;
+
+    /**
+     * 用户uid
+     */
+    @Excel(name = "用户uid")
+    private Long userId;
+
+    /**
+     * 0 = 支出 1 = 获得
+     */
+    @Excel(name = "0 = 支出 1 = 获得")
+    private Integer pm;
+
+    /**
+     * 账单标题
+     */
+    @Excel(name = "账单标题")
+    private String title;
+
+    /**
+     * 明细数字
+     */
+    @Excel(name = "明细数字")
+    private BigDecimal number;
+
+    /**
+     * 剩余
+     */
+    @Excel(name = "剩余")
+    private BigDecimal balance;
+
+    /**
+     * 积分用途
+     */
+    @Excel(name = "积分用途")
+    private String useCategory;
+
+    /**
+     * 0 = 带确定 1 = 有效 -1 = 无效
+     */
+    @Excel(name = "0 = 带确定 1 = 有效 -1 = 无效")
+    private Integer status;
+
+    /** 创建者 */
+    private String createBy;
+
+    /** 创建时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private Date createTime;
+
+    /** 更新者 */
+    private String updateBy;
+
+    /** 更新时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private Date updateTime;
+
+    /** 备注 */
+    private String remark;
+
+    /**
+     * 删除(0:正常;1:删除)
+     */
+    private Integer delFlag;
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setUserId(Long userId) {
+        this.userId = userId;
+    }
+
+    public Long getUserId() {
+        return userId;
+    }
+
+    public void setPm(Integer pm) {
+        this.pm = pm;
+    }
+
+    public Integer getPm() {
+        return pm;
+    }
+
+    public void setTitle(String title) {
+        this.title = title;
+    }
+
+    public String getTitle() {
+        return title;
+    }
+
+    public void setNumber(BigDecimal number) {
+        this.number = number;
+    }
+
+    public BigDecimal getNumber() {
+        return number;
+    }
+
+    public void setBalance(BigDecimal balance) {
+        this.balance = balance;
+    }
+
+    public BigDecimal getBalance() {
+        return balance;
+    }
+
+    public void setUseCategory(String useCategory) {
+        this.useCategory = useCategory;
+    }
+
+    public String getUseCategory() {
+        return useCategory;
+    }
+
+    public void setStatus(Integer status) {
+        this.status = status;
+    }
+
+    public Integer getStatus() {
+        return status;
+    }
+
+    public void setDelFlag(Integer delFlag) {
+        this.delFlag = delFlag;
+    }
+
+    public Integer getDelFlag() {
+        return delFlag;
+    }
+
+    public String getCreateBy() {
+        return createBy;
+    }
+
+    public void setCreateBy(String createBy) {
+        this.createBy = createBy;
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public String getUpdateBy() {
+        return updateBy;
+    }
+
+    public void setUpdateBy(String updateBy) {
+        this.updateBy = updateBy;
+    }
+
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
+                .append("id", getId())
+                .append("userId", getUserId())
+                .append("pm", getPm())
+                .append("title", getTitle())
+                .append("number", getNumber())
+                .append("balance", getBalance())
+                .append("useCategory", getUseCategory())
+                .append("remark", getRemark())
+                .append("status", getStatus())
+                .append("createBy", getCreateBy())
+                .append("createTime", getCreateTime())
+                .append("updateBy", getUpdateBy())
+                .append("updateTime", getUpdateTime())
+                .append("delFlag", getDelFlag())
+                .toString();
+    }
+}

+ 39 - 0
qmjszx-system/src/main/java/beilv/system/domain/dto/SysMemberDTO.java

@@ -0,0 +1,39 @@
+package beilv.system.domain.dto;
+
+import beilv.common.annotation.Excel;
+import beilv.common.core.domain.BaseEntity;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * 兑换礼品dto
+ *
+ * @author ruoyi
+ * @date 2025-01-02
+ */
+@Data
+public class SysMemberDTO {
+
+    /**
+     * 用户id
+     */
+    private Long id;
+
+    /**
+     * 消耗积分
+     */
+    @Excel(name = "消耗积分")
+    private BigDecimal integral;
+
+    /**
+     * 礼品名称
+     */
+    @Excel(name = "礼品名称")
+    private String giftName;
+
+}

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

@@ -0,0 +1,61 @@
+package beilv.system.mapper;
+
+import beilv.system.domain.SysMember;
+
+import java.util.List;
+
+/**
+ * 会员用户信息Mapper接口
+ *
+ * @author ruoyi
+ * @date 2025-01-02
+ */
+public interface SysMemberMapper {
+    /**
+     * 查询会员用户信息
+     *
+     * @param id 会员用户信息主键
+     * @return 会员用户信息
+     */
+    public SysMember selectSysMemberById(Long id);
+
+    /**
+     * 查询会员用户信息列表
+     *
+     * @param sysMember 会员用户信息
+     * @return 会员用户信息集合
+     */
+    public List<SysMember> selectSysMemberList(SysMember sysMember);
+
+    /**
+     * 新增会员用户信息
+     *
+     * @param sysMember 会员用户信息
+     * @return 结果
+     */
+    public int insertSysMember(SysMember sysMember);
+
+    /**
+     * 修改会员用户信息
+     *
+     * @param sysMember 会员用户信息
+     * @return 结果
+     */
+    public int updateSysMember(SysMember sysMember);
+
+    /**
+     * 删除会员用户信息
+     *
+     * @param id 会员用户信息主键
+     * @return 结果
+     */
+    public int deleteSysMemberById(Long id);
+
+    /**
+     * 批量删除会员用户信息
+     *
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteSysMemberByIds(String[] ids);
+}

+ 75 - 0
qmjszx-system/src/main/java/beilv/system/mapper/SysUserBillMapper.java

@@ -0,0 +1,75 @@
+package beilv.system.mapper;
+
+import java.math.BigDecimal;
+import java.util.List;
+import beilv.system.domain.SysUserBill;
+
+/**
+ * 用户积分流水Mapper接口
+ * 
+ * @author ruoyi
+ * @date 2024-12-31
+ */
+public interface SysUserBillMapper 
+{
+    /**
+     * 查询用户积分流水
+     * 
+     * @param id 用户积分流水主键
+     * @return 用户积分流水
+     */
+    public SysUserBill selectSysUserBillById(Long id);
+
+    /**
+     * 查询用户积分流水列表
+     * 
+     * @param sysUserBill 用户积分流水
+     * @return 用户积分流水集合
+     */
+    public List<SysUserBill> selectSysUserBillList(SysUserBill sysUserBill);
+
+    /**
+     * 新增用户积分流水
+     * 
+     * @param sysUserBill 用户积分流水
+     * @return 结果
+     */
+    public int insertSysUserBill(SysUserBill sysUserBill);
+
+    /**
+     * 修改用户积分流水
+     * 
+     * @param sysUserBill 用户积分流水
+     * @return 结果
+     */
+    public int updateSysUserBill(SysUserBill sysUserBill);
+
+    /**
+     * 删除用户积分流水
+     * 
+     * @param id 用户积分流水主键
+     * @return 结果
+     */
+    public int deleteSysUserBillById(Long id);
+
+    /**
+     * 批量删除用户积分流水
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteSysUserBillByIds(String[] ids);
+
+
+    /**
+     * 增加收入流水
+     *
+     * @param userId   userId
+     * @param title    账单标题
+     * @param number   明细数字
+     * @param balance  剩余
+     * @param remark     备注
+     */
+    void income(Long userId, String title, BigDecimal number,
+                BigDecimal balance, String remark);
+}

+ 71 - 0
qmjszx-system/src/main/java/beilv/system/service/ISysMemberService.java

@@ -0,0 +1,71 @@
+package beilv.system.service;
+
+import beilv.system.domain.SysMember;
+import beilv.system.domain.dto.SysMemberDTO;
+
+import java.util.List;
+
+/**
+ * 会员用户信息Service接口
+ *
+ * @author ruoyi
+ * @date 2025-01-02
+ */
+public interface ISysMemberService {
+    /**
+     * 查询会员用户信息
+     *
+     * @param id 会员用户信息主键
+     * @return 会员用户信息
+     */
+    public SysMember selectSysMemberById(Long id);
+
+    /**
+     * 查询会员用户信息列表
+     *
+     * @param sysMember 会员用户信息
+     * @return 会员用户信息集合
+     */
+    public List<SysMember> selectSysMemberList(SysMember sysMember);
+
+    /**
+     * 新增会员用户信息
+     *
+     * @param sysMember 会员用户信息
+     * @return 结果
+     */
+    public int insertSysMember(SysMember sysMember);
+
+    /**
+     * 修改会员用户信息
+     *
+     * @param sysMember 会员用户信息
+     * @return 结果
+     */
+    public int updateSysMember(SysMember sysMember);
+
+    /**
+     * 批量删除会员用户信息
+     *
+     * @param ids 需要删除的会员用户信息主键集合
+     * @return 结果
+     */
+    public int deleteSysMemberByIds(String ids);
+
+    /**
+     * 删除会员用户信息信息
+     *
+     * @param id 会员用户信息主键
+     * @return 结果
+     */
+    public int deleteSysMemberById(Long id);
+
+
+    /**
+     * 用户积分兑换商品
+     *
+     * @param dto 会员用户信息
+     * @return 结果
+     */
+    int exchange(SysMemberDTO dto);
+}

+ 84 - 0
qmjszx-system/src/main/java/beilv/system/service/ISysUserBillService.java

@@ -0,0 +1,84 @@
+package beilv.system.service;
+
+import beilv.system.domain.SysUserBill;
+
+import java.math.BigDecimal;
+import java.util.List;
+
+/**
+ * 用户积分流水Service接口
+ *
+ * @author ruoyi
+ * @date 2024-12-31
+ */
+public interface ISysUserBillService {
+    /**
+     * 查询用户积分流水
+     *
+     * @param id 用户积分流水主键
+     * @return 用户积分流水
+     */
+    public SysUserBill selectSysUserBillById(Long id);
+
+    /**
+     * 查询用户积分流水列表
+     *
+     * @param sysUserBill 用户积分流水
+     * @return 用户积分流水集合
+     */
+    public List<SysUserBill> selectSysUserBillList(SysUserBill sysUserBill);
+
+    /**
+     * 新增用户积分流水
+     *
+     * @param sysUserBill 用户积分流水
+     * @return 结果
+     */
+    public int insertSysUserBill(SysUserBill sysUserBill);
+
+    /**
+     * 修改用户积分流水
+     *
+     * @param sysUserBill 用户积分流水
+     * @return 结果
+     */
+    public int updateSysUserBill(SysUserBill sysUserBill);
+
+    /**
+     * 批量删除用户积分流水
+     *
+     * @param ids 需要删除的用户积分流水主键集合
+     * @return 结果
+     */
+    public int deleteSysUserBillByIds(String ids);
+
+    /**
+     * 删除用户积分流水信息
+     *
+     * @param id 用户积分流水主键
+     * @return 结果
+     */
+    public int deleteSysUserBillById(Long id);
+
+    /**
+     * 增加收入流水
+     *
+     * @param userId  userId
+     * @param title   账单标题
+     * @param number  明细数字
+     * @param balance 剩余
+     * @param remark  备注
+     */
+    void income(Long userId, String title, BigDecimal number, BigDecimal balance, String remark);
+
+    /**
+     * 增加支出流水
+     *
+     * @param userId  userId
+     * @param title   账单标题
+     * @param number  明细数字
+     * @param balance 剩余
+     * @param remark  备注
+     */
+    void expend(Long userId, String title, BigDecimal number, BigDecimal balance, String remark);
+}

+ 109 - 0
qmjszx-system/src/main/java/beilv/system/service/impl/SysMemberServiceImpl.java

@@ -0,0 +1,109 @@
+package beilv.system.service.impl;
+
+import beilv.common.core.text.Convert;
+import beilv.common.utils.DateUtils;
+import beilv.system.domain.SysMember;
+import beilv.system.domain.dto.SysMemberDTO;
+import beilv.system.mapper.SysMemberMapper;
+import beilv.system.service.ISysMemberService;
+import beilv.system.service.ISysUserBillService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.math.BigDecimal;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 会员用户信息Service业务层处理
+ *
+ * @author ruoyi
+ * @date 2025-01-02
+ */
+@Service
+public class SysMemberServiceImpl implements ISysMemberService {
+    @Autowired
+    private SysMemberMapper sysMemberMapper;
+    @Autowired
+    private ISysUserBillService sysUserBillService;
+
+    /**
+     * 查询会员用户信息
+     *
+     * @param id 会员用户信息主键
+     * @return 会员用户信息
+     */
+    @Override
+    public SysMember selectSysMemberById(Long id) {
+        return sysMemberMapper.selectSysMemberById(id);
+    }
+
+    /**
+     * 查询会员用户信息列表
+     *
+     * @param sysMember 会员用户信息
+     * @return 会员用户信息
+     */
+    @Override
+    public List<SysMember> selectSysMemberList(SysMember sysMember) {
+        return sysMemberMapper.selectSysMemberList(sysMember);
+    }
+
+    /**
+     * 新增会员用户信息
+     *
+     * @param sysMember 会员用户信息
+     * @return 结果
+     */
+    @Override
+    public int insertSysMember(SysMember sysMember) {
+        sysMember.setCreateTime(DateUtils.getNowDate());
+        return sysMemberMapper.insertSysMember(sysMember);
+    }
+
+    /**
+     * 修改会员用户信息
+     *
+     * @param sysMember 会员用户信息
+     * @return 结果
+     */
+    @Override
+    public int updateSysMember(SysMember sysMember) {
+        sysMember.setUpdateTime(DateUtils.getNowDate());
+        return sysMemberMapper.updateSysMember(sysMember);
+    }
+
+    /**
+     * 批量删除会员用户信息
+     *
+     * @param ids 需要删除的会员用户信息主键
+     * @return 结果
+     */
+    @Override
+    public int deleteSysMemberByIds(String ids) {
+        return sysMemberMapper.deleteSysMemberByIds(Convert.toStrArray(ids));
+    }
+
+    /**
+     * 删除会员用户信息信息
+     *
+     * @param id 会员用户信息主键
+     * @return 结果
+     */
+    @Override
+    public int deleteSysMemberById(Long id) {
+        return sysMemberMapper.deleteSysMemberById(id);
+    }
+
+    @Override
+    public int exchange(SysMemberDTO dto) {
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+        Date date = new Date();
+        SysMember sysMember = sysMemberMapper.selectSysMemberById(dto.getId());
+        BigDecimal surplusIntegral = sysMember.getIntegral().subtract(dto.getIntegral());
+        sysUserBillService.expend(dto.getId(), "会员兑换", dto.getIntegral(), surplusIntegral, sdf.format(date) + "消耗" + dto.getIntegral() + "积分," + "兑换" + dto.getGiftName() + "成功");
+        sysMember.setIntegral(surplusIntegral);
+        return sysMemberMapper.updateSysMember(sysMember);
+    }
+}

+ 140 - 0
qmjszx-system/src/main/java/beilv/system/service/impl/SysUserBillServiceImpl.java

@@ -0,0 +1,140 @@
+package beilv.system.service.impl;
+
+import beilv.common.core.text.Convert;
+import beilv.common.utils.DateUtils;
+import beilv.system.domain.SysUserBill;
+import beilv.system.mapper.SysUserBillMapper;
+import beilv.system.service.ISysUserBillService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.math.BigDecimal;
+import java.util.List;
+
+/**
+ * 用户积分流水Service业务层处理
+ *
+ * @author ruoyi
+ * @date 2024-12-31
+ */
+@Service
+public class SysUserBillServiceImpl implements ISysUserBillService {
+    @Autowired
+    private SysUserBillMapper sysUserBillMapper;
+
+    /**
+     * 查询用户积分流水
+     *
+     * @param id 用户积分流水主键
+     * @return 用户积分流水
+     */
+    @Override
+    public SysUserBill selectSysUserBillById(Long id) {
+        return sysUserBillMapper.selectSysUserBillById(id);
+    }
+
+    /**
+     * 查询用户积分流水列表
+     *
+     * @param sysUserBill 用户积分流水
+     * @return 用户积分流水
+     */
+    @Override
+    public List<SysUserBill> selectSysUserBillList(SysUserBill sysUserBill) {
+        return sysUserBillMapper.selectSysUserBillList(sysUserBill);
+    }
+
+    /**
+     * 新增用户积分流水
+     *
+     * @param sysUserBill 用户积分流水
+     * @return 结果
+     */
+    @Override
+    public int insertSysUserBill(SysUserBill sysUserBill) {
+        sysUserBill.setCreateTime(DateUtils.getNowDate());
+        return sysUserBillMapper.insertSysUserBill(sysUserBill);
+    }
+
+    /**
+     * 修改用户积分流水
+     *
+     * @param sysUserBill 用户积分流水
+     * @return 结果
+     */
+    @Override
+    public int updateSysUserBill(SysUserBill sysUserBill) {
+        sysUserBill.setUpdateTime(DateUtils.getNowDate());
+        return sysUserBillMapper.updateSysUserBill(sysUserBill);
+    }
+
+    /**
+     * 批量删除用户积分流水
+     *
+     * @param ids 需要删除的用户积分流水主键
+     * @return 结果
+     */
+    @Override
+    public int deleteSysUserBillByIds(String ids) {
+        return sysUserBillMapper.deleteSysUserBillByIds(Convert.toStrArray(ids));
+    }
+
+    /**
+     * 删除用户积分流水信息
+     *
+     * @param id 用户积分流水主键
+     * @return 结果
+     */
+    @Override
+    public int deleteSysUserBillById(Long id) {
+        return sysUserBillMapper.deleteSysUserBillById(id);
+    }
+
+    /**
+     * 增加收入流水
+     *
+     * @param userId   userId
+     * @param title    账单标题
+     * @param number   明细数字
+     * @param balance  剩余
+     * @param remark   备注
+     */
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public void income(Long userId, String title, BigDecimal number, BigDecimal balance, String remark) {
+        SysUserBill userBill = SysUserBill.builder()
+                .userId(userId)
+                .title(title)
+                .number(number)
+                .balance(balance)
+                .pm(1)
+                .remark(remark)
+                .build();
+        sysUserBillMapper.insertSysUserBill(userBill);
+    }
+
+    /**
+     * 增加支出流水
+     *
+     * @param userId  userId
+     * @param title   账单标题
+     * @param number  明细数字
+     * @param balance 剩余
+     * @param remark  备注
+     */
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public void expend(Long userId, String title, BigDecimal number, BigDecimal balance, String remark) {
+        SysUserBill userBill = SysUserBill.builder()
+                .userId(userId)
+                .title(title)
+                .number(number)
+                .balance(balance)
+                .pm(0)
+                .remark(remark)
+                .build();
+        sysUserBillMapper.insertSysUserBill(userBill);
+    }
+
+}

+ 172 - 0
qmjszx-system/src/main/resources/mapper/system/SysMemberMapper.xml

@@ -0,0 +1,172 @@
+<?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.SysMemberMapper">
+    
+    <resultMap type="SysMember" id="SysMemberResult">
+        <result property="id"    column="id"    />
+        <result property="username"    column="username"    />
+        <result property="password"    column="password"    />
+        <result property="realName"    column="real_name"    />
+        <result property="sex"    column="sex"    />
+        <result property="birthday"    column="birthday"    />
+        <result property="cardId"    column="card_id"    />
+        <result property="avatar"    column="avatar"    />
+        <result property="mobile"    column="mobile"    />
+        <result property="loginDate"    column="login_date"    />
+        <result property="loginIp"    column="login_ip"    />
+        <result property="registerIp"    column="register_ip"    />
+        <result property="addIp"    column="add_ip"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="lastIp"    column="last_ip"    />
+        <result property="integral"    column="integral"    />
+        <result property="status"    column="status"    />
+        <result property="userType"    column="user_type"    />
+        <result property="loginType"    column="login_type"    />
+        <result property="wxProfile"    column="wx_profile"    />
+        <result property="delFlag"    column="del_flag"    />
+        <result property="openId"    column="open_id"    />
+        <result property="routineOpenId"    column="routine_open_id"    />
+    </resultMap>
+
+    <sql id="selectSysMemberVo">
+        select id, username, password, real_name, sex, birthday, card_id, avatar, mobile, login_date, login_ip, register_ip, add_ip, create_by, create_time, update_by, update_time, last_ip, integral, status, user_type, login_type, wx_profile, del_flag, open_id, routine_open_id from sys_member
+    </sql>
+
+    <select id="selectSysMemberList" parameterType="SysMember" resultMap="SysMemberResult">
+        <include refid="selectSysMemberVo"/>
+        <where>  
+            <if test="username != null  and username != ''"> and username like concat('%', #{username}, '%')</if>
+            <if test="password != null  and password != ''"> and password = #{password}</if>
+            <if test="realName != null  and realName != ''"> and real_name like concat('%', #{realName}, '%')</if>
+            <if test="sex != null "> and sex = #{sex}</if>
+            <if test="birthday != null "> and birthday = #{birthday}</if>
+            <if test="cardId != null  and cardId != ''"> and card_id = #{cardId}</if>
+            <if test="avatar != null  and avatar != ''"> and avatar = #{avatar}</if>
+            <if test="mobile != null  and mobile != ''"> and mobile = #{mobile}</if>
+            <if test="loginDate != null "> and login_date = #{loginDate}</if>
+            <if test="loginIp != null  and loginIp != ''"> and login_ip = #{loginIp}</if>
+            <if test="registerIp != null  and registerIp != ''"> and register_ip = #{registerIp}</if>
+            <if test="addIp != null  and addIp != ''"> and add_ip = #{addIp}</if>
+            <if test="lastIp != null  and lastIp != ''"> and last_ip = #{lastIp}</if>
+            <if test="integral != null "> and integral = #{integral}</if>
+            <if test="status != null "> and status = #{status}</if>
+            <if test="userType != null  and userType != ''"> and user_type = #{userType}</if>
+            <if test="loginType != null  and loginType != ''"> and login_type = #{loginType}</if>
+            <if test="wxProfile != null  and wxProfile != ''"> and wx_profile = #{wxProfile}</if>
+            <if test="openId != null  and openId != ''"> and open_id = #{openId}</if>
+            <if test="routineOpenId != null  and routineOpenId != ''"> and routine_open_id = #{routineOpenId}</if>
+        </where>
+    </select>
+    
+    <select id="selectSysMemberById" parameterType="Long" resultMap="SysMemberResult">
+        <include refid="selectSysMemberVo"/>
+        where id = #{id}
+    </select>
+
+    <insert id="insertSysMember" parameterType="SysMember" useGeneratedKeys="true" keyProperty="id">
+        insert into sys_member
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="username != null">username,</if>
+            <if test="password != null">password,</if>
+            <if test="realName != null">real_name,</if>
+            <if test="sex != null">sex,</if>
+            <if test="birthday != null">birthday,</if>
+            <if test="cardId != null">card_id,</if>
+            <if test="avatar != null">avatar,</if>
+            <if test="mobile != null">mobile,</if>
+            <if test="loginDate != null">login_date,</if>
+            <if test="loginIp != null">login_ip,</if>
+            <if test="registerIp != null">register_ip,</if>
+            <if test="addIp != null">add_ip,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="updateTime != null">update_time,</if>
+            <if test="lastIp != null">last_ip,</if>
+            <if test="integral != null">integral,</if>
+            <if test="status != null">status,</if>
+            <if test="userType != null and userType != ''">user_type,</if>
+            <if test="loginType != null and loginType != ''">login_type,</if>
+            <if test="wxProfile != null">wx_profile,</if>
+            <if test="delFlag != null">del_flag,</if>
+            <if test="openId != null">open_id,</if>
+            <if test="routineOpenId != null">routine_open_id,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="username != null">#{username},</if>
+            <if test="password != null">#{password},</if>
+            <if test="realName != null">#{realName},</if>
+            <if test="sex != null">#{sex},</if>
+            <if test="birthday != null">#{birthday},</if>
+            <if test="cardId != null">#{cardId},</if>
+            <if test="avatar != null">#{avatar},</if>
+            <if test="mobile != null">#{mobile},</if>
+            <if test="loginDate != null">#{loginDate},</if>
+            <if test="loginIp != null">#{loginIp},</if>
+            <if test="registerIp != null">#{registerIp},</if>
+            <if test="addIp != null">#{addIp},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="lastIp != null">#{lastIp},</if>
+            <if test="integral != null">#{integral},</if>
+            <if test="status != null">#{status},</if>
+            <if test="userType != null and userType != ''">#{userType},</if>
+            <if test="loginType != null and loginType != ''">#{loginType},</if>
+            <if test="wxProfile != null">#{wxProfile},</if>
+            <if test="delFlag != null">#{delFlag},</if>
+            <if test="openId != null">#{openId},</if>
+            <if test="routineOpenId != null">#{routineOpenId},</if>
+         </trim>
+    </insert>
+
+    <update id="updateSysMember" parameterType="SysMember">
+        update sys_member
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="username != null">username = #{username},</if>
+            <if test="password != null">password = #{password},</if>
+            <if test="realName != null">real_name = #{realName},</if>
+            <if test="sex != null">sex = #{sex},</if>
+            <if test="birthday != null">birthday = #{birthday},</if>
+            <if test="cardId != null">card_id = #{cardId},</if>
+            <if test="avatar != null">avatar = #{avatar},</if>
+            <if test="mobile != null">mobile = #{mobile},</if>
+            <if test="loginDate != null">login_date = #{loginDate},</if>
+            <if test="loginIp != null">login_ip = #{loginIp},</if>
+            <if test="registerIp != null">register_ip = #{registerIp},</if>
+            <if test="addIp != null">add_ip = #{addIp},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="lastIp != null">last_ip = #{lastIp},</if>
+            <if test="integral != null">integral = #{integral},</if>
+            <if test="status != null">status = #{status},</if>
+            <if test="userType != null and userType != ''">user_type = #{userType},</if>
+            <if test="loginType != null and loginType != ''">login_type = #{loginType},</if>
+            <if test="wxProfile != null">wx_profile = #{wxProfile},</if>
+            <if test="delFlag != null">del_flag = #{delFlag},</if>
+            <if test="openId != null">open_id = #{openId},</if>
+            <if test="routineOpenId != null">routine_open_id = #{routineOpenId},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteSysMemberById" parameterType="Long">
+        delete from sys_member where id = #{id}
+    </delete>
+
+    <delete id="deleteSysMemberByIds" parameterType="String">
+        delete from sys_member where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+
+</mapper>

+ 127 - 0
qmjszx-system/src/main/resources/mapper/system/SysUserBillMapper.xml

@@ -0,0 +1,127 @@
+<?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.SysUserBillMapper">
+
+    <resultMap type="SysUserBill" id="SysUserBillResult">
+        <result property="id" column="id"/>
+        <result property="userId" column="user_id"/>
+        <result property="pm" column="pm"/>
+        <result property="title" column="title"/>
+        <result property="number" column="number"/>
+        <result property="balance" column="balance"/>
+        <result property="useCategory" column="use_category"/>
+        <result property="remark" column="remark"/>
+        <result property="status" column="status"/>
+        <result property="createBy" column="create_by"/>
+        <result property="createTime" column="create_time"/>
+        <result property="updateBy" column="update_by"/>
+        <result property="updateTime" column="update_time"/>
+        <result property="delFlag" column="del_flag"/>
+    </resultMap>
+
+    <sql id="selectSysUserBillVo">
+        select id,
+               user_id,
+               pm,
+               title,
+               number,
+               balance,
+               use_category,
+               remark,
+               status,
+               create_by,
+               create_time,
+               update_by,
+               update_time,
+               del_flag
+        from sys_user_bill
+    </sql>
+
+    <select id="selectSysUserBillList" parameterType="SysUserBill" resultMap="SysUserBillResult">
+        <include refid="selectSysUserBillVo"/>
+        <where>
+            <if test="userId != null ">and user_id = #{userId}</if>
+            <if test="pm != null ">and pm = #{pm}</if>
+            <if test="title != null  and title != ''">and title = #{title}</if>
+            <if test="number != null ">and number = #{number}</if>
+            <if test="balance != null ">and balance = #{balance}</if>
+            <if test="useCategory != null  and useCategory != ''">and use_category = #{useCategory}</if>
+            <if test="status != null ">and status = #{status}</if>
+        </where>
+    </select>
+
+    <select id="selectSysUserBillById" parameterType="Long" resultMap="SysUserBillResult">
+        <include refid="selectSysUserBillVo"/>
+        where id = #{id}
+    </select>
+
+    <insert id="insertSysUserBill" parameterType="SysUserBill" useGeneratedKeys="true" keyProperty="id">
+        insert into sys_user_bill
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="userId != null">user_id,</if>
+            <if test="pm != null">pm,</if>
+            <if test="title != null and title != ''">title,</if>
+            <if test="number != null">number,</if>
+            <if test="balance != null">balance,</if>
+            <if test="useCategory != null">use_category,</if>
+            <if test="remark != null and remark != ''">remark,</if>
+            <if test="status != null">status,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="updateTime != null">update_time,</if>
+            <if test="delFlag != null">del_flag,</if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="userId != null">#{userId},</if>
+            <if test="pm != null">#{pm},</if>
+            <if test="title != null and title != ''">#{title},</if>
+            <if test="number != null">#{number},</if>
+            <if test="balance != null">#{balance},</if>
+            <if test="useCategory != null">#{useCategory},</if>
+            <if test="remark != null and remark != ''">#{remark},</if>
+            <if test="status != null">#{status},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="delFlag != null">#{delFlag},</if>
+        </trim>
+    </insert>
+
+    <update id="updateSysUserBill" parameterType="SysUserBill">
+        update sys_user_bill
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="userId != null">user_id = #{userId},</if>
+            <if test="pm != null">pm = #{pm},</if>
+            <if test="title != null and title != ''">title = #{title},</if>
+            <if test="number != null">number = #{number},</if>
+            <if test="balance != null">balance = #{balance},</if>
+            <if test="useCategory != null">use_category = #{useCategory},</if>
+            <if test="remark != null and remark != ''">remark = #{remark},</if>
+            <if test="status != null">status = #{status},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="delFlag != null">del_flag = #{delFlag},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteSysUserBillById" parameterType="Long">
+        delete
+        from sys_user_bill
+        where id = #{id}
+    </delete>
+
+    <delete id="deleteSysUserBillByIds" parameterType="String">
+        delete from sys_user_bill where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+
+</mapper>