|
|
@@ -55,6 +55,12 @@
|
|
|
</sql>
|
|
|
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
|
|
|
select
|
|
|
+ <include refid="Base_Column_List" />
|
|
|
+ from demand
|
|
|
+ where id = #{id,jdbcType=VARCHAR}
|
|
|
+ </select>
|
|
|
+ <select id="selectAppByPrimaryKey" resultType="com.goafanti.demand.bo.DemandListBo" parameterType="java.lang.String" >
|
|
|
+ select
|
|
|
d.id, d.serial_number AS serialNumber, d.data_category AS dataCategory, d.name, d.keyword, d.info_sources AS infoSources, d.industry_category_a AS industryCategoryA,
|
|
|
d.industry_category_b AS industryCategoryB, d.industry_category_c AS industryCategoryC, d.demand_type AS demandType, d.problem_des AS problemDes, d.technical_requirements AS technicalRequirements,
|
|
|
d.picture_url AS pictureUrl, d.text_file_url AS textFileUrl, d.video_url AS videoUrl, d.fixed_budget AS fixedBudget, d.fixed_cycle AS fixedCycle, d.people_number AS peopleNumber,
|
|
|
@@ -62,16 +68,17 @@
|
|
|
d.employer_address AS employerAddress, d.employer_contacts AS employerContacts, d.employer_contacts_mobile AS employerContactsMobile, d.employer_contacts_mailbox AS employerContactsMailbox,
|
|
|
d.contacts, d.status, d.release_status AS releaseStatus, d.release_date AS releaseDate , d.create_time AS createTime, d.principal_id AS principalId, d.deleted_sign AS deletedSign,
|
|
|
d.audit_status AS auditStatus, d.tech_broker_id AS techBrokerId,d.boutique,d.urgent_money AS urgentMoney,d.urgent_days as urgentDays
|
|
|
- ,ifnull(t.x,0) as orderIntentionCount,ifnull(t2.x,0) as orderCount
|
|
|
+ ,ifnull(t.x,0) as orderIntentionCount,ifnull(t2.x,0) as orderCount,j.easemob_name as easemobName
|
|
|
from demand d
|
|
|
+ left join jpush_easemob_account j on d.employer_id=j.uid
|
|
|
left join (select count(0) as x,commodity_id from t_order
|
|
|
where order_status != 4
|
|
|
group by commodity_id ) t on d.id=t.commodity_id
|
|
|
left join (select count(0) as x,commodity_id from t_order
|
|
|
where order_status != 4 and order_status != 0
|
|
|
group by commodity_id ) t2 on d.id=t2.commodity_id
|
|
|
- where id = #{id,jdbcType=VARCHAR}
|
|
|
- </select>
|
|
|
+ where d.id = #{id,jdbcType=VARCHAR}
|
|
|
+ </select>
|
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
|
|
|
delete from demand
|
|
|
where id = #{id,jdbcType=VARCHAR}
|