瀏覽代碼

付款码

suochencheng 6 年之前
父節點
當前提交
2193098d6f
共有 28 個文件被更改,包括 5792 次插入137 次删除
  1. 34 0
      src/main/java/com/izouma/awesomeadmin/constant/AppConstant.java
  2. 35 0
      src/main/java/com/izouma/awesomeadmin/dao/PayCodeInfoMapper.java
  3. 440 0
      src/main/java/com/izouma/awesomeadmin/dao/PayCodeInfoMapper.xml
  4. 35 0
      src/main/java/com/izouma/awesomeadmin/dao/PayCodeOrderMapper.java
  5. 545 0
      src/main/java/com/izouma/awesomeadmin/dao/PayCodeOrderMapper.xml
  6. 39 0
      src/main/java/com/izouma/awesomeadmin/dao/PayCodeStockMapper.java
  7. 541 0
      src/main/java/com/izouma/awesomeadmin/dao/PayCodeStockMapper.xml
  8. 161 0
      src/main/java/com/izouma/awesomeadmin/model/PayCodeInfo.java
  9. 201 0
      src/main/java/com/izouma/awesomeadmin/model/PayCodeOrder.java
  10. 169 0
      src/main/java/com/izouma/awesomeadmin/model/PayCodeStock.java
  11. 28 0
      src/main/java/com/izouma/awesomeadmin/service/PayCodeInfoService.java
  12. 31 0
      src/main/java/com/izouma/awesomeadmin/service/PayCodeOrderService.java
  13. 33 0
      src/main/java/com/izouma/awesomeadmin/service/PayCodeStockService.java
  14. 117 0
      src/main/java/com/izouma/awesomeadmin/service/impl/PayCodeInfoServiceImpl.java
  15. 166 0
      src/main/java/com/izouma/awesomeadmin/service/impl/PayCodeOrderServiceImpl.java
  16. 158 0
      src/main/java/com/izouma/awesomeadmin/service/impl/PayCodeStockServiceImpl.java
  17. 1 1
      src/main/java/com/izouma/awesomeadmin/util/MbappUtil.java
  18. 128 0
      src/main/java/com/izouma/awesomeadmin/web/PayCodeInfoController.java
  19. 140 0
      src/main/java/com/izouma/awesomeadmin/web/PayCodeOrderController.java
  20. 170 0
      src/main/java/com/izouma/awesomeadmin/web/PayCodeStockController.java
  21. 235 0
      src/main/vue/src/pages/PayCodeInfo.vue
  22. 573 0
      src/main/vue/src/pages/PayCodeInfos.vue
  23. 220 0
      src/main/vue/src/pages/PayCodeOrder.vue
  24. 585 0
      src/main/vue/src/pages/PayCodeOrders.vue
  25. 224 0
      src/main/vue/src/pages/PayCodeStock.vue
  26. 610 0
      src/main/vue/src/pages/PayCodeStocks.vue
  27. 143 136
      src/main/vue/src/pages/PlayerInfos.vue
  28. 30 0
      src/main/vue/src/router/index.js

+ 34 - 0
src/main/java/com/izouma/awesomeadmin/constant/AppConstant.java

@@ -554,5 +554,39 @@ public interface AppConstant {
 
 
     }
     }
 
 
+    public interface PayCodeType {
+
+        /**
+         * 微信
+         */
+        String wechat = "wechat";
+        /**
+         * 支付宝
+         */
+        String alipay = "alipay";
+        /**
+         * 云闪付
+         */
+        String cloud_flash = "cloud_flash";
+        /**
+         * 银联
+         */
+        String union_pay = "union_pay";
+        /**
+         * 微信实时
+         */
+        String wechat_real_time = "wechat_real_time";
+        /**
+         * 淘宝
+         */
+        String taobao = "taobao";
+        /**
+         * 信用卡
+         */
+        String credit_card = "credit_card";
+
+
+    }
+
 
 
 }
 }

+ 35 - 0
src/main/java/com/izouma/awesomeadmin/dao/PayCodeInfoMapper.java

@@ -0,0 +1,35 @@
+package com.izouma.awesomeadmin.dao;
+
+import java.util.*;
+import com.izouma.awesomeadmin.datasource.DataSource;
+import org.springframework.stereotype.Repository;
+import com.izouma.awesomeadmin.model.PayCodeInfo;
+
+
+/**
+*  Dao接口
+*/
+@Repository("com.zoumaframe.dao.PayCodeInfoMapper")
+public interface PayCodeInfoMapper{
+    /*generatedStart*/
+    int deleteByPrimaryKey(Integer id);
+
+    int insertSelective(PayCodeInfo record);
+
+    PayCodeInfo selectByPrimaryKey(Integer id);
+
+    int updateByPrimaryKeySelective(PayCodeInfo record);
+
+    List<PayCodeInfo> queryAllPayCodeInfo(PayCodeInfo record);
+
+    List<PayCodeInfo> queryPayCodeInfoByPage(Map<String, Object> parameter);
+
+    int delete(PayCodeInfo record);
+
+    PayCodeInfo queryPayCodeInfo(PayCodeInfo record);
+
+    List<PayCodeInfo> query(PayCodeInfo record);
+    /*generatedEnd*/
+
+}
+

+ 440 - 0
src/main/java/com/izouma/awesomeadmin/dao/PayCodeInfoMapper.xml

