|
|
|
@ -26,21 +26,21 @@ |
|
|
|
)SELECT * FROM mm ORDER BY id DESC; |
|
|
|
</select> |
|
|
|
|
|
|
|
<!--根据uid查询用户--> |
|
|
|
<select id="getUserByUid" parameterType="java.lang.Integer" resultType="cn.chjyj.szwh.bean.Goods"> |
|
|
|
<!--id查询--> |
|
|
|
<select id="getOrderById" parameterType="java.lang.Integer" resultType="cn.chjyj.szwh.bean.Order"> |
|
|
|
select |
|
|
|
<include refid="column"/> |
|
|
|
from |
|
|
|
<include refid="tbName"/> |
|
|
|
where uid=#{uid} |
|
|
|
where id=#{id} |
|
|
|
</select> |
|
|
|
|
|
|
|
<!--查询用户名,加上密码--> |
|
|
|
<select id="getUserByUname" parameterType="java.lang.String" resultType="cn.chjyj.szwh.bean.Goods"> |
|
|
|
select<include refid="column"/>,password |
|
|
|
<!--订单号--> |
|
|
|
<select id="getOrderByBatchcode" parameterType="java.lang.String" resultType="cn.chjyj.szwh.bean.Order"> |
|
|
|
select<include refid="column"/> |
|
|
|
from |
|
|
|
<include refid="tbName"/> |
|
|
|
where uname=#{uname} limit 1; |
|
|
|
where batchcode=#{batchcode} limit 1; |
|
|
|
</select> |
|
|
|
|
|
|
|
<!--订单条件查询--> |
|
|
|
@ -82,43 +82,17 @@ |
|
|
|
) |
|
|
|
</insert> |
|
|
|
|
|
|
|
<update id="upUser" parameterType="cn.chjyj.szwh.bean.Goods"> |
|
|
|
update |
|
|
|
<include refid="tbName"/> |
|
|
|
set |
|
|
|
|
|
|
|
<if test="password!=null"> |
|
|
|
password=#{password}, |
|
|
|
</if> |
|
|
|
<if test="urealname!=null"> |
|
|
|
urealname=#{urealname}, |
|
|
|
</if> |
|
|
|
<if test="ubirth!=null"> |
|
|
|
ubirth =#{ubirth}, |
|
|
|
</if> |
|
|
|
<if test="gender!=null"> |
|
|
|
gender=#{gender}, |
|
|
|
</if> |
|
|
|
<if test="nickName!=null"> |
|
|
|
nickname=#{nickName}, |
|
|
|
</if> |
|
|
|
<if test="avatarurl!=null"> |
|
|
|
avatarurl=#{avatarurl}, |
|
|
|
</if> |
|
|
|
<if test="nickname!=null"> |
|
|
|
nickname=#{nickname}, |
|
|
|
</if> |
|
|
|
<if test="platfrom!=null"> |
|
|
|
platfrom=#{platfrom}, |
|
|
|
</if> |
|
|
|
<if test="sessionkey!=null"> |
|
|
|
sessionkey=#{sessionkey}, |
|
|
|
</if> |
|
|
|
<if test="openid!=null"> |
|
|
|
openid=#{openid}, |
|
|
|
</if> |
|
|
|
uname=#{uname} |
|
|
|
where uid=#{uid}; |
|
|
|
<!--更新--> |
|
|
|
<update id="updateOrderStatus"> |
|
|
|
update <include refid="tbName"/> |
|
|
|
<set> |
|
|
|
<foreach collection="map" item="v" index="k" separator="and"> |
|
|
|
<if test="v != null and v != ''"> |
|
|
|
${k} = #{v} |
|
|
|
</if> |
|
|
|
</foreach> |
|
|
|
</set> |
|
|
|
where id=#{id} |
|
|
|
</update> |
|
|
|
|
|
|
|
</mapper> |