|
@@ -570,11 +570,12 @@
|
|
|
<select id="selectByPrimaryKeyWithModule" resultType="com.goafanti.business.bo.JtBusinessProjectResult">
|
|
<select id="selectByPrimaryKeyWithModule" resultType="com.goafanti.business.bo.JtBusinessProjectResult">
|
|
|
select
|
|
select
|
|
|
jtbp.id, jtbp.name, jtbp.category_id as categoryId, jtbp.number, jtbp.price, jtbp.activity_price as activityPrice, jtbp.member_price as memberPrice, jtbp.offset,
|
|
jtbp.id, jtbp.name, jtbp.category_id as categoryId, jtbp.number, jtbp.price, jtbp.activity_price as activityPrice, jtbp.member_price as memberPrice, jtbp.offset,
|
|
|
- jtbp.activity_flag as activityFlag,
|
|
|
|
|
|
|
+ jtbp.activity_flag as activityFlag, u.nickname as ownerName,ifnull(p.count,0) as interestCount,
|
|
|
jtbp.introduce, jtbp.province, jtbp.city, jtbp.create_time as createTime, jtbp.min_img_url as minImgUrl, jtbp.max_img_url as maxImgUrl, jtbp.value, jtbp.apply_conditions as applyConditions,
|
|
jtbp.introduce, jtbp.province, jtbp.city, jtbp.create_time as createTime, jtbp.min_img_url as minImgUrl, jtbp.max_img_url as maxImgUrl, jtbp.value, jtbp.apply_conditions as applyConditions,
|
|
|
jtbp.owner_id as ownerId, jtbp.is_hot as isHot, jtbp.audit_status as auditStatus, jtbp.audit_info as auditInfo, jtbp.release_date as releaseDate,jtbc.module as module,jtbp.advertisement
|
|
jtbp.owner_id as ownerId, jtbp.is_hot as isHot, jtbp.audit_status as auditStatus, jtbp.audit_info as auditInfo, jtbp.release_date as releaseDate,jtbc.module as module,jtbp.advertisement
|
|
|
- from jt_business_project jtbp
|
|
|
|
|
|
|
+ from jt_business_project jtbp left join `user` u on jtbp.owner_id=u.id
|
|
|
left join jt_business_category jtbc on jtbc.id = jtbp.category_id
|
|
left join jt_business_category jtbc on jtbc.id = jtbp.category_id
|
|
|
|
|
+ left join (select project_id,count(*) as count from project_interest) p on jtbp.id=p.project_id
|
|
|
where jtbp.id = #{id,jdbcType=VARCHAR}
|
|
where jtbp.id = #{id,jdbcType=VARCHAR}
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
@@ -619,7 +620,7 @@
|
|
|
jtbp.audit_status as auditStatus,
|
|
jtbp.audit_status as auditStatus,
|
|
|
jtbp.release_Date as releaseDate,
|
|
jtbp.release_Date as releaseDate,
|
|
|
jtbp.advertisement,
|
|
jtbp.advertisement,
|
|
|
- dct.dealCount as dealCount,
|
|
|
|
|
|
|
+ ifnull(dct.dealCount,0) as dealCount,
|
|
|
u.identify_name as companyName,u.id as companyId
|
|
u.identify_name as companyName,u.id as companyId
|
|
|
from jt_business_project jtbp
|
|
from jt_business_project jtbp
|
|
|
left join user u on u.id=jtbp.owner_id
|
|
left join user u on u.id=jtbp.owner_id
|
|
@@ -747,10 +748,15 @@
|
|
|
jtbp.name,
|
|
jtbp.name,
|
|
|
jtbp.introduce as introduction,
|
|
jtbp.introduce as introduction,
|
|
|
jtbp.price as textA,
|
|
jtbp.price as textA,
|
|
|
- jtbp.min_img_url as ImgUrl
|
|
|
|
|
|
|
+ u.nickname as ownerName,
|
|
|
|
|
+ jtbp.min_img_url as ImgUrl,
|
|
|
|
|
+ ifnull(p.count,'0') as interestCount
|
|
|
from
|
|
from
|
|
|
jt_business_project jtbp
|
|
jt_business_project jtbp
|
|
|
left join project_interest pi on jtbp.id=pi.project_id
|
|
left join project_interest pi on jtbp.id=pi.project_id
|
|
|
|
|
+ left join `user` u on jtbp.owner_id =u.id
|
|
|
|
|
+ left join (select project_id,count(*) as count from project_interest group by project_id) p
|
|
|
|
|
+ on p.project_id=jtbp.id
|
|
|
where pi.uid=#{uid,jdbcType=VARCHAR}
|
|
where pi.uid=#{uid,jdbcType=VARCHAR}
|
|
|
order by pi.create_time desc
|
|
order by pi.create_time desc
|
|
|
<if test="page_sql!=null">
|
|
<if test="page_sql!=null">
|