活动管理-抽奖次数消费信息列表修改

This commit is contained in:
dy 2021-03-31 11:45:42 +08:00
parent 4784b6e74a
commit 84699a9412
6 changed files with 156 additions and 109 deletions

View File

@ -510,6 +510,21 @@ var table = {
}); });
return actions.join(''); return actions.join('');
}, },
// 回显活动名称
selectDrawname: function(datas, value) {
if ($.common.isEmpty(datas) || $.common.isEmpty(value)) {
return '';
}
var actions = [];
$.each(datas, function(index, draw) {
if (draw.drawcode == ('' + value)) {
var listClass = $.common.equals("default", draw.listClass) || $.common.isEmpty(draw.listClass) ? "" : "badge badge-" + draw.listClass;
actions.push($.common.sprintf("<span class='%s'>%s</span>", listClass, draw.drawname));
return false;
}
});
return actions.join('');
},
// 回显数据字典(字符串数组) // 回显数据字典(字符串数组)
selectDictLabels: function(datas, value, separator) { selectDictLabels: function(datas, value, separator) {
if ($.common.isEmpty(datas) || $.common.isEmpty(value)) { if ($.common.isEmpty(datas) || $.common.isEmpty(value)) {

View File

@ -29,6 +29,8 @@ public interface DrawInfoMapper
*/ */
public List<DrawInfo> selectDrawInfoList(DrawInfo drawInfo); public List<DrawInfo> selectDrawInfoList(DrawInfo drawInfo);
List<DrawInfo> findDrawInfoList();
/** /**
* 新增抽奖活动管理对象 * 新增抽奖活动管理对象
* *

View File

@ -29,6 +29,12 @@ public interface IDrawInfoService
*/ */
public List<DrawInfo> selectDrawInfoList(DrawInfo drawInfo); public List<DrawInfo> selectDrawInfoList(DrawInfo drawInfo);
/**
* 查询活动列表-下拉用
* @return
*/
public List<DrawInfo> findDrawInfoList();
/** /**
* 新增抽奖活动管理对象 * 新增抽奖活动管理对象
* *

View File

@ -16,7 +16,7 @@ import com.ruoyi.common.core.text.Convert;
* @author xlh * @author xlh
* @date 2021-03-25 * @date 2021-03-25
*/ */
@Service @Service("drawInfo")
public class DrawInfoServiceImpl implements IDrawInfoService public class DrawInfoServiceImpl implements IDrawInfoService
{ {
@Autowired @Autowired
@ -46,6 +46,11 @@ public class DrawInfoServiceImpl implements IDrawInfoService
return drawInfoMapper.selectDrawInfoList(drawInfo); return drawInfoMapper.selectDrawInfoList(drawInfo);
} }
@Override
public List<DrawInfo> findDrawInfoList() {
return drawInfoMapper.findDrawInfoList();
}
/** /**
* 新增抽奖活动管理对象 * 新增抽奖活动管理对象
* *

View File

@ -57,6 +57,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</where> </where>
</select> </select>
<select id="findDrawInfoList" resultMap="DrawInfoResult">
select DRAWID, DRAWCODE, DRAWTYPE, DRAWNAME from draw_info
</select>
<select id="selectDrawInfoById" parameterType="String" resultMap="DrawInfoResult"> <select id="selectDrawInfoById" parameterType="String" resultMap="DrawInfoResult">
SELECT SELECT
i.DRAWID, i.DRAWID,

View File

@ -12,7 +12,12 @@
<ul> <ul>
<li> <li>
<label>活动代码:</label> <label>活动代码:</label>
<input type="text" name="DRAWCODE"/> <!-- <input type="text" name="DRAWCODE"/>-->
<select name="DRAWCODE" th:with="drawinfo=${@drawInfo.findDrawInfoList()}">
<option value="">所有</option>
<option th:each="drawInfo : ${drawinfo}" th:text="${drawInfo.DRAWNAME}"
th:value="${drawInfo.DRAWCODE}"></option>
</select>
</li> </li>
<li> <li>
<label>任务流水:</label> <label>任务流水:</label>
@ -26,7 +31,8 @@
<label>次数类型:</label> <label>次数类型:</label>
<select name="TYPE" th:with="type=${@dict.getType('drawType')}" style="width: 80px"> <select name="TYPE" th:with="type=${@dict.getType('drawType')}" style="width: 80px">
<option value="">所有</option> <option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> <option th:each="dict : ${type}" th:text="${dict.dictLabel}"
th:value="${dict.dictValue}"></option>
</select> </select>
</li> </li>
<!-- <li>--> <!-- <li>-->
@ -45,12 +51,15 @@
<label>状态:</label> <label>状态:</label>
<select name="STATE" th:with="type=${@dict.getType('status')}" style="width: 80px"> <select name="STATE" th:with="type=${@dict.getType('status')}" style="width: 80px">
<option value="">所有</option> <option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> <option th:each="dict : ${type}" th:text="${dict.dictLabel}"
th:value="${dict.dictValue}"></option>
</select> </select>
</li> </li>
<li> <li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a> <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a> class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i
class="fa fa-refresh"></i>&nbsp;重置</a>
</li> </li>
</ul> </ul>
</div> </div>
@ -83,6 +92,7 @@
var prefix = ctx + "activity/consume"; var prefix = ctx + "activity/consume";
var drawTypes = [[${@dict.getType('drawType')}]]; var drawTypes = [[${@dict.getType('drawType')}]];
var STATEDatas = [[${@dict.getType('status')}]]; var STATEDatas = [[${@dict.getType('status')}]];
var drawInfoList = [[${@drawInfo.findDrawInfoList()}]];
$(function () { $(function () {
var options = { var options = {
@ -95,6 +105,7 @@
columns: [{ columns: [{
checkbox: true checkbox: true
}, },
{ {
field: 'taskconsumeid', field: 'taskconsumeid',
title: '业务主键', title: '业务主键',
@ -105,18 +116,17 @@
title: '活动次数记录主键', title: '活动次数记录主键',
visible: false visible: false
}, },
{
field: 'drawcode',
title: '活动代码'
},
{
field: 'taskid',
title: '任务流水'
},
{ {
field: 'userid', field: 'userid',
title: '用户标识' title: '用户标识'
}, },
{
field: 'drawcode',
title: '活动代码',
formatter: function (value, row, index) {
return $.table.selectDrawname(drawInfoList, value);
}
},
{ {
field: 'type', field: 'type',
title: '赠送次数类型', title: '赠送次数类型',
@ -124,17 +134,26 @@
return $.table.selectDictLabel(drawTypes, value); return $.table.selectDictLabel(drawTypes, value);
} }
}, },
{
field: 'createtimestamp',
title: '创建时间'
},
{ {
field: 'consumenumber', field: 'consumenumber',
title: '使用次数' title: '使用次数'
}, },
{
field: 'taskid',
title: '任务流水'
},
{ {
field: 'transeqno', field: 'transeqno',
title: '使用流水' title: '使用流水'
}, },
{ {
field: 'tradeorderid', field: 'tradeorderid',
title: '使用主键' title: '使用主键',
visible: false
}, },
{ {
field: 'state', field: 'state',
@ -144,10 +163,6 @@
} }
}, },
// { // {
// field: 'createtimestamp',
// title: '创建时间'
// },
// {
// field: 'lastupdatetimestamp', // field: 'lastupdatetimestamp',
// title: '最后修改时间' // title: '最后修改时间'
// }, // },