|
@@ -6,9 +6,11 @@ import com.alipay.api.domain.CompanyInfo;
|
|
|
import com.github.pagehelper.Page;
|
|
|
import com.jpsoft.employment.modules.base.entity.City;
|
|
|
import com.jpsoft.employment.modules.base.entity.Company;
|
|
|
+import com.jpsoft.employment.modules.base.entity.MessageNotice;
|
|
|
import com.jpsoft.employment.modules.base.entity.ResumeApprove;
|
|
|
import com.jpsoft.employment.modules.base.service.CityService;
|
|
|
import com.jpsoft.employment.modules.base.service.CompanyService;
|
|
|
+import com.jpsoft.employment.modules.base.service.MessageNoticeService;
|
|
|
import com.jpsoft.employment.modules.base.service.ResumeApproveService;
|
|
|
import com.jpsoft.employment.modules.common.dto.MessageResult;
|
|
|
import com.jpsoft.employment.modules.common.dto.Sort;
|
|
@@ -22,6 +24,7 @@ import com.jpsoft.employment.modules.sys.entity.DataDictionary;
|
|
|
import com.jpsoft.employment.modules.sys.entity.User;
|
|
|
import com.jpsoft.employment.modules.sys.service.DataDictionaryService;
|
|
|
|
|
|
+import com.jpsoft.employment.modules.sys.service.RoleService;
|
|
|
import com.jpsoft.employment.modules.sys.service.UserService;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiImplicitParam;
|
|
@@ -94,6 +97,12 @@ public class ResumeApiController {
|
|
|
@Autowired
|
|
|
private RecruitmentCollectionService recruitmentCollectionService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private MessageNoticeService messageNoticeService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private RoleService roleService;
|
|
|
+
|
|
|
|
|
|
private Logger logger = LoggerFactory.getLogger(getClass());
|
|
|
|
|
@@ -137,7 +146,12 @@ public class ResumeApiController {
|
|
|
|
|
|
try {
|
|
|
JobUser jobUser = jobUserService.get(subject);
|
|
|
- if("3".equals(jobUser.getIsAuthentication())){
|
|
|
+ if("0".equals(jobUser.getIsAuthentication())){
|
|
|
+ messageResult.setMessage("未实名认证,无法投递简历!");
|
|
|
+ messageResult.setResult(false);
|
|
|
+ messageResult.setCode(400);
|
|
|
+ return messageResult;
|
|
|
+ }else if("3".equals(jobUser.getIsAuthentication())){
|
|
|
messageResult.setMessage("实名制未通过,无法投递简历!");
|
|
|
messageResult.setResult(false);
|
|
|
messageResult.setCode(400);
|
|
@@ -194,6 +208,27 @@ public class ResumeApiController {
|
|
|
recruitment.setDeliveryTimes(deliveryTimes++);
|
|
|
recruitmentService.update(recruitment);
|
|
|
}
|
|
|
+
|
|
|
+ MessageNotice mc = new MessageNotice();
|
|
|
+ //投递成功 发送站内消息给HR
|
|
|
+ mc.setId(UUID.randomUUID().toString());
|
|
|
+ mc.setCreateBy(subject);
|
|
|
+ mc.setCreateTime(new Date());
|
|
|
+ mc.setDelFlag(false);
|
|
|
+
|
|
|
+ mc.setTitle("有用户投递简历");
|
|
|
+ mc.setContent("用户"+jobUser.getRealName() + "投递了您的招聘岗位");
|
|
|
+
|
|
|
+ mc.setClassify("1");//系统消息
|
|
|
+ mc.setType("1");
|
|
|
+ mc.setStatus(true);
|
|
|
+ mc.setIsNeedAgree(false);
|
|
|
+ List<User> hrUserList = userService.findByRoleAndCompanyId("40846865-15ec-4de4-983e-054eb47666a4",recruitment.getCompanyId());
|
|
|
+ if(hrUserList.size() > 0){
|
|
|
+ mc.setRecipientId(StringUtils.join(hrUserList.toArray(), ","));
|
|
|
+ messageNoticeService.insert(mc);
|
|
|
+ }
|
|
|
+
|
|
|
messageResult.setMessage("投递成功");
|
|
|
messageResult.setResult(true);
|
|
|
messageResult.setCode(200);
|