|
|
|
@ -18,10 +18,14 @@
|
|
|
|
|
<result column="referenceFileUrl" property="fileUrl"/>
|
|
|
|
|
<result column="referenceCoverUrl" property="coverUrl"/>
|
|
|
|
|
</collection>
|
|
|
|
|
<collection property="teachRefeList" ofType="java.util.Map" autoMapping="false">
|
|
|
|
|
<result column="teachRefeFileUrl" property="teachRefeFileUrl"/>
|
|
|
|
|
<result column="teachRefeType" property="teachRefeType"/>
|
|
|
|
|
</collection>
|
|
|
|
|
</resultMap>
|
|
|
|
|
<select id="list" resultMap="taskListMap">
|
|
|
|
|
SELECT
|
|
|
|
|
t1.*,t2.tagId,t3.title as tagTitle,t4.brandId,t5.name as brandName
|
|
|
|
|
t1.*,t2.tagId,t3.title as tagTitle,t4.brandId,t5.name as brandName,r1.fileUrl as teachRefeFileUrl,r1.type as teachRefeType
|
|
|
|
|
<if test='openid!=null'>
|
|
|
|
|
,(SELECT count(*)!=0 from userTask as t4,user as t5
|
|
|
|
|
WHERE t1.id = t4.taskId and t4.userId = t5.id and t5.openid = #{openid} ) as isReceived
|
|
|
|
@ -33,6 +37,7 @@
|
|
|
|
|
<!-- on t1.id = t3.taskId-->
|
|
|
|
|
LEFT JOIN taskTag as t2 on t1.id = t2.taskId LEFT JOIN tag as t3 on t3.id = t2.tagId
|
|
|
|
|
LEFT JOIN taskBrand as t4 on t1.id = t4.taskId LEFT JOIN brand as t5 on t5.id = t4.brandId
|
|
|
|
|
LEFT JOIN taskTeachRefe as r1 on t1.id = r1.taskId
|
|
|
|
|
WHERE t1.id in
|
|
|
|
|
<foreach collection="list" index="index" item="item" open="(" separator="," close=")">#{item}</foreach>
|
|
|
|
|
<if test="tagIdList !=null and tagIdList.size()!=0 ">
|
|
|
|
|