Antiloveg 8 years ago
parent
commit
972963d334

+ 2 - 1
src/main/java/com/goafanti/common/mapper/DemandMapper.xml

@@ -972,11 +972,12 @@
   		d.picture_url as pictureUrl, d.text_file_url as textFileUrl, d.video_url as videoUrl,
   		d.fixed_cycle as fixedCycle, d.people_number as peopleNumber, d.fixed_scheme as fixedScheme,
   		d.cost_escrow as costEscrow, d.validity_period as validityPeriod, ui.username,
-  		oi.unit_name as unitName, di.id as demandInterestId
+  		oi.unit_name as unitName, di.id as demandInterestId, do.id as demandOrderId
   	from demand d
   	left join user_identity ui on ui.uid = d.employer_id
   	left join organization_identity oi on oi.uid = d.employer_id
   	left join demand_interest di on di.demand_id = d.id and di.uid = #{0}
+  	left join demand_order do on do.demand_id = d.id and do.uid = #{0}
   	where d.id = #{1}
   </select>
   

+ 12 - 0
src/main/java/com/goafanti/portal/bo/DemandSearchDetailBo.java

@@ -58,6 +58,18 @@ public class DemandSearchDetailBo extends DemandSearchListBo{
 	 */
 	private String demandInterestId;
 	
+	/**
+	 * 订单ID
+	 */
+	private String demandOrderId;
+	
+	public String getDemandOrderId() {
+		return demandOrderId;
+	}
+
+	public void setDemandOrderId(String demandOrderId) {
+		this.demandOrderId = demandOrderId;
+	}
 
 	public String getDemandInterestId() {
 		return demandInterestId;

+ 1 - 1
src/main/java/com/goafanti/portal/controller/PortalInterestApiController.java

@@ -145,7 +145,7 @@ public class PortalInterestApiController extends CertifyApiController{
 		AchievementInterest ai = achievementInterestService
 				.selectAchievementInterestByUidAndAchievementId(TokenManager.getUserId(), id);
 		if (null != ai) {
-			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "当前科技成果已关注!"));
+			res.getError().add(buildError("", "当前科技成果已关注!"));
 			return res;
 		}