租车用户管理

This commit is contained in:
19173159168
2025-07-27 15:53:14 +08:00
parent db8b5e636a
commit 876f32964b
16 changed files with 865 additions and 12 deletions

View File

@ -0,0 +1,104 @@
<?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.ZcBaseUserMapper">
<resultMap type="ZcBaseUser" id="ZcBaseUserResult">
<result property="id" column="id" />
<result property="userName" column="user_name" />
<result property="avatarUrl" column="avatar_url" />
<result property="password" column="password" />
<result property="phoneNumber" column="phone_number" />
<result property="roleId" column="role_id" />
<result property="nickName" column="nick_name" />
<result property="wechatOpenid" column="wechat_openid" />
<result property="alipayUserid" column="alipay_userid" />
<result property="delFlag" column="del_flag" />
<result property="createTime" column="create_time" />
<result property="updateTime" column="update_time" />
</resultMap>
<sql id="selectZcBaseUserVo">
select id, user_name, avatar_url, password, phone_number, role_id, 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"/>
<where>
<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="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>
</where>
</select>
<select id="selectZcBaseUserById" parameterType="Long" resultMap="ZcBaseUserResult">
<include refid="selectZcBaseUserVo"/>
where id = #{id}
</select>
<insert id="insertZcBaseUser" parameterType="ZcBaseUser" useGeneratedKeys="true" keyProperty="id">
insert into zc_base_user
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="userName != null and userName != ''">user_name,</if>
<if test="avatarUrl != null">avatar_url,</if>
<if test="password != null and password != ''">password,</if>
<if test="phoneNumber != null and phoneNumber != ''">phone_number,</if>
<if test="roleId != null">role_id,</if>
<if test="nickName != null">nick_name,</if>
<if test="wechatOpenid != null">wechat_openid,</if>
<if test="alipayUserid != null">alipay_userid,</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="avatarUrl != null">#{avatarUrl},</if>
<if test="password != null and password != ''">#{password},</if>
<if test="phoneNumber != null and phoneNumber != ''">#{phoneNumber},</if>
<if test="roleId != null">#{roleId},</if>
<if test="nickName != null">#{nickName},</if>
<if test="wechatOpenid != null">#{wechatOpenid},</if>
<if test="alipayUserid != null">#{alipayUserid},</if>
<if test="delFlag != null">#{delFlag},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateTime != null">#{updateTime},</if>
</trim>
</insert>
<update id="updateZcBaseUser" parameterType="ZcBaseUser">
update zc_base_user
<trim prefix="SET" suffixOverrides=",">
<if test="userName != null and userName != ''">user_name = #{userName},</if>
<if test="avatarUrl != null">avatar_url = #{avatarUrl},</if>
<if test="password != null and password != ''">password = #{password},</if>
<if test="phoneNumber != null and phoneNumber != ''">phone_number = #{phoneNumber},</if>
<if test="roleId != null">role_id = #{roleId},</if>
<if test="nickName != null">nick_name = #{nickName},</if>
<if test="wechatOpenid != null">wechat_openid = #{wechatOpenid},</if>
<if test="alipayUserid != null">alipay_userid = #{alipayUserid},</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="deleteZcBaseUserById" parameterType="Long">
delete from zc_base_user where id = #{id}
</delete>
<delete id="deleteZcBaseUserByIds" parameterType="String">
delete from zc_base_user where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@ -61,6 +61,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectCompanyList" parameterType="Company" resultMap="CompanyResult">
<include refid="selectCompanyVo"/>
<where>
del_flag = 0
<if test="id != null and id != ''"> and id = #{id}</if>
<if test="companyName != null and companyName != ''"> and company_name like concat('%', #{companyName}, '%')</if>
<if test="contactName != null and contactName != ''"> and contact_name like concat('%', #{contactName}, '%')</if>
@ -108,7 +109,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<!-- 根据手机号查询运营商是否存在 -->
<select id="checkPhoneUnique" parameterType="string" resultType="com.ruoyi.operation.domain.Company">
SELECT * FROM zc_company WHERE phone = #{phone}
SELECT * FROM zc_company WHERE del_flag = 0 AND phone = #{phone}
</select>
<insert id="insertCompany" parameterType="Company" useGeneratedKeys="true" keyProperty="id">
@ -269,7 +270,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete>
<delete id="deleteCompanyByIds" parameterType="String">
delete from zc_company where id in
update zc_company set del_flag = 2 where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>

View File

@ -69,6 +69,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
from zc_company_store cs
left join zc_company c on c.id = cs.operating_company_id
<where>
cs.del_flag = '0' and c.del_flag = '0'
<if test="name != null and name != ''"> and cs.name like concat('%', #{name}, '%')</if>
<if test="contactPerson != null and contactPerson != ''"> and cs.contact_person = #{contactPerson}</if>
<if test="phone != null and phone != ''"> and cs.phone = #{phone}</if>
@ -289,7 +290,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete>
<delete id="deleteCompanyStoreByIds" parameterType="String">
delete from zc_company_store where id in
update zc_company_store set del_flag = '2' where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>

View File

@ -83,7 +83,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select id="checkVinUnique" resultType="com.ruoyi.operation.domain.ZcCar">
SELECT * FROM zc_car WHERE vin = #{vin}
SELECT * FROM zc_car WHERE del_flag = 0 AND vin = #{vin}
</select>
<insert id="insertZcCar" parameterType="ZcCar" useGeneratedKeys="true" keyProperty="id">
@ -228,7 +228,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete>
<delete id="deleteZcCarByIds" parameterType="String">
delete from zc_car where id in
update zc_car set del_flag ='2' where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>

View File

@ -130,17 +130,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete>
<delete id="deleteZcCarModelByIds" parameterType="String">
delete from zc_car_model where id in
update zc_car_model set del_flag = '2' where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
<select id="selectAllBrands" resultType="string">
SELECT DISTINCT brand_name FROM zc_car_model ORDER BY brand_name ASC
SELECT DISTINCT brand_name FROM zc_car_model where del_flag = 0 ORDER BY brand_name ASC
</select>
<select id="selectModelsByBrand" resultType="string">
SELECT model_name FROM zc_car_model WHERE brand_name = #{brandName} ORDER BY model_name ASC
SELECT model_name FROM zc_car_model WHERE del_flag = 0 and brand_name = #{brandName} ORDER BY model_name ASC
</select>
</mapper>

View File

@ -42,7 +42,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
,c.company_name as operating_company_name
from zc_rent_car_rule a
left join zc_company c on c.id = a.operating_company_id
<where>
<where>
a.del_flag = '0' and c.del_flag = '0'
<if test="ruleName != null and ruleName != ''"> and a.rule_name like concat('%', #{ruleName}, '%')</if>
<if test="ruleCode != null and ruleCode != ''"> and a.rule_code = #{ruleCode}</if>
<if test="rentalType != null and rentalType != ''"> and a.rental_type = #{rentalType}</if>
@ -157,7 +158,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete>
<delete id="deleteZcRentCarRuleByIds" parameterType="String">
delete from zc_rent_car_rule where id in
update zc_rent_car_rule set del_flag = '2' where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>

View File

@ -0,0 +1,62 @@
<!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-user-add">
<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="password" 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">昵称:</label>
<div class="col-sm-8">
<input name="nickName" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">微信小程序openid</label>
<div class="col-sm-8">
<input name="wechatOpenid" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">支付宝小程序userid</label>
<div class="col-sm-8">
<input name="alipayUserid" class="form-control" type="text">
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var prefix = ctx + "baseUser/user"
$("#form-user-add").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-user-add').serialize());
}
}
</script>
</body>
</html>

View File

@ -0,0 +1,64 @@
<!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-user-edit" th:object="${zcBaseUser}">
<input name="id" th:field="*{id}" type="hidden">
<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="password" th:field="*{password}" 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">昵称:</label>
<div class="col-sm-8">
<input name="nickName" th:field="*{nickName}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">微信小程序openid</label>
<div class="col-sm-8">
<input name="wechatOpenid" th:field="*{wechatOpenid}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">支付宝小程序userid</label>
<div class="col-sm-8">
<input name="alipayUserid" th:field="*{alipayUserid}" class="form-control" type="text">
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var prefix = ctx + "baseUser/user";
$("#form-user-edit").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/edit", $('#form-user-edit').serialize());
}
}
</script>
</body>
</html>

