Browse Source

官网招聘省份修改

anderx 1 year ago
parent
commit
5833e3d9a2

+ 1 - 1
src/main/java/com/kede/common/mapper/RecruitmentMapper.xml

@@ -29,7 +29,7 @@
         where  id = #{id,jdbcType=INTEGER} 
     </select>
 
-    <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
+    <delete id="deleteByPrimaryKey" >
         delete from recruitment
         where  id = #{id,jdbcType=INTEGER} 
     </delete>

+ 8 - 0
src/main/java/com/kede/recruitment/controller/AdminRecruitmentApiController.java

@@ -32,6 +32,10 @@ public class AdminRecruitmentApiController extends BaseApiController {
 			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"内容","内容"));
 			return res;
 		}
+		if(StringUtils.isBlank(ir.getProvince())) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"省份","省份"));
+			return res;
+		}
 		if (!res.getError().isEmpty()) {
 			return res;
 		}
@@ -45,6 +49,10 @@ public class AdminRecruitmentApiController extends BaseApiController {
 	@RequestMapping(value = "/updateRecruitment", method = RequestMethod.POST)
 	public Result updateRecruitment(InputRecruitment ir) {
 		Result res =new Result();
+		if(StringUtils.isBlank(ir.getProvince())) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"省份","省份"));
+			return res;
+		}
 		res.data(recruitmentService.updateRecruitment(ir));
 		return res;
 	}