完善c端接口

This commit is contained in:
menxipeng
2025-07-19 14:20:38 +08:00
parent 40f49732a6
commit 028ccf4408
34 changed files with 1278 additions and 126 deletions

View File

@@ -2,17 +2,6 @@
<!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">
SELECT * FROM shop_user where phone = #{phone}
</select>
<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">
@@ -30,6 +19,9 @@
<if test="status != null">status,</if>
<if test="vip != null">vip,</if>
<if test="online != null">online,</if>
<if test="deviceId != null">device_id,</if>
<if test="deviceType != null">device_type,</if>
<if test="headImg != null">head_img,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="userId != null">#{userId},</if>
@@ -44,6 +36,9 @@
<if test="status != null">#{status},</if>
<if test="vip != null">#{vip},</if>
<if test="online != null">#{online},</if>
<if test="deviceId != null">#{deviceId},</if>
<if test="deviceType != null">#{deviceType},</if>
<if test="headImg != null">#{headImg},</if>
</trim>
</insert>
@@ -61,13 +56,16 @@
<result property="status" column="status" />
<result property="vip" column="vip" />
<result property="online" column="online" />
<result property="deviceId" column="device_id" />
<result property="deviceType" column="device_type" />
<result property="headImg" column="head_img" />
<result property="createTime" column="create_time" />
<result property="updateTime" column="update_time" />
<result property="isDel" column="is_del" />
</resultMap>
<sql id="selectShopUserVo">
select id, user_id, username, password, phone, nickname, sex, birthday, addr, register_time, status, vip, online, create_time, update_time, is_del from shop_user
select id, user_id, username, password,device_type,device_id, phone, nickname, sex, birthday, addr, register_time, status, vip, online, create_time, update_time, is_del,head_img from shop_user
</sql>
<select id="selectShopUserList" parameterType="ShopUser" resultMap="ShopUserResult">
@@ -89,6 +87,20 @@
</where>
</select>
<select id="selectShopUserByPhone" resultMap="ShopUserResult">
SELECT * FROM shop_user where phone = #{phone}
</select>
<select id="selectShopUserByUsername" resultMap="ShopUserResult">
SELECT * FROM shop_user where username = #{username}
</select>
<select id="selectShopUserByUsernameAndPass" resultMap="ShopUserResult">
SELECT * FROM shop_user where username = #{username} and password = #{password}
</select>
<select id="selectShopUserById" parameterType="String" resultMap="ShopUserResult">
<include refid="selectShopUserVo"/>
where id = #{id}