Commit 4552338f by xunj

心愿抽奖

1 parent 8559711e
...@@ -2,27 +2,57 @@ ...@@ -2,27 +2,57 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.polysoft.activity.mapper.WishMapper"> <mapper namespace="com.polysoft.activity.mapper.WishMapper">
<select id="queryWishList" resultType="com.polysoft.activity.model.vo.WishVO"
parameterType="com.polysoft.activity.model.param.QueryWishParam">
SELECT
t1.wish_id,
t1.user_id,
t1.address,
t1.wish_context,
t1.user_name,
t1.prize_falg,
t1.create_time,
t1.push_date,
t2.pic_url
<!--<insert id="addWish" parameterType="com.polysoft.activity.model.dto.AddWishDto"> FROM
insert into t_wish ( t_wish t1
wish_id, left join t_wish_pic t2 on(t1.wish_id = t2.wish_id)
user_id, <where>
user_name, 1=1
address, <if test="pushDate !=null and pushDate != '' ">
wish_context, and push_date = #{pushDate}
prize_falg, </if>
create_time, <if test="wishId != null and wishId != '' ">
push_date, and wish_id = #{wishId}
delete_falg </if>
)VALUES ( <if test="userId != null and userId != '' ">
#{wishId}, and user_id = #{userId}
#{wishId}, </if>
#{wishId}, </where>
#{wishId}, </select>
#{wishId}, <select id="queryLuckDrawWish" resultType="com.polysoft.activity.model.vo.QueryLuckDrawWishVO">
#{wishId}, SELECT
#{wishId}, t.user_id,
#{wishId}, t.wish_id
) FROM
</insert>--> t_wish t
WHERE
t.push_date = DATE_FORMAT(NOW(),'%Y-%m-%d')
AND t.user_id NOT IN ( SELECT t2.user_id FROM t_wish_real_prize t2 )
GROUP by t.user_id
order by t.user_id asc
</select>
<select id="querRealPrize" resultType="com.polysoft.activity.model.vo.QueryRealPrizeVO">
SELECT
prize_id,
prize_name,
luck_draw_date,
prize_num,
prize_price
FROM
t_real_prize
WHERE
luck_draw_date = DATE_FORMAT( NOW( ), '%Y-%m-%d' )
</select>
</mapper> </mapper>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!