Sfoglia il codice sorgente

积分赠送配置

guomengjiao 1 settimana fa
parent
commit
5adf661161

+ 7 - 0
renren-admin/src/main/java/io/renren/modules/qmjz/entity/bo/ScoreStuBo.java

@@ -2,6 +2,8 @@ package io.renren.modules.qmjz.entity.bo;
 
 
 import lombok.Data;
 import lombok.Data;
 
 
+import java.util.List;
+
 /**
 /**
  * 积分表
  * 积分表
  */
  */
@@ -39,4 +41,9 @@ public class ScoreStuBo {
      * 赠送积分数量
      * 赠送积分数量
      */
      */
     private Integer giftScore;
     private Integer giftScore;
+
+    /**
+     * 任务类型
+     */
+    private List<Long> taskIds;
 }
 }

+ 2 - 0
renren-admin/src/main/java/io/renren/modules/qmjz/entity/vo/ScoreStuVo.java

@@ -35,6 +35,8 @@ public class ScoreStuVo {
     @ApiModelProperty(value="积分类型")
     @ApiModelProperty(value="积分类型")
     private String scoreType;
     private String scoreType;
 
 
+    @ApiModelProperty(value = "任务类型")
+    private Long taskId;
     /**
     /**
      * 积分事件
      * 积分事件
      */
      */

+ 7 - 1
renren-admin/src/main/resources/mapper/qmjz/ScoreStuMapper.xml

@@ -4,7 +4,7 @@
     <select id="selectPageList" resultType="io.renren.modules.qmjz.entity.vo.ScoreStuVo">
     <select id="selectPageList" resultType="io.renren.modules.qmjz.entity.vo.ScoreStuVo">
         select
         select
         a.id,
         a.id,
-        a.stu_id,score_type,score_event,a.score_value,a.surplus_score,a.create_time,b.phone
+        a.stu_id,score_type,a.task_id,score_event,a.score_value,a.surplus_score,a.create_time,b.phone
         from `tb_score_stu` as a
         from `tb_score_stu` as a
                      join `member_info` as b
                      join `member_info` as b
                      on(a.stu_id=b.id)
                      on(a.stu_id=b.id)
@@ -21,6 +21,12 @@
             <if test="bo.scoreEvent != null and bo.scoreEvent!=''">
             <if test="bo.scoreEvent != null and bo.scoreEvent!=''">
              and  a.score_event like concat ('%',#{bo.scoreEvent},'%')
              and  a.score_event like concat ('%',#{bo.scoreEvent},'%')
             </if>
             </if>
+            <if test="bo.taskIds != null">
+                and a.task_id in
+                <foreach item="item" index="index" collection="bo.taskIds" separator="," open="(" close=")">
+                    #{item}
+                </foreach>
+            </if>
         </where>
         </where>
         order by a.create_time desc, a.id desc
         order by a.create_time desc, a.id desc
     </select>
     </select>

+ 11 - 25
renren-admin/src/main/resources/statics/js/modules/qyh/mutualTransferFlow.js

@@ -1,26 +1,18 @@
-var i = getUrlParam("id");
 $(function () {
 $(function () {
     $("#jqGrid").jqGrid({
     $("#jqGrid").jqGrid({
-        // url: baseURL + 'qmjz/scoreStu/page',
-        postData: { id: i },
+        url: baseURL + 'qmjz/scoreStu/page',
+        postData: { taskIds: '20,21' },
         datatype: "json",
         datatype: "json",
         colModel: [
         colModel: [
             { label: 'id', name: 'id', index: 'id', width: 50, key: true, hidden: true },
             { label: 'id', name: 'id', index: 'id', width: 50, key: true, hidden: true },
             { label: '用户ID', name: 'stuId', index: 'stuId', width: 80, sortable: false },
             { label: '用户ID', name: 'stuId', index: 'stuId', width: 80, sortable: false },
             { label: '手机号', name: 'phone', index: 'phone', width: 80 },
             { label: '手机号', name: 'phone', index: 'phone', width: 80 },
-            {
-                label: '转换类型', name: 'scoreType', index: 'scoreType', width: 80, formatter: function (cellvalue, options, rowdata) {
-                    // for (const item of vm.transferType) {
-                    //     if (cellvalue == item.value) {
-                    //         return item.code
-                    //     }
-                    // }
-                    return ''
-                }
-            },
-            { label: '变动积分', name: 'scoreEvent', index: 'scoreEvent', width: 80, sortable: false },
-            { label: '变动前', name: 'beforeScoreValue', index: 'beforeScoreValue', width: 80, sortable: false },
-            { label: '变动后', name: 'afterScoreValue', index: 'afterScoreValue', width: 80, sortable: false },
+            { label: '转换类型', name: 'scoreEvent', index: 'scoreEvent', width: 80 },
+            { label: '变动积分', name: 'scoreValue', index: 'scoreValue', width: 80, sortable: false },
+            { label: '变动前', name: 'beforeScoreValue', index: 'beforeScoreValue', width: 80, sortable: false , formatter: function (cellvalue, options, rowdata) {
+                    return rowdata.surplusScore - rowdata.scoreValue;
+            }},
+            { label: '变动后', name: 'surplusScore', index: 'surplusScore', width: 80, sortable: false },
             { label: '时间', name: 'createTime', index: 'createTime', width: 80, sortable: false }
             { label: '时间', name: 'createTime', index: 'createTime', width: 80, sortable: false }
         ],
         ],
         viewrecords: true,
         viewrecords: true,
@@ -58,25 +50,19 @@ $(function () {
 var vm = new Vue({
 var vm = new Vue({
     el: '#rrapp',
     el: '#rrapp',
     data: {
     data: {
-        workTagConnect: {},
-        dict: null,
         showList: true,
         showList: true,
         q: {
         q: {
-            scoreType: '',
+            taskIds: '20,21',
             phone: '',
             phone: '',
-            scoreEvent: '',
             stuId: '',
             stuId: '',
         },
         },
         jpgrid: {},
         jpgrid: {},
     },
     },
-
     methods: {
     methods: {
         init: function () {
         init: function () {
-            vm.q.scoreType = '';
+            vm.q.taskIds = '20,21';
             vm.q.phone = '';
             vm.q.phone = '';
-            vm.q.scoreEvent = '';
             vm.q.stuId = '';
             vm.q.stuId = '';
-
         },
         },
         query: function () {
         query: function () {
             vm.reload(1);
             vm.reload(1);
@@ -93,7 +79,7 @@ var vm = new Vue({
                 page = $("#jqGrid").jqGrid('getGridParam', 'page');
                 page = $("#jqGrid").jqGrid('getGridParam', 'page');
             }
             }
             $("#jqGrid").jqGrid('setGridParam', {
             $("#jqGrid").jqGrid('setGridParam', {
-                postData: { 'pid': i, 'stuId': vm.q.stuId, 'phone': vm.q.phone, 'scoreEvent': vm.q.scoreEvent, 'scoreType': vm.q.scoreType },
+                postData: { 'stuId': vm.q.stuId, 'phone': vm.q.phone, 'taskIds': vm.q.taskIds },
                 page: page
                 page: page
             }).trigger("reloadGrid");
             }).trigger("reloadGrid");
         },
         },

+ 3 - 3
renren-admin/src/main/resources/templates/modules/qyh/mutualTransferFlow.html

@@ -11,10 +11,10 @@
                 <div class="form-group col-sm-12 div-Gay">
                 <div class="form-group col-sm-12 div-Gay">
                     <input type="text" class="form-control" v-model.number="q.stuId" @keyup.enter="query" placeholder="用户ID" onkeyup="this.value=this.value.replace(/\D/g,'')" onafterpaste="this.value=this.value.replace(/\D/g,'')">
                     <input type="text" class="form-control" v-model.number="q.stuId" @keyup.enter="query" placeholder="用户ID" onkeyup="this.value=this.value.replace(/\D/g,'')" onafterpaste="this.value=this.value.replace(/\D/g,'')">
                     <input type="text" class="form-control" v-model="q.phone" @keyup.enter="query" placeholder="手机号" onkeyup="this.value=this.value.replace(/\D/g,'')" onafterpaste="this.value=this.value.replace(/\D/g,'')">
                     <input type="text" class="form-control" v-model="q.phone" @keyup.enter="query" placeholder="手机号" onkeyup="this.value=this.value.replace(/\D/g,'')" onafterpaste="this.value=this.value.replace(/\D/g,'')">
-                    <select id="qsex" class="form-control" v-model="q.scoreType"    @keyup.enter="query">
+                    <select id="qsex" class="form-control" v-model="q.taskIds" @keyup.enter="query">
                         <option  value="" hidden disabled>--转换类型--</option>
                         <option  value="" hidden disabled>--转换类型--</option>
-                        <option name="type" :value="1">赠出</option>
-                        <option name="type" :value="2">赠入</option>
+                        <option name="type" :value="20">赠送积分</option>
+                        <option name="type" :value="21">接收赠送积分</option>
                     </select>
                     </select>
 
 
                     <a class="btn btn-query" @click="query"><i class="fa fa-search"></i>&nbsp;查询</a>
                     <a class="btn btn-query" @click="query"><i class="fa fa-search"></i>&nbsp;查询</a>