代码提交

This commit is contained in:
zhengzheng 2022-05-01 12:16:43 +08:00
parent 45e719f0a2
commit 41a1a630af
12 changed files with 147 additions and 43 deletions

View File

@ -271,19 +271,17 @@ public class ActiveInfoController extends BaseController
// return prefix + "/tree";
// }
// /**
// * 角色状态修改
// */
// @Log(title = "角色管理", businessType = BusinessType.UPDATE)
// @RequiresPermissions("system:role:edit")
// @PostMapping("/changeStatus")
// @ResponseBody
// public AjaxResult changeStatus(SysRole role)
// {
// roleService.checkRoleAllowed(role);
// roleService.checkRoleDataScope(role.getRoleId());
// return toAjax(roleService.changeStatus(role));
// }
/**
* 状态修改
*/
@Log(title = "活动上下线状态管理", businessType = BusinessType.UPDATE)
@RequiresPermissions("active:info:edit")
@PostMapping("/changeStatus")
@ResponseBody
public AjaxResult changeStatus(@Validated ActiveInfo activeInfo)
{
return toAjax(activeInfoService.updateActive(activeInfo));
}
// /**
// * 分配用户

View File

@ -29,6 +29,14 @@
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">报名要求:</label>
<div class="col-sm-8">
<select name="isEnroll" class="form-control m-b" th:with="type=${@dict.getType('sya_active_enroll')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">活动图片:</label>

View File

@ -56,6 +56,14 @@
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">报名要求:</label>
<div class="col-sm-8">
<select name="isEnroll" class="form-control m-b" th:with="type=${@dict.getType('sya_active_enroll')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{isEnroll}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">活动图片:</label>
<div class="col-sm-8">
@ -63,7 +71,7 @@
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">状态:</label>
<label class="col-sm-3 control-label is-required">活动状态:</label>
<div class="col-sm-8">
<select name="status" class="form-control m-b" th:with="type=${@dict.getType('sys_active_status')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{status}"></option>
@ -104,6 +112,7 @@
var activeStartDate = $("input[name='activeStartDate']").val();
var activeEndDate = $("input[name='activeEndDate']").val();
var activeType = $("select[name='activeType']").val();
var isEnroll = $("select[name='isEnroll']").val();
var activePic = $("input[name='activePic']").val();
var status = $("select[name='status']").val();
var remark = $("input[name='remark']").val();
@ -120,6 +129,7 @@
"activeStartDate": activeStartDate,
"activeEndDate": activeEndDate,
"activeType": activeType,
"isEnroll": isEnroll,
"activePic": activePic,
"status": status,
"remark": remark

View File

