소스 검색

岗位发布审核

yanliming 4 년 전
부모
커밋
7c46c728b5
1개의 변경된 파일22개의 추가작업 그리고 1개의 파일을 삭제
  1. 22 1
      common/src/main/java/com/jpsoft/employment/modules/job/service/impl/RecruitmentServiceImpl.java

+ 22 - 1
common/src/main/java/com/jpsoft/employment/modules/job/service/impl/RecruitmentServiceImpl.java

@@ -5,6 +5,8 @@ import java.util.Map;
 import java.util.UUID;
 import javax.annotation.Resource;
 
+import com.jpsoft.employment.modules.job.dao.RecruitmentApproveDAO;
+import com.jpsoft.employment.modules.job.entity.RecruitmentApprove;
 import com.jpsoft.employment.modules.job.entity.RecruitmentVO;
 import org.springframework.stereotype.Component;
 import org.springframework.transaction.annotation.Transactional;
@@ -24,6 +26,9 @@ public class RecruitmentServiceImpl implements RecruitmentService {
 	@Resource(name="recruitmentDAO")
 	private RecruitmentDAO recruitmentDAO;
 
+	@Resource(name="recruitmentApproveDAO")
+	private RecruitmentApproveDAO recruitmentApproveDAO;
+
 	@Override
 	public Recruitment get(String id) {
 		// TODO Auto-generated method stub
@@ -34,8 +39,24 @@ public class RecruitmentServiceImpl implements RecruitmentService {
 	public int insert(Recruitment model) {
 		// TODO Auto-generated method stub
 		//model.setId(UUID.randomUUID().toString());
+
+		int count = recruitmentDAO.insert(model);
+
+		int affectCount = 0;
+
+		if(count>0){
+			RecruitmentApprove recruitmentApprove = new RecruitmentApprove();
+			recruitmentApprove.setId(UUID.randomUUID().toString());
+			recruitmentApprove.setCreateBy(model.getCreateBy());
+			recruitmentApprove.setCreateTime(model.getCreateTime());
+			recruitmentApprove.setDelFlag(false);
+			recruitmentApprove.setRecruitmentId(model.getId());
+
+
+			affectCount = recruitmentApproveDAO.insert(recruitmentApprove);
+		}
 		
-		return recruitmentDAO.insert(model);
+		return affectCount;
 	}
 
 	@Override