فهرست منبع

Merge remote-tracking branch 'origin/master'

bihuisong 5 ماه پیش
والد
کامیت
19f384f6af
18فایلهای تغییر یافته به همراه629 افزوده شده و 274 حذف شده
  1. 18 0
      qmjszx-admin/src/main/resources/static/ruoyi/js/ry-ui.js
  2. 161 173
      qmjszx-admin/src/main/resources/templates/competition/add.html
  3. 24 33
      qmjszx-admin/src/main/resources/templates/competition/competition.html
  4. 32 50
      qmjszx-admin/src/main/resources/templates/competition/edit.html
  5. 3 1
      qmjszx-admin/src/main/resources/templates/login.html
  6. 6 0
      qmjszx-business/src/main/java/beilv/competition/controller/CompetitionController.java
  7. 28 14
      qmjszx-business/src/main/java/beilv/competition/domain/Competition.java
  8. 2 0
      qmjszx-business/src/main/java/beilv/competition/mapper/CompetitionMapper.java
  9. 2 0
      qmjszx-business/src/main/java/beilv/competition/service/ICompetitionService.java
  10. 7 2
      qmjszx-business/src/main/java/beilv/competition/service/impl/CompetitionServiceImpl.java
  11. 70 0
      qmjszx-business/src/main/java/beilv/stadium/controller/StadiumController.java
  12. 60 0
      qmjszx-business/src/main/java/beilv/stadium/domain/Stadium.java
  13. 15 0
      qmjszx-business/src/main/java/beilv/stadium/domain/StadiumBO.java
  14. 17 0
      qmjszx-business/src/main/java/beilv/stadium/mapper/StadiumMapper.java
  15. 20 0
      qmjszx-business/src/main/java/beilv/stadium/service/IStadiumService.java
  16. 73 0
      qmjszx-business/src/main/java/beilv/stadium/service/impl/StadiumServiceImpl.java
  17. 9 1
      qmjszx-business/src/main/resources/mapper/competition/CompetitionMapper.xml
  18. 82 0
      qmjszx-business/src/main/resources/mapper/stadium/StadiumMapper.xml

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

@@ -1144,6 +1144,10 @@ var table = {
                 table.set();
                 $.modal.open("添加" + table.options.modalName, $.operate.addUrl(id));
             },
