You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

55 lines
1.6 KiB

package com.fr.plugin.xx.zyjn.handler.action;
import com.fr.json.JSONObject;
import com.fr.plugin.xx.zyjn.dao.SyncService;
import com.fr.plugin.xx.zyjn.entity.SyncUserEntity;
import com.fr.third.springframework.web.bind.annotation.RequestMethod;
import com.fr.web.utils.WebUtils;
import javax.servlet.http.HttpServletResponse;
/**
* @Author xx
* @Date 2021/11/27
* @Description
**/
public class SyncUserHandler extends BaseHandler {
/*
*
基本字段-员工工号 sn String no no 员工工号
基本字段-组织编号 orgSn String no no 所属组织编号
基本字段-姓名 name String no no 用户名称
基本字段-性别 sex int yes no 性别,1-男,2-女,0-未知
基本字段-状态 status int no no 1-正常,2-离职
基本字段-手机号 telephone String yes no 手机号
基本字段-邮箱 email String yes no 邮箱
基本字段-职务 position String yes no 职务中文
基本字段-入职日期 joinDate String yes no 入职日期,例2020-07-07 00:00:00
基本字段-登录名 loginName String yes no
基本字段-密码 password String yes no MD5 32位小写加密后的密码
* */
@Override
public RequestMethod getMethod() {
return RequestMethod.POST;
}
@Override
public String getPath() {
return "/sync/user";
}
@Override
public boolean isPublic() {
return true;
}
@Override
void sync(HttpServletResponse res, JSONObject body) throws Exception {
SyncUserEntity entity = new SyncUserEntity(body);
SyncService.saveUser(entity);
WebUtils.printAsJSON(res, new JSONObject("{\"code\":0,\"msg\":\"成功\"}"));
}
}