From fa705507ba574c857b1667553737d23b1b7ff495 Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期四, 12 五月 2022 12:06:31 +0800 Subject: [PATCH] 后端模板代码优化 --- src/main/resources/code/service/app/src/main/resources/mapper/WXUserInfoMapper.xml | 26 +++++++++++++------------- 1 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/main/resources/code/service/app/src/main/resources/mapper/WXUserInfoMapper.xml b/src/main/resources/code/service/app/src/main/resources/mapper/WXUserInfoMapper.xml index 18627a7..680bfa8 100644 --- a/src/main/resources/code/service/app/src/main/resources/mapper/WXUserInfoMapper.xml +++ b/src/main/resources/code/service/app/src/main/resources/mapper/WXUserInfoMapper.xml @@ -1,7 +1,7 @@ <?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.ks.app.mapper.user.WXUserInfoMapper"> +<mapper namespace="com.ks.app.dao.user.WXUserInfoMapper"> <resultMap id="BaseResultMap" type="com.ks.app.entity.user.WXUserInfo"> <id column="id" property="id" jdbcType="BIGINT"/> @@ -28,26 +28,26 @@ parameterType="java.lang.Long"> select <include refid="Base_Column_List"/> - from lt_user_wx where id = #{id, jdbcType=BIGINT} + from mm_user_wx where id = #{id, jdbcType=BIGINT} </select> <select id="selectByPrimaryKeyForUpdate" resultMap="BaseResultMap" parameterType="java.lang.Long"> select <include refid="Base_Column_List"/> - from lt_user_wx where id = #{id,jdbcType=BIGINT} for update + from mm_user_wx where id = #{id,jdbcType=BIGINT} for update </select> <delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> delete from - lt_user_wx where id = #{id,jdbcType=BIGINT} + mm_user_wx where id = #{id,jdbcType=BIGINT} </delete> <insert id="insert" parameterType="com.ks.app.entity.user.WXUserInfo" useGeneratedKeys="true" keyProperty="id"> insert into - lt_user_wx + mm_user_wx <trim prefix="(" suffix=")" suffixOverrides=","> system, nick_name, @@ -82,7 +82,7 @@ <insert id="insertSelective" parameterType="com.ks.app.entity.user.WXUserInfo" useGeneratedKeys="true" keyProperty="id"> - insert into lt_user_wx + insert into mm_user_wx <trim prefix="(" suffix=")" suffixOverrides=","> <if test="id != null">id,</if> <if test="system != null">system,</if> @@ -115,7 +115,7 @@ </insert> <update id="updateByPrimaryKey" parameterType="com.ks.app.entity.user.WXUserInfo"> - update lt_user_wx + update mm_user_wx <set> <if test="id != null">id = #{id,jdbcType=BIGINT},</if> <if test="system != null">system = #{system,jdbcType=VARCHAR},</if> @@ -134,7 +134,7 @@ </update> <update id="updateByPrimaryKeySelective" parameterType="com.ks.app.entity.user.WXUserInfo"> - update lt_user_wx + update mm_user_wx <set> <if test="system != null">system = #{system,jdbcType=VARCHAR},</if> <if test="nickName != null">nick_name = #{nickName,jdbcType=VARCHAR},</if> @@ -153,18 +153,18 @@ <sql id="listWhere"> <if test="query.system!=null"> - - system=#{query.system} + and system=#{query.system} </if> <if test="query.unionId!=null"> - union_id=#{query.unionId} + and union_id=#{query.unionId} </if> + </sql> <select id="list" resultMap="BaseResultMap"> - SELECT * FROM lt_user_wx + SELECT * FROM mm_user_wx <where> <include refid="listWhere"> </include> @@ -180,7 +180,7 @@ <select id="count" resultType="java.lang.Long"> - SELECT count(*) FROM lt_user_wx + SELECT count(*) FROM mm_user_wx <where> <include refid="listWhere"> </include> -- Gitblit v1.8.0