用户钱包,用户反馈
This commit is contained in:
@ -0,0 +1,84 @@
|
||||
<?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.ruoyi.baseUser.mapper.ZcBaseUserFeedbackMapper">
|
||||
|
||||
<resultMap type="ZcBaseUserFeedback" id="ZcBaseUserFeedbackResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="userId" column="user_id" />
|
||||
<result property="userName" column="user_name" />
|
||||
<result property="phoneNumber" column="phone_number" />
|
||||
<result property="feedbackContent" column="feedback_content" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectZcBaseUserFeedbackVo">
|
||||
select id, user_id, user_name, phone_number, feedback_content, del_flag, create_time, update_time from zc_base_user_feedback
|
||||
</sql>
|
||||
|
||||
<select id="selectZcBaseUserFeedbackList" parameterType="ZcBaseUserFeedback" resultMap="ZcBaseUserFeedbackResult">
|
||||
<include refid="selectZcBaseUserFeedbackVo"/>
|
||||
<where>
|
||||
<if test="userId != null "> and user_id = #{userId}</if>
|
||||
<if test="userName != null and userName != ''"> and user_name like concat('%', #{userName}, '%')</if>
|
||||
<if test="phoneNumber != null and phoneNumber != ''"> and phone_number = #{phoneNumber}</if>
|
||||
<if test="feedbackContent != null and feedbackContent != ''"> and feedback_content = #{feedbackContent}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectZcBaseUserFeedbackById" parameterType="Long" resultMap="ZcBaseUserFeedbackResult">
|
||||
<include refid="selectZcBaseUserFeedbackVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertZcBaseUserFeedback" parameterType="ZcBaseUserFeedback" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into zc_base_user_feedback
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="userId != null">user_id,</if>
|
||||
<if test="userName != null and userName != ''">user_name,</if>
|
||||
<if test="phoneNumber != null and phoneNumber != ''">phone_number,</if>
|
||||
<if test="feedbackContent != null and feedbackContent != ''">feedback_content,</if>
|
||||
<if test="delFlag != null">del_flag,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="userId != null">#{userId},</if>
|
||||
<if test="userName != null and userName != ''">#{userName},</if>
|
||||
<if test="phoneNumber != null and phoneNumber != ''">#{phoneNumber},</if>
|
||||
<if test="feedbackContent != null and feedbackContent != ''">#{feedbackContent},</if>
|
||||
<if test="delFlag != null">#{delFlag},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateZcBaseUserFeedback" parameterType="ZcBaseUserFeedback">
|
||||
update zc_base_user_feedback
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="userId != null">user_id = #{userId},</if>
|
||||
<if test="userName != null and userName != ''">user_name = #{userName},</if>
|
||||
<if test="phoneNumber != null and phoneNumber != ''">phone_number = #{phoneNumber},</if>
|
||||
<if test="feedbackContent != null and feedbackContent != ''">feedback_content = #{feedbackContent},</if>
|
||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteZcBaseUserFeedbackById" parameterType="Long">
|
||||
delete from zc_base_user_feedback where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteZcBaseUserFeedbackByIds" parameterType="String">
|
||||
delete from zc_base_user_feedback where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
@ -0,0 +1,127 @@
|
||||
<?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.ruoyi.baseUser.mapper.ZcBaseWalletMapper">
|
||||
|
||||
<resultMap type="ZcBaseWallet" id="ZcBaseWalletResult">
|
||||
<result property="userId" column="user_id" />
|
||||
<result property="userName" column="user_name" />
|
||||
<result property="phoneNumber" column="phone_number" />
|
||||
<result property="balance" column="balance" />
|
||||
<result property="availableAmount" column="available_amount" />
|
||||
<result property="freezeAmount" column="freeze_amount" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="ZcBaseWalletZcBaseWalletChangeResult" type="ZcBaseWallet" extends="ZcBaseWalletResult">
|
||||
<collection property="zcBaseWalletChangeList" notNullColumn="sub_id" javaType="java.util.List" resultMap="ZcBaseWalletChangeResult" />
|
||||
</resultMap>
|
||||
|
||||
<resultMap type="ZcBaseWalletChange" id="ZcBaseWalletChangeResult">
|
||||
<result property="id" column="sub_id" />
|
||||
<result property="userId" column="sub_user_id" />
|
||||
<result property="changeType" column="sub_change_type" />
|
||||
<result property="payType" column="sub_pay_type" />
|
||||
<result property="changeTime" column="sub_change_time" />
|
||||
<result property="changeAmount" column="sub_change_amount" />
|
||||
<result property="referralOrderNo" column="sub_referral_order_no" />
|
||||
<result property="delFlag" column="sub_del_flag" />
|
||||
<result property="createTime" column="sub_create_time" />
|
||||
<result property="updateTime" column="sub_update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectZcBaseWalletVo">
|
||||
select user_id, user_name, phone_number, balance, available_amount, freeze_amount, del_flag, create_time, update_time from zc_base_wallet
|
||||
</sql>
|
||||
|
||||
<select id="selectZcBaseWalletList" parameterType="ZcBaseWallet" resultMap="ZcBaseWalletResult">
|
||||
<include refid="selectZcBaseWalletVo"/>
|
||||
<where>
|
||||
<if test="userName != null and userName != ''"> and user_name like concat('%', #{userName}, '%')</if>
|
||||
<if test="phoneNumber != null and phoneNumber != ''"> and phone_number = #{phoneNumber}</if>
|
||||
<if test="balance != null "> and balance = #{balance}</if>
|
||||
<if test="availableAmount != null "> and available_amount = #{availableAmount}</if>
|
||||
<if test="freezeAmount != null "> and freeze_amount = #{freezeAmount}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectZcBaseWalletByUserId" parameterType="Long" resultMap="ZcBaseWalletZcBaseWalletChangeResult">
|
||||
select a.user_id, a.user_name, a.phone_number, a.balance, a.available_amount, a.freeze_amount, a.del_flag, a.create_time, a.update_time,
|
||||
b.id as sub_id, b.user_id as sub_user_id, b.change_type as sub_change_type, b.pay_type as sub_pay_type, b.change_time as sub_change_time, b.change_amount as sub_change_amount, b.referral_order_no as sub_referral_order_no, b.del_flag as sub_del_flag, b.create_time as sub_create_time, b.update_time as sub_update_time
|
||||
from zc_base_wallet a
|
||||
left join zc_base_wallet_change b on b.user_id = a.user_id
|
||||
where a.user_id = #{userId}
|
||||
</select>
|
||||
|
||||
<insert id="insertZcBaseWallet" parameterType="ZcBaseWallet" useGeneratedKeys="true" keyProperty="userId">
|
||||
insert into zc_base_wallet
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="userName != null and userName != ''">user_name,</if>
|
||||
<if test="phoneNumber != null and phoneNumber != ''">phone_number,</if>
|
||||
<if test="balance != null">balance,</if>
|
||||
<if test="availableAmount != null">available_amount,</if>
|
||||
<if test="freezeAmount != null">freeze_amount,</if>
|
||||
<if test="delFlag != null">del_flag,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="userName != null and userName != ''">#{userName},</if>
|
||||
<if test="phoneNumber != null and phoneNumber != ''">#{phoneNumber},</if>
|
||||
<if test="balance != null">#{balance},</if>
|
||||
<if test="availableAmount != null">#{availableAmount},</if>
|
||||
<if test="freezeAmount != null">#{freezeAmount},</if>
|
||||
<if test="delFlag != null">#{delFlag},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateZcBaseWallet" parameterType="ZcBaseWallet">
|
||||
update zc_base_wallet
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="userName != null and userName != ''">user_name = #{userName},</if>
|
||||
<if test="phoneNumber != null and phoneNumber != ''">phone_number = #{phoneNumber},</if>
|
||||
<if test="balance != null">balance = #{balance},</if>
|
||||
<if test="availableAmount != null">available_amount = #{availableAmount},</if>
|
||||
<if test="freezeAmount != null">freeze_amount = #{freezeAmount},</if>
|
||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
</trim>
|
||||
where user_id = #{userId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteZcBaseWalletByUserId" parameterType="Long">
|
||||
delete from zc_base_wallet where user_id = #{userId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteZcBaseWalletByUserIds" parameterType="String">
|
||||
delete from zc_base_wallet where user_id in
|
||||
<foreach item="userId" collection="array" open="(" separator="," close=")">
|
||||
#{userId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<delete id="deleteZcBaseWalletChangeByUserIds" parameterType="String">
|
||||
delete from zc_base_wallet_change where user_id in
|
||||
<foreach item="userId" collection="array" open="(" separator="," close=")">
|
||||
#{userId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<delete id="deleteZcBaseWalletChangeByUserId" parameterType="Long">
|
||||
delete from zc_base_wallet_change where user_id = #{userId}
|
||||
</delete>
|
||||
|
||||
<insert id="batchZcBaseWalletChange">
|
||||
insert into zc_base_wallet_change( id, user_id, change_type, pay_type, change_time, change_amount, referral_order_no, del_flag, create_time, update_time) values
|
||||
<foreach item="item" index="index" collection="list" separator=",">
|
||||
( #{item.id}, #{item.userId}, #{item.changeType}, #{item.payType}, #{item.changeTime}, #{item.changeAmount}, #{item.referralOrderNo}, #{item.delFlag}, #{item.createTime}, #{item.updateTime})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
</mapper>
|
||||
@ -0,0 +1,94 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('新增用户反馈')" />
|
||||
<th:block th:include="include :: summernote-css" />
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-feedback-add">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">用户id:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="userId" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">用户名:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="userName" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">手机号:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="phoneNumber" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">反馈内容:</label>
|
||||
<div class="col-sm-8">
|
||||
<input type="hidden" class="form-control" name="feedbackContent">
|
||||
<div class="summernote" id="feedbackContent"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">删除标志:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="delFlag" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<th:block th:include="include :: summernote-js" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "baseUser/feedback"
|
||||
$("#form-feedback-add").validate({
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/add", $('#form-feedback-add').serialize());
|
||||
}
|
||||
}
|
||||
|
||||
$(function() {
|
||||
$('.summernote').summernote({
|
||||
lang: 'zh-CN',
|
||||
dialogsInBody: true,
|
||||
callbacks: {
|
||||
onChange: function(contents, $edittable) {
|
||||
$("input[name='" + this.id + "']").val(contents);
|
||||
},
|
||||
onImageUpload: function(files) {
|
||||
var obj = this;
|
||||
var data = new FormData();
|
||||
data.append("file", files[0]);
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: ctx + "common/upload",
|
||||
data: data,
|
||||
cache: false,
|
||||
contentType: false,
|
||||
processData: false,
|
||||
dataType: 'json',
|
||||
success: function(result) {
|
||||
if (result.code == web_status.SUCCESS) {
|
||||
$('#' + obj.id).summernote('insertImage', result.url);
|
||||
} else {
|
||||
$.modal.alertError(result.msg);
|
||||
}
|
||||
},
|
||||
error: function(error) {
|
||||
$.modal.alertWarning("图片上传失败。");
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@ -0,0 +1,93 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('修改用户反馈')" />
|
||||
<th:block th:include="include :: summernote-css" />
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-feedback-edit" th:object="${zcBaseUserFeedback}">
|
||||
<input name="id" th:field="*{id}" type="hidden">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">用户id:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="userId" th:field="*{userId}" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">用户名:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="userName" th:field="*{userName}" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">手机号:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="phoneNumber" th:field="*{phoneNumber}" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">反馈内容:</label>
|
||||
<div class="col-sm-8">
|
||||
<input type="hidden" class="form-control" th:field="*{feedbackContent}">
|
||||
<div class="summernote" id="feedbackContent"></div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<th:block th:include="include :: summernote-js" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "baseUser/feedback";
|
||||
$("#form-feedback-edit").validate({
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/edit", $('#form-feedback-edit').serialize());
|
||||
}
|
||||
}
|
||||
|
||||
$(function() {
|
||||
$('.summernote').each(function(i) {
|
||||
$('#' + this.id).summernote({
|
||||
lang: 'zh-CN',
|
||||
dialogsInBody: true,
|
||||
callbacks: {
|
||||
onChange: function(contents, $edittable) {
|
||||
$("input[name='" + this.id + "']").val(contents);
|
||||
},
|
||||
onImageUpload: function(files) {
|
||||
var obj = this;
|
||||
var data = new FormData();
|
||||
data.append("file", files[0]);
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: ctx + "common/upload",
|
||||
data: data,
|
||||
cache: false,
|
||||
contentType: false,
|
||||
processData: false,
|
||||
dataType: 'json',
|
||||
success: function(result) {
|
||||
if (result.code == web_status.SUCCESS) {
|
||||
$('#' + obj.id).summernote('insertImage', result.url);
|
||||
} else {
|
||||
$.modal.alertError(result.msg);
|
||||
}
|
||||
},
|
||||
error: function(error) {
|
||||
$.modal.alertWarning("图片上传失败。");
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
var content = $("input[name='" + this.id + "']").val();
|
||||
$('#' + this.id).summernote('code', content);
|
||||
})
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@ -0,0 +1,98 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<head>
|
||||
<th:block th:include="include :: header('用户反馈列表')" />
|
||||
</head>
|
||||
<body class="gray-bg">
|
||||
<div class="container-div">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 search-collapse">
|
||||
<form id="formId">
|
||||
<div class="select-list">
|
||||
<ul>
|
||||
<li>
|
||||
<label>用户名:</label>
|
||||
<input type="text" name="userName"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>手机号:</label>
|
||||
<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> 搜索</a>
|
||||
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="btn-group-sm" id="toolbar" role="group">
|
||||
<!-- <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="baseUser:feedback:add">-->
|
||||
<!-- <i class="fa fa-plus"></i> 添加-->
|
||||
<!-- </a>-->
|
||||
<!-- <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="baseUser:feedback:edit">-->
|
||||
<!-- <i class="fa fa-edit"></i> 修改-->
|
||||
<!-- </a>-->
|
||||
<!-- <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="baseUser:feedback:remove">-->
|
||||
<!-- <i class="fa fa-remove"></i> 删除-->
|
||||
<!-- </a>-->
|
||||
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="baseUser:feedback:export">
|
||||
<i class="fa fa-download"></i> 导出
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-sm-12 select-table table-striped">
|
||||
<table id="bootstrap-table"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var editFlag = [[${@permission.hasPermi('baseUser:feedback:edit')}]];
|
||||
var removeFlag = [[${@permission.hasPermi('baseUser:feedback:remove')}]];
|
||||
var prefix = ctx + "baseUser/feedback";
|
||||
|
||||
$(function() {
|
||||
var options = {
|
||||
url: prefix + "/list",
|
||||
createUrl: prefix + "/add",
|
||||
updateUrl: prefix + "/edit/{id}",
|
||||
removeUrl: prefix + "/remove",
|
||||
exportUrl: prefix + "/export",
|
||||
modalName: "用户反馈",
|
||||
columns: [
|
||||
{
|
||||
field: 'id',
|
||||
title: 'id主键',
|
||||
visible: false
|
||||
},
|
||||
{
|
||||
field: 'userName',
|
||||
title: '用户名',
|
||||
width: '260'
|
||||
},
|
||||
{
|
||||
field: 'phoneNumber',
|
||||
title: '手机号',
|
||||
width: '260'
|
||||
},
|
||||
{
|
||||
field: 'feedbackContent',
|
||||
title: '反馈内容'
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
width: '100',
|
||||
formatter: function(value, row, index) {
|
||||
var actions = [];
|
||||
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + ' btnOption" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
|
||||
return actions.join('');
|
||||
}
|
||||
}]
|
||||
};
|
||||
$.table.init(options);
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@ -66,9 +66,7 @@
|
||||
removeUrl: prefix + "/remove",
|
||||
exportUrl: prefix + "/export",
|
||||
modalName: "用户引荐",
|
||||
columns: [{
|
||||
checkbox: true
|
||||
},
|
||||
columns: [
|
||||
{
|
||||
field: 'id',
|
||||
title: 'id主键',
|
||||
|
||||
@ -0,0 +1,192 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('新增钱包信息')" />
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-wallet-add">
|
||||
<h4 class="form-header h4">钱包信息信息</h4>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">用户名:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="userName" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">手机号:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="phoneNumber" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">余额(元):</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="balance" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">可用金额(元):</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="availableAmount" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">冻结金额(元):</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="freezeAmount" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">删除标志:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="delFlag" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<h4 class="form-header h4">钱包变更记录信息</h4>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<button type="button" class="btn btn-white btn-sm" onclick="addRow()"><i class="fa fa-plus"> 增加</i></button>
|
||||
<button type="button" class="btn btn-white btn-sm" onclick="sub.delRow()"><i class="fa fa-minus"> 删除</i></button>
|
||||
<div class="col-sm-12 select-table table-striped">
|
||||
<table id="bootstrap-table"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "baseUser/wallet"
|
||||
$("#form-wallet-add").validate({
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/add", $('#form-wallet-add').serialize());
|
||||
}
|
||||
}
|
||||
|
||||
$(function() {
|
||||
var options = {
|
||||
pagination: false,
|
||||
showSearch: false,
|
||||
showRefresh: false,
|
||||
showToggle: false,
|
||||
showColumns: false,
|
||||
sidePagination: "client",
|
||||
columns: [{
|
||||
checkbox: true
|
||||
},
|
||||
{
|
||||
field: 'index',
|
||||
align: 'center',
|
||||
title: "序号",
|
||||
formatter: function (value, row, index) {
|
||||
var columnIndex = $.common.sprintf("<input type='hidden' name='index' value='%s'>", $.table.serialNumber(index));
|
||||
return columnIndex + $.table.serialNumber(index);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'changeType',
|
||||
align: 'center',
|
||||
title: '变更类型',
|
||||
formatter: function(value, row, index) {
|
||||
var html = $.common.sprintf("<input class='form-control' type='text' name='zcBaseWalletChangeList[%s].changeType' value='%s'>", index, value);
|
||||
return html;
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'payType',
|
||||
align: 'center',
|
||||
title: '支付类型',
|
||||
formatter: function(value, row, index) {
|
||||
var html = $.common.sprintf("<input class='form-control' type='text' name='zcBaseWalletChangeList[%s].payType' value='%s'>", index, value);
|
||||
return html;
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'changeTime',
|
||||
align: 'center',
|
||||
title: '变更时间',
|
||||
formatter: function(value, row, index) {
|
||||
var html = $.common.sprintf("<input class='form-control' type='text' name='zcBaseWalletChangeList[%s].changeTime' value='%s'>", index, value);
|
||||
return html;
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'changeAmount',
|
||||
align: 'center',
|
||||
title: '变更金额(元)',
|
||||
formatter: function(value, row, index) {
|
||||
var html = $.common.sprintf("<input class='form-control' type='text' name='zcBaseWalletChangeList[%s].changeAmount' value='%s'>", index, value);
|
||||
return html;
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'referralOrderNo',
|
||||
align: 'center',
|
||||
title: '引荐订单',
|
||||
formatter: function(value, row, index) {
|
||||
var html = $.common.sprintf("<input class='form-control' type='text' name='zcBaseWalletChangeList[%s].referralOrderNo' value='%s'>", index, value);
|
||||
return html;
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'delFlag',
|
||||
align: 'center',
|
||||
title: '删除标志',
|
||||
formatter: function(value, row, index) {
|
||||
var html = $.common.sprintf("<input class='form-control' type='text' name='zcBaseWalletChangeList[%s].delFlag' value='%s'>", index, value);
|
||||
return html;
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'createTime',
|
||||
align: 'center',
|
||||
title: '创建时间',
|
||||
formatter: function(value, row, index) {
|
||||
var html = $.common.sprintf("<input class='form-control' type='text' name='zcBaseWalletChangeList[%s].createTime' value='%s'>", index, value);
|
||||
return html;
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'updateTime',
|
||||
align: 'center',
|
||||
title: '更新时间',
|
||||
formatter: function(value, row, index) {
|
||||
var html = $.common.sprintf("<input class='form-control' type='text' name='zcBaseWalletChangeList[%s].updateTime' value='%s'>", index, value);
|
||||
return html;
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
formatter: function(value, row, index) {
|
||||
var value = $.common.isNotEmpty(row.index) ? row.index : $.table.serialNumber(index);
|
||||
return '<a class="btn btn-danger btn-xs" href="javascript:void(0)" onclick="sub.delRowByIndex(\'' + value + '\')"><i class="fa fa-remove"></i>删除</a>';
|
||||
}
|
||||
}]
|
||||
};
|
||||
$.table.init(options);
|
||||
});
|
||||
|
||||
function addRow() {
|
||||
var count = $("#" + table.options.id).bootstrapTable('getData').length;
|
||||
var row = {
|
||||
index: $.table.serialNumber(count),
|
||||
changeType: "",
|
||||
payType: "",
|
||||
changeTime: "",
|
||||
changeAmount: "",
|
||||
referralOrderNo: "",
|
||||
delFlag: "",
|
||||
createTime: "",
|
||||
updateTime: "",
|
||||
}
|
||||
sub.addRow(row);
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@ -0,0 +1,162 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('钱包信息')" />
|
||||
<style>
|
||||
.search-collapse, .select-table {
|
||||
width: 100%;
|
||||
background: #fff;
|
||||
border-radius: 6px;
|
||||
margin-top: 0px;
|
||||
padding-top: 0px;
|
||||
padding-bottom: 13px;
|
||||
box-shadow: 1px 1px 3px rgba(0, 0, 0, .2);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-wallet-edit" th:object="${zcBaseWallet}">
|
||||
<h4 class="form-header h4">钱包信息</h4>
|
||||
<input name="userId" th:field="*{userId}" type="hidden">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label is-required">用户名:</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="form-control-static" th:text="*{userName}"></div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label is-required">手机号:</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="form-control-static" th:text="*{phoneNumber}"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label is-required">余额(元):</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="form-control-static" th:text="*{balance}"></div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label is-required">可用金额(元):</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="form-control-static" th:text="*{availableAmount}"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label is-required">冻结金额(元):</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="form-control-static" th:text="*{freezeAmount}"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h4 class="form-header h4">钱包变更记录</h4>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="col-sm-12 select-table table-striped">
|
||||
<table id="bootstrap-table"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "baseUser/wallet";
|
||||
var changeTypeDatas = [[${@dict.getType('key_wallet_change_type')}]];
|
||||
var payTypeDatas = [[${@dict.getType('key_wallet_pay_type')}]];
|
||||
$("#form-wallet-edit").validate({
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/edit", $('#form-wallet-edit').serialize());
|
||||
}
|
||||
}
|
||||
|
||||
$(function() {
|
||||
var options = {
|
||||
data: [[${zcBaseWallet.zcBaseWalletChangeList}]],
|
||||
pagination: false,
|
||||
showSearch: false,
|
||||
showRefresh: false,
|
||||
showToggle: false,
|
||||
showColumns: false,
|
||||
sidePagination: "client",
|
||||
columns: [{
|
||||
checkbox: true
|
||||
},
|
||||
{
|
||||
field: 'index',
|
||||
align: 'center',
|
||||
title: "序号",
|
||||
formatter: function (value, row, index) {
|
||||
var columnIndex = $.common.sprintf("<input type='hidden' name='index' value='%s'>", $.table.serialNumber(index));
|
||||
return columnIndex + $.table.serialNumber(index);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'changeType',
|
||||
align: 'center',
|
||||
title: '变更类型',
|
||||
formatter: function(value, row, index) {
|
||||
return $.table.selectDictLabel(changeTypeDatas, value);
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
field: 'payType',
|
||||
align: 'center',
|
||||
title: '支付类型',
|
||||
formatter: function(value, row, index) {
|
||||
return $.table.selectDictLabel(payTypeDatas, value);
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
field: 'changeTime',
|
||||
align: 'center',
|
||||
title: '变更时间'
|
||||
},
|
||||
|
||||
{
|
||||
field: 'changeAmount',
|
||||
align: 'center',
|
||||
title: '变更金额(元)'
|
||||
},
|
||||
|
||||
{
|
||||
field: 'referralOrderNo',
|
||||
align: 'center',
|
||||
title: '引荐订单'
|
||||
},
|
||||
{
|
||||
field: 'createTime',
|
||||
align: 'center',
|
||||
title: '操作时间'
|
||||
},
|
||||
|
||||
{
|
||||
field: 'updateTime',
|
||||
align: 'center',
|
||||
title: '更新时间'
|
||||
}]
|
||||
};
|
||||
$.table.init(options);
|
||||
});
|
||||
|
||||
function addRow() {
|
||||
var count = $("#" + table.options.id).bootstrapTable('getData').length;
|
||||
var row = {
|
||||
index: $.table.serialNumber(count),
|
||||
changeType: "",
|
||||
payType: "",
|
||||
changeTime: "",
|
||||
changeAmount: "",
|
||||
referralOrderNo: "",
|
||||
delFlag: "",
|
||||
createTime: "",
|
||||
updateTime: "",
|
||||
}
|
||||
sub.addRow(row);
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@ -0,0 +1,107 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<head>
|
||||
<th:block th:include="include :: header('钱包信息列表')" />
|
||||
</head>
|
||||
<body class="gray-bg">
|
||||
<div class="container-div">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 search-collapse">
|
||||
<form id="formId">
|
||||
<div class="select-list">
|
||||
<ul>
|
||||
<li>
|
||||
<label>用户名:</label>
|
||||
<input type="text" name="userName"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>手机号:</label>
|
||||
<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> 搜索</a>
|
||||
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="btn-group-sm" id="toolbar" role="group">
|
||||
<!-- <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="baseUser:wallet:add">-->
|
||||
<!-- <i class="fa fa-plus"></i> 添加-->
|
||||
<!-- </a>-->
|
||||
<!-- <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="baseUser:wallet:edit">-->
|
||||
<!-- <i class="fa fa-edit"></i> 修改-->
|
||||
<!-- </a>-->
|
||||
<!-- <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="baseUser:wallet:remove">-->
|
||||
<!-- <i class="fa fa-remove"></i> 删除-->
|
||||
<!-- </a>-->
|
||||
<!-- <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="baseUser:wallet:export">-->
|
||||
<!-- <i class="fa fa-download"></i> 导出-->
|
||||
<!-- </a>-->
|
||||
</div>
|
||||
<div class="col-sm-12 select-table table-striped">
|
||||
<table id="bootstrap-table"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var editFlag = [[${@permission.hasPermi('baseUser:wallet:edit')}]];
|
||||
var removeFlag = [[${@permission.hasPermi('baseUser:wallet:remove')}]];
|
||||
var prefix = ctx + "baseUser/wallet";
|
||||
|
||||
$(function() {
|
||||
var options = {
|
||||
url: prefix + "/list",
|
||||
createUrl: prefix + "/add",
|
||||
updateUrl: prefix + "/edit/{id}",
|
||||
detailUrl: prefix + "/edit/{id}",
|
||||
removeUrl: prefix + "/remove",
|
||||
exportUrl: prefix + "/export",
|
||||
modalName: "钱包信息",
|
||||
columns: [{
|
||||
checkbox: true
|
||||
},
|
||||
{
|
||||
field: 'userId',
|
||||
title: '用户id主键',
|
||||
visible: false
|
||||
},
|
||||
{
|
||||
field: 'userName',
|
||||
title: '用户名'
|
||||
},
|
||||
{
|
||||
field: 'phoneNumber',
|
||||
title: '手机号'
|
||||
},
|
||||
{
|
||||
field: 'balance',
|
||||
title: '余额(元)'
|
||||
},
|
||||
{
|
||||
field: 'availableAmount',
|
||||
title: '可用金额(元)'
|
||||
},
|
||||
{
|
||||
field: 'freezeAmount',
|
||||
title: '冻结金额(元)'
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
formatter: function(value, row, index) {
|
||||
var actions = [];
|
||||
actions.push('<a class="btn btn-success btn-xs ' + editFlag + ' btnOption" href="javascript:void(0)" onClick="$.operate.detail(\''+row.userId+'\', 1300, 800)"><i class="fa fa-edit"></i>钱包明细</a> ');
|
||||
return actions.join('');
|
||||
}
|
||||
}]
|
||||
};
|
||||
$.table.init(options);
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user