2025-07-13 20:42:14 +08:00
|
|
|
<?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.system.mapper.ShopUserMapper">
|
|
|
|
|
|
|
|
|
|
<select id="selectShopUserByPhone" resultType="com.ruoyi.common.core.domain.entity.ShopUser">
|
2025-07-14 23:21:19 +08:00
|
|
|
SELECT * FROM shop_user where phone = #{phone}
|
2025-07-13 20:42:14 +08:00
|
|
|
</select>
|
2025-07-14 23:21:19 +08:00
|
|
|
|
|
|
|
|
<select id="selectShopUserByUsername" resultType="com.ruoyi.common.core.domain.entity.ShopUser">
|
|
|
|
|
SELECT * FROM shop_user where username = #{username}
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="selectShopUserByUsernameAndPass" resultType="com.ruoyi.common.core.domain.entity.ShopUser">
|
|
|
|
|
SELECT * FROM shop_user where username = #{username} and password = #{password}
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<!-- Insert -->
|
|
|
|
|
<insert id="insert" parameterType="com.ruoyi.common.core.domain.entity.ShopUser" useGeneratedKeys="true" keyProperty="id">
|
|
|
|
|
INSERT INTO shop_user
|
|
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
|
<if test="userId != null">user_id,</if>
|
|
|
|
|
<if test="username != null">username,</if>
|
|
|
|
|
<if test="password != null">password,</if>
|
|
|
|
|
<if test="phone != null">phone,</if>
|
|
|
|
|
<if test="nickname != null">nickname,</if>
|
|
|
|
|
<if test="sex != null">sex,</if>
|
|
|
|
|
<if test="birthday != null">birthday,</if>
|
|
|
|
|
<if test="addr != null">addr,</if>
|
|
|
|
|
<if test="registerTime != null">register_time,</if>
|
|
|
|
|
<if test="status != null">status,</if>
|
|
|
|
|
<if test="vip != null">vip,</if>
|
|
|
|
|
<if test="online != null">online,</if>
|
|
|
|
|
</trim>
|
|
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
|
<if test="userId != null">#{userId},</if>
|
|
|
|
|
<if test="username != null">#{username},</if>
|
|
|
|
|
<if test="password != null">#{password},</if>
|
|
|
|
|
<if test="phone != null">#{phone},</if>
|
|
|
|
|
<if test="nickname != null">#{nickname},</if>
|
|
|
|
|
<if test="sex != null">#{sex},</if>
|
|
|
|
|
<if test="birthday != null">#{birthday},</if>
|
|
|
|
|
<if test="addr != null">#{addr},</if>
|
|
|
|
|
<if test="registerTime != null">#{registerTime},</if>
|
|
|
|
|
<if test="status != null">#{status},</if>
|
|
|
|
|
<if test="vip != null">#{vip},</if>
|
|
|
|
|
<if test="online != null">#{online},</if>
|
|
|
|
|
</trim>
|
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
|
|
2025-07-13 20:42:14 +08:00
|
|
|
</mapper>
|