Просмотр исходного кода

管理端--科技需求线索单/意向单log

Antiloveg лет назад: 8
Родитель
Сommit
8212ad5452

+ 24 - 5
src/main/java/com/goafanti/admin/controller/AdminOrderApiController.java

@@ -9,15 +9,20 @@ import org.springframework.web.bind.annotation.RestController;
 
 import com.goafanti.achievement.service.AchievementOrderService;
 import com.goafanti.common.bo.Result;
+import com.goafanti.common.constant.ErrorConstants;
+import com.goafanti.common.controller.CertifyApiController;
+import com.goafanti.demand.service.DemandOrderLogService;
 import com.goafanti.demand.service.DemandOrderService;
 
 @RestController
 @RequestMapping(value = "/api/admin/portal/order")
-public class AdminOrderApiController {
+public class AdminOrderApiController extends CertifyApiController {
 	@Resource
-	private AchievementOrderService achievementOrderService;
+	private AchievementOrderService	achievementOrderService;
 	@Resource
-	private DemandOrderService demandOrderService;
+	private DemandOrderService		demandOrderService;
+	@Resource
+	private DemandOrderLogService	demandOrderLogService;
 
 	/**
 	 * 科技需求线索单/意向单列表(个人用户)
@@ -36,12 +41,12 @@ public class AdminOrderApiController {
 		res.setData(demandOrderService.listUserDemandOrder(uid, username, status, pNo, pSize));
 		return res;
 	}
-	
+
 	/**
 	 * 科技需求线索单/意向单列表(组织用户)
 	 */
 	@RequestMapping(value = "/orgDemandOrderList", method = RequestMethod.GET)
-	public Result orgDemandOrderList(String uid, String unitName, Integer status, String pageNo, String pageSize){
+	public Result orgDemandOrderList(String uid, String unitName, Integer status, String pageNo, String pageSize) {
 		Result res = new Result();
 		Integer pNo = 1;
 		Integer pSize = 10;
@@ -54,4 +59,18 @@ public class AdminOrderApiController {
 		res.setData(demandOrderService.listOrgDemandOrder(uid, unitName, status, pNo, pSize));
 		return res;
 	}
+
+	/**
+	 * 科技需求线索单/意向单log
+	 */
+	@RequestMapping(value = "/demandOrderLog", method = RequestMethod.GET)
+	public Result demandOrderLog(String demandOrderId) {
+		Result res = new Result();
+		if (StringUtils.isEmpty(demandOrderId)) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "", "科技需求订单ID"));
+			return res;
+		}
+		res.setData(demandOrderLogService.selectAdminDemandOrderLogByDemandOrderId(demandOrderId));
+		return res;
+	}
 }

+ 3 - 0
src/main/java/com/goafanti/common/dao/DemandOrderLogMapper.java

@@ -3,6 +3,7 @@ package com.goafanti.common.dao;
 import java.util.List;
 
 import com.goafanti.common.model.DemandOrderLog;
+import com.goafanti.demand.bo.DemandOrderLogAdminBo;
 import com.goafanti.demand.bo.DemandOrderLogUserBo;
 
 public interface DemandOrderLogMapper {
@@ -19,4 +20,6 @@ public interface DemandOrderLogMapper {
     int updateByPrimaryKey(DemandOrderLog record);
 
 	List<DemandOrderLogUserBo> selectDemandOrderLogByDemandOrderId(String demandOrderId);
+
+	List<DemandOrderLogAdminBo> selectAdminDemandOrderLogByDemandOrderId(String demandOrderId);
 }

+ 10 - 0
src/main/java/com/goafanti/common/mapper/DemandOrderLogMapper.xml

@@ -111,4 +111,14 @@
   	where demand_order_id = #{demandOrderId,jdbcType=VARCHAR}
   	order by record_time 
   </select>
+  
+   <select id="selectAdminDemandOrderLogByDemandOrderId" parameterType="java.lang.String" resultType="com.goafanti.demand.bo.DemandOrderLogAdminBo">
+  	select 
+  		dol.record_time as recordTime, dol.status, dol.comment,
+  		a.name as operator
+  	from demand_order_log dol
+  	left join admin a on a.id = dol.operator
+  	where dol.demand_order_id = #{demandOrderId,jdbcType=VARCHAR}
+  	order by record_time 
+  </select>
 </mapper>

+ 16 - 0
src/main/java/com/goafanti/demand/bo/DemandOrderLogAdminBo.java

@@ -0,0 +1,16 @@
+package com.goafanti.demand.bo;
+
+public class DemandOrderLogAdminBo extends DemandOrderLogUserBo {
+	private String operator;
+
+	public String getOperator() {
+		return operator;
+	}
+
+	public void setOperator(String operator) {
+		this.operator = operator;
+	}
+	
+	
+
+}

+ 3 - 0
src/main/java/com/goafanti/demand/service/DemandOrderLogService.java

@@ -2,10 +2,13 @@ package com.goafanti.demand.service;
 
 import java.util.List;
 
+import com.goafanti.demand.bo.DemandOrderLogAdminBo;
 import com.goafanti.demand.bo.DemandOrderLogUserBo;
 
 public interface DemandOrderLogService {
 
 	List<DemandOrderLogUserBo> selectDemandOrderLogByDemandOrderId(String demandOrderId);
 
+	List<DemandOrderLogAdminBo> selectAdminDemandOrderLogByDemandOrderId(String demandOrderId);
+
 }

+ 6 - 0
src/main/java/com/goafanti/demand/service/impl/DemandOrderLogServiceImpl.java

@@ -6,6 +6,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 import com.goafanti.common.dao.DemandOrderLogMapper;
+import com.goafanti.demand.bo.DemandOrderLogAdminBo;
 import com.goafanti.demand.bo.DemandOrderLogUserBo;
 import com.goafanti.demand.service.DemandOrderLogService;
 @Service
@@ -17,4 +18,9 @@ public class DemandOrderLogServiceImpl implements DemandOrderLogService {
 	public List<DemandOrderLogUserBo> selectDemandOrderLogByDemandOrderId(String demandOrderId) {
 		return demandOrderLogMapper.selectDemandOrderLogByDemandOrderId(demandOrderId);
 	}
+
+	@Override
+	public List<DemandOrderLogAdminBo> selectAdminDemandOrderLogByDemandOrderId(String demandOrderId) {
+		return demandOrderLogMapper.selectAdminDemandOrderLogByDemandOrderId(demandOrderId);
+	}
 }