|
|
@@ -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
|