|
@@ -8,53 +8,59 @@
|
|
|
<resultMap id="yhrvo" type="lsjb.bo.yonghuVO.YongHuVo"></resultMap>
|
|
|
|
|
|
<insert id="addYongHu" parameterMap="yhvo">
|
|
|
- insert into g2_table_user (username,password,bumen,zhuangtai,chuangjiantime,yonghuleixing,dianhua)
|
|
|
- values (#{username},#{password},#{bumen},#{zhuangtai},#{chuangjiantime},#{yonghuleixing},#{dianhua})
|
|
|
+ insert into g2_table_user (username,password,bumen,zhuangtai,yonghuleixing,dianhua)
|
|
|
+ values (#{username},#{password},#{bumen},#{zhuangtai},#{yonghuleixing},#{dianhua})
|
|
|
</insert>
|
|
|
|
|
|
-<!-- <delete id="deleteYongHu" parameterMap="yhvo">-->
|
|
|
-<!-- delete from g2_table_guize where gzname = #{gzname}-->
|
|
|
-<!-- </delete>-->
|
|
|
+ <delete id="deleteYongHu" parameterMap="yhvo">
|
|
|
+ delete from g2_table_user where username = #{username}
|
|
|
+ </delete>
|
|
|
|
|
|
-<!-- <update id="updateYongHu" parameterMap="yhvo">-->
|
|
|
-<!-- update g2_table_guize-->
|
|
|
-<!-- <set>-->
|
|
|
-<!-- <trim suffixOverrides=",">-->
|
|
|
-<!-- <if test="newgzname != null and newgzname != '' ">-->
|
|
|
-<!-- gzname = #{newgzname},-->
|
|
|
-<!-- </if>-->
|
|
|
-<!-- <if test="luncishu != null">-->
|
|
|
-<!-- luncishu = #{luncishu},-->
|
|
|
-<!-- </if>-->
|
|
|
-<!-- <if test="luncitime != null">-->
|
|
|
-<!-- luncitime = #{luncitime},-->
|
|
|
-<!-- </if>-->
|
|
|
-<!-- <if test="jiangetime != null">-->
|
|
|
-<!-- jiangetime = #{jiangetime},-->
|
|
|
-<!-- </if>-->
|
|
|
-<!-- </trim>-->
|
|
|
-<!-- </set>-->
|
|
|
-<!-- where gzname = #{gzname}-->
|
|
|
-<!-- </update>-->
|
|
|
+ <update id="updateYongHu" parameterMap="yhvo">
|
|
|
+ update g2_table_user
|
|
|
+ <set>
|
|
|
+ <trim suffixOverrides=",">
|
|
|
+ <if test="newusername != null and newusername != '' ">
|
|
|
+ username = #{newusername},
|
|
|
+ </if>
|
|
|
+ <if test="password != null and password != '' ">
|
|
|
+ password = #{password},
|
|
|
+ </if>
|
|
|
+ <if test="bumen != null and bumen != '' ">
|
|
|
+ bumen = #{bumen},
|
|
|
+ </if>
|
|
|
+ <if test="zhuangtai != null">
|
|
|
+ zhuangtai = #{zhuangtai},
|
|
|
+ </if>
|
|
|
+ <if test="yonghuleixing != null and yonghuleixing != '' ">
|
|
|
+ yonghuleixing = #{yonghuleixing},
|
|
|
+ </if>
|
|
|
+ <if test="dianhua != null and dianhua != '' ">
|
|
|
+ dianhua = #{dianhua},
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ </set>
|
|
|
+ where username = #{username}
|
|
|
+ </update>
|
|
|
|
|
|
-<!-- <select id="queryYongHu" parameterMap="yhvo" resultMap="yhrvo">-->
|
|
|
-<!-- select gzname,luncishu,luncitime,jiangetime from g2_table_guize-->
|
|
|
-<!-- <where>-->
|
|
|
-<!-- 1=1-->
|
|
|
-<!-- <if test="gzname != null and gzname != '' ">-->
|
|
|
-<!-- and gzname = #{gzname}-->
|
|
|
-<!-- </if>-->
|
|
|
-<!-- <if test="luncishu != null">-->
|
|
|
-<!-- and luncishu = #{luncishu}-->
|
|
|
-<!-- </if>-->
|
|
|
-<!-- <if test="luncitime != null">-->
|
|
|
-<!-- and luncitime = #{luncitime}-->
|
|
|
-<!-- </if>-->
|
|
|
-<!-- <if test="jiangetime != null">-->
|
|
|
-<!-- and jiangetime = #{jiangetime}-->
|
|
|
-<!-- </if>-->
|
|
|
-<!-- </where>-->
|
|
|
-<!-- </select>-->
|
|
|
+ <select id="queryYongHu" parameterMap="yhvo" resultMap="yhrvo">
|
|
|
+ select id,username,password,bumen,zhuangtai,chuangjiantime,yonghuleixing,dianhua from g2_table_user
|
|
|
+ <where>
|
|
|
+ 1=1
|
|
|
+ <if test="username != null and username != '' ">
|
|
|
+ and username = #{username}
|
|
|
+ </if>
|
|
|
+ <if test="dianhua != null and username != '' ">
|
|
|
+ and dianhua = #{dianhua}
|
|
|
+ </if>
|
|
|
+ <if test="zhuangtai != null">
|
|
|
+ and zhuangtai = #{zhuangtai}
|
|
|
+ </if>
|
|
|
+ <if test="chuangjiantime != null and username != '' ">
|
|
|
+ and chuangjiantime = #{chuangjiantime}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
|
|
|
|
|
|
</mapper>
|