|
|
|
@ -14,42 +14,53 @@ |
|
|
|
|
|
|
|
|
|
|
|
<!--分页查询商品列表--> |
|
|
|
<!-- <select id="getGoodsList" parameterType="java.lang.Integer" resultType="cn.chjyj.szwh.bean.Goods">--> |
|
|
|
<!-- SELECT <include refid="column"/> --> |
|
|
|
<!-- FROM <include refid=""></include>--> |
|
|
|
<!-- </select>--> |
|
|
|
<!-- <select id="getGoodsList" parameterType="java.lang.Integer" resultType="cn.chjyj.szwh.bean.Goods">--> |
|
|
|
<!-- SELECT <include refid="column"/> --> |
|
|
|
<!-- FROM <include refid=""></include>--> |
|
|
|
<!-- </select>--> |
|
|
|
|
|
|
|
<!--查询记录列表--> |
|
|
|
<select id="getGoodsList" parameterType="java.lang.Integer" resultType="cn.chjyj.szwh.bean.Goods"> |
|
|
|
WITH mm as ( |
|
|
|
select <include refid="column"/> from <include refid="tbName"/> where id>#{startRs} limit #{pageSize} |
|
|
|
) |
|
|
|
SELECT * FROM mm ORDER BY id DESC; |
|
|
|
select * from ( |
|
|
|
select |
|
|
|
<include refid="column"/> |
|
|
|
from |
|
|
|
<include refid="tbName"/> |
|
|
|
where id>#{startRs} limit #{pageSize} |
|
|
|
) as mm ORDER BY mm.id DESC; |
|
|
|
</select> |
|
|
|
|
|
|
|
<!--根据uid查询用户--> |
|
|
|
<select id="getUserByUid" parameterType="java.lang.Integer" resultType="cn.chjyj.szwh.bean.Goods"> |
|
|
|
select <include refid="column"/> |
|
|
|
from <include refid="tbName"/> |
|
|
|
select |
|
|
|
<include refid="column"/> |
|
|
|
from |
|
|
|
<include refid="tbName"/> |
|
|
|
where uid=#{uid} |
|
|
|
</select> |
|
|
|
|
|
|
|
<!--根据 goodsIsli 查询商品信息--> |
|
|
|
<select id="getGoodsByIsli" parameterType="java.lang.String" resultType="cn.chjyj.szwh.bean.Goods"> |
|
|
|
select <include refid="column"/> from <include refid="tbName"/> |
|
|
|
select |
|
|
|
<include refid="column"/> |
|
|
|
from |
|
|
|
<include refid="tbName"/> |
|
|
|
where goods_islicode=#{goodsIsli} limit 1; |
|
|
|
</select> |
|
|
|
|
|
|
|
<!--查询用户--> |
|
|
|
<select id="getSingleUserByOpenid" parameterType="java.lang.String" resultType="cn.chjyj.szwh.bean.Goods"> |
|
|
|
select <include refid="column"/> from |
|
|
|
select |
|
|
|
<include refid="column"/> |
|
|
|
from |
|
|
|
<include refid="tbName"/> |
|
|
|
where openid=#{openid}; |
|
|
|
</select> |
|
|
|
|
|
|
|
<!--新增用户--> |
|
|
|
<insert id="addUser" parameterType="cn.chjyj.szwh.bean.Goods" useGeneratedKeys="true" keyColumn="id"> |
|
|
|
insert into <include refid="tbName"/> |
|
|
|
insert into |
|
|
|
<include refid="tbName"/> |
|
|
|
(uname,password,gender,urealname,ubirth,nickname,avatarurl,platfrom,sessionkey,openid) |
|
|
|
values ( |
|
|
|
#{uname}, |
|
|
|
@ -66,7 +77,8 @@ |
|
|
|
</insert> |
|
|
|
|
|
|
|
<update id="upUser" parameterType="cn.chjyj.szwh.bean.Goods"> |
|
|
|
update <include refid="tbName"/> |
|
|
|
update |
|
|
|
<include refid="tbName"/> |
|
|
|
set |
|
|
|
|
|
|
|
<if test="password!=null"> |
|
|
|
|