+            addToSet: function(id, width, height){
+              table.set();
+              $.modal.openFull("添加" + table.options.modalName, $.operate.addUrl(id), width, height)
+            },
             // 添加信息,以tab页展现
             addTab: function (id) {
                 table.set();
@@ -1191,6 +1195,20 @@ var table = {
                         return;
                     }
                     var url = table.options.updateUrl.replace("{id}", row[table.options.uniqueId]);
+                    $.modal.openFull("修改" + table.options.modalName, url);
+                } else {
+                    $.modal.openFull("修改" + table.options.modalName, $.operate.editUrl(id));
+                }
+            },
+            editToSet: function(id){
+                table.set();
+                if ($.common.isEmpty(id) && table.options.type == table_type.bootstrapTreeTable) {
+                    var row = $("#" + table.options.id).bootstrapTreeTable('getSelections')[0];
+                    if ($.common.isEmpty(row)) {
+                        $.modal.alertWarning("请至少选择一条记录");
+                        return;
+                    }
+                    var url = table.options.updateUrl.replace("{id}", row[table.options.uniqueId]);
                     $.modal.open("修改" + table.options.modalName, url);
                 } else {
                     $.modal.open("修改" + table.options.modalName, $.operate.editUrl(id));

+ 161 - 173
qmjszx-admin/src/main/resources/templates/competition/add.html

@@ -1,211 +1,199 @@
 <!DOCTYPE html>
-<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
+<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 :: summernote-css" />
+    <th:block th:include="include :: header('新增赛事发布')"/>
+    <th:block th:include="include :: datetimepicker-css"/>
+    <th:block th:include="include :: summernote-css"/>
 </head>
 <body class="white-bg">
-    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
-        <form class="form-horizontal m" id="form-competition-add">
-            <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="competitionTitle" class="form-control" type="text" placeholder="请输入活动标题" required>
-                    </div>
+<div class="wrapper wrapper-content animated fadeInRight ibox-content" >
+    <form class="form-horizontal m" id="form-competition-add">
+        <div class="col-xs-12">
+            <div class="form-group">
+                <label class="col-sm-2 control-label is-required">赛事标题:</label>
+                <div class="col-sm-4">
+                    <input name="competitionTitle" class="form-control" type="text" placeholder="请输入赛事标题"
+                           required>
                 </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">
-                        <select name="competitionType" class="form-control" th:with="type=${@dict.getType('competition_type')}" required>
-                            <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
-                        </select>
-                    </div>
+                <label class="col-sm-2 control-label is-required">赛事类型:</label>
+                <div class="col-sm-4">
+                    <select name="competitionType" class="form-control"
+                            th:with="type=${@dict.getType('competition_type')}" required>
+                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}"
+                                th:value="${dict.dictValue}"></option>
+                    </select>
                 </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="personMax" class="form-control" type="text" placeholder="请输入团队最大人数" min="1" required>
-                    </div>
+        </div>
+        <div class="col-xs-12">
+            <div class="form-group">
+                <label class="col-sm-2 control-label is-required">最大人数/团队数:</label>
+                <div class="col-sm-4">
+                    <input name="teamMax" class="form-control" type="number" placeholder="请输入最大人数或团队数"
+                           required>
                 </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="teamMax" class="form-control" type="text" placeholder="请输入最大团队数" required>
-                    </div>
+                <label class="col-sm-2 control-label">场地:</label>
+                <div class="col-sm-4">
+                    <input name="competitionPlace" class="form-control" type="text" placeholder="请输入场地名称">
                 </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="competitionPlace" class="form-control" type="text" placeholder="请输入场地名称或编号" required>
-                    </div>
+        </div>
+        <div class="col-xs-12">
+            <div class="form-group">
+                <label class="col-sm-2 control-label is-required">报名费用:</label>
+                <div class="col-sm-4">
+                    <input name="competitionExpense" class="form-control" type="number" placeholder="请输入报名费用"
+                           required>
                 </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">
-                        <div class="input-group date">
-                            <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
-                            <input name="applyStartTime" type="text" class="form-control" id="applyStartTime" placeholder="年-月-日 时:分" required>
-                        </div>
-                    </div>
+                <label class="col-sm-2 control-label is-required">观看费用:</label>
+                <div class="col-sm-4">
+                    <input name="viewingTicket" class="form-control" type="number" placeholder="请输入观看费用"
+                           required>
                 </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">
-                        <div class="input-group date">
-                            <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
-                            <input name="applyEndTime" type="text" class="form-control" id="applyEndTime" placeholder="年-月-日 时:分" required>
-                        </div>
+        </div>
+        <div class="col-xs-12">
+            <div class="form-group">
+                <label class="col-sm-2 control-label is-required">赛事开始时间:</label>
+                <div class="col-sm-4">
+                    <div class="input-group date">
+                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
+                        <input name="applyStartTime" type="text" class="form-control" id="applyStartTime"
+                               placeholder="年-月-日 时:分" 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">
-                        <select name="applyBeforeTime" class="form-control">
-                            <option value="1">赛事开始前1小时</option>
-                            <option value="2">赛事开始前2小时</option>
-                            <option value="3">赛事开始前3小时</option>
-                            <option value="6">赛事开始前6小时</option>
-                            <option value="12">赛事开始前12小时</option>
-                            <option value="24">赛事开始前24小时</option>
-                            <option value="48">赛事开始前48小时</option>
-                        </select>
+                <label class="col-sm-2 control-label">赛事结束时间:</label>
+                <div class="col-sm-4">
+                    <div class="input-group date">
+                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
+                        <input name="applyEndTime" type="text" class="form-control" id="applyEndTime"
+                               placeholder="年-月-日 时:分">
                     </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="competitionExpense" class="form-control" type="text" required>
-                    </div>
+        </div>
+        <div class="col-xs-12">
+            <div class="form-group">
+                <label class="col-sm-2 control-label is-required">取消报名截至时间:</label>
+                <div class="col-sm-4">
+                    <select name="applyBeforeTime" class="form-control" required>
+                        <option value="1">赛事开始前1小时</option>
+                        <option value="2">赛事开始前2小时</option>
+                        <option value="3">赛事开始前3小时</option>
+                        <option value="6">赛事开始前6小时</option>
+                        <option value="12">赛事开始前12小时</option>
+                        <option value="24">赛事开始前24小时</option>
+                        <option value="48">赛事开始前48小时</option>
+                    </select>
                 </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" class="form-control" name="competitionDetails">
-                        <div class="summernote" id="competitionDetails"></div>
-                    </div>
+        </div>
+        <div class="col-xs-12">
+            <div class="form-group">
+                <label class="col-sm-2 control-label is-required">赛事详情:</label>
+                <div class="col-sm-4">
+                    <input type="hidden" class="form-control" name="competitionDetails" required>
+                    <div class="summernote" id="competitionDetails"></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" class="form-control" name="registrationNotes">
-                        <div class="summernote" id="registrationNotes"></div>
-                    </div>
+                <label class="col-sm-2 control-label">报名须知:</label>
+                <div class="col-sm-4">
+                    <input type="hidden" class="form-control" name="registrationNotes">
+                    <div class="summernote" id="registrationNotes"></div>
                 </div>
             </div>
-        </form>
-    </div>
-    <th:block th:include="include :: footer" />
-    <th:block th:include="include :: datetimepicker-js" />
-    <th:block th:include="include :: summernote-js" />
-    <script th:inline="javascript">
-        var prefix = ctx + "competition"
-        $("#form-competition-add").validate({
-            focusCleanup: true,
-            rules:{
-                personMax:{
-                    digits: true
-                },
-                teamMax:{
-                    digits: true
-                },
-                competitionExpense:{
-                    double: true
-                }
+        </div>
+    </form>
+</div>
+<th:block th:include="include :: footer"/>
+<th:block th:include="include :: datetimepicker-js"/>
+<th:block th:include="include :: summernote-js"/>
+<script th:inline="javascript">
+    var prefix = ctx + "competition"
+    $("#form-competition-add").validate({
+        focusCleanup: true,
+        rules: {
+            teamMax: {
+                digits: true
             },
-        });
-
-        function submitHandler() {
-            var applyStartTime = $('#applyStartTime').val()
-            var applyEndTime = $('#applyEndTime').val()
-            var currentTime = new Date().toISOString().slice(0, 16); // 当前时间,格式为 YYYY-MM-DD HH:MM
-
+            competitionExpense: {
+                double: true
+            },
+            competitionExpense: {
+                double: true
+            }
+        },
+    });
 
+    function submitHandler() {
+        var applyStartTime = $('#applyStartTime').val()
+        var applyEndTime = $('#applyEndTime').val()
+        var currentTime = new Date().toISOString().slice(0, 16); // 当前时间,格式为 YYYY-MM-DD HH:MM
 
-            if ($.validate.form()) {
 
-                // 检查赛事开始时间不能小于当前时间
-                if (applyStartTime < currentTime) {
-                    $.modal.alertWarning("赛事开始时间不能小于当前时间");
-                    return false;
-                }
+        if ($.validate.form()) {
 
-                // 检查赛事结束时间不能小于赛事开始时间
-                if (applyEndTime < applyStartTime) {
-                    $.modal.alertWarning("赛事结束时间不能小于赛事开始时间");
-                    return false;
-                }
+            // 检查赛事开始时间不能小于当前时间
+            if (applyStartTime < currentTime) {
+                $.modal.alertWarning("赛事开始时间不能小于当前时间");
+                return false;
+            }
 
-                $.operate.save(prefix + "/add", $('#form-competition-add').serialize());
+            // 检查赛事结束时间不能小于赛事开始时间
+            if (applyEndTime < applyStartTime) {
+                $.modal.alertWarning("赛事结束时间不能小于赛事开始时间");
+                return false;
             }
+
+            $.operate.save(prefix + "/add", $('#form-competition-add').serialize());
         }
+    }
 
-        $("input[name='applyStartTime']").datetimepicker({
-            format: "yyyy-mm-dd hh:ii",
-            autoclose: true
-        });
+    $("input[name='applyStartTime']").datetimepicker({
+        format: "yyyy-mm-dd hh:ii",
+        autoclose: true
+    });
 
-        $("input[name='applyEndTime']").datetimepicker({
-            format: "yyyy-mm-dd hh:ii",
-            autoclose: true
-        });
+    $("input[name='applyEndTime']").datetimepicker({
+        format: "yyyy-mm-dd hh:ii",
+        autoclose: true
+    });
 
-        $(function() {
-            $('.summernote').summernote({
-                lang: 'zh-CN',
-                dialogsInBody: true,
-                callbacks: {
-                    onChange: function(contents, $edittable) {
-                        $("input[name='" + this.id + "']").val(contents);
-                    },
-                    onImageUpload: function(files) {
-                        var obj = this;
-                    	var data = new FormData();
-                    	data.append("file", files[0]);
-                    	$.ajax({
-                            type: "post",
-                            url: ctx + "common/upload",
-                    		data: data,
-                    		cache: false,
-                    		contentType: false,
-                    		processData: false,
-                    		dataType: 'json',
-                    		success: function(result) {
-                    		    if (result.code == web_status.SUCCESS) {
-                    		        $('#' + obj.id).summernote('insertImage', result.url);
-                    		    } else {
-                    		        $.modal.alertError(result.msg);
-                    		    }
-                    		},
-                    		error: function(error) {
-                    		    $.modal.alertWarning("图片上传失败。");
-                    		}
-                    	});
-                    }
+    $(function () {
+        $('.summernote').summernote({
+            lang: 'zh-CN',
+            dialogsInBody: true,
+            height: 400,
+            callbacks: {
+                onChange: function (contents, $edittable) {
+                    $("input[name='" + this.id + "']").val(contents);
+                },
+                onImageUpload: function (files) {
+                    var obj = this;
+                    var data = new FormData();
+                    data.append("file", files[0]);
+                    $.ajax({
+                        type: "post",
+                        url: ctx + "common/upload",
+                        data: data,
+                        cache: false,
+                        contentType: false,
+                        processData: false,
+                        dataType: 'json',
+                        success: function (result) {
+                            if (result.code == web_status.SUCCESS) {
+                                $('#' + obj.id).summernote('insertImage', result.url);
+                            } else {
+                                $.modal.alertError(result.msg);
+                            }
+                        },
+                        error: function (error) {
+                            $.modal.alertWarning("图片上传失败。");
+                        }
+                    });
                 }
-            });
+            }
         });
-    </script>
+    });
+</script>
 </body>
 </html>

+ 24 - 33
qmjszx-admin/src/main/resources/templates/competition/competition.html

@@ -11,11 +11,11 @@
                 <div class="select-list">
                     <ul>
                         <li>
-                            <label>活动标题:</label>
+                            <label>赛事标题:</label>
                             <input type="text" name="competitionTitle" data-template="请输入活动标题"/>
                         </li>
                         <li>
-                            <label>活动类型:</label>
+                            <label>赛事类型:</label>
                             <select name="competitionType" th:with="type=${@dict.getType('competition_type')}">
                                 <option value="">所有</option>
                                 <option th:each="dict : ${type}" th:text="${dict.dictLabel}"
@@ -27,7 +27,7 @@
                             <input type="text" name="competitionPlace" template="请输入场地"/>
                         </li>
                         <li>
-                            <label>活动状态:</label>
+                            <label>赛事状态:</label>
                             <select name="competitionState" th:with="type=${@dict.getType('competition_state')}">
                                 <option value="">所有</option>
                                 <option th:each="dict : ${type}" th:text="${dict.dictLabel}"
@@ -46,8 +46,8 @@
         </div>
 
         <div class="btn-group-sm" id="toolbar" role="group">
-            <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:competition:add">
-                <i class="fa fa-plus"></i> 添加
+            <a class="btn btn-success" onclick="$.operate.addToSet()" shiro:hasPermission="system:competition:add">
+                <i class="fa fa-plus"></i> 新增
             </a>
         </div>
         <div class="col-sm-12 select-table table-striped">
@@ -72,10 +72,11 @@
             removeUrl: prefix + "/remove",
             publishUrl: prefix + "/publish",
             exportUrl: prefix + "/export",
-            modalName: "赛事发布",
-            columns: [{
-                checkbox: true
-            },
+            modalName: "赛事",
+            columns: [
+               /* {
+                    checkbox: false
+                },*/
                 {
                     field: 'id',
                     title: 'id',
@@ -83,22 +84,18 @@
                 },
                 {
                     field: 'competitionTitle',
-                    title: '活动标题'
+                    title: '赛事标题'
                 },
                 {
                     field: 'competitionType',
-                    title: '活动类型',
+                    title: '赛事类型',
                     formatter: function (value, row, index) {
                         return $.table.selectDictLabel(competitionTypeDatas, value);
                     }
                 },
                 {
-                    field: 'personMax',
-                    title: '团队最大人数'
-                },
-                {
                     field: 'teamMax',
-                    title: '最大团队数'
+                    title: '最大人数/团队数'
                 },
                 {
                     field: 'competitionPlace',
@@ -106,35 +103,29 @@
                 },
                 {
                     field: 'applyStartTime',
-                    title: '报名开始时间'
+                    title: '赛事开始时间'
                 },
                 {
                     field: 'applyEndTime',
-                    title: '报名结束时间'
+                    title: '赛事结束时间'
                 },
                 {
                     field: 'applyBeforeTime',
-                    title: '取消报名截至时间(活动开始前N小时可退款)'
-                },
-                {
-                    field: 'competitionMaximum',
-                    title: '活动上限人数'
+                    title: '取消报名截至时间',
+                    formatter: function (value, row, index) {
+                        return "赛事开始前"+value+"小时";
+                    }
                 },
                 {
                     field: 'competitionExpense',
-                    title: '活动费用(每人)'
-                },
-                /*{
-                    field: 'competitionDetails',
-                    title: '活动详情'
+                    title: '报名费用'
+                },{
+                    field: 'viewingTicket',
+                    title: '观看费用'
                 },
                 {
-                    field: 'registrationNotes',
-                    title: '报名须知'
-                },*/
-                {
                     field: 'competitionState',
-                    title: '活动状态',
+                    title: '赛事状态',
                     formatter: function (value, row, index) {
                         return $.table.selectDictLabel(competitionStateDatas, value);
                     }

+ 32 - 50
qmjszx-admin/src/main/resources/templates/competition/edit.html

@@ -11,16 +11,12 @@
             <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">活动标题:</label>
-                    <div class="col-sm-8">
+                    <label class="col-sm-2 control-label is-required">赛事标题:</label>
+                    <div class="col-sm-4">
                         <input name="competitionTitle" th:field="*{competitionTitle}" 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">
+                    <label class="col-sm-2 control-label is-required">赛事类型:</label>
+                    <div class="col-sm-4">
                         <select name="competitionType" class="form-control" th:with="type=${@dict.getType('competition_type')}">
                             <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{competitionType}"></option>
                         </select>
@@ -29,54 +25,50 @@
             </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="personMax" th:field="*{personMax}" 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">
+                    <label class="col-sm-2 control-label is-required">最大人数/团队数:</label>
+                    <div class="col-sm-4">
                         <input name="teamMax" th:field="*{teamMax}" class="form-control" type="text" required>
                     </div>
+                    <label class="col-sm-2 control-label">场地:</label>
+                    <div class="col-sm-4">
+                        <input name="competitionPlace" th:field="*{competitionPlace}" 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="competitionPlace" th:field="*{competitionPlace}" class="form-control" type="text" required>
+                    <label class="col-sm-2 control-label is-required">报名费用:</label>
+                    <div class="col-sm-4">
+                        <input name="competitionExpense" th:field="*{competitionExpense}" class="form-control" type="text" required>
+                    </div>
+                    <label class="col-sm-2 control-label is-required">观看费用:</label>
+                    <div class="col-sm-4">
+                        <input name="viewingTicket" th:field="*{viewingTicket}" 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">
+                    <label class="col-sm-2 control-label is-required">赛事开始时间:</label>
+                    <div class="col-sm-4">
                         <div class="input-group date">
                             <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
-                            <input name="applyStartTime" th:value="${#dates.format(competition.applyStartTime, 'yyyy-MM-dd HH:mm:ss')}" type="text" class="form-control" id="applyStartTime" placeholder="年-月-日 时:分" required>
+                            <input name="applyStartTime" th:value="${#dates.format(competition.applyStartTime, 'yyyy-MM-dd HH:mm')}" type="text" class="form-control" id="applyStartTime" placeholder="年-月-日 时:分" required>
                         </div>
                     </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">
+                    <label class="col-sm-2 control-label">赛事结束时间:</label>
+                    <div class="col-sm-4">
                         <div class="input-group date">
                             <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
-                            <input name="applyEndTime" th:value="${#dates.format(competition.applyEndTime, 'yyyy-MM-dd HH:mm:ss')}" type="text" class="form-control" id="applyEndTime" placeholder="年-月-日 时:分" required>
+                            <input name="applyEndTime" th:value="${#dates.format(competition.applyEndTime, 'yyyy-MM-dd HH:mm')}" type="text" class="form-control" id="applyEndTime" placeholder="年-月-日 时:分">
                         </div>
                     </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">
+                    <label class="col-sm-2 control-label is-required">取消报名截至时间:</label>
+                    <div class="col-sm-4">
                         <select th:field="*{applyBeforeTime}" name="applyBeforeTime" class="form-control">
                             <option value="1">赛事开始前1小时</option>
                             <option value="2">赛事开始前2小时</option>
@@ -89,27 +81,16 @@
                     </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="competitionExpense" th:field="*{competitionExpense}" 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 type="hidden" class="form-control" th:field="*{competitionDetails}">
+                    <label class="col-sm-2 control-label is-required">赛事详情:</label>
+                    <div class="col-sm-4">
+                        <input type="hidden" class="form-control" th:field="*{competitionDetails}" required>
                         <div class="summernote" id="competitionDetails"></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">
+                    <label class="col-sm-2 control-label">报名须知:</label>
+                    <div class="col-sm-4">
                         <input type="hidden" class="form-control" th:field="*{registrationNotes}">
                         <div class="summernote" id="registrationNotes"></div>
                     </div>
@@ -149,6 +130,7 @@
                 $('#' + this.id).summernote({
                     lang: 'zh-CN',
                     dialogsInBody: true,
+                    height: 400,
                     callbacks: {
                         onChange: function(contents, $edittable) {
                             $("input[name='" + this.id + "']").val(contents);

+ 3 - 1
qmjszx-admin/src/main/resources/templates/login.html

@@ -69,7 +69,9 @@
             </div>
         </div>
     </div>
-<script th:inline="javascript"> var ctx = [[@{/}]]; var captchaType = [[${captchaType}]]; var captchaEnabled = [[${captchaEnabled}]];</script>
+<script th:inline="javascript"> var ctx = [[@{/}]]; var captchaType = [[${captchaType}]]; var captchaEnabled = [[${captchaEnabled}]];
+console.log(ctx)
+</script>
 <!--[if lte IE 8]><script>window.location.href=ctx+'html/ie.html';</script><![endif]-->
 <!-- 全局js -->
 <script src="../static/js/jquery.min.js" th:src="@{/js/jquery.min.js}"></script>

+ 6 - 0
qmjszx-business/src/main/java/beilv/competition/controller/CompetitionController.java

@@ -135,4 +135,10 @@ public class CompetitionController extends BaseController {
     public AjaxResult close(String id){
         return toAjax(competitionService.closeCompetitionById(id));
     }
+
+    @GetMapping("/getCompetitionList")
+    @ResponseBody
+    public AjaxResult getCompetitionList(){
+        return AjaxResult.success(competitionService.getCompetitionList());
+    }
 }

+ 28 - 14
qmjszx-business/src/main/java/beilv/competition/domain/Competition.java

@@ -25,13 +25,13 @@ public class Competition extends BaseEntity {
     /**
      * 活动标题
      */
-    @Excel(name = "活动标题")
+    @Excel(name = "赛事标题")
     private String competitionTitle;
 
     /**
      * 活动类型
      */
-    @Excel(name = "活动类型")
+    @Excel(name = "赛事类型")
     private String competitionType;
 
     /**
@@ -43,51 +43,57 @@ public class Competition extends BaseEntity {
     /**
      * 最大团队数
      */
-    @Excel(name = "最大团队数")
+    @Excel(name = "赛事总人数/总团队数")
     private Integer teamMax;
 
     /**
      * 场地
      */
-    @Excel(name = "场地")
+    @Excel(name = "赛事场地")
     private String competitionPlace;
 
     /**
      * 报名开始时间
      */
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
-    @Excel(name = "报名开始时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm")
+    @Excel(name = "赛事开始时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm")
     private Date applyStartTime;
 
     /**
      * 报名结束时间
      */
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
-    @Excel(name = "报名结束时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm")
+    @Excel(name = "赛事结束时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm")
     private Date applyEndTime;
 
     /**
      * 取消报名截至时间(活动开始前N小时可退款)
      */
-    @Excel(name = "取消报名截至时间(活动开始前N小时可退款)")
+    @Excel(name = "取消报名截至时间")
     private Double applyBeforeTime;
 
     /**
      * 活动上限人数
      */
-    @Excel(name = "活动上限人数")
+    @Excel(name = "赛事上限人数")
     private Integer competitionMaximum;
 
     /**
      * 活动费用(每人)
      */
-    @Excel(name = "活动费用(每人)")
-    private Long competitionExpense;
+    @Excel(name = "赛事费用")
+    private Double competitionExpense;
+
+    /**
+     * 观看门票
+     */
+    @Excel(name = "观看门票")
+    private Double viewingTicket;
 
     /**
      * 活动详情
      */
-    @Excel(name = "活动详情")
+    @Excel(name = "赛事详情")
     private String competitionDetails;
 
     /**
@@ -99,7 +105,7 @@ public class Competition extends BaseEntity {
     /**
      * 活动状态
      */
-    @Excel(name = "活动状态")
+    @Excel(name = "赛事状态")
     private String competitionState;
 
     public void setId(Integer id) {
@@ -182,14 +188,22 @@ public class Competition extends BaseEntity {
         return competitionMaximum;
     }
 
-    public void setCompetitionExpense(Long competitionExpense) {
+    public void setCompetitionExpense(Double competitionExpense) {
         this.competitionExpense = competitionExpense;
     }
 
-    public Long getCompetitionExpense() {
+    public Double getCompetitionExpense() {
         return competitionExpense;
     }
 
+    public void setViewingTicket(Double viewingTicket) {
+        this.viewingTicket = viewingTicket;
+    }
+
+    public Double getViewingTicket() {
+        return viewingTicket;
+    }
+
     public void setCompetitionDetails(String competitionDetails) {
         this.competitionDetails = competitionDetails;
     }

+ 2 - 0
qmjszx-business/src/main/java/beilv/competition/mapper/CompetitionMapper.java

@@ -60,4 +60,6 @@ public interface CompetitionMapper {
     public int deleteCompetitionByIds(String[] ids);
 
     int publishCompetition(Competition competition);
+
+    List<Competition> getCompetitionList();
 }

+ 2 - 0
qmjszx-business/src/main/java/beilv/competition/service/ICompetitionService.java

@@ -63,4 +63,6 @@ public interface ICompetitionService {
     int publishCompetitionById(String id);
 
     int closeCompetitionById(String id);
+
+    List<Competition> getCompetitionList();
 }

+ 7 - 2
qmjszx-business/src/main/java/beilv/competition/service/impl/CompetitionServiceImpl.java

@@ -56,9 +56,9 @@ public class CompetitionServiceImpl implements ICompetitionService {
     @Override
     public int insertCompetition(Competition competition) {
         competition.setCompetitionState(DAI_FA_BU);
-        int a = competition.getPersonMax() != null ? competition.getPersonMax() : 0;
+        /*int a = competition.getPersonMax() != null ? competition.getPersonMax() : 0;
         int b = competition.getTeamMax() != null ? competition.getTeamMax() : 0;
-        competition.setCompetitionMaximum(a * b);
+        competition.setCompetitionMaximum(a * b);*/
         return competitionMapper.insertCompetition(competition);
     }
 
@@ -115,4 +115,9 @@ public class CompetitionServiceImpl implements ICompetitionService {
         competition.setCompetitionState(YI_GUAN_BI);
         return competitionMapper.publishCompetition(competition);
     }
+
+    @Override
+    public List<Competition> getCompetitionList() {
+        return competitionMapper.getCompetitionList();
+    }
 }

+ 70 - 0
qmjszx-business/src/main/java/beilv/stadium/controller/StadiumController.java

@@ -0,0 +1,70 @@
+package beilv.stadium.controller;
+
+import beilv.common.core.controller.BaseController;
+import beilv.common.core.domain.AjaxResult;
+import beilv.common.utils.uuid.IdUtils;
+import beilv.stadium.domain.Stadium;
+import beilv.stadium.domain.StadiumBO;
+import beilv.stadium.service.IStadiumService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+@RestController
+@RequestMapping("/stadium")
+public class StadiumController extends BaseController {
+
+    @Autowired
+    private IStadiumService stadiumService;
+
+
+
+    /**
+     * 添加订单
+     * 写入订单信息: 下单人id, 订单编号, 下单时间, 支付状态:待支付
+     * 调用者传递参数: 用户id, 联系人, 联系电话, 赛事id, 订单类型,
+     */
+    @PostMapping("/toBeStadium")
+    public AjaxResult addStadium(@RequestBody Stadium stadium) {
+        return toAjax(stadiumService.toBeStadium(stadium));
+    }
+
+    /**
+     * 通过订单id取消订单
+     * 调用者传递参数: 订单id,
+     * 注:  取消订单时在下单后没有支付时, 可以执行的操作. 如果已经支付了, 则需要调用申请退款接口
+     */
+    @PostMapping("/cancellStadium")
+    public AjaxResult cancellStadium(@RequestBody Stadium stadium){
+        return toAjax(stadiumService.cancellStadium(stadium));
+    }
+
+    /**
+     * 查询订单
+     * 调用者传递参数: 用户id, 订单状态, 订单类型
+     */
+    @GetMapping("/getStadiumList")
+    public AjaxResult getStadiumList(StadiumBO stadiumBO){
+        return AjaxResult.success(stadiumService.getStadiumList(stadiumBO));
+    }
+
+    /**
+     * 支付回调
+     * 调用着传递: 订单编号, 支付状态
+     */
+    @PostMapping("/havePaidStadium")
+    public AjaxResult havePaidStadium(@RequestBody Stadium stadium){
+        return toAjax(stadiumService.havePaidStadium(stadium));
+    }
+
+    /**
+     * 退款回调
+     * 调用者传递参数: 订单id, 用户id
+     */
+    @PostMapping("/refundStadium")
+    public AjaxResult refundStadium(@RequestBody Stadium stadium){
+        return toAjax(stadiumService.refundStadium(stadium));
+    }
+}

+ 60 - 0
qmjszx-business/src/main/java/beilv/stadium/domain/Stadium.java

@@ -0,0 +1,60 @@
+package beilv.stadium.domain;
+
+import lombok.*;
+
+@Getter
+@Setter
+@ToString
+@AllArgsConstructor
+@NoArgsConstructor
+public class Stadium {
+    /**
+     * 数据id
+     */
+    private Long id;
+    /**
+     * 用户id
+     */
+    private String userId;
+    /**
+     * 联系人
+     */
+    private String contactPerple;
+    /**
+     * 联系电话
+     */
+    private String contactNumber;
+    /**
+     * 下单时间
+     */
+    private String registrationTime;
+    /**
+     * 支付时间
+     */
+    private String paymentTime;
+    /**
+     * 取消时间
+     */
+    private String cancellationTime;
+    /**
+     * 退款时间
+     */
+    private String refundTime;
+    /**
+     * 支付状态
+     */
+    private String paymentStatus;
+    /**
+     * 订单编号
+     */
+    private String orderId;
+    /**
+     * 赛事id
+     */
+    private String competitionId;
+    /**
+     * 订单类型(1: 参赛门票 / 2: 观看门票)
+     */
+    private String orderType;
+
+}

+ 15 - 0
qmjszx-business/src/main/java/beilv/stadium/domain/StadiumBO.java

@@ -0,0 +1,15 @@
+package beilv.stadium.domain;
+
+
+import lombok.*;
+
+@Getter
+@Setter
+@AllArgsConstructor
+@NoArgsConstructor
+@ToString
+public class StadiumBO {
+    private String userId;
+    private String orderType;
+    private String paymentStatus;
+}

+ 17 - 0
qmjszx-business/src/main/java/beilv/stadium/mapper/StadiumMapper.java

@@ -0,0 +1,17 @@
+package beilv.stadium.mapper;
+
+import beilv.stadium.domain.Stadium;
+import beilv.stadium.domain.StadiumBO;
+
+import java.util.List;
+
+public interface StadiumMapper {
+    int toBeStadium(Stadium stadium);
+
+    /**
+     * 修改订单状态 及 状态时间
+     */
+    int cancellStadium(Stadium stadium);
+
+    List<Stadium> getStadimList(StadiumBO stadiumBO);
+}

+ 20 - 0
qmjszx-business/src/main/java/beilv/stadium/service/IStadiumService.java

@@ -0,0 +1,20 @@
+package beilv.stadium.service;
+
+
+import beilv.stadium.domain.Stadium;
+import beilv.stadium.domain.StadiumBO;
+
+import java.util.List;
+
+public interface IStadiumService {
+    int toBeStadium(Stadium stadium);
+
+    int cancellStadium(Stadium stadium);
+
+    int refundStadium(Stadium stadium);
+
+    List<Stadium> getStadiumList(StadiumBO stadiumBO);
+
+    int havePaidStadium(Stadium stadium);
+
+}

+ 73 - 0
qmjszx-business/src/main/java/beilv/stadium/service/impl/StadiumServiceImpl.java

@@ -0,0 +1,73 @@
+package beilv.stadium.service.impl;
+
+import beilv.common.utils.uuid.IdUtils;
+import beilv.stadium.domain.Stadium;
+import beilv.stadium.domain.StadiumBO;
+import beilv.stadium.mapper.StadiumMapper;
+import beilv.stadium.service.IStadiumService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.List;
+
+@Service
+public class StadiumServiceImpl implements IStadiumService {
+
+    @Autowired
+    private StadiumMapper stadiumMapper;
+
+    private final static String DAI_ZHI_FU = "payment_status_to_be_paid";
+    private final static String YI_ZHI_FU = "payment_status_have_paid";
+    private final static String YI_QU_XIAO = "payment_status_cancelled";
+    private final static String YI_TUI_KUAN = "payment_status_refunded";
+
+    private final static SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+
+    @Override
+    public int toBeStadium(Stadium stadium) {
+        //设置订单状态为 待支付
+        stadium.setPaymentStatus(DAI_ZHI_FU);
+        //设置下单时间为当前时间
+        stadium.setRegistrationTime(simpleDateFormat.format(new Date()));
+        //生成订单编号
+        stadium.setOrderId(IdUtils.fastSimpleUUID());
+        return stadiumMapper.toBeStadium(stadium);
+    }
+
+    @Override
+    public int cancellStadium(Stadium stadium) {
+        //设置订单状态为取消
+        stadium.setPaymentStatus(YI_QU_XIAO);
+        //设置取消时间为当前时间
+        stadium.setCancellationTime(simpleDateFormat.format(new Date()));
+        return stadiumMapper.cancellStadium(stadium);
+    }
+
+    @Override
+    public List<Stadium> getStadiumList(StadiumBO stadiumBO) {
+        return stadiumMapper.getStadimList(stadiumBO);
+    }
+
+    @Override
+    public int havePaidStadium(Stadium stadium) {
+        //设置订单状态为已支付
+        stadium.setPaymentStatus(YI_ZHI_FU);
+        //设置支付时间
+        stadium.setPaymentTime(simpleDateFormat.format(new Date()));
+        //更新订单信息
+        return stadiumMapper.cancellStadium(stadium);
+    }
+
+    @Override
+    public int refundStadium(Stadium stadium) {
+        //设置订单状态为取消
+        stadium.setPaymentStatus(YI_TUI_KUAN);
+        //设置取消时间为当前时间
+        stadium.setRefundTime(simpleDateFormat.format(new Date()));
+        //修改订单状态为退款
+        return stadiumMapper.cancellStadium(stadium);
+    }
+
+}

+ 9 - 1
qmjszx-business/src/main/resources/mapper/competition/CompetitionMapper.xml

@@ -19,10 +19,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="competitionDetails"    column="competition_details"    />
         <result property="registrationNotes"    column="registration_notes"    />
         <result property="competitionState"    column="competition_state"    />
+        <result property="viewingTicket"    column="viewing_ticket"    />
     </resultMap>
 
     <sql id="selectCompetitionVo">
-        select id, competition_title, competition_type, person_max, team_max, competition_place, apply_start_time, apply_end_time, apply_before_time, competition_maximum, competition_expense, competition_details, registration_notes, competition_state from competition
+        select id, competition_title, competition_type, person_max, team_max, competition_place, apply_start_time, apply_end_time, apply_before_time, competition_maximum, competition_expense, viewing_ticket, competition_details, registration_notes, competition_state from competition
     </sql>
 
     <select id="selectCompetitionList" parameterType="Competition" resultMap="CompetitionResult">
@@ -54,6 +55,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="applyBeforeTime != null">apply_before_time,</if>
             <if test="competitionMaximum != null">competition_maximum,</if>
             <if test="competitionExpense != null">competition_expense,</if>
+            <if test="viewingTicket != null">viewing_ticket,</if>
             <if test="competitionDetails != null">competition_details,</if>
             <if test="registrationNotes != null">registration_notes,</if>
             <if test="competitionState != null">competition_state,</if>
@@ -69,6 +71,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="applyBeforeTime != null">#{applyBeforeTime},</if>
             <if test="competitionMaximum != null">#{competitionMaximum},</if>
             <if test="competitionExpense != null">#{competitionExpense},</if>
+            <if test="viewingTicket != null">#{viewingTicket},</if>
             <if test="competitionDetails != null">#{competitionDetails},</if>
             <if test="registrationNotes != null">#{registrationNotes},</if>
             <if test="competitionState != null">#{competitionState},</if>
@@ -88,6 +91,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="applyBeforeTime != null">apply_before_time = #{applyBeforeTime},</if>
             <if test="competitionMaximum != null">competition_maximum = #{competitionMaximum},</if>
             <if test="competitionExpense != null">competition_expense = #{competitionExpense},</if>
+            <if test="viewingTicket != null">viewing_ticket = #{viewingTicket},</if>
             <if test="competitionDetails != null">competition_details = #{competitionDetails},</if>
             <if test="registrationNotes != null">registration_notes = #{registrationNotes},</if>
             <if test="competitionState != null">competition_state = #{competitionState},</if>
@@ -111,4 +115,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         where id = #{id}
     </update>
 
+    <select id="getCompetitionList" resultMap="CompetitionResult">
+        select * from competition where competition_state = 'competiton_state_2'
+    </select>
+
 </mapper>

+ 82 - 0
qmjszx-business/src/main/resources/mapper/stadium/StadiumMapper.xml

@@ -0,0 +1,82 @@
+<?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.stadium.mapper.StadiumMapper">
+
+    <resultMap type="Stadium" id="StadiumResult">
+        <result property="id" column="id"/>
+        <result property="userId" column="user_id"/>
+        <result property="contactPerple" column="contact_perple"/>
+        <result property="contactNumber" column="contact_number"/>
+        <result property="registrationTime" column="registration_time"/>
+        <result property="paymentTime" column="payment_time"/>
+        <result property="cancellationTime" column="cancellation_time"/>
+        <result property="refundTime" column="refund_time"/>
+        <result property="paymentStatus" column="payment_status"/>
+        <result property="orderId" column="order_id"/>
+        <result property="competitionId" column="competition_id"/>
+        <result property="orderType" column="order_type"/>
+    </resultMap>
+
+
+    <insert id="toBeStadium" parameterType="stadium">
+        insert into book_a_race
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="userId != null">user_id,</if>
+            <if test="contactPerple != null">contact_perple,</if>
+            <if test="contactNumber != null">contact_number,</if>
+            <if test="registrationTime != null">registration_time,</if>
+            <if test="paymentTime != null">payment_time,</if>
+            <if test="cancellationTime != null">cancellation_time,</if>
+            <if test="refundTime != null">refund_time,</if>
+            <if test="paymentStatus != null">payment_status,</if>
+            <if test="orderId != null">order_id,</if>
+            <if test="competitionId != null">competition_id,</if>
+            <if test="orderType != null">order_type,</if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="userId != null">#{userId},</if>
+            <if test="contactPerple != null">#{contactPerple},</if>
+            <if test="contactNumber != null">#{contactNumber},</if>
+            <if test="registrationTime != null">#{registrationTime},</if>
+            <if test="paymentTime != null">#{paymentTime},</if>
+            <if test="cancellationTime != null">#{cancellationTime},</if>
+            <if test="refundTime != null">#{refundTime},</if>
+            <if test="paymentStatus != null">#{paymentStatus},</if>
+            <if test="orderId != null">#{orderId},</if>
+            <if test="competitionId != null">#{competitionId},</if>
+            <if test="orderType != null">#{orderType},</if>
+        </trim>
+    </insert>
+
+    <update id="cancellStadium" parameterType="stadium">
+        update book_a_race
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="paymentTime != null">#{paymentTime},</if>
+            <if test="cancellationTime != null">#{cancellationTime},</if>
+            <if test="refundTime != null">#{refundTime},</if>
+            <if test="paymentStatus != null">#{paymentStatus},</if>
+        </trim>
+        where order_id = #{orderId}
+    </update>
+
+    <select id="getStadimList" parameterType="stadiumBO" resultMap="StadiumResult">
+        select
+            user_id, contact_perple, contact_number, registration_time, payment_time,
+            cancellation_time, refund_time, payment_status, order_id, competition_id, order_type
+        from book_a_race
+        <where>
+            <if test="userId != null and userId != ''">
+                and user_id = #{userId}
+            </if>
+            <if test="orderType != null and orderType != ''">
+                and order_type = #{orderType}
+            </if>
+            <if test="paymentStatus != null and paymentStatus != ''">
+                and paymen_status = #{paymentStatus}
+            </if>
+        </where>
+    </select>
+
+</mapper>