diff --git a/src/com/engine/recruit/controller/InductionManageController.java b/src/com/engine/recruit/controller/InductionManageController.java index b68bece..bd741e1 100644 --- a/src/com/engine/recruit/controller/InductionManageController.java +++ b/src/com/engine/recruit/controller/InductionManageController.java @@ -2,16 +2,16 @@ package com.engine.recruit.controller; import com.engine.common.util.ParamUtil; import com.engine.common.util.ServiceUtil; +import com.engine.recruit.entity.workbench.OptionVO; import com.engine.recruit.util.ResponseResult; import com.engine.recruit.wrapper.InductionManageWrapper; +import com.icbc.api.internal.apache.http.impl.cookie.S; import weaver.hrm.HrmUserVarify; import weaver.hrm.User; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import javax.ws.rs.POST; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; +import javax.ws.rs.*; import javax.ws.rs.core.Context; import javax.ws.rs.core.MediaType; import java.util.Map; @@ -52,4 +52,12 @@ public class InductionManageController { Map params = ParamUtil.request2Map(request); return new ResponseResult, Map>(user).run(getInductionManageWrapper(user)::checkLoginInfo, params); } + + @GET + @Path("/infoSubmit") + @Produces(MediaType.APPLICATION_JSON) + public String infoSubmit(@Context HttpServletRequest request, @Context HttpServletResponse response, @QueryParam("id") String id) { + User user = HrmUserVarify.getUser(request, response); + return new ResponseResult>(user).run(getInductionManageWrapper(user) :: infoSubmit,id); + } } diff --git a/src/com/engine/recruit/service/InductionManageService.java b/src/com/engine/recruit/service/InductionManageService.java index 753ec79..4d2cbd6 100644 --- a/src/com/engine/recruit/service/InductionManageService.java +++ b/src/com/engine/recruit/service/InductionManageService.java @@ -32,4 +32,13 @@ public interface InductionManageService { * @return */ Map checkLoginInfo(Map param); + + /** + * @Description: + * @Author: liang.cheng + * @Date: 2023/10/25 10:30 AM + * @param: [id] + * @return: java.util.Map + */ + Map infoSubmit(String id); } diff --git a/src/com/engine/recruit/service/impl/InductionManageServiceImpl.java b/src/com/engine/recruit/service/impl/InductionManageServiceImpl.java index 47792c9..bac7397 100644 --- a/src/com/engine/recruit/service/impl/InductionManageServiceImpl.java +++ b/src/com/engine/recruit/service/impl/InductionManageServiceImpl.java @@ -100,13 +100,31 @@ public class InductionManageServiceImpl extends Service implements InductionMana @Override public Map checkLoginInfo(Map param) { RecordSet rs = new RecordSet(); + HashMap map = new HashMap<>(2); String mobile = Util.null2String(param.get("mobile")); String pwd = Util.null2String(param.get("pwd")); - rs.executeQuery("select id from uf_jcl_xxcj where sjh = ? and mm = ?", mobile, pwd); + rs.executeQuery("select count(1) as sum from uf_jcl_rzgl where sjhm = ? and rzzt != 2",mobile); rs.next(); - return new HashMap() {{ - put("id", Util.getIntValue(rs.getString("id"))); - }}; + if (Util.getIntValue(rs.getString("sum")) == 0) { + map.put("message","当前链接已失效且不可操作"); + return map; + } + + rs.executeQuery("select id from uf_jcl_xxcj where sjh = ? and mm = ?", mobile, pwd); + if (rs.next()) { + map.put("id", Util.getIntValue(rs.getString("id"))); + }else { + map.put("message","手机号或密码错误"); + } + + return map; + } + + @Override + public Map infoSubmit(String id) { + RecordSet rs = new RecordSet(); + rs.executeQuery("update uf_jcl_rzgl set xxcj = 2 where id = ?",id); + return null; } /** diff --git a/src/com/engine/recruit/wrapper/InductionManageWrapper.java b/src/com/engine/recruit/wrapper/InductionManageWrapper.java index efbf7b5..4b195ea 100644 --- a/src/com/engine/recruit/wrapper/InductionManageWrapper.java +++ b/src/com/engine/recruit/wrapper/InductionManageWrapper.java @@ -2,6 +2,7 @@ package com.engine.recruit.wrapper; import com.engine.common.util.ServiceUtil; import com.engine.core.impl.Service; +import com.engine.recruit.entity.workbench.OptionVO; import com.engine.recruit.service.InductionManageService; import com.engine.recruit.service.impl.InductionManageServiceImpl; import weaver.hrm.User; @@ -29,4 +30,8 @@ public class InductionManageWrapper extends Service { public Map checkLoginInfo(Map param) { return getInductionManageService(user).checkLoginInfo(param); } + + public Map infoSubmit(String id) { + return getInductionManageService(user).infoSubmit(id); + } }