<?xml version="1.0" encoding="UTF-8"?>
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<mapper namespace="com.stylefeng.guns.modular.system.dao.UserActivityInviteMapper">
|
|
<!-- 通用查询映射结果 -->
|
<resultMap id="BaseResultMap" type="com.stylefeng.guns.modular.system.model.UserActivityInvite">
|
<id column="id" property="id"/>
|
<result column="userActivityId" property="userActivityId"/>
|
<result column="couponId" property="couponId"/>
|
<result column="totalNum" property="totalNum"/>
|
<result column="startTime" property="startTime"/>
|
<result column="endTime" property="endTime"/>
|
<result column="enable" property="enable"/>
|
<result column="effective" property="effective"/>
|
<result column="totalPrice" property="totalPrice"/>
|
<result column="lavePrice" property="lavePrice"/>
|
</resultMap>
|
|
|
|
<select id="query" resultType="map">
|
select
|
a.id as id,
|
a.userActivityId as userActivityId,
|
a.couponId as couponId,
|
a.totalNum as totalNum,
|
a.startTime as startTime,
|
a.endTime as endTime,
|
a.enable as enable,
|
a.effective as effective,
|
c.money as money,
|
c.fullMoney as fullMoney,
|
c.couponUseType as couponUseType,
|
c.couponType as couponType,
|
a.totalPrice as totalPrice,
|
a.lavePrice as lavePrice
|
from t_user_activity_invite a
|
left join t_user_activity b on (a.userActivityId = b.id)
|
left join t_sys_coupon_record c on (a.couponId = c.id)
|
where now() between a.startTime and a.endTime and a.enable = 2 and b.status = 3 and b.companyId = #{companyId}
|
</select>
|
</mapper>
|