fix: 投资系统,茅台预约代码提交。
This commit is contained in:
@@ -0,0 +1,212 @@
|
||||
<?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.invest.mapper.IUserMapper">
|
||||
|
||||
<resultMap type="IUserVo" id="IUserResult">
|
||||
<result property="mobile" column="mobile" />
|
||||
<result property="userId" column="user_id" />
|
||||
<result property="token" column="token" />
|
||||
<result property="cookie" column="cookie" />
|
||||
<result property="deviceId" column="device_id" />
|
||||
<result property="itemCode" column="item_code" />
|
||||
<result property="ishopId" column="ishop_id" />
|
||||
<result property="provinceName" column="province_name" />
|
||||
<result property="cityName" column="city_name" />
|
||||
<result property="address" column="address" />
|
||||
<result property="lat" column="lat" />
|
||||
<result property="lng" column="lng" />
|
||||
<result property="minute" column="minute" />
|
||||
<result property="shopType" column="shop_type" />
|
||||
<result property="randomMinute" column="random_minute" />
|
||||
<result property="pushPlusToken" column="push_plus_token" />
|
||||
<result property="jsonResult" column="json_result" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="expireTime" column="expire_time" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="createUser" column="create_user" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="updateUser" column="update_user" />
|
||||
<result property="createBy" column="create_by" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectIUserVo">
|
||||
select a.mobile, a.user_id, a.token, a.cookie, a.device_id, a.item_code, a.ishop_id, a.province_name, a.city_name, a.address, a.lat, a.lng, a.minute, a.shop_type, a.random_minute, a.push_plus_token, a.json_result, a.remark, a.expire_time, a.del_flag, a.create_time, a.create_user, a.update_time, a.update_user, a.create_by from i_user a
|
||||
</sql>
|
||||
|
||||
<select id="selectIUserList" parameterType="IUserDto" resultMap="IUserResult">
|
||||
<include refid="selectIUserVo"/>
|
||||
<where>
|
||||
a.del_flag='0'
|
||||
<if test="mobile != null "> and a.mobile = #{mobile}</if>
|
||||
<if test="token != null and token != ''"> and a.token = #{token}</if>
|
||||
<if test="cookie != null and cookie != ''"> and a.cookie = #{cookie}</if>
|
||||
<if test="deviceId != null and deviceId != ''"> and a.device_id = #{deviceId}</if>
|
||||
<if test="itemCode != null and itemCode != ''"> and a.item_code = #{itemCode}</if>
|
||||
<if test="ishopId != null and ishopId != ''"> and a.ishop_id = #{ishopId}</if>
|
||||
<if test="provinceName != null and provinceName != ''"> and a.province_name like '%'|| #{provinceName}||'%'</if>
|
||||
<if test="cityName != null and cityName != ''"> and a.city_name like '%'|| #{cityName}||'%'</if>
|
||||
<if test="address != null and address != ''"> and a.address = #{address}</if>
|
||||
<if test="lat != null and lat != ''"> and a.lat = #{lat}</if>
|
||||
<if test="lng != null and lng != ''"> and a.lng = #{lng}</if>
|
||||
<if test="minute != null "> and a.minute = #{minute}</if>
|
||||
<if test="shopType != null "> and a.shop_type = #{shopType}</if>
|
||||
<if test="randomMinute != null and randomMinute != ''"> and a.random_minute = #{randomMinute}</if>
|
||||
<if test="pushPlusToken != null and pushPlusToken != ''"> and a.push_plus_token = #{pushPlusToken}</if>
|
||||
<if test="jsonResult != null and jsonResult != ''"> and a.json_result = #{jsonResult}</if>
|
||||
<if test="expireTime != null "> and a.expire_time = #{expireTime}</if>
|
||||
<if test="createUser != null and createUser != ''"> and a.create_user = #{createUser}</if>
|
||||
<if test="updateUser != null and updateUser != ''"> and a.update_user = #{updateUser}</if>
|
||||
</where>
|
||||
order by a.create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectIUserByMobile" parameterType="Long" resultMap="IUserResult">
|
||||
<include refid="selectIUserVo"/>
|
||||
where a.mobile = #{mobile}
|
||||
</select>
|
||||
|
||||
<insert id="insertIUser" parameterType="IUser">
|
||||
insert into i_user
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="mobile != null">mobile,</if>
|
||||
<if test="userId != null">user_id,</if>
|
||||
<if test="token != null and token != ''">token,</if>
|
||||
<if test="cookie != null and cookie != ''">cookie,</if>
|
||||
<if test="deviceId != null">device_id,</if>
|
||||
<if test="itemCode != null and itemCode != ''">item_code,</if>
|
||||
<if test="ishopId != null">ishop_id,</if>
|
||||
<if test="provinceName != null">province_name,</if>
|
||||
<if test="cityName != null">city_name,</if>
|
||||
<if test="address != null">address,</if>
|
||||
<if test="lat != null">lat,</if>
|
||||
<if test="lng != null">lng,</if>
|
||||
<if test="minute != null">minute,</if>
|
||||
<if test="shopType != null">shop_type,</if>
|
||||
<if test="randomMinute != null">random_minute,</if>
|
||||
<if test="pushPlusToken != null">push_plus_token,</if>
|
||||
<if test="jsonResult != null">json_result,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="expireTime != null">expire_time,</if>
|
||||
<if test="delFlag != null">del_flag,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="createUser != null">create_user,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="updateUser != null">update_user,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="mobile != null">#{mobile},</if>
|
||||
<if test="userId != null">#{userId},</if>
|
||||
<if test="token != null and token != ''">#{token},</if>
|
||||
<if test="cookie != null and cookie != ''">#{cookie},</if>
|
||||
<if test="deviceId != null">#{deviceId},</if>
|
||||
<if test="itemCode != null and itemCode != ''">#{itemCode},</if>
|
||||
<if test="ishopId != null">#{ishopId},</if>
|
||||
<if test="provinceName != null">#{provinceName},</if>
|
||||
<if test="cityName != null">#{cityName},</if>
|
||||
<if test="address != null">#{address},</if>
|
||||
<if test="lat != null">#{lat},</if>
|
||||
<if test="lng != null">#{lng},</if>
|
||||
<if test="minute != null">#{minute},</if>
|
||||
<if test="shopType != null">#{shopType},</if>
|
||||
<if test="randomMinute != null">#{randomMinute},</if>
|
||||
<if test="pushPlusToken != null">#{pushPlusToken},</if>
|
||||
<if test="jsonResult != null">#{jsonResult},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="expireTime != null">#{expireTime},</if>
|
||||
<if test="delFlag != null">#{delFlag},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="createUser != null">#{createUser},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="updateUser != null">#{updateUser},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateIUser" parameterType="IUser">
|
||||
update i_user
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="userId != null">user_id = #{userId},</if>
|
||||
<if test="token != null and token != ''">token = #{token},</if>
|
||||
<if test="cookie != null and cookie != ''">cookie = #{cookie},</if>
|
||||
<if test="deviceId != null">device_id = #{deviceId},</if>
|
||||
<if test="itemCode != null and itemCode != ''">item_code = #{itemCode},</if>
|
||||
<if test="ishopId != null">ishop_id = #{ishopId},</if>
|
||||
<if test="provinceName != null">province_name = #{provinceName},</if>
|
||||
<if test="cityName != null">city_name = #{cityName},</if>
|
||||
<if test="address != null">address = #{address},</if>
|
||||
<if test="lat != null">lat = #{lat},</if>
|
||||
<if test="lng != null">lng = #{lng},</if>
|
||||
<if test="minute != null">minute = #{minute},</if>
|
||||
<if test="shopType != null">shop_type = #{shopType},</if>
|
||||
<if test="randomMinute != null">random_minute = #{randomMinute},</if>
|
||||
<if test="pushPlusToken != null">push_plus_token = #{pushPlusToken},</if>
|
||||
<if test="jsonResult != null">json_result = #{jsonResult},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="expireTime != null">expire_time = #{expireTime},</if>
|
||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="createUser != null">create_user = #{createUser},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="updateUser != null">update_user = #{updateUser},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
</trim>
|
||||
where mobile = #{mobile}
|
||||
</update>
|
||||
|
||||
<delete id="deleteIUserByMobile" parameterType="Long">
|
||||
delete from i_user where mobile = #{mobile}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteIUserByMobiles" parameterType="String">
|
||||
delete from i_user where mobile in
|
||||
<foreach item="mobile" collection="array" open="(" separator="," close=")">
|
||||
#{mobile}
|
||||
</foreach>
|
||||
</delete>
|
||||
<update id="removeIUserByMobile" parameterType="Long">
|
||||
update i_user set del_flag='1' where mobile = #{mobile}
|
||||
</update>
|
||||
|
||||
<update id="removeIUserByMobiles" parameterType="String">
|
||||
update i_user set del_flag='1' where mobile in
|
||||
<foreach item="mobile" collection="array" open="(" separator="," close=")">
|
||||
#{mobile}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<update id="updateUserMinuteBatch">
|
||||
UPDATE i_user SET `minute` = (SELECT FLOOR(random() * 50 + 1))) WHERE random_minute = '0'
|
||||
</update>
|
||||
|
||||
<update id="updateUserMinuteEven">
|
||||
UPDATE i_user SET `minute` = (SELECT FLOOR(random() * 50 + 1))) WHERE random_minute = '0'
|
||||
</update>
|
||||
|
||||
<select id="selectReservationUserByMinute" parameterType="IUserDto" resultMap="IUserResult">
|
||||
<include refid="selectIUserVo"/>
|
||||
<where>
|
||||
a.del_flag='0'
|
||||
and a.lat !=''
|
||||
and a.lng!=''
|
||||
and a.item_code!=''
|
||||
<if test="minute != null "> and a.minute = #{minute}</if>
|
||||
|
||||
</where>
|
||||
order by a.create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectReservationUser" resultMap="IUserResult">
|
||||
<include refid="selectIUserVo"/>
|
||||
<where>
|
||||
a.del_flag='0'
|
||||
and a.lat !=''
|
||||
and a.lng!=''
|
||||
and a.item_code!=''
|
||||
</where>
|
||||
order by a.create_time desc
|
||||
</select>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user