|
|
@@ -8,7 +8,10 @@ import javax.annotation.Resource;
|
|
|
import com.jpsoft.employment.modules.job.entity.RecruitmentVO;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
+import org.springframework.util.Assert;
|
|
|
+
|
|
|
import com.jpsoft.employment.modules.job.dao.RecruitmentDAO;
|
|
|
+import com.jpsoft.employment.modules.job.entity.ApproveStatusConstant;
|
|
|
import com.jpsoft.employment.modules.job.entity.Recruitment;
|
|
|
import com.jpsoft.employment.modules.job.service.RecruitmentService;
|
|
|
import com.github.pagehelper.Page;
|
|
|
@@ -97,6 +100,10 @@ public class RecruitmentServiceImpl implements RecruitmentService {
|
|
|
|
|
|
@Override
|
|
|
public boolean updateForPublish(String recruitmentId, String publishTag) {
|
|
|
+ if("1".equals(publishTag)) { //如果是上架操作,先进行审核状态判断,只有审核完才能上架
|
|
|
+ Recruitment rec=recruitmentDAO.get(recruitmentId);
|
|
|
+ Assert.state(rec!=null&&ApproveStatusConstant.FINISH.equals(rec.getApproveStatus()),"只有审核完成的才能进行上架");
|
|
|
+ }
|
|
|
int num=recruitmentDAO.updateForPublish(recruitmentId, publishTag);
|
|
|
return num>0;
|
|
|
}
|