@@ -0,0 +1,440 @@
+<?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="com.izouma.awesomeadmin.dao.PayCodeInfoMapper">
+    <resultMap id="BaseResultMap" type="com.izouma.awesomeadmin.model.PayCodeInfo">
+        <!--generatedStart-->
+        <id column="id" property="id" jdbcType="INTEGER"/>
+        <result column="del_flag" property="delFlag" jdbcType="CHAR"/>
+        <result column="update_time" property="updateTime" jdbcType="TIMESTAMP"/>
+        <result column="update_user" property="updateUser" jdbcType="VARCHAR"/>
+        <result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
+        <result column="create_user" property="createUser" jdbcType="VARCHAR"/>
+        <result column="code_name" property="codeName" jdbcType="VARCHAR"/>
+        <result column="pay_type" property="payType" jdbcType="VARCHAR"/>
+        <result column="image" property="image" jdbcType="VARCHAR"/>
+        <result column="limit_money" property="limitMoney" jdbcType="DECIMAL"/>
+        <result column="use_flag" property="useFlag" jdbcType="CHAR"/>
+        <result column="remark" property="remark" jdbcType="VARCHAR"/>
+        <!--generatedEnd-->
+    </resultMap>
+
+    <sql id="Base_Column_List">
+        <!--generatedStart-->
+        id, del_flag, update_time, update_user, create_time, create_user, code_name, pay_type, image, limit_money, use_flag, remark        <!--generatedEnd-->
+    </sql>
+
+    <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer">
+        SELECT
+        <include refid="Base_Column_List"/>
+        FROM pay_code_info
+        WHERE id = #{id,jdbcType=INTEGER}
+    </select>
+
+    <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
+        DELETE
+        FROM pay_code_info
+        WHERE id = #{id,jdbcType=INTEGER}
+    </delete>
+
+    <insert id="insertSelective" parameterType="com.izouma.awesomeadmin.model.PayCodeInfo" useGeneratedKeys="true" keyProperty="id">
+        INSERT INTO pay_code_info
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <!--generatedStart-->
+            <if test="id!= null">
+                id,
+            </if>
+            <if test="delFlag!= null">
+                del_flag,
+            </if>
+            <if test="updateTime!= null">
+                update_time,
+            </if>
+            <if test="updateUser!= null">
+                update_user,
+            </if>
+            <if test="createTime!= null">
+                create_time,
+            </if>
+            <if test="createUser!= null">
+                create_user,
+            </if>
+            <if test="codeName!= null">
+                code_name,
+            </if>
+            <if test="payType!= null">
+                pay_type,
+            </if>
+            <if test="image!= null">
+                image,
+            </if>
+            <if test="limitMoney!= null">
+                limit_money,
+            </if>
+            <if test="useFlag!= null">
+                use_flag,
+            </if>
+            <if test="remark!= null">
+                remark,
+            </if>
+            <!--generatedEnd-->
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <!--generatedStart-->
+            <if test="id != null">
+                #{id,jdbcType=INTEGER},
+            </if>
+            <if test="delFlag != null">
+                #{delFlag,jdbcType=CHAR},
+            </if>
+            <if test="updateTime != null">
+                #{updateTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="updateUser != null">
+                #{updateUser,jdbcType=VARCHAR},
+            </if>
+            <if test="createTime != null">
+                #{createTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="createUser != null">
+                #{createUser,jdbcType=VARCHAR},
+            </if>
+            <if test="codeName != null">
+                #{codeName,jdbcType=VARCHAR},
+            </if>
+            <if test="payType != null">
+                #{payType,jdbcType=VARCHAR},
+            </if>
+            <if test="image != null">
+                #{image,jdbcType=VARCHAR},
+            </if>
+            <if test="limitMoney != null">
+                #{limitMoney,jdbcType=DECIMAL},
+            </if>
+            <if test="useFlag != null">
+                #{useFlag,jdbcType=CHAR},
+            </if>
+            <if test="remark != null">
+                #{remark,jdbcType=VARCHAR},
+            </if>
+            <!--generatedEnd-->
+        </trim>
+    </insert>
+
+    <update id="updateByPrimaryKeySelective" parameterType="com.izouma.awesomeadmin.model.PayCodeInfo">
+        UPDATE pay_code_info
+        <set>
+            <!--generatedStart-->
+            <if test="id != null">
+                id= #{id,jdbcType=INTEGER},
+            </if>
+            <if test="delFlag != null">
+                del_flag= #{delFlag,jdbcType=CHAR},
+            </if>
+            <if test="updateTime != null">
+                update_time= #{updateTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="updateUser != null">
+                update_user= #{updateUser,jdbcType=VARCHAR},
+            </if>
+            <if test="createTime != null">
+                create_time= #{createTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="createUser != null">
+                create_user= #{createUser,jdbcType=VARCHAR},
+            </if>
+            <if test="codeName != null">
+                code_name= #{codeName,jdbcType=VARCHAR},
+            </if>
+            <if test="payType != null">
+                pay_type= #{payType,jdbcType=VARCHAR},
+            </if>
+            <if test="image != null">
+                image= #{image,jdbcType=VARCHAR},
+            </if>
+            <if test="limitMoney != null">
+                limit_money= #{limitMoney,jdbcType=DECIMAL},
+            </if>
+            <if test="useFlag != null">
+                use_flag= #{useFlag,jdbcType=CHAR},
+            </if>
+            <if test="remark != null">
+                remark= #{remark,jdbcType=VARCHAR},
+            </if>
+            <!--generatedEnd-->
+        </set>
+        WHERE
+        <if test="id != null and !&quot;&quot;.equals(id)">
+            id = #{id,jdbcType=INTEGER}
+        </if>
+        <if test="idStr != null and !&quot;&quot;.equals(idStr)">
+            id IN (${idStr})
+        </if>
+    </update>
+
+    <select id="queryPayCodeInfoByPage" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.PayCodeInfo">
+        SELECT <include refid="Base_Column_List"/> FROM pay_code_info
+        <where>
+            AND del_flag = 'N'
+            <if test="record.idStr != null and !&quot;&quot;.equals(record.idStr)">
+                AND id IN (${record.idStr})
+            </if>
+            <!--generatedStart-->
+            <if test="record.id != null and !&quot;&quot;.equals(record.id)">
+                AND id = #{record.id}
+            </if>
+            <if test="record.delFlag != null and !&quot;&quot;.equals(record.delFlag)">
+                AND del_flag = #{record.delFlag}
+            </if>
+            <if test="record.updateTime != null and !&quot;&quot;.equals(record.updateTime)">
+                AND update_time = #{record.updateTime}
+            </if>
+            <if test="record.updateUser != null and !&quot;&quot;.equals(record.updateUser)">
+                AND update_user = #{record.updateUser}
+            </if>
+            <if test="record.createTime != null and !&quot;&quot;.equals(record.createTime)">
+                AND create_time = #{record.createTime}
+            </if>
+            <if test="record.createUser != null and !&quot;&quot;.equals(record.createUser)">
+                AND create_user = #{record.createUser}
+            </if>
+            <if test="record.codeName != null and !&quot;&quot;.equals(record.codeName)">
+                AND code_name = #{record.codeName}
+            </if>
+            <if test="record.payType != null and !&quot;&quot;.equals(record.payType)">
+                AND pay_type = #{record.payType}
+            </if>
+            <if test="record.image != null and !&quot;&quot;.equals(record.image)">
+                AND image = #{record.image}
+            </if>
+            <if test="record.limitMoney != null and !&quot;&quot;.equals(record.limitMoney)">
+                AND limit_money = #{record.limitMoney}
+            </if>
+            <if test="record.useFlag != null and !&quot;&quot;.equals(record.useFlag)">
+                AND use_flag = #{record.useFlag}
+            </if>
+            <if test="record.remark != null and !&quot;&quot;.equals(record.remark)">
+                AND remark = #{record.remark}
+            </if>
+            <!--generatedEnd-->
+            <if test="record.searchKey != null and !&quot;&quot;.equals(record.searchKey)">
+                <trim prefix="and (" suffix=")" prefixOverrides="OR">
+                    <!--generatedStart-->
+                    OR code_name LIKE concat('%',#{record.searchKey},'%')
+                    OR pay_type LIKE concat('%',#{record.searchKey},'%')
+                    OR image LIKE concat('%',#{record.searchKey},'%')
+                    OR limit_money LIKE concat('%',#{record.searchKey},'%')
+                    OR use_flag LIKE concat('%',#{record.searchKey},'%')
+                    OR remark LIKE concat('%',#{record.searchKey},'%')
+                    <!--generatedEnd-->
+                </trim>
+            </if>
+
+            <if test="record.advancedQuery != null and !&quot;&quot;.equals(record.advancedQuery)">
+                <foreach item="item" index="index" collection="record.advancedQuery.split('_;')">
+                    <choose>
+                        <when test="item.indexOf('like') != -1">
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    concat('%',#{itemDetail},'%')
+                                </if>
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+                            </foreach>
+                        </when>
+                        <otherwise>
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    #{itemDetail}
+                                </if>
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+                            </foreach>
+                        </otherwise>
+                    </choose>
+                </foreach>
+            </if>
+        </where>
+        ORDER BY
+        <if test="record.orderByStr != null and !&quot;&quot;.equals(record.orderByStr)">
+            <trim suffixOverrides=",">
+                <foreach item="item" index="index" separator="," collection="record.orderByStr.split('_;')">
+                    <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                        ${itemDetail}
+                    </foreach>
+                </foreach>
+            </trim>
+            ,
+        </if>
+        id DESC
+    </select>
+
+    <select id="queryAllPayCodeInfo" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.PayCodeInfo">
+        SELECT <include refid="Base_Column_List"/> FROM pay_code_info
+        <where>
+            AND del_flag = 'N'
+            <if test="idStr != null and !&quot;&quot;.equals(idStr)">
+                AND id IN (${idStr})
+            </if>
+            <!--generatedStart-->
+            <if test="id != null and !&quot;&quot;.equals(id)">
+                AND id = #{id}
+            </if>
+            <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+                AND del_flag = #{delFlag}
+            </if>
+            <if test="updateTime != null and !&quot;&quot;.equals(updateTime)">
+                AND update_time = #{updateTime}
+            </if>
+            <if test="updateUser != null and !&quot;&quot;.equals(updateUser)">
+                AND update_user = #{updateUser}
+            </if>
+            <if test="createTime != null and !&quot;&quot;.equals(createTime)">
+                AND create_time = #{createTime}
+            </if>
+            <if test="createUser != null and !&quot;&quot;.equals(createUser)">
+                AND create_user = #{createUser}
+            </if>
+            <if test="codeName != null and !&quot;&quot;.equals(codeName)">
+                AND code_name = #{codeName}
+            </if>
+            <if test="payType != null and !&quot;&quot;.equals(payType)">
+                AND pay_type = #{payType}
+            </if>
+            <if test="image != null and !&quot;&quot;.equals(image)">
+                AND image = #{image}
+            </if>
+            <if test="limitMoney != null and !&quot;&quot;.equals(limitMoney)">
+                AND limit_money = #{limitMoney}
+            </if>
+            <if test="useFlag != null and !&quot;&quot;.equals(useFlag)">
+                AND use_flag = #{useFlag}
+            </if>
+            <if test="remark != null and !&quot;&quot;.equals(remark)">
+                AND remark = #{remark}
+            </if>
+            <!--generatedEnd-->
+            <if test="searchKey != null and !&quot;&quot;.equals(searchKey)">
+                <trim prefix="and (" suffix=")" prefixOverrides="OR">
+                    <!--generatedStart-->
+                    OR code_name LIKE concat('%',#{searchKey},'%')
+                    OR pay_type LIKE concat('%',#{searchKey},'%')
+                    OR image LIKE concat('%',#{searchKey},'%')
+                    OR limit_money LIKE concat('%',#{searchKey},'%')
+                    OR use_flag LIKE concat('%',#{searchKey},'%')
+                    OR remark LIKE concat('%',#{searchKey},'%')
+                    <!--generatedEnd-->
+                </trim>
+            </if>
+            <if test="advancedQuery != null and !&quot;&quot;.equals(advancedQuery)">
+                <foreach item="item" index="index" collection="advancedQuery.split('_;')">
+                    <choose>
+                        <when test="item.indexOf('like') != -1">
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    concat('%',#{itemDetail},'%')
+                                </if>
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+                            </foreach>
+                        </when>
+                        <otherwise>
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    #{itemDetail}
+                                </if>
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+                            </foreach>
+                        </otherwise>
+                    </choose>
+                </foreach>
+            </if>
+        </where>
+        ORDER BY
+        <if test="orderByStr != null and !&quot;&quot;.equals(orderByStr)">
+            <trim suffixOverrides=",">
+                <foreach item="item" index="index" separator="," collection="orderByStr.split('_;')">
+                    <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                        ${itemDetail}
+                    </foreach>
+                </foreach>
+            </trim>
+            ,
+        </if>
+        id DESC
+    </select>
+
+    <select id="queryPayCodeInfo" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.PayCodeInfo">
+        SELECT <include refid="Base_Column_List"/> FROM pay_code_info
+        <where>
+            AND del_flag = 'N'
+            <!--generatedStart-->
+            <if test="id != null and !&quot;&quot;.equals(id)">
+                AND id = #{id}
+            </if>
+            <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+                AND del_flag = #{delFlag}
+            </if>
+            <if test="updateTime != null and !&quot;&quot;.equals(updateTime)">
+                AND update_time = #{updateTime}
+            </if>
+            <if test="updateUser != null and !&quot;&quot;.equals(updateUser)">
+                AND update_user = #{updateUser}
+            </if>
+            <if test="createTime != null and !&quot;&quot;.equals(createTime)">
+                AND create_time = #{createTime}
+            </if>
+            <if test="createUser != null and !&quot;&quot;.equals(createUser)">
+                AND create_user = #{createUser}
+            </if>
+            <if test="codeName != null and !&quot;&quot;.equals(codeName)">
+                AND code_name = #{codeName}
+            </if>
+            <if test="payType != null and !&quot;&quot;.equals(payType)">
+                AND pay_type = #{payType}
+            </if>
+            <if test="image != null and !&quot;&quot;.equals(image)">
+                AND image = #{image}
+            </if>
+            <if test="limitMoney != null and !&quot;&quot;.equals(limitMoney)">
+                AND limit_money = #{limitMoney}
+            </if>
+            <if test="useFlag != null and !&quot;&quot;.equals(useFlag)">
+                AND use_flag = #{useFlag}
+            </if>
+            <if test="remark != null and !&quot;&quot;.equals(remark)">
+                AND remark = #{remark}
+            </if>
+            <!--generatedEnd-->
+        </where>
+        LIMIT 1
+    </select>
+
+    <update id="delete">
+        UPDATE pay_code_info SET del_flag = 'Y'
+        WHERE
+        <if test="id != null and !&quot;&quot;.equals(id)">
+            id = #{id,jdbcType=INTEGER}
+        </if>
+        <if test="idStr != null and !&quot;&quot;.equals(idStr)">
+            id IN (${idStr})
+        </if>
+    </update>
+
+    <select id="query" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.PayCodeInfo">
+        SELECT
+        <include refid="Base_Column_List"/>
+        FROM pay_code_info
+        <where>
+            AND del_flag = 'N'
+            <!--generatedStart-->
+            <!--generatedEnd-->
+        </where>
+        ORDER BY id DESC
+    </select>
+</mapper>
+

+ 35 - 0
src/main/java/com/izouma/awesomeadmin/dao/PayCodeOrderMapper.java

@@ -0,0 +1,35 @@
+package com.izouma.awesomeadmin.dao;
+
+import java.util.*;
+import com.izouma.awesomeadmin.datasource.DataSource;
+import org.springframework.stereotype.Repository;
+import com.izouma.awesomeadmin.model.PayCodeOrder;
+
+
+/**
+*  Dao接口
+*/
+@Repository("com.zoumaframe.dao.PayCodeOrderMapper")
+public interface PayCodeOrderMapper{
+    /*generatedStart*/
+    int deleteByPrimaryKey(Integer id);
+
+    int insertSelective(PayCodeOrder record);
+
+    PayCodeOrder selectByPrimaryKey(Integer id);
+
+    int updateByPrimaryKeySelective(PayCodeOrder record);
+
+    List<PayCodeOrder> queryAllPayCodeOrder(PayCodeOrder record);
+
+    List<PayCodeOrder> queryPayCodeOrderByPage(Map<String, Object> parameter);
+
+    int delete(PayCodeOrder record);
+
+    PayCodeOrder queryPayCodeOrder(PayCodeOrder record);
+
+    List<PayCodeOrder> query(PayCodeOrder record);
+    /*generatedEnd*/
+
+}
+

+ 545 - 0
src/main/java/com/izouma/awesomeadmin/dao/PayCodeOrderMapper.xml

@@ -0,0 +1,545 @@
+<?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="com.izouma.awesomeadmin.dao.PayCodeOrderMapper">
+    <resultMap id="BaseResultMap" type="com.izouma.awesomeadmin.model.PayCodeOrder">
+        <!--generatedStart-->
+        <id column="id" property="id" jdbcType="INTEGER"/>
+        <result column="del_flag" property="delFlag" jdbcType="CHAR"/>
+        <result column="update_time" property="updateTime" jdbcType="TIMESTAMP"/>
+        <result column="update_user" property="updateUser" jdbcType="VARCHAR"/>
+        <result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
+        <result column="create_user" property="createUser" jdbcType="VARCHAR"/>
+        <result column="order_code" property="orderCode" jdbcType="VARCHAR"/>
+        <result column="type_flag" property="typeFlag" jdbcType="INTEGER"/>
+        <result column="code_id" property="codeId" jdbcType="INTEGER"/>
+        <result column="stock_id" property="stockId" jdbcType="INTEGER"/>
+        <result column="pay_type" property="payType" jdbcType="VARCHAR"/>
+        <result column="money" property="money" jdbcType="DECIMAL"/>
+        <result column="pay_money" property="payMoney" jdbcType="DECIMAL"/>
+        <result column="status_flag" property="statusFlag" jdbcType="INTEGER"/>
+        <result column="pay_time" property="payTime" jdbcType="TIMESTAMP"/>
+        <result column="user_id" property="userId" jdbcType="INTEGER"/>
+        <result column="remark" property="remark" jdbcType="VARCHAR"/>
+        <!--generatedEnd-->
+    </resultMap>
+
+    <sql id="Base_Column_List">
+        <!--generatedStart-->
+        id, del_flag, update_time, update_user, create_time, create_user, order_code, type_flag, code_id, stock_id, pay_type, money, pay_money, status_flag, pay_time, user_id, remark        <!--generatedEnd-->
+    </sql>
+
+    <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer">
+        SELECT
+        <include refid="Base_Column_List"/>
+        FROM pay_code_order
+        WHERE id = #{id,jdbcType=INTEGER}
+    </select>
+
+    <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
+        DELETE
+        FROM pay_code_order
+        WHERE id = #{id,jdbcType=INTEGER}
+    </delete>
+
+    <insert id="insertSelective" parameterType="com.izouma.awesomeadmin.model.PayCodeOrder" useGeneratedKeys="true" keyProperty="id">
+        INSERT INTO pay_code_order
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <!--generatedStart-->
+            <if test="id!= null">
+                id,
+            </if>
+            <if test="delFlag!= null">
+                del_flag,
+            </if>
+            <if test="updateTime!= null">
+                update_time,
+            </if>
+            <if test="updateUser!= null">
+                update_user,
+            </if>
+            <if test="createTime!= null">
+                create_time,
+            </if>
+            <if test="createUser!= null">
+                create_user,
+            </if>
+            <if test="orderCode!= null">
+                order_code,
+            </if>
+            <if test="typeFlag!= null">
+                type_flag,
+            </if>
+            <if test="codeId!= null">
+                code_id,
+            </if>
+            <if test="stockId!= null">
+                stock_id,
+            </if>
+            <if test="payType!= null">
+                pay_type,
+            </if>
+            <if test="money!= null">
+                money,
+            </if>
+            <if test="payMoney!= null">
+                pay_money,
+            </if>
+            <if test="statusFlag!= null">
+                status_flag,
+            </if>
+            <if test="payTime!= null">
+                pay_time,
+            </if>
+            <if test="userId!= null">
+                user_id,
+            </if>
+            <if test="remark!= null">
+                remark,
+            </if>
+            <!--generatedEnd-->
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <!--generatedStart-->
+            <if test="id != null">
+                #{id,jdbcType=INTEGER},
+            </if>
+            <if test="delFlag != null">
+                #{delFlag,jdbcType=CHAR},
+            </if>
+            <if test="updateTime != null">
+                #{updateTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="updateUser != null">
+                #{updateUser,jdbcType=VARCHAR},
+            </if>
+            <if test="createTime != null">
+                #{createTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="createUser != null">
+                #{createUser,jdbcType=VARCHAR},
+            </if>
+            <if test="orderCode != null">
+                #{orderCode,jdbcType=VARCHAR},
+            </if>
+            <if test="typeFlag != null">
+                #{typeFlag,jdbcType=INTEGER},
+            </if>
+            <if test="codeId != null">
+                #{codeId,jdbcType=INTEGER},
+            </if>
+            <if test="stockId != null">
+                #{stockId,jdbcType=INTEGER},
+            </if>
+            <if test="payType != null">
+                #{payType,jdbcType=VARCHAR},
+            </if>
+            <if test="money != null">
+                #{money,jdbcType=DECIMAL},
+            </if>
+            <if test="payMoney != null">
+                #{payMoney,jdbcType=DECIMAL},
+            </if>
+            <if test="statusFlag != null">
+                #{statusFlag,jdbcType=INTEGER},
+            </if>
+            <if test="payTime != null">
+                #{payTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="userId != null">
+                #{userId,jdbcType=INTEGER},
+            </if>
+            <if test="remark != null">
+                #{remark,jdbcType=VARCHAR},
+            </if>
+            <!--generatedEnd-->
+        </trim>
+    </insert>
+
+    <update id="updateByPrimaryKeySelective" parameterType="com.izouma.awesomeadmin.model.PayCodeOrder">
+        UPDATE pay_code_order
+        <set>
+            <!--generatedStart-->
+            <if test="id != null">
+                id= #{id,jdbcType=INTEGER},
+            </if>
+            <if test="delFlag != null">
+                del_flag= #{delFlag,jdbcType=CHAR},
+            </if>
+            <if test="updateTime != null">
+                update_time= #{updateTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="updateUser != null">
+                update_user= #{updateUser,jdbcType=VARCHAR},
+            </if>
+            <if test="createTime != null">
+                create_time= #{createTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="createUser != null">
+                create_user= #{createUser,jdbcType=VARCHAR},
+            </if>
+            <if test="orderCode != null">
+                order_code= #{orderCode,jdbcType=VARCHAR},
+            </if>
+            <if test="typeFlag != null">
+                type_flag= #{typeFlag,jdbcType=INTEGER},
+            </if>
+            <if test="codeId != null">
+                code_id= #{codeId,jdbcType=INTEGER},
+            </if>
+            <if test="stockId != null">
+                stock_id= #{stockId,jdbcType=INTEGER},
+            </if>
+            <if test="payType != null">
+                pay_type= #{payType,jdbcType=VARCHAR},
+            </if>
+            <if test="money != null">
+                money= #{money,jdbcType=DECIMAL},
+            </if>
+            <if test="payMoney != null">
+                pay_money= #{payMoney,jdbcType=DECIMAL},
+            </if>
+            <if test="statusFlag != null">
+                status_flag= #{statusFlag,jdbcType=INTEGER},
+            </if>
+            <if test="payTime != null">
+                pay_time= #{payTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="userId != null">
+                user_id= #{userId,jdbcType=INTEGER},
+            </if>
+            <if test="remark != null">
+                remark= #{remark,jdbcType=VARCHAR},
+            </if>
+            <!--generatedEnd-->
+        </set>
+        WHERE
+        <if test="id != null and !&quot;&quot;.equals(id)">
+            id = #{id,jdbcType=INTEGER}
+        </if>
+        <if test="idStr != null and !&quot;&quot;.equals(idStr)">
+            id IN (${idStr})
+        </if>
+    </update>
+
+    <select id="queryPayCodeOrderByPage" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.PayCodeOrder">
+        SELECT <include refid="Base_Column_List"/> FROM pay_code_order
+        <where>
+            AND del_flag = 'N'
+            <if test="record.idStr != null and !&quot;&quot;.equals(record.idStr)">
+                AND id IN (${record.idStr})
+            </if>
+            <!--generatedStart-->
+            <if test="record.id != null and !&quot;&quot;.equals(record.id)">
+                AND id = #{record.id}
+            </if>
+            <if test="record.delFlag != null and !&quot;&quot;.equals(record.delFlag)">
+                AND del_flag = #{record.delFlag}
+            </if>
+            <if test="record.updateTime != null and !&quot;&quot;.equals(record.updateTime)">
+                AND update_time = #{record.updateTime}
+            </if>
+            <if test="record.updateUser != null and !&quot;&quot;.equals(record.updateUser)">
+                AND update_user = #{record.updateUser}
+            </if>
+            <if test="record.createTime != null and !&quot;&quot;.equals(record.createTime)">
+                AND create_time = #{record.createTime}
+            </if>
+            <if test="record.createUser != null and !&quot;&quot;.equals(record.createUser)">
+                AND create_user = #{record.createUser}
+            </if>
+            <if test="record.orderCode != null and !&quot;&quot;.equals(record.orderCode)">
+                AND order_code = #{record.orderCode}
+            </if>
+            <if test="record.typeFlag != null and !&quot;&quot;.equals(record.typeFlag)">
+                AND type_flag = #{record.typeFlag}
+            </if>
+            <if test="record.codeId != null and !&quot;&quot;.equals(record.codeId)">
+                AND code_id = #{record.codeId}
+            </if>
+            <if test="record.stockId != null and !&quot;&quot;.equals(record.stockId)">
+                AND stock_id = #{record.stockId}
+            </if>
+            <if test="record.payType != null and !&quot;&quot;.equals(record.payType)">
+                AND pay_type = #{record.payType}
+            </if>
+            <if test="record.money != null and !&quot;&quot;.equals(record.money)">
+                AND money = #{record.money}
+            </if>
+            <if test="record.payMoney != null and !&quot;&quot;.equals(record.payMoney)">
+                AND pay_money = #{record.payMoney}
+            </if>
+            <if test="record.statusFlag != null and !&quot;&quot;.equals(record.statusFlag)">
+                AND status_flag = #{record.statusFlag}
+            </if>
+            <if test="record.payTime != null and !&quot;&quot;.equals(record.payTime)">
+                AND pay_time = #{record.payTime}
+            </if>
+            <if test="record.userId != null and !&quot;&quot;.equals(record.userId)">
+                AND user_id = #{record.userId}
+            </if>
+            <if test="record.remark != null and !&quot;&quot;.equals(record.remark)">
+                AND remark = #{record.remark}
+            </if>
+            <!--generatedEnd-->
+            <if test="record.searchKey != null and !&quot;&quot;.equals(record.searchKey)">
+                <trim prefix="and (" suffix=")" prefixOverrides="OR">
+                    <!--generatedStart-->
+                    OR order_code LIKE concat('%',#{record.searchKey},'%')
+                    OR type_flag LIKE concat('%',#{record.searchKey},'%')
+                    OR code_id LIKE concat('%',#{record.searchKey},'%')
+                    OR stock_id LIKE concat('%',#{record.searchKey},'%')
+                    OR pay_type LIKE concat('%',#{record.searchKey},'%')
+                    OR money LIKE concat('%',#{record.searchKey},'%')
+                    OR pay_money LIKE concat('%',#{record.searchKey},'%')
+                    OR status_flag LIKE concat('%',#{record.searchKey},'%')
+                    OR pay_time LIKE concat('%',#{record.searchKey},'%')
+                    OR user_id LIKE concat('%',#{record.searchKey},'%')
+                    OR remark LIKE concat('%',#{record.searchKey},'%')
+                    <!--generatedEnd-->
+                </trim>
+            </if>
+
+            <if test="record.advancedQuery != null and !&quot;&quot;.equals(record.advancedQuery)">
+                <foreach item="item" index="index" collection="record.advancedQuery.split('_;')">
+                    <choose>
+                        <when test="item.indexOf('like') != -1">
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    concat('%',#{itemDetail},'%')
+                                </if>
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+                            </foreach>
+                        </when>
+                        <otherwise>
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    #{itemDetail}
+                                </if>
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+                            </foreach>
+                        </otherwise>
+                    </choose>
+                </foreach>
+            </if>
+        </where>
+        ORDER BY
+        <if test="record.orderByStr != null and !&quot;&quot;.equals(record.orderByStr)">
+            <trim suffixOverrides=",">
+                <foreach item="item" index="index" separator="," collection="record.orderByStr.split('_;')">
+                    <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                        ${itemDetail}
+                    </foreach>
+                </foreach>
+            </trim>
+            ,
+        </if>
+        id DESC
+    </select>
+
+    <select id="queryAllPayCodeOrder" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.PayCodeOrder">
+        SELECT <include refid="Base_Column_List"/> FROM pay_code_order
+        <where>
+            AND del_flag = 'N'
+            <if test="idStr != null and !&quot;&quot;.equals(idStr)">
+                AND id IN (${idStr})
+            </if>
+            <!--generatedStart-->
+            <if test="id != null and !&quot;&quot;.equals(id)">
+                AND id = #{id}
+            </if>
+            <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+                AND del_flag = #{delFlag}
+            </if>
+            <if test="updateTime != null and !&quot;&quot;.equals(updateTime)">
+                AND update_time = #{updateTime}
+            </if>
+            <if test="updateUser != null and !&quot;&quot;.equals(updateUser)">
+                AND update_user = #{updateUser}
+            </if>
+            <if test="createTime != null and !&quot;&quot;.equals(createTime)">
+                AND create_time = #{createTime}
+            </if>
+            <if test="createUser != null and !&quot;&quot;.equals(createUser)">
+                AND create_user = #{createUser}
+            </if>
+            <if test="orderCode != null and !&quot;&quot;.equals(orderCode)">
+                AND order_code = #{orderCode}
+            </if>
+            <if test="typeFlag != null and !&quot;&quot;.equals(typeFlag)">
+                AND type_flag = #{typeFlag}
+            </if>
+            <if test="codeId != null and !&quot;&quot;.equals(codeId)">
+                AND code_id = #{codeId}
+            </if>
+            <if test="stockId != null and !&quot;&quot;.equals(stockId)">
+                AND stock_id = #{stockId}
+            </if>
+            <if test="payType != null and !&quot;&quot;.equals(payType)">
+                AND pay_type = #{payType}
+            </if>
+            <if test="money != null and !&quot;&quot;.equals(money)">
+                AND money = #{money}
+            </if>
+            <if test="payMoney != null and !&quot;&quot;.equals(payMoney)">
+                AND pay_money = #{payMoney}
+            </if>
+            <if test="statusFlag != null and !&quot;&quot;.equals(statusFlag)">
+                AND status_flag = #{statusFlag}
+            </if>
+            <if test="payTime != null and !&quot;&quot;.equals(payTime)">
+                AND pay_time = #{payTime}
+            </if>
+            <if test="userId != null and !&quot;&quot;.equals(userId)">
+                AND user_id = #{userId}
+            </if>
+            <if test="remark != null and !&quot;&quot;.equals(remark)">
+                AND remark = #{remark}
+            </if>
+            <!--generatedEnd-->
+            <if test="searchKey != null and !&quot;&quot;.equals(searchKey)">
+                <trim prefix="and (" suffix=")" prefixOverrides="OR">
+                    <!--generatedStart-->
+                    OR order_code LIKE concat('%',#{searchKey},'%')
+                    OR type_flag LIKE concat('%',#{searchKey},'%')
+                    OR code_id LIKE concat('%',#{searchKey},'%')
+                    OR stock_id LIKE concat('%',#{searchKey},'%')
+                    OR pay_type LIKE concat('%',#{searchKey},'%')
+                    OR money LIKE concat('%',#{searchKey},'%')
+                    OR pay_money LIKE concat('%',#{searchKey},'%')
+                    OR status_flag LIKE concat('%',#{searchKey},'%')
+                    OR pay_time LIKE concat('%',#{searchKey},'%')
+                    OR user_id LIKE concat('%',#{searchKey},'%')
+                    OR remark LIKE concat('%',#{searchKey},'%')
+                    <!--generatedEnd-->
+                </trim>
+            </if>
+            <if test="advancedQuery != null and !&quot;&quot;.equals(advancedQuery)">
+                <foreach item="item" index="index" collection="advancedQuery.split('_;')">
+                    <choose>
+                        <when test="item.indexOf('like') != -1">
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    concat('%',#{itemDetail},'%')
+                                </if>
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+                            </foreach>
+                        </when>
+                        <otherwise>
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    #{itemDetail}
+                                </if>
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+                            </foreach>
+                        </otherwise>
+                    </choose>
+                </foreach>
+            </if>
+        </where>
+        ORDER BY
+        <if test="orderByStr != null and !&quot;&quot;.equals(orderByStr)">
+            <trim suffixOverrides=",">
+                <foreach item="item" index="index" separator="," collection="orderByStr.split('_;')">
+                    <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                        ${itemDetail}
+                    </foreach>
+                </foreach>
+            </trim>
+            ,
+        </if>
+        id DESC
+    </select>
+
+    <select id="queryPayCodeOrder" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.PayCodeOrder">
+        SELECT <include refid="Base_Column_List"/> FROM pay_code_order
+        <where>
+            AND del_flag = 'N'
+            <!--generatedStart-->
+            <if test="id != null and !&quot;&quot;.equals(id)">
+                AND id = #{id}
+            </if>
+            <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+                AND del_flag = #{delFlag}
+            </if>
+            <if test="updateTime != null and !&quot;&quot;.equals(updateTime)">
+                AND update_time = #{updateTime}
+            </if>
+            <if test="updateUser != null and !&quot;&quot;.equals(updateUser)">
+                AND update_user = #{updateUser}
+            </if>
+            <if test="createTime != null and !&quot;&quot;.equals(createTime)">
+                AND create_time = #{createTime}
+            </if>
+            <if test="createUser != null and !&quot;&quot;.equals(createUser)">
+                AND create_user = #{createUser}
+            </if>
+            <if test="orderCode != null and !&quot;&quot;.equals(orderCode)">
+                AND order_code = #{orderCode}
+            </if>
+            <if test="typeFlag != null and !&quot;&quot;.equals(typeFlag)">
+                AND type_flag = #{typeFlag}
+            </if>
+            <if test="codeId != null and !&quot;&quot;.equals(codeId)">
+                AND code_id = #{codeId}
+            </if>
+            <if test="stockId != null and !&quot;&quot;.equals(stockId)">
+                AND stock_id = #{stockId}
+            </if>
+            <if test="payType != null and !&quot;&quot;.equals(payType)">
+                AND pay_type = #{payType}
+            </if>
+            <if test="money != null and !&quot;&quot;.equals(money)">
+                AND money = #{money}
+            </if>
+            <if test="payMoney != null and !&quot;&quot;.equals(payMoney)">
+                AND pay_money = #{payMoney}
+            </if>
+            <if test="statusFlag != null and !&quot;&quot;.equals(statusFlag)">
+                AND status_flag = #{statusFlag}
+            </if>
+            <if test="payTime != null and !&quot;&quot;.equals(payTime)">
+                AND pay_time = #{payTime}
+            </if>
+            <if test="userId != null and !&quot;&quot;.equals(userId)">
+                AND user_id = #{userId}
+            </if>
+            <if test="remark != null and !&quot;&quot;.equals(remark)">
+                AND remark = #{remark}
+            </if>
+            <!--generatedEnd-->
+        </where>
+        LIMIT 1
+    </select>
+
+    <update id="delete">
+        UPDATE pay_code_order SET del_flag = 'Y'
+        WHERE
+        <if test="id != null and !&quot;&quot;.equals(id)">
+            id = #{id,jdbcType=INTEGER}
+        </if>
+        <if test="idStr != null and !&quot;&quot;.equals(idStr)">
+            id IN (${idStr})
+        </if>
+    </update>
+
+    <select id="query" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.PayCodeOrder">
+        SELECT
+        <include refid="Base_Column_List"/>
+        FROM pay_code_order
+        <where>
+            AND del_flag = 'N'
+            <!--generatedStart-->
+            <!--generatedEnd-->
+        </where>
+        ORDER BY id DESC
+    </select>
+</mapper>
+

+ 39 - 0
src/main/java/com/izouma/awesomeadmin/dao/PayCodeStockMapper.java

@@ -0,0 +1,39 @@
+package com.izouma.awesomeadmin.dao;
+
+import java.util.*;
+import com.izouma.awesomeadmin.datasource.DataSource;
+import org.springframework.stereotype.Repository;
+import com.izouma.awesomeadmin.model.PayCodeStock;
+
+
+/**
+*  Dao接口
+*/
+@Repository("com.zoumaframe.dao.PayCodeStockMapper")
+public interface PayCodeStockMapper{
+    /*generatedStart*/
+    int deleteByPrimaryKey(Integer id);
+
+    int insertSelective(PayCodeStock record);
+
+    PayCodeStock selectByPrimaryKey(Integer id);
+
+    int updateByPrimaryKeySelective(PayCodeStock record);
+
+    List<PayCodeStock> queryAllPayCodeStock(PayCodeStock record);
+
+    List<PayCodeStock> queryPayCodeStockByPage(Map<String, Object> parameter);
+
+    int delete(PayCodeStock record);
+
+    PayCodeStock queryPayCodeStock(PayCodeStock record);
+
+    List<PayCodeStock> query(PayCodeStock record);
+
+    /*generatedEnd*/
+    List<PayCodeStock> queryPayCodeStockAllUsedMoney(PayCodeStock record);
+    List<PayCodeStock> queryPayCodeStockAllUsedPayType(PayCodeStock record);
+
+    List<PayCodeStock> queryAllUsedPayCodeStock(PayCodeStock record);
+}
+

+ 541 - 0
src/main/java/com/izouma/awesomeadmin/dao/PayCodeStockMapper.xml

@@ -0,0 +1,541 @@
+<?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="com.izouma.awesomeadmin.dao.PayCodeStockMapper">
+    <resultMap id="BaseResultMap" type="com.izouma.awesomeadmin.model.PayCodeStock">
+        <!--generatedStart-->
+        <id column="id" property="id" jdbcType="INTEGER"/>
+        <result column="del_flag" property="delFlag" jdbcType="CHAR"/>
+        <result column="update_time" property="updateTime" jdbcType="TIMESTAMP"/>
+        <result column="update_user" property="updateUser" jdbcType="VARCHAR"/>
+        <result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
+        <result column="create_user" property="createUser" jdbcType="VARCHAR"/>
+        <result column="code_id" property="codeId" jdbcType="INTEGER"/>
+        <result column="pay_type" property="payType" jdbcType="VARCHAR"/>
+        <result column="money" property="money" jdbcType="DECIMAL"/>
+        <result column="amount" property="amount" jdbcType="INTEGER"/>
+        <result column="use_flag" property="useFlag" jdbcType="CHAR"/>
+        <result column="remark" property="remark" jdbcType="VARCHAR"/>
+        <result column="name" property="name" jdbcType="VARCHAR"/>
+        <!--generatedEnd-->
+    </resultMap>
+
+    <sql id="Base_Column_List">
+        <!--generatedStart-->
+        id, del_flag, update_time, update_user, create_time, create_user, code_id, pay_type, money, amount, use_flag, remark, name        <!--generatedEnd-->
+    </sql>
+
+    <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer">
+        SELECT
+        <include refid="Base_Column_List"/>
+        FROM pay_code_stock
+        WHERE id = #{id,jdbcType=INTEGER}
+    </select>
+
+    <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
+        DELETE
+        FROM pay_code_stock
+        WHERE id = #{id,jdbcType=INTEGER}
+    </delete>
+
+    <insert id="insertSelective" parameterType="com.izouma.awesomeadmin.model.PayCodeStock" useGeneratedKeys="true" keyProperty="id">
+        INSERT INTO pay_code_stock
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <!--generatedStart-->
+            <if test="id!= null">
+                id,
+            </if>
+            <if test="delFlag!= null">
+                del_flag,
+            </if>
+            <if test="updateTime!= null">
+                update_time,
+            </if>
+            <if test="updateUser!= null">
+                update_user,
+            </if>
+            <if test="createTime!= null">
+                create_time,
+            </if>
+            <if test="createUser!= null">
+                create_user,
+            </if>
+            <if test="codeId!= null">
+                code_id,
+            </if>
+            <if test="payType!= null">
+                pay_type,
+            </if>
+            <if test="money!= null">
+                money,
+            </if>
+            <if test="amount!= null">
+                amount,
+            </if>
+            <if test="useFlag!= null">
+                use_flag,
+            </if>
+            <if test="remark!= null">
+                remark,
+            </if>
+            <if test="name!= null">
+                name,
+            </if>
+            <!--generatedEnd-->
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <!--generatedStart-->
+            <if test="id != null">
+                #{id,jdbcType=INTEGER},
+            </if>
+            <if test="delFlag != null">
+                #{delFlag,jdbcType=CHAR},
+            </if>
+            <if test="updateTime != null">
+                #{updateTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="updateUser != null">
+                #{updateUser,jdbcType=VARCHAR},
+            </if>
+            <if test="createTime != null">
+                #{createTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="createUser != null">
+                #{createUser,jdbcType=VARCHAR},
+            </if>
+            <if test="codeId != null">
+                #{codeId,jdbcType=INTEGER},
+            </if>
+            <if test="payType != null">
+                #{payType,jdbcType=VARCHAR},
+            </if>
+            <if test="money != null">
+                #{money,jdbcType=DECIMAL},
+            </if>
+            <if test="amount != null">
+                #{amount,jdbcType=INTEGER},
+            </if>
+            <if test="useFlag != null">
+                #{useFlag,jdbcType=CHAR},
+            </if>
+            <if test="remark != null">
+                #{remark,jdbcType=VARCHAR},
+            </if>
+            <if test="name != null">
+                #{name,jdbcType=VARCHAR},
+            </if>
+            <!--generatedEnd-->
+        </trim>
+    </insert>
+
+    <update id="updateByPrimaryKeySelective" parameterType="com.izouma.awesomeadmin.model.PayCodeStock">
+        UPDATE pay_code_stock
+        <set>
+            <!--generatedStart-->
+            <if test="id != null">
+                id= #{id,jdbcType=INTEGER},
+            </if>
+            <if test="delFlag != null">
+                del_flag= #{delFlag,jdbcType=CHAR},
+            </if>
+            <if test="updateTime != null">
+                update_time= #{updateTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="updateUser != null">
+                update_user= #{updateUser,jdbcType=VARCHAR},
+            </if>
+            <if test="createTime != null">
+                create_time= #{createTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="createUser != null">
+                create_user= #{createUser,jdbcType=VARCHAR},
+            </if>
+            <if test="codeId != null">
+                code_id= #{codeId,jdbcType=INTEGER},
+            </if>
+            <if test="payType != null">
+                pay_type= #{payType,jdbcType=VARCHAR},
+            </if>
+            <if test="money != null">
+                money= #{money,jdbcType=DECIMAL},
+            </if>
+            <if test="amount != null">
+                amount= #{amount,jdbcType=INTEGER},
+            </if>
+            <if test="useFlag != null">
+                use_flag= #{useFlag,jdbcType=CHAR},
+            </if>
+            <if test="remark != null">
+                remark= #{remark,jdbcType=VARCHAR},
+            </if>
+            <if test="name != null">
+                name= #{name,jdbcType=VARCHAR},
+            </if>
+            <!--generatedEnd-->
+        </set>
+        WHERE
+        <if test="id != null and !&quot;&quot;.equals(id)">
+            id = #{id,jdbcType=INTEGER}
+        </if>
+        <if test="idStr != null and !&quot;&quot;.equals(idStr)">
+            id IN (${idStr})
+        </if>
+    </update>
+
+    <select id="queryPayCodeStockByPage" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.PayCodeStock">
+        SELECT <include refid="Base_Column_List"/> FROM pay_code_stock
+        <where>
+            AND del_flag = 'N'
+            <if test="record.idStr != null and !&quot;&quot;.equals(record.idStr)">
+                AND id IN (${record.idStr})
+            </if>
+            <!--generatedStart-->
+            <if test="record.id != null and !&quot;&quot;.equals(record.id)">
+                AND id = #{record.id}
+            </if>
+            <if test="record.delFlag != null and !&quot;&quot;.equals(record.delFlag)">
+                AND del_flag = #{record.delFlag}
+            </if>
+            <if test="record.updateTime != null and !&quot;&quot;.equals(record.updateTime)">
+                AND update_time = #{record.updateTime}
+            </if>
+            <if test="record.updateUser != null and !&quot;&quot;.equals(record.updateUser)">
+                AND update_user = #{record.updateUser}
+            </if>
+            <if test="record.createTime != null and !&quot;&quot;.equals(record.createTime)">
+                AND create_time = #{record.createTime}
+            </if>
+            <if test="record.createUser != null and !&quot;&quot;.equals(record.createUser)">
+                AND create_user = #{record.createUser}
+            </if>
+            <if test="record.codeId != null and !&quot;&quot;.equals(record.codeId)">
+                AND code_id = #{record.codeId}
+            </if>
+            <if test="record.payType != null and !&quot;&quot;.equals(record.payType)">
+                AND pay_type = #{record.payType}
+            </if>
+            <if test="record.money != null and !&quot;&quot;.equals(record.money)">
+                AND money = #{record.money}
+            </if>
+            <if test="record.amount != null and !&quot;&quot;.equals(record.amount)">
+                AND amount = #{record.amount}
+            </if>
+            <if test="record.useFlag != null and !&quot;&quot;.equals(record.useFlag)">
+                AND use_flag = #{record.useFlag}
+            </if>
+            <if test="record.remark != null and !&quot;&quot;.equals(record.remark)">
+                AND remark = #{record.remark}
+            </if>
+            <if test="record.name != null and !&quot;&quot;.equals(record.name)">
+                AND name = #{record.name}
+            </if>
+            <!--generatedEnd-->
+            <if test="record.searchKey != null and !&quot;&quot;.equals(record.searchKey)">
+                <trim prefix="and (" suffix=")" prefixOverrides="OR">
+                    <!--generatedStart-->
+                    OR remark LIKE concat('%',#{record.searchKey},'%')
+                    OR name LIKE concat('%',#{record.searchKey},'%')
+                    <!--generatedEnd-->
+                </trim>
+            </if>
+
+            <if test="record.advancedQuery != null and !&quot;&quot;.equals(record.advancedQuery)">
+                <foreach item="item" index="index" collection="record.advancedQuery.split('_;')">
+                    <choose>
+                        <when test="item.indexOf('like') != -1">
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    concat('%',#{itemDetail},'%')
+                                </if>
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+                            </foreach>
+                        </when>
+                        <otherwise>
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    #{itemDetail}
+                                </if>
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+                            </foreach>
+                        </otherwise>
+                    </choose>
+                </foreach>
+            </if>
+        </where>
+        ORDER BY
+        <if test="record.orderByStr != null and !&quot;&quot;.equals(record.orderByStr)">
+            <trim suffixOverrides=",">
+                <foreach item="item" index="index" separator="," collection="record.orderByStr.split('_;')">
+                    <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                        ${itemDetail}
+                    </foreach>
+                </foreach>
+            </trim>
+            ,
+        </if>
+        id DESC
+    </select>
+
+    <select id="queryAllPayCodeStock" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.PayCodeStock">
+        SELECT <include refid="Base_Column_List"/> FROM pay_code_stock
+        <where>
+            AND del_flag = 'N'
+            <if test="idStr != null and !&quot;&quot;.equals(idStr)">
+                AND id IN (${idStr})
+            </if>
+            <!--generatedStart-->
+            <if test="id != null and !&quot;&quot;.equals(id)">
+                AND id = #{id}
+            </if>
+            <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+                AND del_flag = #{delFlag}
+            </if>
+            <if test="updateTime != null and !&quot;&quot;.equals(updateTime)">
+                AND update_time = #{updateTime}
+            </if>
+            <if test="updateUser != null and !&quot;&quot;.equals(updateUser)">
+                AND update_user = #{updateUser}
+            </if>
+            <if test="createTime != null and !&quot;&quot;.equals(createTime)">
+                AND create_time = #{createTime}
+            </if>
+            <if test="createUser != null and !&quot;&quot;.equals(createUser)">
+                AND create_user = #{createUser}
+            </if>
+            <if test="codeId != null and !&quot;&quot;.equals(codeId)">
+                AND code_id = #{codeId}
+            </if>
+            <if test="payType != null and !&quot;&quot;.equals(payType)">
+                AND pay_type = #{payType}
+            </if>
+            <if test="money != null and !&quot;&quot;.equals(money)">
+                AND money = #{money}
+            </if>
+            <if test="amount != null and !&quot;&quot;.equals(amount)">
+                AND amount = #{amount}
+            </if>
+            <if test="useFlag != null and !&quot;&quot;.equals(useFlag)">
+                AND use_flag = #{useFlag}
+            </if>
+            <if test="remark != null and !&quot;&quot;.equals(remark)">
+                AND remark = #{remark}
+            </if>
+            <if test="name != null and !&quot;&quot;.equals(name)">
+                AND name = #{name}
+            </if>
+            <!--generatedEnd-->
+            <if test="searchKey != null and !&quot;&quot;.equals(searchKey)">
+                <trim prefix="and (" suffix=")" prefixOverrides="OR">
+                    <!--generatedStart-->
+                    OR remark LIKE concat('%',#{searchKey},'%')
+                    OR name LIKE concat('%',#{searchKey},'%')
+                    <!--generatedEnd-->
+                </trim>
+            </if>
+            <if test="advancedQuery != null and !&quot;&quot;.equals(advancedQuery)">
+                <foreach item="item" index="index" collection="advancedQuery.split('_;')">
+                    <choose>
+                        <when test="item.indexOf('like') != -1">
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    concat('%',#{itemDetail},'%')
+                                </if>
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+                            </foreach>
+                        </when>
+                        <otherwise>
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    #{itemDetail}
+                                </if>
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+                            </foreach>
+                        </otherwise>
+                    </choose>
+                </foreach>
+            </if>
+        </where>
+        ORDER BY
+        <if test="orderByStr != null and !&quot;&quot;.equals(orderByStr)">
+            <trim suffixOverrides=",">
+                <foreach item="item" index="index" separator="," collection="orderByStr.split('_;')">
+                    <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                        ${itemDetail}
+                    </foreach>
+                </foreach>
+            </trim>
+            ,
+        </if>
+        id DESC
+    </select>
+
+    <select id="queryPayCodeStockAllUsedMoney" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.PayCodeStock">
+       SELECT
+            DISTINCT money
+        FROM
+            pay_code_stock
+        WHERE
+            del_flag = 'N'
+        AND use_flag = 'Y'
+       <![CDATA[ AND amount > 0 ]]>
+        AND code_id IN (
+            SELECT
+                id
+            FROM
+                pay_code_info
+            WHERE
+                del_flag = 'N'
+            AND use_flag = 'Y'
+        )
+        ORDER BY
+        money
+    </select>
+
+    <select id="queryPayCodeStockAllUsedPayType" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.PayCodeStock">
+       SELECT
+            DISTINCT pay_type
+        FROM
+            pay_code_stock
+        WHERE
+            del_flag = 'N'
+        AND use_flag = 'Y'
+       <![CDATA[ AND amount > 0 ]]>
+        AND code_id IN (
+            SELECT
+                id
+            FROM
+                pay_code_info
+            WHERE
+                del_flag = 'N'
+            AND use_flag = 'Y'
+        )
+        <if test="money != null and !&quot;&quot;.equals(money)">
+            AND money = #{money}
+        </if>
+
+        ORDER BY
+        pay_type
+    </select>
+    <select id="queryAllUsedPayCodeStock" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.PayCodeStock">
+       SELECT
+            *
+        FROM
+            pay_code_stock
+        WHERE
+            del_flag = 'N'
+        AND use_flag = 'Y'
+       <![CDATA[ AND amount > 0 ]]>
+        AND code_id IN (
+            SELECT
+                id
+            FROM
+                pay_code_info
+            WHERE
+                del_flag = 'N'
+            AND use_flag = 'Y'
+        )
+        <if test="codeId != null and !&quot;&quot;.equals(codeId)">
+            AND code_id = #{codeId}
+        </if>
+        <if test="payType != null and !&quot;&quot;.equals(payType)">
+            AND pay_type = #{payType}
+        </if>
+        <if test="money != null and !&quot;&quot;.equals(money)">
+            AND money = #{money}
+        </if>
+        <if test="amount != null and !&quot;&quot;.equals(amount)">
+            AND amount = #{amount}
+        </if>
+        <if test="useFlag != null and !&quot;&quot;.equals(useFlag)">
+            AND use_flag = #{useFlag}
+        </if>
+        <if test="remark != null and !&quot;&quot;.equals(remark)">
+            AND remark = #{remark}
+        </if>
+        <if test="name != null and !&quot;&quot;.equals(name)">
+            AND name = #{name}
+        </if>
+
+    </select>
+
+
+    <select id="queryPayCodeStock" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.PayCodeStock">
+        SELECT <include refid="Base_Column_List"/> FROM pay_code_stock
+        <where>
+            AND del_flag = 'N'
+            <!--generatedStart-->
+            <if test="id != null and !&quot;&quot;.equals(id)">
+                AND id = #{id}
+            </if>
+            <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+                AND del_flag = #{delFlag}
+            </if>
+            <if test="updateTime != null and !&quot;&quot;.equals(updateTime)">
+                AND update_time = #{updateTime}
+            </if>
+            <if test="updateUser != null and !&quot;&quot;.equals(updateUser)">
+                AND update_user = #{updateUser}
+            </if>
+            <if test="createTime != null and !&quot;&quot;.equals(createTime)">
+                AND create_time = #{createTime}
+            </if>
+            <if test="createUser != null and !&quot;&quot;.equals(createUser)">
+                AND create_user = #{createUser}
+            </if>
+            <if test="codeId != null and !&quot;&quot;.equals(codeId)">
+                AND code_id = #{codeId}
+            </if>
+            <if test="payType != null and !&quot;&quot;.equals(payType)">
+                AND pay_type = #{payType}
+            </if>
+            <if test="money != null and !&quot;&quot;.equals(money)">
+                AND money = #{money}
+            </if>
+            <if test="amount != null and !&quot;&quot;.equals(amount)">
+                AND amount = #{amount}
+            </if>
+            <if test="useFlag != null and !&quot;&quot;.equals(useFlag)">
+                AND use_flag = #{useFlag}
+            </if>
+            <if test="remark != null and !&quot;&quot;.equals(remark)">
+                AND remark = #{remark}
+            </if>
+            <if test="name != null and !&quot;&quot;.equals(name)">
+                AND name = #{name}
+            </if>
+            <!--generatedEnd-->
+        </where>
+        LIMIT 1
+    </select>
+
+    <update id="delete">
+        UPDATE pay_code_stock SET del_flag = 'Y'
+        WHERE
+        <if test="id != null and !&quot;&quot;.equals(id)">
+            id = #{id,jdbcType=INTEGER}
+        </if>
+        <if test="idStr != null and !&quot;&quot;.equals(idStr)">
+            id IN (${idStr})
+        </if>
+    </update>
+
+    <select id="query" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.PayCodeStock">
+        SELECT
+        <include refid="Base_Column_List"/>
+        FROM pay_code_stock
+        <where>
+            AND del_flag = 'N'
+            <!--generatedStart-->
+            <!--generatedEnd-->
+        </where>
+        ORDER BY id DESC
+    </select>
+</mapper>
+

+ 161 - 0
src/main/java/com/izouma/awesomeadmin/model/PayCodeInfo.java

@@ -0,0 +1,161 @@
+package com.izouma.awesomeadmin.model;
+
+import java.math.BigDecimal;
+import java.util.*;
+import com.fasterxml.jackson.annotation.JsonAutoDetect;
+import com.fasterxml.jackson.annotation.JsonInclude;
+
+
+@JsonAutoDetect
+@JsonInclude(JsonInclude.Include.NON_NULL)
+public class PayCodeInfo{
+    /*generatedStart*/
+    private Integer id;
+    private String delFlag;
+    private Date updateTime;
+    private String updateUser;
+    private Date createTime;
+    private String createUser;
+    private String codeName;
+    private String payType;
+    private String image;
+    private BigDecimal limitMoney;
+    private String useFlag;
+    private String remark;
+
+    private String idStr;
+
+    private String searchKey;
+
+    /**
+    * and,test_name,like,value;or,remark,=,123
+    */
+    private String advancedQuery;
+
+    /**
+    * column_name_,desc_;column_name_,asc
+    */
+    private String orderByStr;
+    /*generatedEnd*/
+
+    /*generatedStart*/
+    public Integer getId(){
+        return this.id;
+    }
+
+    public void setId(Integer id){
+        this.id = id;
+    }
+    public String getDelFlag(){
+        return this.delFlag;
+    }
+
+    public void setDelFlag(String delFlag){
+        this.delFlag = delFlag;
+    }
+    public Date getUpdateTime(){
+        return this.updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime){
+        this.updateTime = updateTime;
+    }
+    public String getUpdateUser(){
+        return this.updateUser;
+    }
+
+    public void setUpdateUser(String updateUser){
+        this.updateUser = updateUser;
+    }
+    public Date getCreateTime(){
+        return this.createTime;
+    }
+
+    public void setCreateTime(Date createTime){
+        this.createTime = createTime;
+    }
+    public String getCreateUser(){
+        return this.createUser;
+    }
+
+    public void setCreateUser(String createUser){
+        this.createUser = createUser;
+    }
+    public String getCodeName(){
+        return this.codeName;
+    }
+
+    public void setCodeName(String codeName){
+        this.codeName = codeName;
+    }
+    public String getPayType(){
+        return this.payType;
+    }
+
+    public void setPayType(String payType){
+        this.payType = payType;
+    }
+    public String getImage(){
+        return this.image;
+    }
+
+    public void setImage(String image){
+        this.image = image;
+    }
+    public BigDecimal getLimitMoney(){
+        return this.limitMoney;
+    }
+
+    public void setLimitMoney(BigDecimal limitMoney){
+        this.limitMoney = limitMoney;
+    }
+    public String getUseFlag(){
+        return this.useFlag;
+    }
+
+    public void setUseFlag(String useFlag){
+        this.useFlag = useFlag;
+    }
+    public String getRemark(){
+        return this.remark;
+    }
+
+    public void setRemark(String remark){
+        this.remark = remark;
+    }
+
+    public String getSearchKey() {
+        return searchKey;
+    }
+
+    public void setSearchKey(String searchKey) {
+        this.searchKey = searchKey;
+    }
+
+    public String getAdvancedQuery() {
+        return advancedQuery;
+    }
+
+    public void setAdvancedQuery(String advancedQuery) {
+        this.advancedQuery = advancedQuery;
+    }
+
+    public String getOrderByStr() {
+        return orderByStr;
+    }
+
+    public void setOrderByStr(String orderByStr) {
+        this.orderByStr = orderByStr;
+    }
+
+    public String getIdStr() {
+        return idStr;
+    }
+
+    public void setIdStr(String idStr) {
+        this.idStr = idStr;
+    }
+    /*generatedEnd*/
+
+}
+

+ 201 - 0
src/main/java/com/izouma/awesomeadmin/model/PayCodeOrder.java

@@ -0,0 +1,201 @@
+package com.izouma.awesomeadmin.model;
+
+import java.math.BigDecimal;
+import java.util.*;
+import com.fasterxml.jackson.annotation.JsonAutoDetect;
+import com.fasterxml.jackson.annotation.JsonInclude;
+
+
+@JsonAutoDetect
+@JsonInclude(JsonInclude.Include.NON_NULL)
+public class PayCodeOrder{
+    /*generatedStart*/
+    private Integer id;
+    private String delFlag;
+    private Date updateTime;
+    private String updateUser;
+    private Date createTime;
+    private String createUser;
+    private String orderCode;
+    private Integer typeFlag;
+    private Integer codeId;
+    private Integer stockId;
+    private String payType;
+    private BigDecimal money;
+    private BigDecimal payMoney;
+    private Integer statusFlag;
+    private Date payTime;
+    private Integer userId;
+    private String remark;
+
+    private String idStr;
+
+    private String searchKey;
+
+    /**
+    * and,test_name,like,value;or,remark,=,123
+    */
+    private String advancedQuery;
+
+    /**
+    * column_name_,desc_;column_name_,asc
+    */
+    private String orderByStr;
+    /*generatedEnd*/
+
+    /*generatedStart*/
+    public Integer getId(){
+        return this.id;
+    }
+
+    public void setId(Integer id){
+        this.id = id;
+    }
+    public String getDelFlag(){
+        return this.delFlag;
+    }
+
+    public void setDelFlag(String delFlag){
+        this.delFlag = delFlag;
+    }
+    public Date getUpdateTime(){
+        return this.updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime){
+        this.updateTime = updateTime;
+    }
+    public String getUpdateUser(){
+        return this.updateUser;
+    }
+
+    public void setUpdateUser(String updateUser){
+        this.updateUser = updateUser;
+    }
+    public Date getCreateTime(){
+        return this.createTime;
+    }
+
+    public void setCreateTime(Date createTime){
+        this.createTime = createTime;
+    }
+    public String getCreateUser(){
+        return this.createUser;
+    }
+
+    public void setCreateUser(String createUser){
+        this.createUser = createUser;
+    }
+    public String getOrderCode(){
+        return this.orderCode;
+    }
+
+    public void setOrderCode(String orderCode){
+        this.orderCode = orderCode;
+    }
+    public Integer getTypeFlag(){
+        return this.typeFlag;
+    }
+
+    public void setTypeFlag(Integer typeFlag){
+        this.typeFlag = typeFlag;
+    }
+    public Integer getCodeId(){
+        return this.codeId;
+    }
+
+    public void setCodeId(Integer codeId){
+        this.codeId = codeId;
+    }
+    public Integer getStockId(){
+        return this.stockId;
+    }
+
+    public void setStockId(Integer stockId){
+        this.stockId = stockId;
+    }
+    public String getPayType(){
+        return this.payType;
+    }
+
+    public void setPayType(String payType){
+        this.payType = payType;
+    }
+    public BigDecimal getMoney(){
+        return this.money;
+    }
+
+    public void setMoney(BigDecimal money){
+        this.money = money;
+    }
+    public BigDecimal getPayMoney(){
+        return this.payMoney;
+    }
+
+    public void setPayMoney(BigDecimal payMoney){
+        this.payMoney = payMoney;
+    }
+    public Integer getStatusFlag(){
+        return this.statusFlag;
+    }
+
+    public void setStatusFlag(Integer statusFlag){
+        this.statusFlag = statusFlag;
+    }
+    public Date getPayTime(){
+        return this.payTime;
+    }
+
+    public void setPayTime(Date payTime){
+        this.payTime = payTime;
+    }
+    public Integer getUserId(){
+        return this.userId;
+    }
+
+    public void setUserId(Integer userId){
+        this.userId = userId;
+    }
+    public String getRemark(){
+        return this.remark;
+    }
+
+    public void setRemark(String remark){
+        this.remark = remark;
+    }
+
+    public String getSearchKey() {
+        return searchKey;
+    }
+
+    public void setSearchKey(String searchKey) {
+        this.searchKey = searchKey;
+    }
+
+    public String getAdvancedQuery() {
+        return advancedQuery;
+    }
+
+    public void setAdvancedQuery(String advancedQuery) {
+        this.advancedQuery = advancedQuery;
+    }
+
+    public String getOrderByStr() {
+        return orderByStr;
+    }
+
+    public void setOrderByStr(String orderByStr) {
+        this.orderByStr = orderByStr;
+    }
+
+    public String getIdStr() {
+        return idStr;
+    }
+
+    public void setIdStr(String idStr) {
+        this.idStr = idStr;
+    }
+    /*generatedEnd*/
+
+}
+

+ 169 - 0
src/main/java/com/izouma/awesomeadmin/model/PayCodeStock.java

@@ -0,0 +1,169 @@
+package com.izouma.awesomeadmin.model;
+
+import java.math.BigDecimal;
+import java.util.*;
+import com.fasterxml.jackson.annotation.JsonAutoDetect;
+import com.fasterxml.jackson.annotation.JsonInclude;
+
+
+@JsonAutoDetect
+@JsonInclude(JsonInclude.Include.NON_NULL)
+public class PayCodeStock{
+    /*generatedStart*/
+    private Integer id;
+    private String delFlag;
+    private Date updateTime;
+    private String updateUser;
+    private Date createTime;
+    private String createUser;
+    private Integer codeId;
+    private String payType;
+    private BigDecimal money;
+    private Integer amount;
+    private String useFlag;
+    private String remark;
+    private String name;
+
+    private String idStr;
+
+    private String searchKey;
+
+    /**
+    * and,test_name,like,value;or,remark,=,123
+    */
+    private String advancedQuery;
+
+    /**
+    * column_name_,desc_;column_name_,asc
+    */
+    private String orderByStr;
+    /*generatedEnd*/
+
+    /*generatedStart*/
+    public Integer getId(){
+        return this.id;
+    }
+
+    public void setId(Integer id){
+        this.id = id;
+    }
+    public String getDelFlag(){
+        return this.delFlag;
+    }
+
+    public void setDelFlag(String delFlag){
+        this.delFlag = delFlag;
+    }
+    public Date getUpdateTime(){
+        return this.updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime){
+        this.updateTime = updateTime;
+    }
+    public String getUpdateUser(){
+        return this.updateUser;
+    }
+
+    public void setUpdateUser(String updateUser){
+        this.updateUser = updateUser;
+    }
+    public Date getCreateTime(){
+        return this.createTime;
+    }
+
+    public void setCreateTime(Date createTime){
+        this.createTime = createTime;
+    }
+    public String getCreateUser(){
+        return this.createUser;
+    }
+
+    public void setCreateUser(String createUser){
+        this.createUser = createUser;
+    }
+    public Integer getCodeId(){
+        return this.codeId;
+    }
+
+    public void setCodeId(Integer codeId){
+        this.codeId = codeId;
+    }
+    public String getPayType(){
+        return this.payType;
+    }
+
+    public void setPayType(String payType){
+        this.payType = payType;
+    }
+    public BigDecimal getMoney(){
+        return this.money;
+    }
+
+    public void setMoney(BigDecimal money){
+        this.money = money;
+    }
+    public Integer getAmount(){
+        return this.amount;
+    }
+
+    public void setAmount(Integer amount){
+        this.amount = amount;
+    }
+    public String getUseFlag(){
+        return this.useFlag;
+    }
+
+    public void setUseFlag(String useFlag){
+        this.useFlag = useFlag;
+    }
+    public String getRemark(){
+        return this.remark;
+    }
+
+    public void setRemark(String remark){
+        this.remark = remark;
+    }
+    public String getName(){
+        return this.name;
+    }
+
+    public void setName(String name){
+        this.name = name;
+    }
+
+    public String getSearchKey() {
+        return searchKey;
+    }
+
+    public void setSearchKey(String searchKey) {
+        this.searchKey = searchKey;
+    }
+
+    public String getAdvancedQuery() {
+        return advancedQuery;
+    }
+
+    public void setAdvancedQuery(String advancedQuery) {
+        this.advancedQuery = advancedQuery;
+    }
+
+    public String getOrderByStr() {
+        return orderByStr;
+    }
+
+    public void setOrderByStr(String orderByStr) {
+        this.orderByStr = orderByStr;
+    }
+
+    public String getIdStr() {
+        return idStr;
+    }
+
+    public void setIdStr(String idStr) {
+        this.idStr = idStr;
+    }
+    /*generatedEnd*/
+
+}
+

+ 28 - 0
src/main/java/com/izouma/awesomeadmin/service/PayCodeInfoService.java

@@ -0,0 +1,28 @@
+package com.izouma.awesomeadmin.service;
+
+import java.util.*;
+import com.izouma.awesomeadmin.dto.Page;
+import com.izouma.awesomeadmin.model.PayCodeInfo;
+
+
+/**
+*  service接口类
+*/
+public interface PayCodeInfoService{
+    /*generatedStart*/
+    List<PayCodeInfo> getPayCodeInfoList(PayCodeInfo record);
+
+    List<PayCodeInfo> getPayCodeInfoByPage(Page page, PayCodeInfo record);
+
+    PayCodeInfo getPayCodeInfoById(String id);
+
+    PayCodeInfo getPayCodeInfo(PayCodeInfo record);
+
+    boolean createPayCodeInfo(PayCodeInfo record);
+
+    boolean deletePayCodeInfo(PayCodeInfo record);
+
+    boolean updatePayCodeInfo(PayCodeInfo record);
+    /*generatedEnd*/
+}
+

+ 31 - 0
src/main/java/com/izouma/awesomeadmin/service/PayCodeOrderService.java

@@ -0,0 +1,31 @@
+package com.izouma.awesomeadmin.service;
+
+import java.util.*;
+import com.izouma.awesomeadmin.dto.Page;
+import com.izouma.awesomeadmin.dto.Result;
+import com.izouma.awesomeadmin.model.PayCodeOrder;
+
+
+/**
+*  service接口类
+*/
+public interface PayCodeOrderService{
+    /*generatedStart*/
+    List<PayCodeOrder> getPayCodeOrderList(PayCodeOrder record);
+
+    List<PayCodeOrder> getPayCodeOrderByPage(Page page, PayCodeOrder record);
+
+    PayCodeOrder getPayCodeOrderById(String id);
+
+    PayCodeOrder getPayCodeOrder(PayCodeOrder record);
+
+    boolean createPayCodeOrder(PayCodeOrder record);
+
+    boolean deletePayCodeOrder(PayCodeOrder record);
+
+    boolean updatePayCodeOrder(PayCodeOrder record);
+
+    /*generatedEnd*/
+    Result submit(PayCodeOrder record);
+}
+

+ 33 - 0
src/main/java/com/izouma/awesomeadmin/service/PayCodeStockService.java

@@ -0,0 +1,33 @@
+package com.izouma.awesomeadmin.service;
+
+import java.util.*;
+import com.izouma.awesomeadmin.dto.Page;
+import com.izouma.awesomeadmin.model.PayCodeStock;
+
+
+/**
+*  service接口类
+*/
+public interface PayCodeStockService{
+    /*generatedStart*/
+    List<PayCodeStock> getPayCodeStockList(PayCodeStock record);
+
+    List<PayCodeStock> getPayCodeStockByPage(Page page, PayCodeStock record);
+
+    PayCodeStock getPayCodeStockById(String id);
+
+    PayCodeStock getPayCodeStock(PayCodeStock record);
+
+    boolean createPayCodeStock(PayCodeStock record);
+
+    boolean deletePayCodeStock(PayCodeStock record);
+
+    boolean updatePayCodeStock(PayCodeStock record);
+
+    /*generatedEnd*/
+    List<PayCodeStock> getPayCodeStockAllUsedMoney(PayCodeStock record);
+    List<PayCodeStock> getPayCodeStockAllUsedPayType(PayCodeStock record);
+
+    PayCodeStock getRandomStock(PayCodeStock record);
+}
+

+ 117 - 0
src/main/java/com/izouma/awesomeadmin/service/impl/PayCodeInfoServiceImpl.java

@@ -0,0 +1,117 @@
+package com.izouma.awesomeadmin.service.impl;
+
+import java.util.*;
+import org.apache.log4j.Logger;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.izouma.awesomeadmin.constant.AppConstant;
+import com.izouma.awesomeadmin.dto.Page;
+import com.izouma.awesomeadmin.model.PayCodeInfo;
+import com.izouma.awesomeadmin.service.PayCodeInfoService;
+import com.izouma.awesomeadmin.dao.PayCodeInfoMapper;
+
+/**
+*  service接口实现类
+*/
+@Service
+public class PayCodeInfoServiceImpl implements PayCodeInfoService{
+    /*generatedStart*/
+    private static Logger logger = Logger.getLogger(PayCodeInfoServiceImpl.class);
+
+    @Autowired
+    private PayCodeInfoMapper payCodeInfoMapper;
+    /*generatedEnd*/
+
+    /*generatedStart*/
+    @Override
+    public List<PayCodeInfo> getPayCodeInfoList(PayCodeInfo record) {
+        logger.info("getPayCodeInfoList");
+        try {
+            return payCodeInfoMapper.queryAllPayCodeInfo(record);
+        } catch (Exception e) {
+            logger.error("getPayCodeInfoList", e);
+        }
+        return null;
+    }
+
+    @Override
+    public List<PayCodeInfo> getPayCodeInfoByPage(Page page, PayCodeInfo record) {
+        logger.info("getPayCodeInfoByPage");
+        try {
+            Map<String, Object> parameter = new HashMap<String, Object>();
+            parameter.put("record", record);
+            parameter.put(AppConstant.PAGE, page);
+
+            return payCodeInfoMapper.queryPayCodeInfoByPage(parameter);
+        } catch (Exception e) {
+            logger.error("getPayCodeInfoByPage", e);
+        }
+        return null;
+    }
+
+    @Override
+    public PayCodeInfo getPayCodeInfoById(String id) {
+        logger.info("getPayCodeInfoyId");
+        try {
+            return payCodeInfoMapper.selectByPrimaryKey(Integer.valueOf(id));
+        } catch (Exception e) {
+            logger.error("getPayCodeInfoById", e);
+        }
+        return null;
+    }
+
+    @Override
+    public PayCodeInfo getPayCodeInfo(PayCodeInfo record) {
+        logger.info("getPayCodeInfo");
+        try {
+            return payCodeInfoMapper.queryPayCodeInfo(record);
+        } catch (Exception e) {
+            logger.error("getPayCodeInfo", e);
+        }
+        return null;
+    }
+
+    @Override
+    public boolean createPayCodeInfo(PayCodeInfo record) {
+        logger.info("createPayCodeInfo");
+        try {
+            int updates = payCodeInfoMapper.insertSelective(record);
+            if (updates > 0) {
+                 return true;
+            }
+        } catch (Exception e) {
+            logger.error("createPayCodeInfo", e);
+        }
+        return false;
+    }
+
+    @Override
+    public boolean deletePayCodeInfo(PayCodeInfo record) {
+        logger.info("deletePayCodeInfo");
+        try {
+            int updates = payCodeInfoMapper.delete(record);
+            if (updates > 0) {
+                 return true;
+            }
+        } catch (Exception e) {
+             logger.error("deletePayCodeInfo", e);
+        }
+        return false;
+    }
+
+    @Override
+    public boolean updatePayCodeInfo(PayCodeInfo record) {
+        logger.info("updatePayCodeInfo");
+        try {
+            int updates = payCodeInfoMapper.updateByPrimaryKeySelective(record);
+            if (updates > 0) {
+                 return true;
+            }
+        } catch (Exception e) {
+             logger.error("updatePayCodeInfo", e);
+        }
+        return false;
+    }
+    /*generatedEnd*/
+}
+

+ 166 - 0
src/main/java/com/izouma/awesomeadmin/service/impl/PayCodeOrderServiceImpl.java

@@ -0,0 +1,166 @@
+package com.izouma.awesomeadmin.service.impl;
+
+import java.util.*;
+
+import com.izouma.awesomeadmin.dao.PayCodeStockMapper;
+import com.izouma.awesomeadmin.dto.Result;
+import com.izouma.awesomeadmin.model.PayCodeStock;
+import com.izouma.awesomeadmin.util.MbappUtil;
+import org.apache.log4j.Logger;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.izouma.awesomeadmin.constant.AppConstant;
+import com.izouma.awesomeadmin.dto.Page;
+import com.izouma.awesomeadmin.model.PayCodeOrder;
+import com.izouma.awesomeadmin.service.PayCodeOrderService;
+import com.izouma.awesomeadmin.dao.PayCodeOrderMapper;
+
+/**
+ * service接口实现类
+ */
+@Service
+public class PayCodeOrderServiceImpl implements PayCodeOrderService {
+    /*generatedStart*/
+    private static Logger logger = Logger.getLogger(PayCodeOrderServiceImpl.class);
+
+    @Autowired
+    private PayCodeOrderMapper payCodeOrderMapper;
+    /*generatedEnd*/
+    /*generatedStart*/
+    @Autowired
+    private PayCodeStockMapper payCodeStockMapper;
+
+    @Override
+    public List<PayCodeOrder> getPayCodeOrderList(PayCodeOrder record) {
+        logger.info("getPayCodeOrderList");
+        try {
+            return payCodeOrderMapper.queryAllPayCodeOrder(record);
+        } catch (Exception e) {
+            logger.error("getPayCodeOrderList", e);
+        }
+        return null;
+    }
+
+    @Override
+    public List<PayCodeOrder> getPayCodeOrderByPage(Page page, PayCodeOrder record) {
+        logger.info("getPayCodeOrderByPage");
+        try {
+            Map<String, Object> parameter = new HashMap<String, Object>();
+            parameter.put("record", record);
+            parameter.put(AppConstant.PAGE, page);
+
+            return payCodeOrderMapper.queryPayCodeOrderByPage(parameter);
+        } catch (Exception e) {
+            logger.error("getPayCodeOrderByPage", e);
+        }
+        return null;
+    }
+
+    @Override
+    public PayCodeOrder getPayCodeOrderById(String id) {
+        logger.info("getPayCodeOrderyId");
+        try {
+            return payCodeOrderMapper.selectByPrimaryKey(Integer.valueOf(id));
+        } catch (Exception e) {
+            logger.error("getPayCodeOrderById", e);
+        }
+        return null;
+    }
+
+    @Override
+    public PayCodeOrder getPayCodeOrder(PayCodeOrder record) {
+        logger.info("getPayCodeOrder");
+        try {
+            return payCodeOrderMapper.queryPayCodeOrder(record);
+        } catch (Exception e) {
+            logger.error("getPayCodeOrder", e);
+        }
+        return null;
+    }
+
+    @Override
+    public boolean createPayCodeOrder(PayCodeOrder record) {
+        logger.info("createPayCodeOrder");
+        try {
+            int updates = payCodeOrderMapper.insertSelective(record);
+            if (updates > 0) {
+                return true;
+            }
+        } catch (Exception e) {
+            logger.error("createPayCodeOrder", e);
+        }
+        return false;
+    }
+
+    @Override
+    public boolean deletePayCodeOrder(PayCodeOrder record) {
+        logger.info("deletePayCodeOrder");
+        try {
+            int updates = payCodeOrderMapper.delete(record);
+            if (updates > 0) {
+                return true;
+            }
+        } catch (Exception e) {
+            logger.error("deletePayCodeOrder", e);
+        }
+        return false;
+    }
+
+    @Override
+    public boolean updatePayCodeOrder(PayCodeOrder record) {
+        logger.info("updatePayCodeOrder");
+        try {
+            int updates = payCodeOrderMapper.updateByPrimaryKeySelective(record);
+            if (updates > 0) {
+                return true;
+            }
+        } catch (Exception e) {
+            logger.error("updatePayCodeOrder", e);
+        }
+        return false;
+    }
+
+
+    /*generatedEnd*/
+
+    @Override
+    public Result submit(PayCodeOrder record) {
+        logger.info("submit");
+        try {
+
+            record.setOrderCode(MbappUtil.getOrderIdByUUId());
+            if (record.getStockId() == null) {
+                return new Result(false, "付款码库存为空");
+            }
+
+            PayCodeStock payCodeStock = new PayCodeStock();
+            payCodeStock.setId(record.getStockId());
+            payCodeStock = payCodeStockMapper.queryPayCodeStock(payCodeStock);
+
+            if (payCodeStock == null) {
+                return new Result(false, "付款码库存不存在");
+            }
+            if (payCodeStock.getAmount() <= 0) {
+                return new Result(false, "付款码库存不足");
+            }
+
+            record.setPayType(payCodeStock.getPayType());
+            record.setCodeId(payCodeStock.getCodeId());
+            record.setMoney(payCodeStock.getMoney());
+
+            int updates = payCodeOrderMapper.insertSelective(record);
+            if (updates > 0) {
+                payCodeStock.setAmount(payCodeStock.getAmount() - 1);
+                payCodeStockMapper.updateByPrimaryKeySelective(payCodeStock);
+
+                return new Result(true, record.getId());
+            }
+
+
+        } catch (Exception e) {
+            logger.error("submit", e);
+        }
+        return new Result(false, "下单失败");
+    }
+}
+

+ 158 - 0
src/main/java/com/izouma/awesomeadmin/service/impl/PayCodeStockServiceImpl.java

@@ -0,0 +1,158 @@
+package com.izouma.awesomeadmin.service.impl;
+
+import java.util.*;
+
+import org.apache.log4j.Logger;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.izouma.awesomeadmin.constant.AppConstant;
+import com.izouma.awesomeadmin.dto.Page;
+import com.izouma.awesomeadmin.model.PayCodeStock;
+import com.izouma.awesomeadmin.service.PayCodeStockService;
+import com.izouma.awesomeadmin.dao.PayCodeStockMapper;
+
+/**
+ * service接口实现类
+ */
+@Service
+public class PayCodeStockServiceImpl implements PayCodeStockService {
+    /*generatedStart*/
+    private static Logger logger = Logger.getLogger(PayCodeStockServiceImpl.class);
+
+    @Autowired
+    private PayCodeStockMapper payCodeStockMapper;
+    /*generatedEnd*/
+
+    /*generatedStart*/
+    @Override
+    public List<PayCodeStock> getPayCodeStockList(PayCodeStock record) {
+        logger.info("getPayCodeStockList");
+        try {
+            return payCodeStockMapper.queryAllPayCodeStock(record);
+        } catch (Exception e) {
+            logger.error("getPayCodeStockList", e);
+        }
+        return null;
+    }
+
+    @Override
+    public List<PayCodeStock> getPayCodeStockByPage(Page page, PayCodeStock record) {
+        logger.info("getPayCodeStockByPage");
+        try {
+            Map<String, Object> parameter = new HashMap<String, Object>();
+            parameter.put("record", record);
+            parameter.put(AppConstant.PAGE, page);
+
+            return payCodeStockMapper.queryPayCodeStockByPage(parameter);
+        } catch (Exception e) {
+            logger.error("getPayCodeStockByPage", e);
+        }
+        return null;
+    }
+
+    @Override
+    public PayCodeStock getPayCodeStockById(String id) {
+        logger.info("getPayCodeStockyId");
+        try {
+            return payCodeStockMapper.selectByPrimaryKey(Integer.valueOf(id));
+        } catch (Exception e) {
+            logger.error("getPayCodeStockById", e);
+        }
+        return null;
+    }
+
+    @Override
+    public PayCodeStock getPayCodeStock(PayCodeStock record) {
+        logger.info("getPayCodeStock");
+        try {
+            return payCodeStockMapper.queryPayCodeStock(record);
+        } catch (Exception e) {
+            logger.error("getPayCodeStock", e);
+        }
+        return null;
+    }
+
+    @Override
+    public boolean createPayCodeStock(PayCodeStock record) {
+        logger.info("createPayCodeStock");
+        try {
+            int updates = payCodeStockMapper.insertSelective(record);
+            if (updates > 0) {
+                return true;
+            }
+        } catch (Exception e) {
+            logger.error("createPayCodeStock", e);
+        }
+        return false;
+    }
+
+    @Override
+    public boolean deletePayCodeStock(PayCodeStock record) {
+        logger.info("deletePayCodeStock");
+        try {
+            int updates = payCodeStockMapper.delete(record);
+            if (updates > 0) {
+                return true;
+            }
+        } catch (Exception e) {
+            logger.error("deletePayCodeStock", e);
+        }
+        return false;
+    }
+
+    @Override
+    public boolean updatePayCodeStock(PayCodeStock record) {
+        logger.info("updatePayCodeStock");
+        try {
+            int updates = payCodeStockMapper.updateByPrimaryKeySelective(record);
+            if (updates > 0) {
+                return true;
+            }
+        } catch (Exception e) {
+            logger.error("updatePayCodeStock", e);
+        }
+        return false;
+    }
+    /*generatedEnd*/
+
+    @Override
+    public List<PayCodeStock> getPayCodeStockAllUsedMoney(PayCodeStock record) {
+        logger.info("getPayCodeStockAllUsedMoney");
+        try {
+            return payCodeStockMapper.queryPayCodeStockAllUsedMoney(record);
+        } catch (Exception e) {
+            logger.error("getPayCodeStockAllUsedMoney", e);
+        }
+        return null;
+    }
+
+    @Override
+    public List<PayCodeStock> getPayCodeStockAllUsedPayType(PayCodeStock record) {
+        logger.info("getPayCodeStockAllUsedPayType");
+        try {
+            return payCodeStockMapper.queryPayCodeStockAllUsedPayType(record);
+        } catch (Exception e) {
+            logger.error("getPayCodeStockAllUsedPayType", e);
+        }
+        return null;
+    }
+
+    @Override
+    public PayCodeStock getRandomStock(PayCodeStock record) {
+        logger.info("getRandomStock");
+        try {
+            List<PayCodeStock> payCodeStockList = payCodeStockMapper.queryAllUsedPayCodeStock(record);
+
+            if (payCodeStockList.size() > 0) {
+                Collections.shuffle(payCodeStockList);
+
+                return payCodeStockList.get(0);
+            }
+
+        } catch (Exception e) {
+            logger.error("getRandomStock", e);
+        }
+        return null;
+    }
+}
+

+ 1 - 1
src/main/java/com/izouma/awesomeadmin/util/MbappUtil.java

@@ -281,7 +281,7 @@ public class MbappUtil {
         // 0 代表前面补充0
         // 0 代表前面补充0
         // 4 代表长度为4
         // 4 代表长度为4
         // d 代表参数为正数型
         // d 代表参数为正数型
-        return machineId + String.format("%015d", hashCodeV);
+        return machineId + String.format("%010d", hashCodeV);
     }
     }
 
 
     public static String getCodeByUUId() {
     public static String getCodeByUUId() {

+ 128 - 0
src/main/java/com/izouma/awesomeadmin/web/PayCodeInfoController.java

@@ -0,0 +1,128 @@
+package com.izouma.awesomeadmin.web;
+
+import java.util.*;
+
+import com.izouma.awesomeadmin.util.ExportExcelUtil;
+import org.apache.commons.lang.StringUtils;
+import org.apache.shiro.authz.annotation.RequiresAuthentication;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.*;
+import com.izouma.awesomeadmin.constant.AppConstant;
+import com.izouma.awesomeadmin.dto.Page;
+import com.izouma.awesomeadmin.dto.Result;
+import com.izouma.awesomeadmin.model.PayCodeInfo;
+import com.izouma.awesomeadmin.service.PayCodeInfoService;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+@Controller
+@RequestMapping("/payCodeInfo")
+public class PayCodeInfoController {
+    /*generatedStart*/
+    @Autowired
+    private PayCodeInfoService payCodeInfoService;
+    /*generatedEnd*/
+
+    /*generatedStart*/
+    @RequiresAuthentication
+    @RequestMapping(value = "/all", method = RequestMethod.GET)
+    @ResponseBody
+    public Result all(PayCodeInfo record) {
+        List<PayCodeInfo> pp = payCodeInfoService.getPayCodeInfoList(record);
+        return new Result(true, pp);
+    }
+
+    @RequestMapping(value = "/getPayCodeInfo", method = RequestMethod.GET)
+    @ResponseBody
+    public Result getPayCodeInfo(@RequestParam(required = false, value = "id") String id) {
+        PayCodeInfo data = payCodeInfoService.getPayCodeInfoById(id);
+        return new Result(true, data);
+    }
+
+    @RequestMapping(value = "/getOne", method = RequestMethod.GET)
+    @ResponseBody
+    public Result getOne(PayCodeInfo record) {
+        PayCodeInfo data = payCodeInfoService.getPayCodeInfo(record);
+        return new Result(true, data);
+    }
+
+    @RequestMapping(value = "/page", method = RequestMethod.GET)
+    @ResponseBody
+    public Result page(Page page, PayCodeInfo record) {
+        Map<String, Object> result = new HashMap<>();
+
+        List<PayCodeInfo> pp =payCodeInfoService.getPayCodeInfoByPage(page, record);
+
+        result.put(AppConstant.PAGE, page);
+        result.put("pp", pp);
+        return new Result(true, result);
+    }
+
+    @RequestMapping(value = "/save", method = RequestMethod.POST)
+    @ResponseBody
+    public Result save(PayCodeInfo record) {
+        boolean num = payCodeInfoService.createPayCodeInfo(record);
+        if (num) {
+        return new Result(true, record.getId());
+        }
+        return new Result(false, "保存异常");
+    }
+
+    @RequestMapping(value = "/update", method = RequestMethod.POST)
+    @ResponseBody
+    public Result updatePayCodeInfo(PayCodeInfo record) {
+        boolean num = payCodeInfoService.updatePayCodeInfo(record);
+        if (num) {
+        return new Result(true, "保存成功");
+        }
+        return new Result(false, "保存异常");
+    }
+
+    @RequestMapping(value = "/del", method = RequestMethod.POST)
+    @ResponseBody
+    public Result deletePayCodeInfo(PayCodeInfo record) {
+
+        boolean num = payCodeInfoService.deletePayCodeInfo(record);
+        if (num) {
+        return new Result(true, "删除成功");
+        }
+        return new Result(false, "删除异常");
+    }
+
+    @RequestMapping(value = "/exportExcel", method = RequestMethod.GET)
+    @ResponseBody
+    public void exportExcel(HttpServletRequest request, HttpServletResponse response, PayCodeInfo record) throws Exception {
+
+        List<PayCodeInfo> payCodeInfos = payCodeInfoService.getPayCodeInfoList(record);
+
+        String sheetName = "pay_code_info";
+        String titleName = "支付码数据表";
+        String fileName = "支付码表";
+        int columnNumber = 12;
+        int[] columnWidth = { 20,  20,  20,  20,  20,  20,  20,  20,  20,  20,  20,  20 };
+        String[] columnName = {  "ID" ,   "删除标识" ,   "更新时间" ,   "更新人" ,   "创建时间" ,   "创建人" ,   "名称" ,   "类型" ,   "二维码" ,   "限制金额" ,   "可用" ,   "备注"  };
+        String[][] dataList = new String[payCodeInfos.size()][12];
+
+        for (int i = 0; i < payCodeInfos.size(); i++) {
+                        dataList[i][0] = String.valueOf(payCodeInfos.get(i).getId());
+                        dataList[i][1] = String.valueOf(payCodeInfos.get(i).getDelFlag());
+                        dataList[i][2] = String.valueOf(payCodeInfos.get(i).getUpdateTime());
+                        dataList[i][3] = String.valueOf(payCodeInfos.get(i).getUpdateUser());
+                        dataList[i][4] = String.valueOf(payCodeInfos.get(i).getCreateTime());
+                        dataList[i][5] = String.valueOf(payCodeInfos.get(i).getCreateUser());
+                        dataList[i][6] = String.valueOf(payCodeInfos.get(i).getCodeName());
+                        dataList[i][7] = String.valueOf(payCodeInfos.get(i).getPayType());
+                        dataList[i][8] = String.valueOf(payCodeInfos.get(i).getImage());
+                        dataList[i][9] = String.valueOf(payCodeInfos.get(i).getLimitMoney());
+                        dataList[i][10] = String.valueOf(payCodeInfos.get(i).getUseFlag());
+                        dataList[i][11] = String.valueOf(payCodeInfos.get(i).getRemark());
+                    }
+
+        ExportExcelUtil.ExportWithResponse(sheetName, titleName, fileName,
+                columnNumber, columnWidth, columnName, dataList, response);
+    }
+    /*generatedEnd*/
+}
+

+ 140 - 0
src/main/java/com/izouma/awesomeadmin/web/PayCodeOrderController.java

@@ -0,0 +1,140 @@
+package com.izouma.awesomeadmin.web;
+
+import java.util.*;
+
+import com.izouma.awesomeadmin.util.ExportExcelUtil;
+import org.apache.commons.lang.StringUtils;
+import org.apache.shiro.authz.annotation.RequiresAuthentication;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.*;
+import com.izouma.awesomeadmin.constant.AppConstant;
+import com.izouma.awesomeadmin.dto.Page;
+import com.izouma.awesomeadmin.dto.Result;
+import com.izouma.awesomeadmin.model.PayCodeOrder;
+import com.izouma.awesomeadmin.service.PayCodeOrderService;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+@Controller
+@RequestMapping("/payCodeOrder")
+public class PayCodeOrderController {
+    /*generatedStart*/
+    @Autowired
+    private PayCodeOrderService payCodeOrderService;
+    /*generatedEnd*/
+
+    /*generatedStart*/
+    @RequiresAuthentication
+    @RequestMapping(value = "/all", method = RequestMethod.GET)
+    @ResponseBody
+    public Result all(PayCodeOrder record) {
+        List<PayCodeOrder> pp = payCodeOrderService.getPayCodeOrderList(record);
+        return new Result(true, pp);
+    }
+
+    @RequestMapping(value = "/getPayCodeOrder", method = RequestMethod.GET)
+    @ResponseBody
+    public Result getPayCodeOrder(@RequestParam(required = false, value = "id") String id) {
+        PayCodeOrder data = payCodeOrderService.getPayCodeOrderById(id);
+        return new Result(true, data);
+    }
+
+    @RequestMapping(value = "/getOne", method = RequestMethod.GET)
+    @ResponseBody
+    public Result getOne(PayCodeOrder record) {
+        PayCodeOrder data = payCodeOrderService.getPayCodeOrder(record);
+        return new Result(true, data);
+    }
+
+    @RequestMapping(value = "/page", method = RequestMethod.GET)
+    @ResponseBody
+    public Result page(Page page, PayCodeOrder record) {
+        Map<String, Object> result = new HashMap<>();
+
+        List<PayCodeOrder> pp = payCodeOrderService.getPayCodeOrderByPage(page, record);
+
+        result.put(AppConstant.PAGE, page);
+        result.put("pp", pp);
+        return new Result(true, result);
+    }
+
+    @RequestMapping(value = "/save", method = RequestMethod.POST)
+    @ResponseBody
+    public Result save(PayCodeOrder record) {
+        boolean num = payCodeOrderService.createPayCodeOrder(record);
+        if (num) {
+            return new Result(true, record.getId());
+        }
+        return new Result(false, "保存异常");
+    }
+
+    @RequestMapping(value = "/update", method = RequestMethod.POST)
+    @ResponseBody
+    public Result updatePayCodeOrder(PayCodeOrder record) {
+        boolean num = payCodeOrderService.updatePayCodeOrder(record);
+        if (num) {
+            return new Result(true, "保存成功");
+        }
+        return new Result(false, "保存异常");
+    }
+
+    @RequestMapping(value = "/del", method = RequestMethod.POST)
+    @ResponseBody
+    public Result deletePayCodeOrder(PayCodeOrder record) {
+
+        boolean num = payCodeOrderService.deletePayCodeOrder(record);
+        if (num) {
+            return new Result(true, "删除成功");
+        }
+        return new Result(false, "删除异常");
+    }
+
+    @RequestMapping(value = "/exportExcel", method = RequestMethod.GET)
+    @ResponseBody
+    public void exportExcel(HttpServletRequest request, HttpServletResponse response, PayCodeOrder record) throws Exception {
+
+        List<PayCodeOrder> payCodeOrders = payCodeOrderService.getPayCodeOrderList(record);
+
+        String sheetName = "pay_code_order";
+        String titleName = "付款码订单数据表";
+        String fileName = "付款码订单表";
+        int columnNumber = 17;
+        int[] columnWidth = {20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20};
+        String[] columnName = {"ID", "删除标识", "更新时间", "更新人", "创建时间", "创建人", "订单code", "类型", "付款码", "库存ID", "支付类型", "金额", "支付金额", "状态", "支付时间", "用户", "备注"};
+        String[][] dataList = new String[payCodeOrders.size()][17];
+
+        for (int i = 0; i < payCodeOrders.size(); i++) {
+            dataList[i][0] = String.valueOf(payCodeOrders.get(i).getId());
+            dataList[i][1] = String.valueOf(payCodeOrders.get(i).getDelFlag());
+            dataList[i][2] = String.valueOf(payCodeOrders.get(i).getUpdateTime());
+            dataList[i][3] = String.valueOf(payCodeOrders.get(i).getUpdateUser());
+            dataList[i][4] = String.valueOf(payCodeOrders.get(i).getCreateTime());
+            dataList[i][5] = String.valueOf(payCodeOrders.get(i).getCreateUser());
+            dataList[i][6] = String.valueOf(payCodeOrders.get(i).getOrderCode());
+            dataList[i][7] = String.valueOf(payCodeOrders.get(i).getTypeFlag());
+            dataList[i][8] = String.valueOf(payCodeOrders.get(i).getCodeId());
+            dataList[i][9] = String.valueOf(payCodeOrders.get(i).getStockId());
+            dataList[i][10] = String.valueOf(payCodeOrders.get(i).getPayType());
+            dataList[i][11] = String.valueOf(payCodeOrders.get(i).getMoney());
+            dataList[i][12] = String.valueOf(payCodeOrders.get(i).getPayMoney());
+            dataList[i][13] = String.valueOf(payCodeOrders.get(i).getStatusFlag());
+            dataList[i][14] = String.valueOf(payCodeOrders.get(i).getPayTime());
+            dataList[i][15] = String.valueOf(payCodeOrders.get(i).getUserId());
+            dataList[i][16] = String.valueOf(payCodeOrders.get(i).getRemark());
+        }
+
+        ExportExcelUtil.ExportWithResponse(sheetName, titleName, fileName,
+                columnNumber, columnWidth, columnName, dataList, response);
+    }
+    /*generatedEnd*/
+
+    @RequestMapping(value = "/submit", method = RequestMethod.POST)
+    @ResponseBody
+    public Result submit(PayCodeOrder record) {
+        return payCodeOrderService.submit(record);
+    }
+
+}
+

+ 170 - 0
src/main/java/com/izouma/awesomeadmin/web/PayCodeStockController.java

@@ -0,0 +1,170 @@
+package com.izouma.awesomeadmin.web;
+
+import java.util.*;
+
+import com.izouma.awesomeadmin.util.ExportExcelUtil;
+import org.apache.commons.lang.StringUtils;
+import org.apache.shiro.authz.annotation.RequiresAuthentication;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.*;
+import com.izouma.awesomeadmin.constant.AppConstant;
+import com.izouma.awesomeadmin.dto.Page;
+import com.izouma.awesomeadmin.dto.Result;
+import com.izouma.awesomeadmin.model.PayCodeStock;
+import com.izouma.awesomeadmin.service.PayCodeStockService;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+@Controller
+@RequestMapping("/payCodeStock")
+public class PayCodeStockController {
+    /*generatedStart*/
+    @Autowired
+    private PayCodeStockService payCodeStockService;
+    /*generatedEnd*/
+
+    /*generatedStart*/
+    @RequiresAuthentication
+    @RequestMapping(value = "/all", method = RequestMethod.GET)
+    @ResponseBody
+    public Result all(PayCodeStock record) {
+        List<PayCodeStock> pp = payCodeStockService.getPayCodeStockList(record);
+        return new Result(true, pp);
+    }
+
+    @RequestMapping(value = "/getPayCodeStock", method = RequestMethod.GET)
+    @ResponseBody
+    public Result getPayCodeStock(@RequestParam(required = false, value = "id") String id) {
+        PayCodeStock data = payCodeStockService.getPayCodeStockById(id);
+        return new Result(true, data);
+    }
+
+    @RequestMapping(value = "/getOne", method = RequestMethod.GET)
+    @ResponseBody
+    public Result getOne(PayCodeStock record) {
+        PayCodeStock data = payCodeStockService.getPayCodeStock(record);
+        return new Result(true, data);
+    }
+
+    @RequestMapping(value = "/page", method = RequestMethod.GET)
+    @ResponseBody
+    public Result page(Page page, PayCodeStock record) {
+        Map<String, Object> result = new HashMap<>();
+
+        List<PayCodeStock> pp = payCodeStockService.getPayCodeStockByPage(page, record);
+
+        result.put(AppConstant.PAGE, page);
+        result.put("pp", pp);
+        return new Result(true, result);
+    }
+
+    @RequestMapping(value = "/save", method = RequestMethod.POST)
+    @ResponseBody
+    public Result save(PayCodeStock record) {
+        boolean num = payCodeStockService.createPayCodeStock(record);
+        if (num) {
+            return new Result(true, record.getId());
+        }
+        return new Result(false, "保存异常");
+    }
+
+    @RequestMapping(value = "/update", method = RequestMethod.POST)
+    @ResponseBody
+    public Result updatePayCodeStock(PayCodeStock record) {
+        boolean num = payCodeStockService.updatePayCodeStock(record);
+        if (num) {
+            return new Result(true, "保存成功");
+        }
+        return new Result(false, "保存异常");
+    }
+
+    @RequestMapping(value = "/del", method = RequestMethod.POST)
+    @ResponseBody
+    public Result deletePayCodeStock(PayCodeStock record) {
+
+        boolean num = payCodeStockService.deletePayCodeStock(record);
+        if (num) {
+            return new Result(true, "删除成功");
+        }
+        return new Result(false, "删除异常");
+    }
+
+    @RequestMapping(value = "/exportExcel", method = RequestMethod.GET)
+    @ResponseBody
+    public void exportExcel(HttpServletRequest request, HttpServletResponse response, PayCodeStock record) throws Exception {
+
+        List<PayCodeStock> payCodeStocks = payCodeStockService.getPayCodeStockList(record);
+
+        String sheetName = "pay_code_stock";
+        String titleName = "付款码库存数据表";
+        String fileName = "付款码库存表";
+        int columnNumber = 13;
+        int[] columnWidth = {20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20};
+        String[] columnName = {"ID", "删除标识", "更新时间", "更新人", "创建时间", "创建人", "付款码Id", "支付类型", "金额", "数量", "可用", "备注", "名称"};
+        String[][] dataList = new String[payCodeStocks.size()][13];
+
+        for (int i = 0; i < payCodeStocks.size(); i++) {
+            dataList[i][0] = String.valueOf(payCodeStocks.get(i).getId());
+            dataList[i][1] = String.valueOf(payCodeStocks.get(i).getDelFlag());
+            dataList[i][2] = String.valueOf(payCodeStocks.get(i).getUpdateTime());
+            dataList[i][3] = String.valueOf(payCodeStocks.get(i).getUpdateUser());
+            dataList[i][4] = String.valueOf(payCodeStocks.get(i).getCreateTime());
+            dataList[i][5] = String.valueOf(payCodeStocks.get(i).getCreateUser());
+            dataList[i][6] = String.valueOf(payCodeStocks.get(i).getCodeId());
+            dataList[i][7] = String.valueOf(payCodeStocks.get(i).getPayType());
+            dataList[i][8] = String.valueOf(payCodeStocks.get(i).getMoney());
+            dataList[i][9] = String.valueOf(payCodeStocks.get(i).getAmount());
+            dataList[i][10] = String.valueOf(payCodeStocks.get(i).getUseFlag());
+            dataList[i][11] = String.valueOf(payCodeStocks.get(i).getRemark());
+            dataList[i][12] = String.valueOf(payCodeStocks.get(i).getName());
+        }
+
+        ExportExcelUtil.ExportWithResponse(sheetName, titleName, fileName,
+                columnNumber, columnWidth, columnName, dataList, response);
+    }
+    /*generatedEnd*/
+
+    /**
+     * 查询可用的付款价格。
+     *
+     * @param record
+     * @return
+     */
+    @RequestMapping(value = "/allUsedMoney", method = RequestMethod.GET)
+    @ResponseBody
+    public Result allUsedMoney(PayCodeStock record) {
+        List<PayCodeStock> pp = payCodeStockService.getPayCodeStockAllUsedMoney(record);
+        return new Result(true, pp);
+    }
+
+    /**
+     * 查询可用的付款类型。
+     *
+     * @param record
+     * @return
+     */
+    @RequestMapping(value = "/allUsedPayType", method = RequestMethod.GET)
+    @ResponseBody
+    public Result allUsedPayType(PayCodeStock record) {
+        List<PayCodeStock> pp = payCodeStockService.getPayCodeStockAllUsedPayType(record);
+        return new Result(true, pp);
+    }
+
+    /**
+     * 随机获取可用付款库存
+     *
+     * @param record
+     * @return
+     */
+    @RequestMapping(value = "/randomStock", method = RequestMethod.GET)
+    @ResponseBody
+    public Result randomStock(PayCodeStock record) {
+
+        PayCodeStock pp = payCodeStockService.getRandomStock(record);
+        return new Result(true, pp);
+    }
+
+}
+

+ 235 - 0
src/main/vue/src/pages/PayCodeInfo.vue

@@ -0,0 +1,235 @@
+<template>
+    <div>
+        <el-form :model="formData" :rules="rules" ref="form" label-width="120px" label-position="right" size="small"
+                 style="max-width: 500px;">
+            <el-form-item prop="codeName" label="名称">
+                <el-input v-model="formData.codeName" :disabled="'codeName'==subColumn"></el-input>
+            </el-form-item>
+            <el-form-item prop="payType" label="类型">
+                <template>
+                    <el-select v-model="formData.payType" clearable placeholder="请选择" :disabled="'payType'==subColumn">
+                        <el-option
+                                   v-for="item in payTypeOptions"
+                                   :key="item.value"
+                                   :label="item.label"
+                                   :value="item.value">
+                        </el-option>
+                    </el-select>
+                </template>
+            </el-form-item>
+            <el-form-item prop="image" label="二维码">
+                <single-upload v-model="formData.image" :disabled="'image'==subColumn"></single-upload>
+            </el-form-item>
+            <el-form-item prop="limitMoney" label="限制金额">
+                <el-input type="number" v-model="formData.limitMoney" :disabled="'limitMoney'==subColumn"></el-input>
+            </el-form-item>
+            <el-form-item prop="useFlag" label="可用">
+                <el-switch
+                           v-model="formData.useFlag"
+                           :disabled="'useFlag'==subColumn">
+                </el-switch>
+            </el-form-item>
+            <el-form-item prop="remark" label="备注">
+                <el-input v-model="formData.remark" :disabled="'remark'==subColumn"></el-input>
+            </el-form-item>
+            <el-form-item>
+                <el-button @click="onSave" :loading="$store.state.fetchingData" type="primary">保存</el-button>
+                <el-button @click="onDelete" v-if="formData.id" type="danger">删除</el-button>
+                <el-button @click="$router.go(-1)">取消</el-button>
+            </el-form-item>
+        </el-form>
+    </div>
+</template>
+<script>
+import formValidator from '../formValidator';
+import { mapState } from 'vuex';
+import { format } from 'date-fns';
+import zh from 'date-fns/locale/zh_cn';
+
+export default {
+    name: 'PayCodeInfo',
+    created() {
+        if (this.$route.query.column) {
+            this.subColumn = this.$route.query.column.split(',')[1];
+            this.subValue = this.$route.query.column.split(',')[0];
+        }
+
+        if (this.$route.query.id) {
+            this.$http
+                .get({
+                    url: '/payCodeInfo/getOne',
+                    data: {
+                        id: this.$route.query.id,
+                    },
+                })
+                .then(res => {
+                    if (res.success) {
+                        this.formData = res.data;
+                        if (this.$route.query.column) {
+                            this.formData[this.subColumn] = this.subValue;
+                        }
+
+                        this.formData.useFlag =
+                            this.formData.useFlag == 'Y' ? true : false;
+                    }
+                });
+        } else {
+            if (this.$route.query.column) {
+                this.formData[this.subColumn] = this.subValue;
+            }
+        }
+    },
+    data() {
+        return {
+            saving: false,
+            formData: {},
+            rules: {
+                codeName: [
+                    { required: true, message: '请输入 名称', trigger: 'blur' },
+                ],
+                payType: [
+                    { required: true, message: '请输入 类型', trigger: 'blur' },
+                ],
+                image: [
+                    {
+                        required: true,
+                        message: '请输入 二维码',
+                        trigger: 'blur',
+                    },
+                ],
+            },
+            payTypeOptions: [
+                {
+                    value: 'wechat',
+                    label: '微信',
+                },
+                {
+                    value: 'alipay',
+                    label: '支付宝',
+                    disabled: true,
+                },
+                {
+                    value: 'cloud_flash',
+                    label: '云闪付',
+                },
+                {
+                    value: 'union_pay',
+                    label: '银联',
+                },
+                {
+                    value: 'wechat_real_time',
+                    label: '微信实时',
+                },
+                {
+                    value: 'taobao',
+                    label: '淘宝',
+                },
+                {
+                    value: 'credit_card',
+                    label: '信用卡',
+                },
+            ],
+            subColumn: '',
+            subValue: '',
+        };
+    },
+    computed: {
+        ...mapState(['userInfo']),
+    },
+    methods: {
+        onSave() {
+            this.$refs.form.validate(valid => {
+                if (valid) {
+                    this.logicalValidate();
+                } else {
+                    return false;
+                }
+            });
+        },
+        logicalValidate() {
+            let logicalData = {};
+
+            if (JSON.stringify(logicalData) == '{}') {
+                this.submit();
+            } else {
+                this.$http
+                    .get({
+                        url: '/payCodeInfo/getOne',
+                        data: logicalData,
+                    })
+                    .then(res => {
+                        if (res.success) {
+                            let logicalFlag = true;
+                            if (res.data) {
+                                if (this.formData.id) {
+                                    if (res.data.id != this.formData.id) {
+                                        logicalFlag = false;
+                                    }
+                                } else {
+                                    logicalFlag = false;
+                                }
+                            }
+
+                            if (logicalFlag) {
+                                this.submit();
+                            } else {
+                                this.$message.warning(
+                                    '逻辑关键字:' + '' + '验证失败',
+                                );
+                            }
+                        } else {
+                            this.$message.warning(
+                                '逻辑关键字:' + '' + '验证失败',
+                            );
+                        }
+                    });
+            }
+        },
+        submit() {
+            let data = { ...this.formData };
+
+            data.useFlag = this.formData.useFlag ? 'Y' : 'N';
+
+            this.$http
+                .post({
+                    url: this.formData.id
+                        ? '/payCodeInfo/update'
+                        : '/payCodeInfo/save',
+                    data: data,
+                })
+                .then(res => {
+                    if (res.success) {
+                        this.$message.success('成功');
+                        this.$router.go(-1);
+                    } else {
+                        this.$message.warning('失败');
+                    }
+                });
+        },
+        onDelete() {
+            this.$alert('删除将无法恢复,确认要删除么?', '警告', {
+                type: 'error',
+            })
+                .then(() => {
+                    return this.$http.post({
+                        url: '/payCodeInfo/del',
+                        data: { id: this.formData.id },
+                    });
+                })
+                .then(() => {
+                    this.$message.success('删除成功');
+                    this.$router.go(-1);
+                })
+                .catch(action => {
+                    if (action === 'cancel') {
+                        this.$message.info('删除取消');
+                    } else {
+                        this.$message.error('删除失败');
+                    }
+                });
+        },
+    },
+};
+</script>
+<style lang="less" scoped>
+</style>

+ 573 - 0
src/main/vue/src/pages/PayCodeInfos.vue

@@ -0,0 +1,573 @@
+<template>
+    <div>
+        <div class="filters-container">
+
+            <el-select v-model="payType" size="small" clearable filterable placeholder="支付类型" @change="searchData" style="width:120px">
+                <el-option v-for="item in payTypeOptions" :key="item.value" :label="item.label" :value="item.value"></el-option>
+            </el-select>
+
+            <el-input placeholder="关键字" size="small" v-model="filter1" clearable class="filter-item"></el-input>
+            <el-button @click="searchData" type="primary" size="small" icon="el-icon-search" class="filter-item">搜索
+            </el-button>
+            <el-button @click="showAdvancedQueryDialog = !showAdvancedQueryDialog" type="primary" size="small"
+                       icon="el-icon-search" class="filter-item">高级查询
+            </el-button>
+            <el-button @click="showTableSortDialog = !showTableSortDialog" type="primary" size="small"
+                       icon="el-icon-sort" class="filter-item">排序
+            </el-button>
+            <el-button @click="$router.push({path:'/payCodeInfo',query:{column:$route.query.column}})" type="primary"
+                       size="small" icon="el-icon-edit"
+                       class="filter-item">添加
+            </el-button>
+            <el-button @click="exportExcel" type="primary" size="small" icon="el-icon-share" class="filter-item">导出EXCEL
+            </el-button>
+            <el-dropdown trigger="click" size="medium" class="table-column-filter">
+                <span>
+                    筛选数据<i class="el-icon-arrow-down el-icon--right"></i>
+                </span>
+                <el-dropdown-menu slot="dropdown" class="table-column-filter-wrapper">
+                    <el-checkbox v-for="item in tableColumns" :key="item.value" v-model="item.show">{{item.label}}
+                    </el-checkbox>
+                </el-dropdown-menu>
+            </el-dropdown>
+        </div>
+        <el-table
+                  :data="tableData"
+                  :height="tableHeight"
+                  row-key="id"
+                  ref="table">
+            <el-table-column
+                             v-if="multipleMode"
+                             align="center"
+                             type="selection"
+                             width="50">
+            </el-table-column>
+            <el-table-column
+                             type="index"
+                             min-width="50"
+                             align="center">
+            </el-table-column>
+
+            <el-table-column
+                             v-if="isColumnShow('id')"
+                             prop="id"
+                             label="ID"
+                             min-width="100">
+            </el-table-column>
+
+            <el-table-column
+                             v-if="isColumnShow('codeName')"
+                             prop="codeName"
+                             label="名称"
+                             min-width="100">
+            </el-table-column>
+
+            <el-table-column
+                             v-if="isColumnShow('payType')"
+                             prop="payType"
+                             label="类型"
+                             :formatter="PayTypeFormatter"
+                             min-width="100">
+            </el-table-column>
+
+            <el-table-column
+                             v-if="isColumnShow('image')"
+                             prop="image"
+                             label="二维码"
+                             min-width="100">
+                <template slot-scope="{row}">
+                    <img :src="row.image" @click="showImg(row.image)" style="width: 100px;height: 100px;vertical-align: middle;" />
+                </template>
+
+            </el-table-column>
+
+            <el-table-column
+                             v-if="isColumnShow('limitMoney')"
+                             prop="limitMoney"
+                             label="限制金额"
+                             min-width="100">
+            </el-table-column>
+
+            <el-table-column
+                             v-if="isColumnShow('useFlag')"
+                             prop="useFlag"
+                             label="可用"
+                             min-width="100">
+            </el-table-column>
+
+            <el-table-column
+                             v-if="isColumnShow('remark')"
+                             prop="remark"
+                             label="备注"
+                             min-width="100">
+            </el-table-column>
+            <el-table-column
+                             label="操作"
+                             align="center"
+                             fixed="right"
+                             min-width="150">
+                <template slot-scope="scope">
+                    <el-button @click="$router.push({path:'/payCodeStocks',query:{column:scope.row.id+',codeId'}})" type="primary" size="small" plain>库存
+                    </el-button>
+                    <el-button @click="$router.push({path:'/payCodeOrders',query:{column:scope.row.id+',codeId'}})" type="primary" size="small" plain>订单
+                    </el-button>
+                    <el-button @click="editRow(scope.row)" type="primary" size="mini" plain>编辑</el-button>
+                    <!-- <el-button @click="deleteRow(scope.row)" type="danger" size="mini" plain>删除</el-button> -->
+                </template>
+            </el-table-column>
+        </el-table>
+        <div class="pagination-wrapper">
+            <div class="multiple-mode-wrapper" v-if="0">
+                <el-button size="small" v-if="!multipleMode" @click="toggleMultipleMode(true)">批量编辑</el-button>
+                <el-button-group v-else>
+                    <el-button size="small" @click="operation1">批量操作1</el-button>
+                    <el-button size="small" @click="operation2">批量操作2</el-button>
+                    <el-button size="small" @click="toggleMultipleMode(false)">取消</el-button>
+                </el-button-group>
+            </div>
+            <el-pagination
+                           background
+                           @size-change="pageSizeChange"
+                           @current-change="currentPageChange"
+                           :current-page="currentPage"
+                           :page-sizes="[10, 20, 30, 40, 50]"
+                           :page-size="pageSize"
+                           layout="total, sizes, prev, pager, next, jumper"
+                           :total="totalNumber">
+            </el-pagination>
+        </div>
+        <el-dialog title="高级查询" :visible.sync="showAdvancedQueryDialog">
+            <el-button @click="addField" type="text" icon="el-icon-plus">添加</el-button>
+            <el-table :data="advancedQueryFields">
+
+                <el-table-column prop="link" label="链接符" align="center">
+                    <template slot-scope="{row}">
+                        <el-select placeholder="链接" size="small" v-model="row.link" class="filter-item">
+                            <el-option label="AND" value="AND">
+                            </el-option>
+                            <el-option label="OR" value="OR">
+                            </el-option>
+                        </el-select>
+                    </template>
+                </el-table-column>
+                <el-table-column prop="name" label="字段" align="center">
+                    <template slot-scope="{row}">
+                        <el-select v-model="row.name">
+
+                            <el-option v-for="item in advancedQueryColumns" :label="item.label" :value="item.value"
+                                       :key="item.value"></el-option>
+                        </el-select>
+                    </template>
+                </el-table-column>
+                <el-table-column prop="searchMethod" label="搜索方式" width="150" align="center">
+                    <template slot-scope="{row}">
+                        <el-select v-model="row.searchMethod">
+                            <el-option v-for="item in searchMethods" :label="item" :value="item"
+                                       :key="item"></el-option>
+                        </el-select>
+                    </template>
+                </el-table-column>
+                <el-table-column prop="value" label="参数" align="center">
+                    <template slot-scope="{row}">
+                        <el-input v-model="row.value"></el-input>
+                    </template>
+                </el-table-column>
+                <el-table-column width="60" align="center">
+                    <template slot-scope="{ row, column, $index }">
+                        <el-button @click="removeField($index)" size="small" type="text">删除</el-button>
+                    </template>
+                </el-table-column>
+            </el-table>
+
+            <span slot="footer" class="dialog-footer">
+
+                <el-button @click="advancedQuery" :loading="$store.state.fetchingData">确定</el-button>
+            </span>
+        </el-dialog>
+
+        <el-dialog title="排序" :visible.sync="showTableSortDialog">
+            <el-button @click="addSortField" type="text" icon="el-icon-plus">添加</el-button>
+            <el-table :data="tableSortFields">
+
+                <el-table-column prop="name" label="字段" align="center">
+                    <template slot-scope="{row}">
+                        <el-select v-model="row.name">
+
+                            <el-option v-for="item in advancedQueryColumns" :label="item.label" :value="item.value"
+                                       :key="item.value"></el-option>
+                        </el-select>
+                    </template>
+                </el-table-column>
+                <el-table-column prop="order" label="排序" align="center">
+                    <template slot-scope="{row}">
+                        <el-select v-model="row.order">
+                            <el-option label="降序" value="desc">
+                            </el-option>
+                            <el-option label="升序" value="asc">
+                            </el-option>
+                        </el-select>
+                    </template>
+                </el-table-column>
+                <el-table-column width="60" align="center">
+                    <template slot-scope="{ row, column, $index }">
+                        <el-button @click="removeSortField($index)" size="small" type="text">删除</el-button>
+                    </template>
+                </el-table-column>
+            </el-table>
+
+            <span slot="footer" class="dialog-footer">
+
+                <el-button @click="tableSortQuery" :loading="$store.state.fetchingData">确定</el-button>
+            </span>
+        </el-dialog>
+
+        <el-dialog title="查看图片" :visible.sync="imageDialogVisible" size="small">
+            <img width="100%" :src="imgSrc" alt="">
+        </el-dialog>
+
+    </div>
+</template>
+<script>
+import { mapState } from 'vuex';
+import { format } from 'date-fns';
+import zh from 'date-fns/locale/zh_cn';
+
+export default {
+    name: 'PayCodeInfos',
+    created() {
+        this.getData();
+    },
+    data() {
+        return {
+            totalNumber: 0,
+            totalPage: 10,
+            currentPage: 1,
+            pageSize: 20,
+            tableData: [],
+            filter1: '',
+            filter2: '',
+            tableColumns: [
+                {
+                    label: 'ID',
+                    value: 'id',
+                    show: true,
+                },
+                {
+                    label: '名称',
+                    value: 'codeName',
+                    show: true,
+                },
+                {
+                    label: '类型',
+                    value: 'payType',
+                    show: true,
+                },
+                {
+                    label: '二维码',
+                    value: 'image',
+                    show: true,
+                },
+                {
+                    label: '限制金额',
+                    value: 'limitMoney',
+                    show: true,
+                },
+                {
+                    label: '可用',
+                    value: 'useFlag',
+                    show: true,
+                },
+                {
+                    label: '备注',
+                    value: 'remark',
+                    show: true,
+                },
+            ],
+            multipleMode: false,
+            showAdvancedQueryDialog: false,
+            advancedQueryFields: [],
+            showTableSortDialog: false,
+            tableSortFields: [],
+            searchMethods: ['=', '!=', '>', '>=', '<', '<=', 'like'],
+            advancedQueryColumns: [
+                {
+                    label: 'ID',
+                    value: 'id',
+                },
+                {
+                    label: '名称',
+                    value: 'code_name',
+                },
+                {
+                    label: '类型',
+                    value: 'pay_type',
+                },
+                {
+                    label: '二维码',
+                    value: 'image',
+                },
+                {
+                    label: '限制金额',
+                    value: 'limit_money',
+                },
+                {
+                    label: '可用',
+                    value: 'use_flag',
+                },
+                {
+                    label: '备注',
+                    value: 'remark',
+                },
+            ],
+            advancedQuerySearchKey: '',
+            orderByStr: '',
+            imgSrc: '',
+            imageDialogVisible: false,
+            payTypeOptions: [
+                {
+                    value: 'wechat',
+                    label: '微信',
+                },
+                {
+                    value: 'alipay',
+                    label: '支付宝',
+                    disabled: true,
+                },
+                {
+                    value: 'cloud_flash',
+                    label: '云闪付',
+                },
+                {
+                    value: 'union_pay',
+                    label: '银联',
+                },
+                {
+                    value: 'wechat_real_time',
+                    label: '微信实时',
+                },
+                {
+                    value: 'taobao',
+                    label: '淘宝',
+                },
+                {
+                    value: 'credit_card',
+                    label: '信用卡',
+                },
+            ],
+            payType: '',
+        };
+    },
+    computed: {
+        ...mapState(['tableHeight']),
+        selection() {
+            return this.$refs.table.selection.map(i => i.id);
+        },
+    },
+    methods: {
+        pageSizeChange(size) {
+            this.currentPage = 1;
+            this.pageSize = size;
+            this.getData();
+        },
+        currentPageChange(page) {
+            this.currentPage = page;
+            this.getData();
+        },
+        getData() {
+            var data = {
+                currentPage: this.currentPage,
+                pageNumber: this.pageSize,
+                searchKey: this.filter1,
+                advancedQuery: this.advancedQuerySearchKey,
+                orderByStr: this.orderByStr,
+                payType: this.payType,
+            };
+
+            if (this.$route.query.column) {
+                var tempColumn = this.$route.query.column;
+                data[tempColumn.split(',')[1]] = tempColumn.split(',')[0];
+            }
+
+            this.$http
+                .get({
+                    url: '/payCodeInfo/page',
+                    data: data,
+                })
+                .then(res => {
+                    if (res.success) {
+                        this.totalNumber = res.data.page.totalNumber;
+                        this.tableData = res.data.pp;
+                    }
+                });
+        },
+        isColumnShow(column) {
+            var row = this.tableColumns.find(i => i.value === column);
+            return row ? row.show : false;
+        },
+        toggleMultipleMode(multipleMode) {
+            this.multipleMode = multipleMode;
+            if (!multipleMode) {
+                this.$refs.table.clearSelection();
+            }
+        },
+        editRow(row) {
+            this.$router.push({
+                path: '/payCodeInfo',
+                query: {
+                    id: row.id,
+                    column: this.$route.query.column,
+                },
+            });
+        },
+        operation1() {
+            this.$notify({
+                title: '提示',
+                message: this.selection,
+            });
+        },
+        operation2() {
+            this.$message('操作2');
+        },
+        addField() {
+            this.advancedQueryFields.push({
+                link: 'AND',
+                name: '',
+                searchMethod: '=',
+                value: '',
+            });
+        },
+        removeField(i) {
+            if (this.advancedQueryFields.length > 0) {
+                this.advancedQueryFields.splice(i, 1);
+            }
+        },
+        advancedQuery() {
+            this.advancedQuerySearchKey = '';
+
+            if (this.advancedQueryFields.length > 0) {
+                var templist = [];
+
+                this.advancedQueryFields.forEach(item => {
+                    if (
+                        item.link &&
+                        item.name &&
+                        item.searchMethod &&
+                        item.value
+                    ) {
+                        var tempItem =
+                            item.link +
+                            '_,' +
+                            item.name +
+                            '_,' +
+                            item.searchMethod +
+                            '_,' +
+                            item.value;
+                        templist.push(tempItem);
+                    }
+                });
+
+                if (templist.length > 0) {
+                    this.advancedQuerySearchKey = templist.join('_;');
+                }
+            }
+
+            this.getData();
+            this.showAdvancedQueryDialog = false;
+        },
+        addSortField() {
+            this.tableSortFields.push({
+                name: '',
+                order: 'asc',
+            });
+        },
+        removeSortField(i) {
+            if (this.tableSortFields.length > 0) {
+                this.tableSortFields.splice(i, 1);
+            }
+        },
+        tableSortQuery() {
+            this.orderByStr = '';
+
+            if (this.tableSortFields.length > 0) {
+                var templist = [];
+
+                this.tableSortFields.forEach(item => {
+                    if (item.name && item.order) {
+                        var tempItem = item.name + '_,' + item.order;
+                        templist.push(tempItem);
+                    }
+                });
+
+                if (templist.length > 0) {
+                    this.orderByStr = templist.join('_;');
+                }
+            }
+
+            this.getData();
+            this.showTableSortDialog = false;
+        },
+        exportExcel() {
+            window.location.href =
+                this.$baseUrl +
+                '/payCodeInfo/exportExcel?searchKey=' +
+                this.filter1 +
+                '&advancedQuery=' +
+                this.advancedQuerySearchKey +
+                '&orderByStr=' +
+                this.orderByStr;
+        },
+        searchData() {
+            this.currentPage = 1;
+            this.getData();
+        },
+        deleteRow(row) {
+            this.$alert('删除将无法恢复,确认要删除么?', '警告', {
+                type: 'error',
+            })
+                .then(() => {
+                    return this.$http.post({
+                        url: '/payCodeInfo/del',
+                        data: { id: row.id },
+                    });
+                })
+                .then(() => {
+                    this.$message.success('删除成功');
+                    this.getData();
+                })
+                .catch(action => {
+                    if (action === 'cancel') {
+                        this.$message.info('删除取消');
+                    } else {
+                        this.$message.error('删除失败');
+                    }
+                });
+        },
+        DateTimeFormatter(row, column, cellValue) {
+            if (cellValue) {
+                return format(cellValue, 'YYYY/MM/DD HH:mm', { locale: zh });
+            }
+        },
+        DateFormatter(row, column, cellValue) {
+            if (cellValue) {
+                return format(cellValue, 'YYYY/MM/DD', { locale: zh });
+            }
+        },
+        PayTypeFormatter(row, column, cellValue) {
+            var valueStr = '';
+            this.payTypeOptions.forEach(item => {
+                if (item.value == cellValue) {
+                    valueStr = item.label;
+                }
+            });
+
+            return valueStr;
+        },
+        showImg(img) {
+            this.imgSrc = img;
+            this.imageDialogVisible = true;
+        },
+    },
+};
+</script>
+<style lang="less" scoped>
+</style>

+ 220 - 0
src/main/vue/src/pages/PayCodeOrder.vue

@@ -0,0 +1,220 @@
+<template>
+    <div>
+        <el-form :model="formData" :rules="rules" ref="form" label-width="120px" label-position="right" size="small"
+                 style="max-width: 500px;">
+            <el-form-item prop="orderCode" label="订单code">
+                <el-input v-model="formData.orderCode" :disabled="'orderCode'==subColumn"></el-input>
+            </el-form-item>
+            <el-form-item prop="typeFlag" label="类型">
+                <el-input v-model="formData.typeFlag" :disabled="'typeFlag'==subColumn"></el-input>
+            </el-form-item>
+            <el-form-item prop="codeId" label="付款码">
+                <el-input v-model="formData.codeId" :disabled="'codeId'==subColumn"></el-input>
+            </el-form-item>
+            <el-form-item prop="stockId" label="库存ID">
+                <el-input v-model="formData.stockId" :disabled="'stockId'==subColumn"></el-input>
+            </el-form-item>
+            <el-form-item prop="payType" label="支付类型">
+                <template>
+                    <el-select v-model="formData.payType" clearable  placeholder="请选择" :disabled="'payType'==subColumn">
+                        <el-option
+                            v-for="item in payTypeOptions"
+                            :key="item.value"
+                            :label="item.label"
+                            :value="item.value">
+                        </el-option>
+                    </el-select>
+                </template>
+            </el-form-item>
+            <el-form-item prop="money" label="金额">
+                <el-input type="number" v-model="formData.money" :disabled="'money'==subColumn"></el-input>
+            </el-form-item>
+            <el-form-item prop="payMoney" label="支付金额">
+                <el-input type="number" v-model="formData.payMoney" :disabled="'payMoney'==subColumn"></el-input>
+            </el-form-item>
+            <el-form-item prop="statusFlag" label="状态">
+                <el-input v-model="formData.statusFlag" :disabled="'statusFlag'==subColumn"></el-input>
+            </el-form-item>
+            <el-form-item prop="payTime" label="支付时间">
+                <template>
+                    <div class="block">
+                        <el-date-picker
+                            v-model="formData.payTime"
+                            type="datetime"
+                            value-format="timestamp"
+                            placeholder="选择日期"
+                            :disabled="'payTime'==subColumn">
+                        </el-date-picker>
+                    </div>
+                </template>
+            </el-form-item>
+            <el-form-item prop="userId" label="用户">
+                <el-input v-model="formData.userId" :disabled="'userId'==subColumn"></el-input>
+            </el-form-item>
+            <el-form-item prop="remark" label="备注">
+                <el-input v-model="formData.remark" :disabled="'remark'==subColumn"></el-input>
+            </el-form-item>
+            <el-form-item>
+                <el-button @click="onSave" :loading="$store.state.fetchingData" type="primary">保存</el-button>
+                <el-button @click="onDelete" v-if="formData.id" type="danger">删除</el-button>
+                <el-button @click="$router.go(-1)">取消</el-button>
+            </el-form-item>
+        </el-form>
+    </div>
+</template>
+<script>
+    import formValidator from '../formValidator'
+    import { mapState } from 'vuex'
+    import { format } from 'date-fns'
+    import zh from 'date-fns/locale/zh_cn'
+
+    export default {
+        name: 'PayCodeOrder',
+        created() {
+
+            if (this.$route.query.column) {
+                this.subColumn = this.$route.query.column.split(',')[1];
+                this.subValue = this.$route.query.column.split(',')[0];
+            }
+
+            if (this.$route.query.id) {
+                this.$http.get({
+                    url: '/payCodeOrder/getOne',
+                    data: {
+                        id: this.$route.query.id
+                    }
+                }).then(res => {
+                    if (res.success) {
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            this.formData = res.data;
+                        if (this.$route.query.column) {
+                            this.formData[this.subColumn] = this.subValue;
+                        }
+                    }
+                })
+            } else {
+                if (this.$route.query.column) {
+                    this.formData[this.subColumn] = this.subValue;
+                }
+            }
+
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                },
+        data() {
+            return {
+                saving: false,
+                formData: {
+                },
+                rules: {
+                },
+            payTypeOptions:[{
+	value: 'wechat',
+	label: '微信'
+}, {
+	value: 'alipay',
+	label: '支付宝',
+	disabled: true
+}, {
+	value: 'cloud_flash',
+	label: '云闪付'
+}, {
+	value: 'union_pay',
+	label: '银联'
+}, {
+	value: 'wechat_real_time',
+	label: '微信实时'
+}, {
+	value: 'taobao',
+	label: '淘宝'
+}, {
+	value: 'credit_card',
+	label: '信用卡'
+}],
+                subColumn: '',
+                subValue: '',
+            }
+        },
+        computed: {
+            ...mapState(['userInfo']),
+        },
+        methods: {
+            onSave() {
+                this.$refs.form.validate((valid) => {
+                    if (valid) {
+                        this.logicalValidate();
+                    } else {
+                        return false;
+                    }
+                });
+            },
+            logicalValidate() {
+                let logicalData = {
+                };
+
+                if (JSON.stringify(logicalData) == '{}') {
+                    this.submit();
+                } else {
+                    this.$http.get({
+                        url: '/payCodeOrder/getOne',
+                        data: logicalData
+                    }).then(res => {
+                        if (res.success) {
+                            let logicalFlag = true;
+                            if (res.data) {
+                                if (this.formData.id) {
+                                    if (res.data.id != this.formData.id) {
+                                        logicalFlag = false;
+                                    }
+                                } else {
+                                    logicalFlag = false;
+                                }
+                            }
+
+                            if (logicalFlag) {
+                                this.submit();
+                            } else {
+                                this.$message.warning('逻辑关键字:'+''+'验证失败')
+                            }
+
+                        } else {
+                            this.$message.warning('逻辑关键字:'+''+'验证失败')
+                        }
+                    });
+                }
+            },
+            submit() {
+                let data = {...this.formData};
+
+                                                                                                                                                                                                                                                                                                
+                this.$http.post({
+                    url: this.formData.id ? '/payCodeOrder/update' : '/payCodeOrder/save',
+                    data: data
+                }).then(res => {
+                    if (res.success) {
+                        this.$message.success('成功');
+                        this.$router.go(-1);
+                    } else {
+                        this.$message.warning('失败')
+                    }
+                });
+            },
+            onDelete() {
+                this.$alert('删除将无法恢复,确认要删除么?', '警告', { type: 'error' }).then(() => {
+                    return this.$http.post({
+                        url: '/payCodeOrder/del',
+                        data: { id: this.formData.id }
+                    })
+                }).then(() => {
+                    this.$message.success('删除成功');
+                    this.$router.go(-1);
+                }).catch(action => {
+                    if (action === 'cancel') {
+                        this.$message.info('删除取消');
+                    } else {
+                        this.$message.error('删除失败');
+                    }
+                })
+            },
+        }
+    }
+</script>
+<style lang="less" scoped>
+</style>

+ 585 - 0
src/main/vue/src/pages/PayCodeOrders.vue

@@ -0,0 +1,585 @@
+<template>
+    <div>
+        <div class="filters-container">
+        
+            <el-input placeholder="关键字" size="small" v-model="filter1" clearable class="filter-item"></el-input>
+            <el-button @click="searchData" type="primary" size="small" icon="el-icon-search" class="filter-item">搜索
+            </el-button>
+            <el-button @click="showAdvancedQueryDialog = !showAdvancedQueryDialog" type="primary" size="small"
+                       icon="el-icon-search" class="filter-item">高级查询
+            </el-button>
+            <el-button @click="showTableSortDialog = !showTableSortDialog" type="primary" size="small"
+                       icon="el-icon-sort" class="filter-item">排序
+            </el-button>
+            <el-button @click="$router.push({path:'/payCodeOrder',query:{column:$route.query.column}})" type="primary"
+                       size="small" icon="el-icon-edit"
+                       class="filter-item">添加
+            </el-button>
+            <el-button @click="exportExcel" type="primary" size="small" icon="el-icon-share" class="filter-item">导出EXCEL
+            </el-button>
+            <el-dropdown trigger="click" size="medium" class="table-column-filter">
+                <span>
+                  筛选数据<i class="el-icon-arrow-down el-icon--right"></i>
+                </span>
+                <el-dropdown-menu slot="dropdown" class="table-column-filter-wrapper">
+                    <el-checkbox v-for="item in tableColumns" :key="item.value" v-model="item.show">{{item.label}}
+                    </el-checkbox>
+                </el-dropdown-menu>
+            </el-dropdown>
+        </div>
+        <el-table
+                :data="tableData"
+                :height="tableHeight"
+                row-key="id"
+                ref="table">
+            <el-table-column
+                    v-if="multipleMode"
+                    align="center"
+                    type="selection"
+                    width="50">
+            </el-table-column>
+            <el-table-column
+                    type="index"
+                    min-width="50"
+                    align="center">
+            </el-table-column>
+                            
+                                            <el-table-column
+                                v-if="isColumnShow('id')"
+                                prop="id"
+                                label="ID"
+                                min-width="100">
+                        </el-table-column>
+                                                                                                                                                                                                            
+                                            <el-table-column
+                                v-if="isColumnShow('orderCode')"
+                                prop="orderCode"
+                                label="订单code"
+                                min-width="100">
+                        </el-table-column>
+                                                                
+                                            <el-table-column
+                                v-if="isColumnShow('typeFlag')"
+                                prop="typeFlag"
+                                label="类型"
+                                min-width="100">
+                        </el-table-column>
+                                                                
+                                            <el-table-column
+                                v-if="isColumnShow('codeId')"
+                                prop="codeId"
+                                label="付款码"
+                                min-width="100">
+                        </el-table-column>
+                                                                
+                                            <el-table-column
+                                v-if="isColumnShow('stockId')"
+                                prop="stockId"
+                                label="库存ID"
+                                min-width="100">
+                        </el-table-column>
+                                                                
+                                            <el-table-column
+                                v-if="isColumnShow('payType')"
+                                prop="payType"
+                                label="支付类型"
+                                min-width="100">
+                        </el-table-column>
+                                                                
+                                            <el-table-column
+                                v-if="isColumnShow('money')"
+                                prop="money"
+                                label="金额"
+                                min-width="100">
+                        </el-table-column>
+                                                                
+                                            <el-table-column
+                                v-if="isColumnShow('payMoney')"
+                                prop="payMoney"
+                                label="支付金额"
+                                min-width="100">
+                        </el-table-column>
+                                                                
+                                            <el-table-column
+                                v-if="isColumnShow('statusFlag')"
+                                prop="statusFlag"
+                                label="状态"
+                                min-width="100">
+                        </el-table-column>
+                                                                
+                                            <el-table-column
+                                v-if="isColumnShow('payTime')"
+                                prop="payTime"
+                                label="支付时间"
+                                :formatter="DateTimeFormatter"
+                                min-width="100">
+                        </el-table-column>
+                                                                
+                                            <el-table-column
+                                v-if="isColumnShow('userId')"
+                                prop="userId"
+                                label="用户"
+                                min-width="100">
+                        </el-table-column>
+                                                                
+                                            <el-table-column
+                                v-if="isColumnShow('remark')"
+                                prop="remark"
+                                label="备注"
+                                min-width="100">
+                        </el-table-column>
+                                                            <el-table-column
+                    label="操作"
+                    align="center"
+                    fixed="right"
+                    min-width="150"
+            >
+                <template slot-scope="scope">
+                                        <el-button @click="editRow(scope.row)" type="primary" size="mini" plain>编辑</el-button>
+                    <el-button @click="deleteRow(scope.row)" type="danger" size="mini" plain>删除</el-button>
+                </template>
+            </el-table-column>
+        </el-table>
+        <div class="pagination-wrapper">
+            <div class="multiple-mode-wrapper" v-if="0">
+                <el-button size="small" v-if="!multipleMode" @click="toggleMultipleMode(true)">批量编辑</el-button>
+                <el-button-group v-else>
+                    <el-button size="small" @click="operation1">批量操作1</el-button>
+                    <el-button size="small" @click="operation2">批量操作2</el-button>
+                    <el-button size="small" @click="toggleMultipleMode(false)">取消</el-button>
+                </el-button-group>
+            </div>
+            <el-pagination
+                    background
+                    @size-change="pageSizeChange"
+                    @current-change="currentPageChange"
+                    :current-page="currentPage"
+                    :page-sizes="[10, 20, 30, 40, 50]"
+                    :page-size="pageSize"
+                    layout="total, sizes, prev, pager, next, jumper"
+                    :total="totalNumber">
+            </el-pagination>
+        </div>
+        <el-dialog title="高级查询" :visible.sync="showAdvancedQueryDialog">
+            <el-button @click="addField" type="text" icon="el-icon-plus">添加</el-button>
+            <el-table :data="advancedQueryFields">
+
+                <el-table-column prop="link" label="链接符" align="center">
+                    <template slot-scope="{row}">
+                        <el-select placeholder="链接" size="small" v-model="row.link" class="filter-item">
+                            <el-option label="AND" value="AND">
+                            </el-option>
+                            <el-option label="OR" value="OR">
+                            </el-option>
+                        </el-select>
+                    </template>
+                </el-table-column>
+                <el-table-column prop="name" label="字段" align="center">
+                    <template slot-scope="{row}">
+                        <el-select v-model="row.name">
+
+                            <el-option v-for="item in advancedQueryColumns" :label="item.label" :value="item.value"
+                                       :key="item.value"></el-option>
+                        </el-select>
+                    </template>
+                </el-table-column>
+                <el-table-column prop="searchMethod" label="搜索方式" width="150" align="center">
+                    <template slot-scope="{row}">
+                        <el-select v-model="row.searchMethod">
+                            <el-option v-for="item in searchMethods" :label="item" :value="item"
+                                       :key="item"></el-option>
+                        </el-select>
+                    </template>
+                </el-table-column>
+                <el-table-column prop="value" label="参数" align="center">
+                    <template slot-scope="{row}">
+                        <el-input v-model="row.value"></el-input>
+                    </template>
+                </el-table-column>
+                <el-table-column width="60" align="center">
+                    <template slot-scope="{ row, column, $index }">
+                        <el-button @click="removeField($index)" size="small" type="text">删除</el-button>
+                    </template>
+                </el-table-column>
+            </el-table>
+
+            <span slot="footer" class="dialog-footer">
+
+                <el-button @click="advancedQuery" :loading="$store.state.fetchingData">确定</el-button>
+            </span>
+        </el-dialog>
+
+        <el-dialog title="排序" :visible.sync="showTableSortDialog">
+            <el-button @click="addSortField" type="text" icon="el-icon-plus">添加</el-button>
+            <el-table :data="tableSortFields">
+
+                <el-table-column prop="name" label="字段" align="center">
+                    <template slot-scope="{row}">
+                        <el-select v-model="row.name">
+
+                            <el-option v-for="item in advancedQueryColumns" :label="item.label" :value="item.value"
+                                       :key="item.value"></el-option>
+                        </el-select>
+                    </template>
+                </el-table-column>
+                <el-table-column prop="order" label="排序" align="center">
+                    <template slot-scope="{row}">
+                        <el-select v-model="row.order">
+                            <el-option label="降序" value="desc">
+                            </el-option>
+                            <el-option label="升序" value="asc">
+                            </el-option>
+                        </el-select>
+                    </template>
+                </el-table-column>
+                <el-table-column width="60" align="center">
+                    <template slot-scope="{ row, column, $index }">
+                        <el-button @click="removeSortField($index)" size="small" type="text">删除</el-button>
+                    </template>
+                </el-table-column>
+            </el-table>
+
+            <span slot="footer" class="dialog-footer">
+
+                <el-button @click="tableSortQuery" :loading="$store.state.fetchingData">确定</el-button>
+            </span>
+        </el-dialog>
+
+        <el-dialog title="查看图片" :visible.sync="imageDialogVisible" size="small">
+            <img width="100%" :src="imgSrc" alt="">
+        </el-dialog>
+
+    </div>
+</template>
+<script>
+    import {mapState} from 'vuex'
+    import {format} from 'date-fns'
+    import zh from 'date-fns/locale/zh_cn'
+
+    export default {
+        name: 'PayCodeOrders',
+        created() {
+            this.getData();
+        },
+        data() {
+            return {
+                totalNumber: 0,
+                totalPage: 10,
+                currentPage: 1,
+                pageSize: 20,
+                tableData: [],
+                filter1: '',
+                filter2: '',
+                tableColumns: [
+                                                                        {
+                                label: 'ID',
+                                value: 'id',
+                                show: true
+                            },
+                                                                                                                                                                                                                                                                                                                            {
+                                label: '订单code',
+                                value: 'orderCode',
+                                show: true
+                            },
+                                                                                                {
+                                label: '类型',
+                                value: 'typeFlag',
+                                show: true
+                            },
+                                                                                                {
+                                label: '付款码',
+                                value: 'codeId',
+                                show: true
+                            },
+                                                                                                {
+                                label: '库存ID',
+                                value: 'stockId',
+                                show: true
+                            },
+                                                                                                {
+                                label: '支付类型',
+                                value: 'payType',
+                                show: true
+                            },
+                                                                                                {
+                                label: '金额',
+                                value: 'money',
+                                show: true
+                            },
+                                                                                                {
+                                label: '支付金额',
+                                value: 'payMoney',
+                                show: true
+                            },
+                                                                                                {
+                                label: '状态',
+                                value: 'statusFlag',
+                                show: true
+                            },
+                                                                                                {
+                                label: '支付时间',
+                                value: 'payTime',
+                                show: true
+                            },
+                                                                                                {
+                                label: '用户',
+                                value: 'userId',
+                                show: true
+                            },
+                                                                                                {
+                                label: '备注',
+                                value: 'remark',
+                                show: true
+                            },
+                                                            ],
+                multipleMode: false,
+                showAdvancedQueryDialog: false,
+                advancedQueryFields: [],
+                showTableSortDialog: false,
+                tableSortFields: [],
+                searchMethods: ['=', '!=', '>', '>=', '<', '<=', 'like'],
+                advancedQueryColumns: [
+                                                                        {
+                                label: 'ID',
+                                value: 'id'
+                            },
+                                                                                                                                                                                                                                                                                                                            {
+                                label: '订单code',
+                                value: 'order_code'
+                            },
+                                                                                                {
+                                label: '类型',
+                                value: 'type_flag'
+                            },
+                                                                                                {
+                                label: '付款码',
+                                value: 'code_id'
+                            },
+                                                                                                {
+                                label: '库存ID',
+                                value: 'stock_id'
+                            },
+                                                                                                {
+                                label: '支付类型',
+                                value: 'pay_type'
+                            },
+                                                                                                {
+                                label: '金额',
+                                value: 'money'
+                            },
+                                                                                                {
+                                label: '支付金额',
+                                value: 'pay_money'
+                            },
+                                                                                                {
+                                label: '状态',
+                                value: 'status_flag'
+                            },
+                                                                                                {
+                                label: '支付时间',
+                                value: 'pay_time'
+                            },
+                                                                                                {
+                                label: '用户',
+                                value: 'user_id'
+                            },
+                                                                                                {
+                                label: '备注',
+                                value: 'remark'
+                            },
+                                                            ],
+                advancedQuerySearchKey: '',
+                orderByStr: '',
+                imgSrc: '',
+                imageDialogVisible: false,
+            }
+        },
+        computed: {
+            ...mapState(['tableHeight']),
+            selection() {
+                return this.$refs.table.selection.map(i => i.id);
+            }
+        },
+        methods: {
+            pageSizeChange(size) {
+                this.currentPage = 1;
+                this.pageSize = size;
+                this.getData();
+            },
+            currentPageChange(page) {
+                this.currentPage = page;
+                this.getData();
+            },
+            getData() {
+
+                var data = {
+                    currentPage: this.currentPage,
+                    pageNumber: this.pageSize,
+                    searchKey: this.filter1,
+                    advancedQuery: this.advancedQuerySearchKey,
+                    orderByStr: this.orderByStr,
+                }
+
+                if (this.$route.query.column) {
+                    var tempColumn = this.$route.query.column;
+                    data[tempColumn.split(',')[1]] = tempColumn.split(',')[0];
+                }
+
+                this.$http.get({
+                    url: '/payCodeOrder/page',
+                    data: data
+                }).then(res => {
+                    if (res.success) {
+                        this.totalNumber = res.data.page.totalNumber;
+                        this.tableData = res.data.pp;
+                    }
+                })
+            },
+            isColumnShow(column) {
+                var row = this.tableColumns.find(i => i.value === column);
+                return row ? row.show : false;
+            },
+            toggleMultipleMode(multipleMode) {
+                this.multipleMode = multipleMode;
+                if (!multipleMode) {
+                    this.$refs.table.clearSelection();
+                }
+            },
+            editRow(row) {
+                this.$router.push({
+                    path: '/payCodeOrder',
+                    query: {
+                        id: row.id,
+                        column: this.$route.query.column,
+                    }
+                })
+            },
+            operation1() {
+                this.$notify({
+                    title: '提示',
+                    message: this.selection
+                });
+            },
+            operation2() {
+                this.$message('操作2');
+            },
+            addField() {
+                this.advancedQueryFields.push({
+                    link: 'AND',
+                    name: '',
+                    searchMethod: '=',
+                    value: '',
+                });
+            },
+            removeField(i) {
+                if (this.advancedQueryFields.length > 0) {
+                    this.advancedQueryFields.splice(i, 1);
+                }
+            },
+            advancedQuery() {
+
+                this.advancedQuerySearchKey = '';
+
+                if (this.advancedQueryFields.length > 0) {
+
+                    var templist = [];
+
+                    this.advancedQueryFields.forEach(item => {
+                        if (item.link && item.name && item.searchMethod && item.value) {
+                            var tempItem = item.link + '_,' + item.name + '_,' + item.searchMethod + '_,' + item.value;
+                            templist.push(tempItem);
+                        }
+                    })
+
+                    if (templist.length > 0) {
+
+                        this.advancedQuerySearchKey = templist.join('_;');
+                    }
+                }
+
+                this.getData();
+                this.showAdvancedQueryDialog = false;
+            },
+            addSortField() {
+                this.tableSortFields.push({
+                    name: '',
+                    order: 'asc',
+                });
+            },
+            removeSortField(i) {
+                if (this.tableSortFields.length > 0) {
+                    this.tableSortFields.splice(i, 1);
+                }
+            },
+            tableSortQuery() {
+
+                this.orderByStr = '';
+
+                if (this.tableSortFields.length > 0) {
+
+                    var templist = [];
+
+                    this.tableSortFields.forEach(item => {
+                        if (item.name && item.order) {
+                            var tempItem = item.name + '_,' + item.order;
+                            templist.push(tempItem);
+                        }
+                    })
+
+                    if (templist.length > 0) {
+
+                        this.orderByStr = templist.join('_;');
+                    }
+                }
+
+                this.getData();
+                this.showTableSortDialog = false;
+            },
+            exportExcel() {
+                window.location.href = this.$baseUrl + "/payCodeOrder/exportExcel?searchKey="
+                        + this.filter1 + "&advancedQuery=" + this.advancedQuerySearchKey+"&orderByStr=" + this.orderByStr;
+            },
+            searchData() {
+                this.currentPage = 1;
+                this.getData();
+            },
+            deleteRow(row) {
+                this.$alert('删除将无法恢复,确认要删除么?', '警告', {type: 'error'}).then(() => {
+                    return this.$http.post({
+                        url: '/payCodeOrder/del',
+                        data: {id: row.id}
+                    })
+                }).then(() => {
+                    this.$message.success('删除成功');
+                    this.getData();
+                }).catch(action => {
+                    if (action === 'cancel') {
+                        this.$message.info('删除取消');
+                    } else {
+                        this.$message.error('删除失败');
+                    }
+                })
+            },
+            DateTimeFormatter(row, column, cellValue) {
+                if (cellValue) {
+                    return format(cellValue, 'YYYY/MM/DD HH:mm', {locale: zh})
+                }
+
+            },
+            DateFormatter(row, column, cellValue) {
+                if (cellValue) {
+                    return format(cellValue, 'YYYY/MM/DD', {locale: zh})
+                }
+
+            },
+            showImg(img) {
+                this.imgSrc = img;
+                this.imageDialogVisible = true;
+            },
+
+        }
+    }
+</script>
+<style lang="less" scoped>
+
+</style>

+ 224 - 0
src/main/vue/src/pages/PayCodeStock.vue

@@ -0,0 +1,224 @@
+<template>
+    <div>
+        <el-form :model="formData" :rules="rules" ref="form" label-width="120px" label-position="right" size="small"
+                 style="max-width: 500px;">
+            <el-form-item prop="codeId" label="付款码Id">
+                <el-input v-model="formData.codeId" :disabled="'codeId'==subColumn"></el-input>
+            </el-form-item>
+            <el-form-item prop="payType" label="支付类型">
+                <template>
+                    <el-select v-model="formData.payType" clearable placeholder="请选择" :disabled="'payType'==subColumn">
+                        <el-option
+                                   v-for="item in payTypeOptions"
+                                   :key="item.value"
+                                   :label="item.label"
+                                   :value="item.value">
+                        </el-option>
+                    </el-select>
+                </template>
+            </el-form-item>
+            <el-form-item prop="money" label="金额">
+                <el-input type="number" v-model="formData.money" :disabled="'money'==subColumn"></el-input>
+            </el-form-item>
+            <el-form-item prop="amount" label="数量">
+                <el-input type="number" v-model="formData.amount" :disabled="'amount'==subColumn"></el-input>
+            </el-form-item>
+            <el-form-item prop="useFlag" label="可用">
+                <el-switch
+                           v-model="formData.useFlag"
+                           :disabled="'useFlag'==subColumn">
+                </el-switch>
+            </el-form-item>
+            <el-form-item prop="remark" label="备注">
+                <el-input v-model="formData.remark" :disabled="'remark'==subColumn"></el-input>
+            </el-form-item>
+            <el-form-item prop="name" label="名称">
+                <el-input v-model="formData.name" :disabled="'name'==subColumn"></el-input>
+            </el-form-item>
+            <el-form-item>
+                <el-button @click="onSave" :loading="$store.state.fetchingData" type="primary">保存</el-button>
+                <el-button @click="onDelete" v-if="formData.id" type="danger">删除</el-button>
+                <el-button @click="$router.go(-1)">取消</el-button>
+            </el-form-item>
+        </el-form>
+    </div>
+</template>
+<script>
+import formValidator from '../formValidator';
+import { mapState } from 'vuex';
+import { format } from 'date-fns';
+import zh from 'date-fns/locale/zh_cn';
+
+export default {
+    name: 'PayCodeStock',
+    created() {
+        if (this.$route.query.column) {
+            this.subColumn = this.$route.query.column.split(',')[1];
+            this.subValue = this.$route.query.column.split(',')[0];
+        }
+
+        if (this.$route.query.id) {
+            this.$http
+                .get({
+                    url: '/payCodeStock/getOne',
+                    data: {
+                        id: this.$route.query.id,
+                    },
+                })
+                .then(res => {
+                    if (res.success) {
+                        this.formData = res.data;
+                        if (this.$route.query.column) {
+                            this.formData[this.subColumn] = this.subValue;
+                        }
+
+                        this.formData.useFlag =
+                            this.formData.useFlag == 'Y' ? true : false;
+                    }
+                });
+        } else {
+            if (this.$route.query.column) {
+                this.formData[this.subColumn] = this.subValue;
+            }
+        }
+    },
+    data() {
+        return {
+            saving: false,
+            formData: {},
+            rules: {},
+            payTypeOptions: [
+                {
+                    value: 'wechat',
+                    label: '微信',
+                },
+                {
+                    value: 'alipay',
+                    label: '支付宝',
+                    disabled: true,
+                },
+                {
+                    value: 'cloud_flash',
+                    label: '云闪付',
+                },
+                {
+                    value: 'union_pay',
+                    label: '银联',
+                },
+                {
+                    value: 'wechat_real_time',
+                    label: '微信实时',
+                },
+                {
+                    value: 'taobao',
+                    label: '淘宝',
+                },
+                {
+                    value: 'credit_card',
+                    label: '信用卡',
+                },
+            ],
+            subColumn: '',
+            subValue: '',
+        };
+    },
+    computed: {
+        ...mapState(['userInfo']),
+    },
+    methods: {
+        onSave() {
+            this.$refs.form.validate(valid => {
+                if (valid) {
+                    this.logicalValidate();
+                } else {
+                    return false;
+                }
+            });
+        },
+        logicalValidate() {
+            let logicalData = {};
+
+            if (JSON.stringify(logicalData) == '{}') {
+                this.submit();
+            } else {
+                this.$http
+                    .get({
+                        url: '/payCodeStock/getOne',
+                        data: logicalData,
+                    })
+                    .then(res => {
+                        if (res.success) {
+                            let logicalFlag = true;
+                            if (res.data) {
+                                if (this.formData.id) {
+                                    if (res.data.id != this.formData.id) {
+                                        logicalFlag = false;
+                                    }
+                                } else {
+                                    logicalFlag = false;
+                                }
+                            }
+
+                            if (logicalFlag) {
+                                this.submit();
+                            } else {
+                                this.$message.warning(
+                                    '逻辑关键字:' + '' + '验证失败',
+                                );
+                            }
+                        } else {
+                            this.$message.warning(
+                                '逻辑关键字:' + '' + '验证失败',
+                            );
+                        }
+                    });
+            }
+        },
+        submit() {
+            let data = { ...this.formData };
+
+            data.useFlag = this.formData.useFlag ? 'Y' : 'N';
+
+            this.$http
+                .post({
+                    url: this.formData.id
+                        ? '/payCodeStock/update'
+                        : '/payCodeStock/save',
+                    data: data,
+                })
+                .then(res => {
+                    if (res.success) {
+                        this.$message.success('成功');
+                        this.$router.go(-1);
+                    } else {
+                        this.$message.warning('失败');
+                    }
+                });
+        },
+        onDelete() {
+            this.$alert('删除将无法恢复,确认要删除么?', '警告', {
+                type: 'error',
+            })
+                .then(() => {
+                    return this.$http.post({
+                        url: '/payCodeStock/del',
+                        data: { id: this.formData.id },
+                    });
+                })
+                .then(() => {
+                    this.$message.success('删除成功');
+                    this.$router.go(-1);
+                })
+                .catch(action => {
+                    if (action === 'cancel') {
+                        this.$message.info('删除取消');
+                    } else {
+                        this.$message.error('删除失败');
+                    }
+                });
+        },
+    },
+};
+</script>
+<style lang="less" scoped>
+</style>

+ 610 - 0
src/main/vue/src/pages/PayCodeStocks.vue

@@ -0,0 +1,610 @@
+<template>
+    <div>
+        <div class="filters-container">
+
+            <el-select v-model="payType" size="small" clearable filterable placeholder="支付类型" @change="searchData" style="width:120px">
+                <el-option v-for="item in payTypeOptions" :key="item.value" :label="item.label" :value="item.value"></el-option>
+            </el-select>
+            <el-select v-model="codeId" size="small" clearable filterable placeholder="付款码" @change="searchData" style="width:120px">
+                <el-option v-for="item in payCodeOptions" :key="item.id" :label="item.codeName" :value="item.id"></el-option>
+            </el-select>
+
+            <el-input placeholder="关键字" size="small" v-model="filter1" clearable class="filter-item"></el-input>
+            <el-button @click="searchData" type="primary" size="small" icon="el-icon-search" class="filter-item">搜索
+            </el-button>
+            <el-button @click="showAdvancedQueryDialog = !showAdvancedQueryDialog" type="primary" size="small"
+                       icon="el-icon-search" class="filter-item">高级查询
+            </el-button>
+            <el-button @click="showTableSortDialog = !showTableSortDialog" type="primary" size="small"
+                       icon="el-icon-sort" class="filter-item">排序
+            </el-button>
+            <el-button @click="$router.push({path:'/payCodeStock',query:{column:$route.query.column}})" type="primary"
+                       size="small" icon="el-icon-edit"
+                       class="filter-item">添加
+            </el-button>
+            <el-button @click="exportExcel" type="primary" size="small" icon="el-icon-share" class="filter-item">导出EXCEL
+            </el-button>
+            <el-dropdown trigger="click" size="medium" class="table-column-filter">
+                <span>
+                    筛选数据<i class="el-icon-arrow-down el-icon--right"></i>
+                </span>
+                <el-dropdown-menu slot="dropdown" class="table-column-filter-wrapper">
+                    <el-checkbox v-for="item in tableColumns" :key="item.value" v-model="item.show">{{item.label}}
+                    </el-checkbox>
+                </el-dropdown-menu>
+            </el-dropdown>
+        </div>
+        <el-table
+                  :data="tableData"
+                  :height="tableHeight"
+                  row-key="id"
+                  ref="table">
+            <el-table-column
+                             v-if="multipleMode"
+                             align="center"
+                             type="selection"
+                             width="50">
+            </el-table-column>
+            <el-table-column
+                             type="index"
+                             min-width="50"
+                             align="center">
+            </el-table-column>
+
+            <el-table-column
+                             v-if="isColumnShow('id')"
+                             prop="id"
+                             label="ID"
+                             min-width="100">
+            </el-table-column>
+
+            <el-table-column
+                             v-if="isColumnShow('codeId')"
+                             prop="codeId"
+                             label="付款码Id"
+                             :formatter="PayCodeFormatter"
+                             min-width="100">
+            </el-table-column>
+
+            <el-table-column
+                             v-if="isColumnShow('payType')"
+                             prop="payType"
+                             label="支付类型"
+                             :formatter="PayTypeFormatter"
+                             min-width="100">
+            </el-table-column>
+
+            <el-table-column
+                             v-if="isColumnShow('money')"
+                             prop="money"
+                             label="金额"
+                             min-width="100">
+            </el-table-column>
+
+            <el-table-column
+                             v-if="isColumnShow('amount')"
+                             prop="amount"
+                             label="数量"
+                             min-width="100">
+            </el-table-column>
+
+            <el-table-column
+                             v-if="isColumnShow('useFlag')"
+                             prop="useFlag"
+                             label="可用"
+                             min-width="100">
+            </el-table-column>
+
+            <el-table-column
+                             v-if="isColumnShow('remark')"
+                             prop="remark"
+                             label="备注"
+                             min-width="100">
+            </el-table-column>
+
+            <el-table-column
+                             v-if="isColumnShow('name')"
+                             prop="name"
+                             label="名称"
+                             min-width="100">
+            </el-table-column>
+            <el-table-column
+                             label="操作"
+                             align="center"
+                             fixed="right"
+                             min-width="150">
+                <template slot-scope="scope">
+                    <el-button @click="$router.push({path:'/payCodeOrders',query:{column:scope.row.id+',stockId'}})" type="primary" size="small" plain>订单
+                    </el-button>
+                    <el-button @click="editRow(scope.row)" type="primary" size="mini" plain>编辑</el-button>
+                    <!-- <el-button @click="deleteRow(scope.row)" type="danger" size="mini" plain>删除</el-button> -->
+                </template>
+            </el-table-column>
+        </el-table>
+        <div class="pagination-wrapper">
+            <div class="multiple-mode-wrapper" v-if="0">
+                <el-button size="small" v-if="!multipleMode" @click="toggleMultipleMode(true)">批量编辑</el-button>
+                <el-button-group v-else>
+                    <el-button size="small" @click="operation1">批量操作1</el-button>
+                    <el-button size="small" @click="operation2">批量操作2</el-button>
+                    <el-button size="small" @click="toggleMultipleMode(false)">取消</el-button>
+                </el-button-group>
+            </div>
+            <el-pagination
+                           background
+                           @size-change="pageSizeChange"
+                           @current-change="currentPageChange"
+                           :current-page="currentPage"
+                           :page-sizes="[10, 20, 30, 40, 50]"
+                           :page-size="pageSize"
+                           layout="total, sizes, prev, pager, next, jumper"
+                           :total="totalNumber">
+            </el-pagination>
+        </div>
+        <el-dialog title="高级查询" :visible.sync="showAdvancedQueryDialog">
+            <el-button @click="addField" type="text" icon="el-icon-plus">添加</el-button>
+            <el-table :data="advancedQueryFields">
+
+                <el-table-column prop="link" label="链接符" align="center">
+                    <template slot-scope="{row}">
+                        <el-select placeholder="链接" size="small" v-model="row.link" class="filter-item">
+                            <el-option label="AND" value="AND">
+                            </el-option>
+                            <el-option label="OR" value="OR">
+                            </el-option>
+                        </el-select>
+                    </template>
+                </el-table-column>
+                <el-table-column prop="name" label="字段" align="center">
+                    <template slot-scope="{row}">
+                        <el-select v-model="row.name">
+
+                            <el-option v-for="item in advancedQueryColumns" :label="item.label" :value="item.value"
+                                       :key="item.value"></el-option>
+                        </el-select>
+                    </template>
+                </el-table-column>
+                <el-table-column prop="searchMethod" label="搜索方式" width="150" align="center">
+                    <template slot-scope="{row}">
+                        <el-select v-model="row.searchMethod">
+                            <el-option v-for="item in searchMethods" :label="item" :value="item"
+                                       :key="item"></el-option>
+                        </el-select>
+                    </template>
+                </el-table-column>
+                <el-table-column prop="value" label="参数" align="center">
+                    <template slot-scope="{row}">
+                        <el-input v-model="row.value"></el-input>
+                    </template>
+                </el-table-column>
+                <el-table-column width="60" align="center">
+                    <template slot-scope="{ row, column, $index }">
+                        <el-button @click="removeField($index)" size="small" type="text">删除</el-button>
+                    </template>
+                </el-table-column>
+            </el-table>
+
+            <span slot="footer" class="dialog-footer">
+
+                <el-button @click="advancedQuery" :loading="$store.state.fetchingData">确定</el-button>
+            </span>
+        </el-dialog>
+
+        <el-dialog title="排序" :visible.sync="showTableSortDialog">
+            <el-button @click="addSortField" type="text" icon="el-icon-plus">添加</el-button>
+            <el-table :data="tableSortFields">
+
+                <el-table-column prop="name" label="字段" align="center">
+                    <template slot-scope="{row}">
+                        <el-select v-model="row.name">
+
+                            <el-option v-for="item in advancedQueryColumns" :label="item.label" :value="item.value"
+                                       :key="item.value"></el-option>
+                        </el-select>
+                    </template>
+                </el-table-column>
+                <el-table-column prop="order" label="排序" align="center">
+                    <template slot-scope="{row}">
+                        <el-select v-model="row.order">
+                            <el-option label="降序" value="desc">
+                            </el-option>
+                            <el-option label="升序" value="asc">
+                            </el-option>
+                        </el-select>
+                    </template>
+                </el-table-column>
+                <el-table-column width="60" align="center">
+                    <template slot-scope="{ row, column, $index }">
+                        <el-button @click="removeSortField($index)" size="small" type="text">删除</el-button>
+                    </template>
+                </el-table-column>
+            </el-table>
+
+            <span slot="footer" class="dialog-footer">
+
+                <el-button @click="tableSortQuery" :loading="$store.state.fetchingData">确定</el-button>
+            </span>
+        </el-dialog>
+
+        <el-dialog title="查看图片" :visible.sync="imageDialogVisible" size="small">
+            <img width="100%" :src="imgSrc" alt="">
+        </el-dialog>
+
+    </div>
+</template>
+<script>
+import { mapState } from 'vuex';
+import { format } from 'date-fns';
+import zh from 'date-fns/locale/zh_cn';
+
+export default {
+    name: 'PayCodeStocks',
+    created() {
+        this.getData();
+
+        this.$http
+            .get({
+                url: '/payCodeInfo/all',
+            })
+            .then(res => {
+                if (res.success) {
+                    this.payCodeOptions = res.data;
+                }
+            });
+    },
+    data() {
+        return {
+            totalNumber: 0,
+            totalPage: 10,
+            currentPage: 1,
+            pageSize: 20,
+            tableData: [],
+            filter1: '',
+            filter2: '',
+            tableColumns: [
+                {
+                    label: 'ID',
+                    value: 'id',
+                    show: true,
+                },
+                {
+                    label: '付款码Id',
+                    value: 'codeId',
+                    show: true,
+                },
+                {
+                    label: '支付类型',
+                    value: 'payType',
+                    show: true,
+                },
+                {
+                    label: '金额',
+                    value: 'money',
+                    show: true,
+                },
+                {
+                    label: '数量',
+                    value: 'amount',
+                    show: true,
+                },
+                {
+                    label: '可用',
+                    value: 'useFlag',
+                    show: true,
+                },
+                {
+                    label: '备注',
+                    value: 'remark',
+                    show: true,
+                },
+                {
+                    label: '名称',
+                    value: 'name',
+                    show: true,
+                },
+            ],
+            multipleMode: false,
+            showAdvancedQueryDialog: false,
+            advancedQueryFields: [],
+            showTableSortDialog: false,
+            tableSortFields: [],
+            searchMethods: ['=', '!=', '>', '>=', '<', '<=', 'like'],
+            advancedQueryColumns: [
+                {
+                    label: 'ID',
+                    value: 'id',
+                },
+                {
+                    label: '付款码Id',
+                    value: 'code_id',
+                },
+                {
+                    label: '支付类型',
+                    value: 'pay_type',
+                },
+                {
+                    label: '金额',
+                    value: 'money',
+                },
+                {
+                    label: '数量',
+                    value: 'amount',
+                },
+                {
+                    label: '可用',
+                    value: 'use_flag',
+                },
+                {
+                    label: '备注',
+                    value: 'remark',
+                },
+                {
+                    label: '名称',
+                    value: 'name',
+                },
+            ],
+            advancedQuerySearchKey: '',
+            orderByStr: '',
+            imgSrc: '',
+            imageDialogVisible: false,
+            payTypeOptions: [
+                {
+                    value: 'wechat',
+                    label: '微信',
+                },
+                {
+                    value: 'alipay',
+                    label: '支付宝',
+                    disabled: true,
+                },
+                {
+                    value: 'cloud_flash',
+                    label: '云闪付',
+                },
+                {
+                    value: 'union_pay',
+                    label: '银联',
+                },
+                {
+                    value: 'wechat_real_time',
+                    label: '微信实时',
+                },
+                {
+                    value: 'taobao',
+                    label: '淘宝',
+                },
+                {
+                    value: 'credit_card',
+                    label: '信用卡',
+                },
+            ],
+            payType: '',
+            codeId: '',
+            payCodeOptions: [],
+        };
+    },
+    computed: {
+        ...mapState(['tableHeight']),
+        selection() {
+            return this.$refs.table.selection.map(i => i.id);
+        },
+    },
+    methods: {
+        pageSizeChange(size) {
+            this.currentPage = 1;
+            this.pageSize = size;
+            this.getData();
+        },
+        currentPageChange(page) {
+            this.currentPage = page;
+            this.getData();
+        },
+        getData() {
+            var data = {
+                currentPage: this.currentPage,
+                pageNumber: this.pageSize,
+                searchKey: this.filter1,
+                advancedQuery: this.advancedQuerySearchKey,
+                orderByStr: this.orderByStr,
+                payType: this.payType,
+                codeId: this.codeId,
+            };
+
+            if (this.$route.query.column) {
+                var tempColumn = this.$route.query.column;
+                data[tempColumn.split(',')[1]] = tempColumn.split(',')[0];
+            }
+
+            this.$http
+                .get({
+                    url: '/payCodeStock/page',
+                    data: data,
+                })
+                .then(res => {
+                    if (res.success) {
+                        this.totalNumber = res.data.page.totalNumber;
+                        this.tableData = res.data.pp;
+                    }
+                });
+        },
+        isColumnShow(column) {
+            var row = this.tableColumns.find(i => i.value === column);
+            return row ? row.show : false;
+        },
+        toggleMultipleMode(multipleMode) {
+            this.multipleMode = multipleMode;
+            if (!multipleMode) {
+                this.$refs.table.clearSelection();
+            }
+        },
+        editRow(row) {
+            this.$router.push({
+                path: '/payCodeStock',
+                query: {
+                    id: row.id,
+                    column: this.$route.query.column,
+                },
+            });
+        },
+        operation1() {
+            this.$notify({
+                title: '提示',
+                message: this.selection,
+            });
+        },
+        operation2() {
+            this.$message('操作2');
+        },
+        addField() {
+            this.advancedQueryFields.push({
+                link: 'AND',
+                name: '',
+                searchMethod: '=',
+                value: '',
+            });
+        },
+        removeField(i) {
+            if (this.advancedQueryFields.length > 0) {
+                this.advancedQueryFields.splice(i, 1);
+            }
+        },
+        advancedQuery() {
+            this.advancedQuerySearchKey = '';
+
+            if (this.advancedQueryFields.length > 0) {
+                var templist = [];
+
+                this.advancedQueryFields.forEach(item => {
+                    if (
+                        item.link &&
+                        item.name &&
+                        item.searchMethod &&
+                        item.value
+                    ) {
+                        var tempItem =
+                            item.link +
+                            '_,' +
+                            item.name +
+                            '_,' +
+                            item.searchMethod +
+                            '_,' +
+                            item.value;
+                        templist.push(tempItem);
+                    }
+                });
+
+                if (templist.length > 0) {
+                    this.advancedQuerySearchKey = templist.join('_;');
+                }
+            }
+
+            this.getData();
+            this.showAdvancedQueryDialog = false;
+        },
+        addSortField() {
+            this.tableSortFields.push({
+                name: '',
+                order: 'asc',
+            });
+        },
+        removeSortField(i) {
+            if (this.tableSortFields.length > 0) {
+                this.tableSortFields.splice(i, 1);
+            }
+        },
+        tableSortQuery() {
+            this.orderByStr = '';
+
+            if (this.tableSortFields.length > 0) {
+                var templist = [];
+
+                this.tableSortFields.forEach(item => {
+                    if (item.name && item.order) {
+                        var tempItem = item.name + '_,' + item.order;
+                        templist.push(tempItem);
+                    }
+                });
+
+                if (templist.length > 0) {
+                    this.orderByStr = templist.join('_;');
+                }
+            }
+
+            this.getData();
+            this.showTableSortDialog = false;
+        },
+        exportExcel() {
+            window.location.href =
+                this.$baseUrl +
+                '/payCodeStock/exportExcel?searchKey=' +
+                this.filter1 +
+                '&advancedQuery=' +
+                this.advancedQuerySearchKey +
+                '&orderByStr=' +
+                this.orderByStr;
+        },
+        searchData() {
+            this.currentPage = 1;
+            this.getData();
+        },
+        deleteRow(row) {
+            this.$alert('删除将无法恢复,确认要删除么?', '警告', {
+                type: 'error',
+            })
+                .then(() => {
+                    return this.$http.post({
+                        url: '/payCodeStock/del',
+                        data: { id: row.id },
+                    });
+                })
+                .then(() => {
+                    this.$message.success('删除成功');
+                    this.getData();
+                })
+                .catch(action => {
+                    if (action === 'cancel') {
+                        this.$message.info('删除取消');
+                    } else {
+                        this.$message.error('删除失败');
+                    }
+                });
+        },
+        DateTimeFormatter(row, column, cellValue) {
+            if (cellValue) {
+                return format(cellValue, 'YYYY/MM/DD HH:mm', { locale: zh });
+            }
+        },
+        DateFormatter(row, column, cellValue) {
+            if (cellValue) {
+                return format(cellValue, 'YYYY/MM/DD', { locale: zh });
+            }
+        },
+        showImg(img) {
+            this.imgSrc = img;
+            this.imageDialogVisible = true;
+        },
+        PayTypeFormatter(row, column, cellValue) {
+            var valueStr = '';
+            this.payTypeOptions.forEach(item => {
+                if (item.value == cellValue) {
+                    valueStr = item.label;
+                }
+            });
+
+            return valueStr;
+        },
+        PayCodeFormatter(row, column, cellValue) {
+            var valueStr = '';
+            this.payCodeOptions.forEach(item => {
+                if (item.id == cellValue) {
+                    valueStr = item.codeName;
+                }
+            });
+
+            return valueStr;
+        },
+    },
+};
+</script>
+<style lang="less" scoped>
+</style>

+ 143 - 136
src/main/vue/src/pages/PlayerInfos.vue

@@ -58,13 +58,10 @@
                 </template>
                 </template>
             </el-table-column>
             </el-table-column>
 
 
-            <el-table-column v-if="isColumnShow('killNumber')" prop="killNumber" label="击败玩家" min-width="100">
+            <el-table-column prop="killNumber" label="击败玩家" min-width="100">
             </el-table-column>
             </el-table-column>
 
 
-            <el-table-column v-if="isColumnShow('ranking')" prop="ranking" label="游戏排名" min-width="100">
-            </el-table-column>
-
-            <el-table-column v-if="isColumnShow('liveTime')" prop="liveTime" label="存活时长" min-width="100">
+            <el-table-column prop="kill3time" label="击败用时" min-width="100">
             </el-table-column>
             </el-table-column>
 
 
             <el-table-column v-if="isColumnShow('image')" prop="image" label="截图" min-width="200">
             <el-table-column v-if="isColumnShow('image')" prop="image" label="截图" min-width="200">
@@ -215,14 +212,11 @@
 
 
         <el-dialog title="手动结算" :visible.sync="jieXiShowDialog">
         <el-dialog title="手动结算" :visible.sync="jieXiShowDialog">
             <el-form :model="jieXiRow" label-width="120px">
             <el-form :model="jieXiRow" label-width="120px">
-                <el-form-item label="游戏排名">
-                    <el-input v-model="jieXiRow.ranking"></el-input>
-                </el-form-item>
-                <el-form-item label="存活时长">
-                    <el-input v-model="jieXiRow.liveTime"></el-input>
+                <el-form-item label="击败时间">
+                    <el-input type="Number" v-model="jieXiRow.kill3time"></el-input>
                 </el-form-item>
                 </el-form-item>
                 <el-form-item label="击败玩家">
                 <el-form-item label="击败玩家">
-                    <el-input v-model="jieXiRow.killNumber"></el-input>
+                    <el-input type="Number" v-model="jieXiRow.killNumber"></el-input>
                 </el-form-item>
                 </el-form-item>
                 <el-form-item label="备注">
                 <el-form-item label="备注">
                     <el-input v-model="jieXiRow.remark"></el-input>
                     <el-input v-model="jieXiRow.remark"></el-input>
@@ -240,9 +234,9 @@
     </div>
     </div>
 </template>
 </template>
 <script>
 <script>
-import { mapState } from 'vuex'
-import { format } from 'date-fns'
-import zh from 'date-fns/locale/zh_cn'
+import { mapState } from 'vuex';
+import { format } from 'date-fns';
+import zh from 'date-fns/locale/zh_cn';
 
 
 export default {
 export default {
     created() {
     created() {
@@ -261,108 +255,108 @@ export default {
                 {
                 {
                     label: 'ID',
                     label: 'ID',
                     value: 'id',
                     value: 'id',
-                    show: true
+                    show: true,
                 },
                 },
                 {
                 {
                     label: '游戏ID',
                     label: '游戏ID',
                     value: 'gameId',
                     value: 'gameId',
-                    show: false
+                    show: false,
                 },
                 },
                 {
                 {
                     label: '房间ID',
                     label: '房间ID',
                     value: 'houseId',
                     value: 'houseId',
-                    show: true
+                    show: true,
                 },
                 },
                 {
                 {
                     label: '加入时间',
                     label: '加入时间',
                     value: 'joinTime',
                     value: 'joinTime',
-                    show: true
+                    show: true,
                 },
                 },
                 {
                 {
                     label: '参赛积分',
                     label: '参赛积分',
                     value: 'principal',
                     value: 'principal',
-                    show: true
+                    show: true,
                 },
                 },
                 {
                 {
                     label: '奖励',
                     label: '奖励',
                     value: 'bonus',
                     value: 'bonus',
-                    show: true
+                    show: true,
                 },
                 },
                 {
                 {
                     label: '用户',
                     label: '用户',
                     value: 'userId',
                     value: 'userId',
-                    show: true
+                    show: true,
                 },
                 },
 
 
                 {
                 {
                     label: '截图',
                     label: '截图',
                     value: 'image',
                     value: 'image',
-                    show: true
+                    show: true,
                 },
                 },
                 {
                 {
                     label: '击败玩家',
                     label: '击败玩家',
                     value: 'killNumber',
                     value: 'killNumber',
-                    show: false
+                    show: false,
                 },
                 },
                 {
                 {
                     label: '游戏排名',
                     label: '游戏排名',
                     value: 'ranking',
                     value: 'ranking',
-                    show: true
+                    show: true,
                 },
                 },
                 {
                 {
                     label: '开始时间',
                     label: '开始时间',
                     value: 'beginTime',
                     value: 'beginTime',
-                    show: false
+                    show: false,
                 },
                 },
                 {
                 {
                     label: '结束时间',
                     label: '结束时间',
                     value: 'endTime',
                     value: 'endTime',
-                    show: false
+                    show: false,
                 },
                 },
                 {
                 {
                     label: '状态',
                     label: '状态',
                     value: 'statusFlag',
                     value: 'statusFlag',
-                    show: true
+                    show: true,
                 },
                 },
                 {
                 {
                     label: '审核人',
                     label: '审核人',
                     value: 'examineUser',
                     value: 'examineUser',
-                    show: false
+                    show: false,
                 },
                 },
                 {
                 {
                     label: '审核时间',
                     label: '审核时间',
                     value: 'examineTime',
                     value: 'examineTime',
-                    show: false
+                    show: false,
                 },
                 },
                 {
                 {
                     label: '审核类型',
                     label: '审核类型',
                     value: 'examineType',
                     value: 'examineType',
-                    show: false
+                    show: false,
                 },
                 },
                 {
                 {
                     label: '视频地址',
                     label: '视频地址',
                     value: 'video',
                     value: 'video',
-                    show: true
+                    show: true,
                 },
                 },
                 {
                 {
                     label: '存活时长',
                     label: '存活时长',
                     value: 'liveTime',
                     value: 'liveTime',
-                    show: true
+                    show: true,
                 },
                 },
                 {
                 {
                     label: '游戏类型',
                     label: '游戏类型',
                     value: 'gameType',
                     value: 'gameType',
-                    show: false
+                    show: false,
                 },
                 },
                 {
                 {
                     label: '赛季ID',
                     label: '赛季ID',
                     value: 'seasonId',
                     value: 'seasonId',
-                    show: false
+                    show: false,
                 },
                 },
                 {
                 {
                     label: '备注',
                     label: '备注',
                     value: 'remark',
                     value: 'remark',
-                    show: false
+                    show: false,
                 },
                 },
             ],
             ],
             multipleMode: false,
             multipleMode: false,
@@ -374,87 +368,87 @@ export default {
             advancedQueryColumns: [
             advancedQueryColumns: [
                 {
                 {
                     label: 'ID',
                     label: 'ID',
-                    value: 'id'
+                    value: 'id',
                 },
                 },
                 {
                 {
                     label: '游戏ID',
                     label: '游戏ID',
-                    value: 'game_id'
+                    value: 'game_id',
                 },
                 },
                 {
                 {
                     label: '房间ID',
                     label: '房间ID',
-                    value: 'house_id'
+                    value: 'house_id',
                 },
                 },
                 {
                 {
                     label: '加入时间',
                     label: '加入时间',
-                    value: 'join_time'
+                    value: 'join_time',
                 },
                 },
                 {
                 {
                     label: '参赛积分',
                     label: '参赛积分',
-                    value: 'principal'
+                    value: 'principal',
                 },
                 },
                 {
                 {
                     label: '奖励',
                     label: '奖励',
-                    value: 'bonus'
+                    value: 'bonus',
                 },
                 },
                 {
                 {
                     label: '用户',
                     label: '用户',
-                    value: 'user_id'
+                    value: 'user_id',
                 },
                 },
                 {
                 {
                     label: '备注',
                     label: '备注',
-                    value: 'remark'
+                    value: 'remark',
                 },
                 },
                 {
                 {
                     label: '截图',
                     label: '截图',
-                    value: 'image'
+                    value: 'image',
                 },
                 },
                 {
                 {
                     label: '击败玩家',
                     label: '击败玩家',
-                    value: 'kill_number'
+                    value: 'kill_number',
                 },
                 },
                 {
                 {
                     label: '游戏排名',
                     label: '游戏排名',
-                    value: 'ranking'
+                    value: 'ranking',
                 },
                 },
                 {
                 {
                     label: '开始时间',
                     label: '开始时间',
-                    value: 'begin_time'
+                    value: 'begin_time',
                 },
                 },
                 {
                 {
                     label: '结束时间',
                     label: '结束时间',
-                    value: 'end_time'
+                    value: 'end_time',
                 },
                 },
                 {
                 {
                     label: '状态',
                     label: '状态',
-                    value: 'status_flag'
+                    value: 'status_flag',
                 },
                 },
                 {
                 {
                     label: '审核人',
                     label: '审核人',
-                    value: 'examine_user'
+                    value: 'examine_user',
                 },
                 },
                 {
                 {
                     label: '审核时间',
                     label: '审核时间',
-                    value: 'examine_time'
+                    value: 'examine_time',
                 },
                 },
                 {
                 {
                     label: '审核类型',
                     label: '审核类型',
-                    value: 'examine_type'
+                    value: 'examine_type',
                 },
                 },
                 {
                 {
                     label: '视频地址',
                     label: '视频地址',
-                    value: 'video'
+                    value: 'video',
                 },
                 },
                 {
                 {
                     label: '存活时长',
                     label: '存活时长',
-                    value: 'live_time'
+                    value: 'live_time',
                 },
                 },
                 {
                 {
                     label: '游戏类型',
                     label: '游戏类型',
-                    value: 'game_type'
+                    value: 'game_type',
                 },
                 },
                 {
                 {
                     label: '赛季ID',
                     label: '赛季ID',
-                    value: 'season_id'
+                    value: 'season_id',
                 },
                 },
             ],
             ],
             advancedQuerySearchKey: '',
             advancedQuerySearchKey: '',
@@ -463,14 +457,13 @@ export default {
             imageDialogVisible: false,
             imageDialogVisible: false,
             jieXiRow: {},
             jieXiRow: {},
             jieXiShowDialog: false,
             jieXiShowDialog: false,
-
-        }
+        };
     },
     },
     computed: {
     computed: {
         ...mapState(['tableHeight']),
         ...mapState(['tableHeight']),
         selection() {
         selection() {
             return this.$refs.table.selection.map(i => i.id);
             return this.$refs.table.selection.map(i => i.id);
-        }
+        },
     },
     },
     methods: {
     methods: {
         pageSizeChange(size) {
         pageSizeChange(size) {
@@ -483,29 +476,30 @@ export default {
             this.getData();
             this.getData();
         },
         },
         getData() {
         getData() {
-
             var data = {
             var data = {
                 currentPage: this.currentPage,
                 currentPage: this.currentPage,
                 pageNumber: this.pageSize,
                 pageNumber: this.pageSize,
                 searchKey: this.filter1,
                 searchKey: this.filter1,
                 advancedQuery: this.advancedQuerySearchKey,
                 advancedQuery: this.advancedQuerySearchKey,
                 orderByStr: this.orderByStr,
                 orderByStr: this.orderByStr,
-            }
+            };
 
 
             if (this.$route.query.column) {
             if (this.$route.query.column) {
                 var tempColumn = this.$route.query.column;
                 var tempColumn = this.$route.query.column;
                 data[tempColumn.split(',')[1]] = tempColumn.split(',')[0];
                 data[tempColumn.split(',')[1]] = tempColumn.split(',')[0];
             }
             }
 
 
-            this.$http.get({
-                url: '/playerInfo/page',
-                data: data
-            }).then(res => {
-                if (res.success) {
-                    this.totalNumber = res.data.page.totalNumber;
-                    this.tableData = res.data.pp;
-                }
-            })
+            this.$http
+                .get({
+                    url: '/playerInfo/page',
+                    data: data,
+                })
+                .then(res => {
+                    if (res.success) {
+                        this.totalNumber = res.data.page.totalNumber;
+                        this.tableData = res.data.pp;
+                    }
+                });
         },
         },
         isColumnShow(column) {
         isColumnShow(column) {
             var row = this.tableColumns.find(i => i.value === column);
             var row = this.tableColumns.find(i => i.value === column);
@@ -523,13 +517,13 @@ export default {
                 query: {
                 query: {
                     id: row.id,
                     id: row.id,
                     column: this.$route.query.column,
                     column: this.$route.query.column,
-                }
-            })
+                },
+            });
         },
         },
         operation1() {
         operation1() {
             this.$notify({
             this.$notify({
                 title: '提示',
                 title: '提示',
-                message: this.selection
+                message: this.selection,
             });
             });
         },
         },
         operation2() {
         operation2() {
@@ -549,22 +543,31 @@ export default {
             }
             }
         },
         },
         advancedQuery() {
         advancedQuery() {
-
             this.advancedQuerySearchKey = '';
             this.advancedQuerySearchKey = '';
 
 
             if (this.advancedQueryFields.length > 0) {
             if (this.advancedQueryFields.length > 0) {
-
                 var templist = [];
                 var templist = [];
 
 
                 this.advancedQueryFields.forEach(item => {
                 this.advancedQueryFields.forEach(item => {
-                    if (item.link && item.name && item.searchMethod && item.value) {
-                        var tempItem = item.link + '_,' + item.name + '_,' + item.searchMethod + '_,' + item.value;
+                    if (
+                        item.link &&
+                        item.name &&
+                        item.searchMethod &&
+                        item.value
+                    ) {
+                        var tempItem =
+                            item.link +
+                            '_,' +
+                            item.name +
+                            '_,' +
+                            item.searchMethod +
+                            '_,' +
+                            item.value;
                         templist.push(tempItem);
                         templist.push(tempItem);
                     }
                     }
-                })
+                });
 
 
                 if (templist.length > 0) {
                 if (templist.length > 0) {
-
                     this.advancedQuerySearchKey = templist.join('_;');
                     this.advancedQuerySearchKey = templist.join('_;');
                 }
                 }
             }
             }
@@ -584,11 +587,9 @@ export default {
             }
             }
         },
         },
         tableSortQuery() {
         tableSortQuery() {
-
             this.orderByStr = '';
             this.orderByStr = '';
 
 
             if (this.tableSortFields.length > 0) {
             if (this.tableSortFields.length > 0) {
-
                 var templist = [];
                 var templist = [];
 
 
                 this.tableSortFields.forEach(item => {
                 this.tableSortFields.forEach(item => {
@@ -596,10 +597,9 @@ export default {
                         var tempItem = item.name + '_,' + item.order;
                         var tempItem = item.name + '_,' + item.order;
                         templist.push(tempItem);
                         templist.push(tempItem);
                     }
                     }
-                })
+                });
 
 
                 if (templist.length > 0) {
                 if (templist.length > 0) {
-
                     this.orderByStr = templist.join('_;');
                     this.orderByStr = templist.join('_;');
                 }
                 }
             }
             }
@@ -608,48 +608,57 @@ export default {
             this.showTableSortDialog = false;
             this.showTableSortDialog = false;
         },
         },
         exportExcel() {
         exportExcel() {
-            window.location.href = this.$baseUrl + "/playerInfo/exportExcel?searchKey="
-                + this.filter1 + "&advancedQuery=" + this.advancedQuerySearchKey + "&orderByStr=" + this.orderByStr;
+            window.location.href =
+                this.$baseUrl +
+                '/playerInfo/exportExcel?searchKey=' +
+                this.filter1 +
+                '&advancedQuery=' +
+                this.advancedQuerySearchKey +
+                '&orderByStr=' +
+                this.orderByStr;
         },
         },
         searchData() {
         searchData() {
             this.currentPage = 1;
             this.currentPage = 1;
             this.getData();
             this.getData();
         },
         },
         deleteRow(row) {
         deleteRow(row) {
-            this.$alert('删除将无法恢复,确认要删除么?', '警告', { type: 'error' }).then(() => {
-                return this.$http.post({
-                    url: '/playerInfo/del',
-                    data: { id: row.id }
-                })
-            }).then(() => {
-                this.$message.success('删除成功');
-                this.getData();
-            }).catch(action => {
-                if (action === 'cancel') {
-                    this.$message.info('删除取消');
-                } else {
-                    this.$message.error('删除失败');
-                }
+            this.$alert('删除将无法恢复,确认要删除么?', '警告', {
+                type: 'error',
             })
             })
+                .then(() => {
+                    return this.$http.post({
+                        url: '/playerInfo/del',
+                        data: { id: row.id },
+                    });
+                })
+                .then(() => {
+                    this.$message.success('删除成功');
+                    this.getData();
+                })
+                .catch(action => {
+                    if (action === 'cancel') {
+                        this.$message.info('删除取消');
+                    } else {
+                        this.$message.error('删除失败');
+                    }
+                });
         },
         },
         DateTimeFormatter(row, column, cellValue) {
         DateTimeFormatter(row, column, cellValue) {
             if (cellValue) {
             if (cellValue) {
-                return format(cellValue, 'YYYY/MM/DD HH:mm', { locale: zh })
+                return format(cellValue, 'YYYY/MM/DD HH:mm', { locale: zh });
             }
             }
-
         },
         },
         DateFormatter(row, column, cellValue) {
         DateFormatter(row, column, cellValue) {
             if (cellValue) {
             if (cellValue) {
-                return format(cellValue, 'YYYY/MM/DD', { locale: zh })
+                return format(cellValue, 'YYYY/MM/DD', { locale: zh });
             }
             }
-
         },
         },
         showImg(img) {
         showImg(img) {
             this.imgSrc = img;
             this.imgSrc = img;
             this.imageDialogVisible = true;
             this.imageDialogVisible = true;
         },
         },
         download(path) {
         download(path) {
-            let url = path.replace("/var", "http://123.58.240.138:8080");
+            let url = path.replace('/var', 'http://123.58.240.138:8080');
             window.open(url);
             window.open(url);
         },
         },
         getStatus(row) {
         getStatus(row) {
@@ -673,7 +682,8 @@ export default {
                 case 3:
                 case 3:
                     type = 'info';
                     type = 'info';
                     label = '结束';
                     label = '结束';
-                    tip = '比赛结束,等待解析。若长时间未解析完成或其他原因未能成功解析,可手动点击手动解析进行成绩录入';
+                    tip =
+                        '比赛结束,等待解析。若长时间未解析完成或其他原因未能成功解析,可手动点击手动解析进行成绩录入';
                     break;
                     break;
                 case 4:
                 case 4:
                     type = 'info';
                     type = 'info';
@@ -710,7 +720,7 @@ export default {
                     label = '未知';
                     label = '未知';
                     tip = '状态未知';
                     tip = '状态未知';
             }
             }
-            return { type, label, tip }
+            return { type, label, tip };
         },
         },
 
 
         jieXi(row) {
         jieXi(row) {
@@ -720,39 +730,36 @@ export default {
             this.jieXiShowDialog = true;
             this.jieXiShowDialog = true;
         },
         },
         jieXiSubmit() {
         jieXiSubmit() {
-            if (!this.jieXiRow.ranking) {
-                this.$message.warning('请输入游戏内排名')
-
+            if (!this.jieXiRow.kill3time) {
+                this.$message.warning('请输入击败时间');
             } else {
             } else {
-                this.$http.post({
-                    url: '/playerInfo/update',
-                    data: {
-                        id: this.jieXiRow.id,
-                        ranking: this.jieXiRow.ranking,
-                        liveTime: this.jieXiRow.liveTime,
-                        killNumber: this.jieXiRow.killNumber,
-                        remark: this.jieXiRow.remark,
-                        examineUser: this.jieXiRow.examineUser,
-                        statusFlag: 8
-                    }
-                }).then(res => {
-                    if (res.success) {
-
-                        this.$message.success('保存成功');
-                        this.getData();
-
-                    } else {
-                        this.$message.error(res.error);
-                    }
-
-                    this.jieXiRow = {};
-                    this.jieXiShowDialog = false;
-                })
+                this.$http
+                    .post({
+                        url: '/playerInfo/update',
+                        data: {
+                            id: this.jieXiRow.id,
+                            kill3time: this.jieXiRow.kill3time,
+                            killNumber: this.jieXiRow.killNumber,
+                            remark: this.jieXiRow.remark,
+                            examineUser: this.jieXiRow.examineUser,
+                            statusFlag: 8,
+                        },
+                    })
+                    .then(res => {
+                        if (res.success) {
+                            this.$message.success('保存成功');
+                            this.getData();
+                        } else {
+                            this.$message.error(res.error);
+                        }
+
+                        this.jieXiRow = {};
+                        this.jieXiShowDialog = false;
+                    });
             }
             }
         },
         },
-
-    }
-}
+    },
+};
 </script>
 </script>
 <style lang="less">
 <style lang="less">
 .vjs-tech {
 .vjs-tech {

+ 30 - 0
src/main/vue/src/router/index.js

@@ -434,6 +434,36 @@ const router = new Router({
                     path: '/customerServices',
                     path: '/customerServices',
                     name: 'CustomerServices',
                     name: 'CustomerServices',
                     component: () => import('../pages/CustomerServices')
                     component: () => import('../pages/CustomerServices')
+                },
+                {
+                    path: '/payCodeInfo',
+                    name: 'PayCodeInfo',
+                    component: () => import('../pages/PayCodeInfo')
+                },
+                {
+                    path: '/payCodeInfos',
+                    name: 'PayCodeInfos',
+                    component: () => import('../pages/PayCodeInfos')
+                },
+                {
+                    path: '/payCodeStock',
+                    name: 'PayCodeStock',
+                    component: () => import('../pages/PayCodeStock')
+                },
+                {
+                    path: '/payCodeStocks',
+                    name: 'PayCodeStocks',
+                    component: () => import('../pages/PayCodeStocks')
+                },
+                {
+                    path: '/payCodeOrder',
+                    name: 'PayCodeOrder',
+                    component: () => import('../pages/PayCodeOrder')
+                },
+                {
+                    path: '/payCodeOrders',
+                    name: 'PayCodeOrders',
+                    component: () => import('../pages/PayCodeOrders')
                 }
                 }
                 /**INSERT_LOCATION**/
                 /**INSERT_LOCATION**/
             ],
             ],