|
|
|
@@ -18,7 +18,6 @@ |
|
|
|
<result column="createtime" property="createtime"/> |
|
|
|
<result column="updatetime" property="updatetime"/> |
|
|
|
<result column="bg_color" property="bgColor"/> |
|
|
|
<result column="couponChannelId" property="couponChannelId"/> |
|
|
|
|
|
|
|
</resultMap> |
|
|
|
|
|
|
|
@@ -83,13 +82,21 @@ |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="show" parameterType="com.iformall.domain.po.WxTopic" resultMap="BaseResultMap"> |
|
|
|
select t.*,cc.id as couponChannelId from wx_topic t left join wx_coupon_channel cc on(cc.sub_target_id = t.id) |
|
|
|
select t.* from wx_topic t |
|
|
|
where t.status = 1 |
|
|
|
and now() >= t.begin_time and now() <= t.end_time |
|
|
|
and t.tenant_id = #{tenantId} |
|
|
|
order by t.begin_time desc limit 1 |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="showList" parameterType="com.iformall.domain.po.WxTopic" resultMap="BaseResultMap"> |
|
|
|
select t.* from wx_topic t |
|
|
|
where t.status = 1 |
|
|
|
and now() >= t.begin_time and now() <= t.end_time |
|
|
|
and t.tenant_id = #{tenantId} |
|
|
|
order by t.begin_time desc |
|
|
|
</select> |
|
|
|
|
|
|
|
<update id="updateStatus" parameterType="com.iformall.domain.po.WxTopic"> |
|
|
|
update wx_topic set status = 3 where id in( |
|
|
|
select t.id from ( |
|
|
|
|