View File

@ -0,0 +1,113 @@
<!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>
<label>昵称:</label>
<input type="text" name="nickName"/>
</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-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</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:user:add">-->
<!-- <i class="fa fa-plus"></i> 添加-->
<!-- </a>-->
<!-- <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="baseUser:user:edit">-->
<!-- <i class="fa fa-edit"></i> 修改-->
<!-- </a>-->
<!-- <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="baseUser:user:remove">-->
<!-- <i class="fa fa-remove"></i> 删除-->
<!-- </a>-->
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="baseUser:user: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:user:edit')}]];
var removeFlag = [[${@permission.hasPermi('baseUser:user:remove')}]];
var prefix = ctx + "baseUser/user";
$(function() {
var options = {
url: prefix + "/list",
createUrl: prefix + "/add",
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
exportUrl: prefix + "/export",
modalName: "租车用户信息",
columns: [{
checkbox: true
},
{
field: 'id',
title: '用户id主键',
visible: false
},
{
field: 'userName',
title: '用户名'
},
{
field: 'phoneNumber',
title: '手机号'
},
{
field: 'nickName',
title: '昵称'
},
{
field: 'wechatOpenid',
title: '微信小程序'
},
{
field: 'alipayUserid',
title: '支付宝小程序'
},
{
title: '操作',
align: 'center',
formatter: function(value, row, index) {
var actions = [];
// 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>');
return actions.join('');
}
}]
};
$.table.init(options);
});
</script>
</body>
</html>

View File

@ -4,7 +4,7 @@
<th:block th:include="include :: header('新增门店')" />
<th:block th:include="include :: datetimepicker-css" />
<th:block th:include="include :: bootstrap-fileinput-css" />
<script src="https://map.qq.com/api/gljs?v=1.exp&key=XG7BZ-WIZ34-E4PUJ-FQFQF-P6PSS-MMBP2"></script>
<script src="https://map.qq.com/api/gljs?v=1.exp&key=GPYBZ-Q4TY3-MWZ3S-OO6TP-5GA43-I4BRH"></script>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">

View File

@ -4,7 +4,7 @@
<th:block th:include="include :: header('修改门店')" />
<th:block th:include="include :: datetimepicker-css" />
<th:block th:include="include :: bootstrap-fileinput-css" />
<script src="https://map.qq.com/api/gljs?v=1.exp&key=XG7BZ-WIZ34-E4PUJ-FQFQF-P6PSS-MMBP2"></script>
<script src="https://map.qq.com/api/gljs?v=1.exp&key=GPYBZ-Q4TY3-MWZ3S-OO6TP-5GA43-I4BRH"></script>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">