| | |
| | | <result column="app_id" jdbcType="BIGINT" property="appId"/> |
| | | <result column="weight" jdbcType="INTEGER" property="weight"/> |
| | | <result column="join_id" jdbcType="BIGINT" property="joinerId"/> |
| | | <association property="eventList" column="join_id" |
| | | javaType="com.ks.lucky.pojo.DO.ActivityJoinAssistEvent" |
| | | select="selectEventkeyWithJoinId"></association> |
| | | <collection property="eventList" column="{joinId=join_id,appId=app_id,uid=uid}" |
| | | javaType="java.util.List" |
| | | select="selectEventkeyWithJoinId"></collection> |
| | | </resultMap> |
| | | |
| | | <select id="selectEventkeyWithJoinId" parameterType="java.lang.Long" |
| | | resultType="com.ks.lucky.pojo.DO.LuckyActivityJoinAssist"> |
| | | <select id="selectEventkeyWithJoinId" parameterType="java.util.Map" |
| | | resultType="com.ks.lucky.pojo.DO.ActivityJoinAssistEvent"> |
| | | |
| | | SELECT a.`event_key` FROM `lucky_activity_join_assist` a WHERE a.`join_id`=#{joinId} AND app_id=#{appId} AND uid=#{uid} |
| | | |
| | |
| | | </select> |
| | | <!-- 非模板 --> |
| | | <sql id="listWhere"> |
| | | <if test="query.joinId!=null">and join_id=#{query.joinId}</if> |
| | | <if test="query.appId!=null">and app_id=#{query.appId}</if> |
| | | <if test="query.uid!=null">and uid=#{query.uid}</if> |
| | | <if test="query.eventKey!=null">and event_key=#{query.eventKey}</if> |
| | | <if test="query.minCreateTime!=null">and create_time>=#{query.minCreateTime}</if> |
| | | <if test="query.maxCreateTime!=null">and #{query.maxCreateTime}>create_time</if> |
| | | <if test="query.joinId!=null">and a.join_id=#{query.joinId}</if> |
| | | <if test="query.appId!=null">and a.app_id=#{query.appId}</if> |
| | | <if test="query.uid!=null">and a.uid=#{query.uid}</if> |
| | | <if test="query.eventKey!=null">and a.event_key=#{query.eventKey}</if> |
| | | <if test="query.minCreateTime!=null">and a.create_time>=#{query.minCreateTime}</if> |
| | | <if test="query.maxCreateTime!=null">and #{query.maxCreateTime}>a.create_time</if> |
| | | </sql> |
| | | <select id="list" resultMap="BaseResultMap">select |
| | | <include refid="Base_Column_List"/> |
| | | from lucky_activity_join_assist where 1=1 |
| | | from lucky_activity_join_assist a where 1=1 |
| | | <include refid="listWhere"/> |
| | | <if test="query.sortList!=null"> |
| | | <foreach collection="query.sortList" item="item" separator="," open=" order by "> ${item}</foreach> |
| | | <foreach collection="query.sortList" item="item" separator="," open=" order by ">${item}</foreach> |
| | | </if> |
| | | limit #{query.start},#{query.count} |
| | | </select> |
| | | <select id="count" resultType="java.lang.Long">select count(*) from lucky_activity_join_assist where 1=1 |
| | | |
| | | |
| | | <select id="listByActivityId" resultMap="BaseResultMap">select |
| | | a.* |
| | | from lucky_activity_join_assist a left join lucky_activity_join_record r on r.id=a.join_id where 1=1 |
| | | |
| | | <if test="activityId!=null"> |
| | | and r.activity_id=#{activityId} |
| | | </if> |
| | | |
| | | <include refid="listWhere"/> |
| | | |
| | | |
| | | limit #{query.start},#{query.count} |
| | | </select> |
| | | |
| | | |
| | | <select id="count" resultType="java.lang.Long">select count(*) from lucky_activity_join_assist a where 1=1 |
| | | <include refid="listWhere"/> |
| | | </select> |
| | | <select id="listAssistFriends" |