|
@@ -230,7 +230,17 @@
|
|
|
and id in (select business_id from business_product where product_id = #{productId})
|
|
|
</if>
|
|
|
</select>
|
|
|
-
|
|
|
+ <select id="selectByIdToInfo" resultType="com.management.platform.entity.BusinessOpportunity">
|
|
|
+ SELECT *,
|
|
|
+ (select `name` from stage where id = stage_id) stageValue,
|
|
|
+ (select custom_name from custom where id = customer_id) customerName,
|
|
|
+ (select `name` from contacts where id = contacts_id) contactsName,
|
|
|
+ (select `name` from `user` where id = contacts_id) inchargerName,
|
|
|
+ (select `name` from `user` where id = creator_id) creatorName,
|
|
|
+ (SELECT sum(total) from business_product WHERE business_id = id)
|
|
|
+ from business_opportunity
|
|
|
+ where id = #{id}
|
|
|
+ </select>
|
|
|
|
|
|
|
|
|
</mapper>
|