移动端接口

This commit is contained in:
Chengliang 2023-10-26 16:04:05 +08:00
parent ff1f68e864
commit 7d4c2d42bd
4 changed files with 47 additions and 7 deletions

View File

@ -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<String, Object> params = ParamUtil.request2Map(request);
return new ResponseResult<Map<String, Object>, Map<String, Object>>(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<String, Map<String, Object>>(user).run(getInductionManageWrapper(user) :: infoSubmit,id);
}
}

View File

@ -32,4 +32,13 @@ public interface InductionManageService {
* @return
*/
Map<String, Object> checkLoginInfo(Map<String, Object> param);
/**
* @Description:
* @Author: liang.cheng
* @Date: 2023/10/25 10:30 AM
* @param: [id]
* @return: java.util.Map<java.lang.String,java.lang.Object>
*/
Map<String, Object> infoSubmit(String id);
}

View File

@ -100,13 +100,31 @@ public class InductionManageServiceImpl extends Service implements InductionMana
@Override
public Map<String, Object> checkLoginInfo(Map<String, Object> param) {
RecordSet rs = new RecordSet();
HashMap<String, Object> 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<String, Object>() {{
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<String, Object> infoSubmit(String id) {
RecordSet rs = new RecordSet();
rs.executeQuery("update uf_jcl_rzgl set xxcj = 2 where id = ?",id);
return null;
}
/**

View File

@ -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<String, Object> checkLoginInfo(Map<String, Object> param) {
return getInductionManageService(user).checkLoginInfo(param);
}
public Map<String, Object> infoSubmit(String id) {
return getInductionManageService(user).infoSubmit(id);
}
}