oss上传,手动结束订单待完善,数据权限优化调整
This commit is contained in:
@ -82,3 +82,4 @@ renren:
|
||||
# token有效时长,7天,单位秒
|
||||
expire: 604800
|
||||
header: token
|
||||
|
||||
|
||||
@ -148,3 +148,12 @@ csrf:
|
||||
swagger:
|
||||
# 是否开启swagger
|
||||
enabled: true
|
||||
|
||||
# 阿里云 OSS 配置
|
||||
aliyun:
|
||||
oss:
|
||||
endpoint: oss-cn-shanghai.aliyuncs.com
|
||||
accessKeyId: LTAI5tFZygsWsFqAqUbBmCrB
|
||||
accessKeySecret: n417ym6PZyq5Gc4NHHps3EwzNiClDJ
|
||||
bucketName: sczx-car-rental # 需要你提供具体的 bucket 名称
|
||||
domain: car-rental.sczxnet.com
|
||||
|
||||
@ -42,19 +42,25 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
select id, user_name, avatar_url, password, phone_number, role_id, is_store, nick_name, wechat_openid, alipay_userid, del_flag, create_time, update_time from zc_base_user
|
||||
</sql>
|
||||
|
||||
<select id="selectZcBaseUserList" parameterType="ZcBaseUser" resultMap="ZcBaseUserResult">
|
||||
<include refid="selectZcBaseUserVo"/>
|
||||
<select id="selectZcBaseUserList" parameterType="ZcBaseUser" resultMap="ZcBaseUserZcBaseUserStoreResult">
|
||||
|
||||
select a.id, a.user_name, a.avatar_url, a.password, a.phone_number, a.role_id, a.is_store, a.nick_name, a.wechat_openid, a.alipay_userid, a.del_flag, a.create_time, a.update_time,
|
||||
b.id as sub_id, b.user_id as sub_user_id, b.operator_id as sub_operator_id, b.store_id as sub_store_id, b.create_time as sub_create_time
|
||||
from zc_base_user a
|
||||
left join zc_base_user_store b on b.user_id = a.id
|
||||
<where>
|
||||
del_flag = '0'
|
||||
<if test="userName != null and userName != ''"> and user_name like concat('%', #{userName}, '%')</if>
|
||||
<if test="avatarUrl != null and avatarUrl != ''"> and avatar_url = #{avatarUrl}</if>
|
||||
<if test="password != null and password != ''"> and password = #{password}</if>
|
||||
<if test="phoneNumber != null and phoneNumber != ''"> and phone_number = #{phoneNumber}</if>
|
||||
<if test="roleId != null "> and role_id = #{roleId}</if>
|
||||
<if test="isStore != null "> and is_store = #{isStore}</if>
|
||||
<if test="nickName != null and nickName != ''"> and nick_name like concat('%', #{nickName}, '%')</if>
|
||||
<if test="wechatOpenid != null and wechatOpenid != ''"> and wechat_openid = #{wechatOpenid}</if>
|
||||
<if test="alipayUserid != null and alipayUserid != ''"> and alipay_userid = #{alipayUserid}</if>
|
||||
a.del_flag = '0'
|
||||
<if test="userName != null and userName != ''"> and a.user_name like concat('%', #{userName}, '%')</if>
|
||||
<if test="avatarUrl != null and avatarUrl != ''"> and a.avatar_url = #{avatarUrl}</if>
|
||||
<if test="password != null and password != ''"> and a.password = #{password}</if>
|
||||
<if test="phoneNumber != null and phoneNumber != ''"> and a.phone_number = #{phoneNumber}</if>
|
||||
<if test="roleId != null "> and a.role_id = #{roleId}</if>
|
||||
<if test="isStore != null "> and a.is_store = #{isStore}</if>
|
||||
<if test="nickName != null and nickName != ''"> and a.nick_name like concat('%', #{nickName}, '%')</if>
|
||||
<if test="wechatOpenid != null and wechatOpenid != ''"> and a.wechat_openid = #{wechatOpenid}</if>
|
||||
<if test="alipayUserid != null and alipayUserid != ''"> and a.alipay_userid = #{alipayUserid}</if>
|
||||
<if test="storeId != null "> and b.store_id = #{storeId}</if>
|
||||
<if test="operatorId != null "> and b.operator_id = #{operatorId}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
@ -63,7 +69,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
b.id as sub_id, b.user_id as sub_user_id, b.operator_id as sub_operator_id, b.store_id as sub_store_id, b.create_time as sub_create_time
|
||||
from zc_base_user a
|
||||
left join zc_base_user_store b on b.user_id = a.id
|
||||
where a.del_flag = '0' and b.store_id = #{storeId}
|
||||
where a.del_flag = '0'
|
||||
<if test="storeId != null "> and b.store_id = #{storeId}</if>
|
||||
<if test="operatorId != null "> and b.operator_id = #{operatorId}</if>
|
||||
</select>
|
||||
|
||||
<select id="selectZcBaseUserById" parameterType="Long" resultMap="ZcBaseUserZcBaseUserStoreResult">
|
||||
|
||||
@ -104,6 +104,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="storeName != null and storeName!= '' "> and s.name = #{storeName}</if>
|
||||
<if test="licensePlate != null and licensePlate!= '' "> and zc.license_plate = #{licensePlate}</if>
|
||||
</where>
|
||||
order by a.update_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectZcOrderMainByOrderId" parameterType="Long" resultMap="ZcOrderMainZcOrderSubResult">
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-order-edit" th:object="${zcOrderMain}">
|
||||
<h4 class="form-header h4">租车订单信息</h4>
|
||||
<input name="orderId" th:field="*{orderId}" type="hidden">
|
||||
<input id="orderId" name="orderId" th:field="*{orderId}" type="hidden">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label is-required">订单编号:</label>
|
||||
<div class="col-sm-4">
|
||||
@ -129,6 +129,8 @@
|
||||
<div class="col-sm-12 select-table table-striped">
|
||||
<table id="bootstrap-table"></table>
|
||||
</div>
|
||||
<br/>
|
||||
<button type="button" th:if="not (*{orderStatus} == 'AUTO_END' or *{orderStatus} == 'MANUAL_END')" class="btn btn-white btn-sm" onclick="manualEndOrder()">手动结束订单</i></button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@ -256,24 +258,23 @@
|
||||
$.table.init(options);
|
||||
});
|
||||
|
||||
function addRow() {
|
||||
var count = $("#" + table.options.id).bootstrapTable('getData').length;
|
||||
var row = {
|
||||
index: $.table.serialNumber(count),
|
||||
suborderNo: "",
|
||||
suborderType: "",
|
||||
amount: "",
|
||||
paymentMethod: "",
|
||||
vinBatteryNo: "",
|
||||
createdAt: "",
|
||||
paymentId: "",
|
||||
paidAt: "",
|
||||
remark: "",
|
||||
delFlag: "",
|
||||
createTime: "",
|
||||
updateTime: "",
|
||||
}
|
||||
sub.addRow(row);
|
||||
function manualEndOrder(){
|
||||
var orderId = $("#orderId").val();
|
||||
$.modal.confirm("确认手动结束该订单", function() {
|
||||
$.operate.post(prefix + "/manualEndOrder", { "orderId": orderId}, function(result) {
|
||||
if (result.code == web_status.SUCCESS) {
|
||||
$.modal.msgSuccess("操作成功");
|
||||
// 关闭当前弹窗
|
||||
$.modal.close();
|
||||
var parent = activeWindow();
|
||||
parent.$.table.refresh();
|
||||
|
||||
} else {
|
||||
$.modal.msgError(result.msg);
|
||||
}
|
||||
});
|
||||
|
||||
})
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
|
||||
@ -93,6 +93,7 @@
|
||||
<script th:inline="javascript">
|
||||
var editFlag = [[${@permission.hasPermi('orders:order:edit')}]];
|
||||
var removeFlag = [[${@permission.hasPermi('orders:order:remove')}]];
|
||||
var closeFlag = [[${@permission.hasPermi('orders:order:close')}]];
|
||||
var orderStatusDatas = [[${@dict.getType('key_order_status')}]];
|
||||
var rentalTypeDatas = [[${@dict.getType('key_order_rental_type')}]];
|
||||
var depositFreeDatas = [[${@dict.getType('key_rent_deposit_free')}]];
|
||||
@ -244,21 +245,12 @@
|
||||
field: 'startRentTime',
|
||||
title: '开始计费时间',
|
||||
width: '160px'
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
width: '100px',
|
||||
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.orderId + '\',1300,800)"><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.orderId + '\')"><i class="fa fa-remove"></i>删除</a>');
|
||||
return actions.join('');
|
||||
}
|
||||
}]
|
||||
};
|
||||
$.table.init(options);
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user