@ -11,10 +11,10 @@
<div class="select-list">
<ul>
<li>
活动标题:<input type="text" name="roleName"/>
活动标题:<input type="text" name="activeTitle"/>
</li>
<li>
活动状态:<select name="status" th:with="type=${@dict.getType('sys_normal_disable')}">
活动状态:<select name="status" th:with="type=${@dict.getType('sys_active_status')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
th:value="${dict.dictValue}"></option>
@ -118,15 +118,29 @@
title: '活动状态',
sortable: true,
formatter: function(value, item, index) {
if (item.status == '1') {
return '进行中';
if (item.status == '0') {
return '未开始';
}
else if (item.status == '2') {
return '报名中';
} else if (item.status == '3') {
else if (item.status == '1') {
return '进行中';
} else if (item.status == '2') {
return '已结束';
}
}
},
{
field: 'status',
title: '报名要求',
sortable: true,
formatter: function(value, item, index) {
if (item.isEnroll == '0') {
return '不需要报名';
}
else if (item.isEnroll == '1') {
return '需要报名';
}
}
},
{
@ -153,11 +167,11 @@
sortable: true
},
{
field: 'createTime',
title: '创建时间',
sortable: true
},
<!-- {-->
<!-- field: 'createTime',-->
<!-- title: '创建时间',-->
<!-- sortable: true-->
<!-- },-->
{
title: '操作',
align: 'center',
@ -167,6 +181,10 @@
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a> ');
actions.push('<a class="btn btn-info btn-xs ' + addFlag + '" href="javascript:void(0)" onclick="authFirstPage(\'' + row.id + '\')"><i class="fa fa-plus"></i>设为首页</a> ');
var more = [];
more.push("<a class='btn btn-default btn-xs " + editFlag + "' href='javascript:void(0)' onclick='online(" +row.id + ")'><i class='fa fa-check'></i>活动上线</a> ");
more.push("<a class='btn btn-default btn-xs " + removeFlag + "' href='javascript:void(0)' onclick='Offline(" + row.id + ")'><i class='fa fa-close'></i>活动下线</a>");
actions.push('<a tabindex="0" class="btn btn-info btn-xs" role="button" data-container="body" data-placement="left" data-toggle="popover" data-html="true" data-trigger="hover" data-content="' + more.join('') + '"><i class="fa fa-chevron-circle-right"></i>更多操作</a>');
return actions.join('');
} else {
return "";
@ -205,13 +223,20 @@
}
}
/* 活动管理-停用 */
function disable(roleId) {
$.modal.confirm("确认要停用角色吗?", function() {
/* 活动管理-上线 */
function online(id) {
$.modal.confirm("确认要设置活动上线吗?", function() {
$.operate.post(prefix + "/changeStatus", { "id": id, "status": 1 });
})
}
/* 活动管理-下线 */
function Offline(id) {
$.modal.confirm("确认要设置活动下线吗?", function() {
$.operate.post(prefix + "/changeStatus", { "id": id, "status": 2 });
})
}
/* 活动管理启用 */
function enable(roleId) {
$.modal.confirm("确认要启用角色吗?", function() {

View File

@ -10,13 +10,15 @@
<form id="post-form">
<div class="select-list">
<ul>
<li>
报名用户编号:<input type="text" name="id"/>
</li>
<li>
活动标题:<input type="text" name="activeTitle"/>
</li>
<li>
EPC号<input type="text" name="qrCode"/>
</li>
<li>
手机号码:<input type="text" name="phoneNumber"/>
</li>
<li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i
class="fa fa-search"></i>&nbsp;搜索</a>
@ -52,8 +54,8 @@
checkbox: true
},
{
field: 'id',
title: '报名用户编号'
field: 'qrCode',
title: 'EPC号'
},
{
field: 'nickName',

View File

@ -11,12 +11,17 @@
<div class="select-list">
<ul>
<li>
报名用户编号:<input type="text" name="id"/>
EPC号<input type="text" name="qrCode"/>
</li>
<li>
昵称:<input type="text" name="nickName"/>
</li>
<li>
职务:<input type="text" name="postName"/>
</li>
<li>
手机号码:<input type="text" name="phoneNumber"/>
</li>
<li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i
class="fa fa-search"></i>&nbsp;搜索</a>
@ -52,8 +57,8 @@
checkbox: true
},
{
field: 'id',
title: '报名用户编号'
field: 'qrCode',
title: 'EPC号'
},
{
field: 'nickName',

View File

@ -91,6 +91,14 @@ public class ActiveInfo extends BaseEntity {
@Excel(name = "活动地址")
private String address;
/**
* 活动报名类型
*/
@Excel(name = "活动报名类型")
private String isEnroll;
public String getAddress() {
return address;
}
@ -219,6 +227,17 @@ public class ActiveInfo extends BaseEntity {
this.activePicUrl = activePicUrl;
}
public String getIsEnroll() {
return isEnroll;
}
public void setIsEnroll(String isEnroll) {
this.isEnroll = isEnroll;
}
@Override
public String toString() {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)

View File

@ -68,9 +68,16 @@ public class EnrollActiveUser extends BaseEntity {
@Excel(name = "活动标题")
private String activeTitle;
@Excel(name = "EPC号")
private String qrCode;
public String getQrCode() {
return qrCode;
}
public void setQrCode(String qrCode) {
this.qrCode = qrCode;
}
public String getNickName() {
return nickName;

View File

@ -60,7 +60,16 @@ public class EnrollUser extends BaseEntity {
@Excel(name = "推荐人编号")
private String recommenderNo;
@Excel(name = "EPC号")
private String qrCode;
public String getQrCode() {
return qrCode;
}
public void setQrCode(String qrCode) {
this.qrCode = qrCode;
}
public String getNickName() {
return nickName;

View File

@ -23,10 +23,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="remark" column="remark" />
<result property="delFlag" column="del_flag" />
<result property="address" column="address" />
<result property="isEnroll" column="is_enroll" />
</resultMap>
<sql id="selectActiveVo">
select r.id, r.active_title, r.active_desc,r.active_start_date,r.active_end_date, r.active_pic_url, r.active_frist_pic_url,r.is_frist_page, r.active_type, r.status, r.del_flag, r.create_time, r.remark, r.address
select r.id, r.active_title, r.active_desc,r.active_start_date,r.active_end_date, r.active_pic_url, r.active_frist_pic_url,r.is_frist_page, r.active_type, r.status, r.del_flag, r.create_time, r.remark, r.address,r.is_enroll
from active_info r
</sql>
@ -92,6 +93,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="remark != null">remark = #{remark},</if>
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
<if test="address != null and address != ''">address = #{address},</if>
<if test="isEnroll != null and isEnroll != ''">is_enroll = #{isEnroll},</if>
update_time = sysdate()
</set>
where id = #{id}
@ -121,6 +123,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="remark != null and remark != ''">remark,</if>
<if test="createBy != null and createBy != ''">create_by,</if>
<if test="address != null and address != ''">address,</if>
<if test="isEnroll != null and isEnroll != ''">is_enroll</if>
create_time
)values(
<if test="activeTitle != null and activeTitle !=''">#{activeTitle},</if>
@ -133,6 +136,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="remark != null and remark != ''">#{remark},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if>
<if test="address != null and address != ''">#{address},</if>
<if test="isEnroll != null and isEnroll != ''">#{isEnroll},</if>
sysdate()
)
</insert>

View File

@ -16,11 +16,12 @@
<result property="createTime" column="create_time"/>
<result property="updateBy" column="update_by"/>
<result property="updateTime" column="update_time"/>
<result property="qrCode" column="qr_code"/>
<result property="remark" column="remark"/>
</resultMap>
<sql id="selectActiveUserVo">
select e.id, e.nick_name, e.post_name, e.phone_number, e.playbill_address,e.recommender_no,e.create_by, e.create_time, e.remark,a.active_title
select e.id, e.nick_name, e.post_name, e.phone_number, e.playbill_address,e.recommender_no,e.create_by, e.create_time, e.remark,a.active_title,e.qr_code
from enroll_user e inner join active_info a ON e.active_no = a.id
</sql>
@ -31,9 +32,15 @@
<if test="id != null and id != ''">
AND e.id like concat('%', #{id}, '%')
</if>
<if test="qrCode != null and qrCode != ''">
AND e.qr_code like concat('%', #{qrCode}, '%')
</if>
<if test="activeTitle != null and activeTitle != ''">
AND a.active_title like concat('%', #{activeTitle}, '%')
</if>
<if test="phoneNumber != null and phoneNumber != ''">
AND e.phone_number like concat('%', #{phoneNumber}, '%')
</if>
</where>
</select>

View File

@ -15,11 +15,12 @@
<result property="createTime" column="create_time"/>
<result property="updateBy" column="update_by"/>
<result property="updateTime" column="update_time"/>
<result property="qrCode" column="qr_code"/>
<result property="remark" column="remark"/>
</resultMap>
<sql id="selectUserVo">
select id, nick_name, post_name, phone_number, playbill_address,recommender_no,create_by, create_time, remark
select id, nick_name, post_name, phone_number, playbill_address,recommender_no,create_by, create_time, remark,qr_code
from enroll_user
</sql>
@ -30,9 +31,18 @@
<if test="id != null and id != ''">
AND id like concat('%', #{id}, '%')
</if>
<if test="qrCode != null and qrCode != ''">
AND qr_code like concat('%', #{qrCode}, '%')
</if>
<if test="nickName != null and nickName != ''">
AND nick_name like concat('%', #{nickName}, '%')
</if>
<if test="postName != null and postName != ''">
AND post_name like concat('%', #{postName}, '%')
</if>
<if test="phoneNumber != null and phoneNumber != ''">
AND phone_number like concat('%', #{phoneNumber}, '%')
</if>
</where>
</select>