租车用户管理
This commit is contained in:
@ -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>
|
||||
@ -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>
|
||||
|
||||
@ -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>
|
||||
|
||||
@ -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>
|
||||
|
||||
@ -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>
|
||||
@ -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>
|
||||
|
||||
Reference in New Issue
Block a user