Selaa lähdekoodia

Merge remote-tracking branch 'origin/master'

shuzhan 1 vuosi sitten
vanhempi
commit
b86334a33c

+ 41 - 0
web/src/main/java/com/jpsoft/employment/modules/base/controller/RecruitInformationInfoController.java

@@ -82,6 +82,7 @@ public class RecruitInformationInfoController {
             recruitInformationInfo.setStatus("0");
             recruitInformationInfo.setBrowseNumber(0);
             recruitInformationInfo.setIsOnline(true);
+            recruitInformationInfo.setIsTopping(false);
 
             int affectCount = recruitInformationInfoService.insert(recruitInformationInfo);
 
@@ -314,6 +315,7 @@ public class RecruitInformationInfoController {
                 map.put("address",recruitInformationInfo.getAddress());
                 map.put("browseNumber",recruitInformationInfo.getBrowseNumber());
                 map.put("ageRequirement",recruitInformationInfo.getAgeRequirement());
+                map.put("isTopping",recruitInformationInfo.getIsTopping());
 
                 String statusN;
                 if ("1".equals(recruitInformationInfo.getStatus())) {
@@ -387,6 +389,7 @@ public class RecruitInformationInfoController {
             row.createCell(colIndex++).setCellValue(com.jpsoft.employment.modules.common.utils.StringUtils.strValue(map.get("positionName"), ""));
             row.createCell(colIndex++).setCellValue(com.jpsoft.employment.modules.common.utils.StringUtils.strValue(map.get("salary"), ""));
             row.createCell(colIndex++).setCellValue(com.jpsoft.employment.modules.common.utils.StringUtils.strValue(map.get("settlementMethodN"), ""));
+            row.createCell(colIndex++).setCellValue(com.jpsoft.employment.modules.common.utils.StringUtils.strValue(map.get("ageRequirement"), ""));
             row.createCell(colIndex++).setCellValue(com.jpsoft.employment.modules.common.utils.StringUtils.strValue(map.get("recruitingNumbers"), ""));
             row.createCell(colIndex++).setCellValue(com.jpsoft.employment.modules.common.utils.StringUtils.strValue(map.get("contacts"), ""));
             row.createCell(colIndex++).setCellValue(com.jpsoft.employment.modules.common.utils.StringUtils.strValue(map.get("contactsPhone"), ""));
@@ -485,6 +488,44 @@ public class RecruitInformationInfoController {
     }
 
 
+    @ApiOperation(value="修改是否置顶")
+    @PostMapping("changeTopping/{id}")
+    public MessageResult<RecruitInformationInfo> changeTopping(@PathVariable("id") String id,@RequestAttribute String subject){
+        MessageResult<RecruitInformationInfo> msgResult = new MessageResult<>();
+
+        try {
+
+            RecruitInformationInfo recruitInformationInfo = recruitInformationInfoService.get(id);
+            recruitInformationInfo.setUpdateBy(subject);
+            recruitInformationInfo.setUpdateTime(new Date());
+
+            if(recruitInformationInfo.getIsTopping()!=null&&recruitInformationInfo.getIsTopping()){
+                recruitInformationInfo.setIsTopping(false);
+            }
+            else{
+                recruitInformationInfo.setIsTopping(true);
+            }
+
+            int affectCount = recruitInformationInfoService.update(recruitInformationInfo);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库修改失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+
 
     @ApiOperation(value = "导入招聘信息")
     @PostMapping("importXls")