Commit f531085f by 吴迪

注释登录相关代码

parent ce4db02b
......@@ -5,7 +5,6 @@ import io.office.common.utils.R;
import io.office.modules.app.annotation.Login;
import io.office.modules.manage.entity.LogLoginEntity;
import io.office.modules.manage.service.LogLoginService;
import io.office.modules.manage.utils.PasswordValidator;
import io.office.modules.manage.vo.request.DomesticCodeVo;
import io.office.modules.sys.service.SysCaptchaService;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -35,34 +34,34 @@ public class LogLoginController {
private SysCaptchaService sysCaptchaService;
/**
* 用户登录
*/
@RequestMapping("/authApi/login")
@Login
// @RequiresPermissions("manage:member:list")
public R login(@RequestBody Map<String, Object> params, HttpServletRequest request, HttpServletResponse response){
DomesticCodeVo domesticCodeVo = new DomesticCodeVo(params.get("uuid").toString(),params.get("captcha").toString());
boolean captcha = sysCaptchaService.validate(domesticCodeVo.getUuid(), domesticCodeVo.getCaptcha());
if(!captcha){
return R.error("验证码不正确");
}
return R.ok().put("data",logLoginService.loginNew2024(params,request,response));
}
@RequestMapping("/authApi/checkPassWord")
@Login
// @RequiresPermissions("manage:member:list")
public R checkPassWord(@RequestBody Map<String, Object> params, HttpServletRequest request, HttpServletResponse response){
String passWord = params.get("passWord").toString();
if(!PasswordValidator.isValidPassword(passWord)) {
return R.error("密码错误");
} else{
return R.ok();
}
}
///**
// * 用户登录
// */
//@RequestMapping("/authApi/login")
//@Login
//// @RequiresPermissions("manage:member:list")
//public R login(@RequestBody Map<String, Object> params, HttpServletRequest request, HttpServletResponse response){
// DomesticCodeVo domesticCodeVo = new DomesticCodeVo(params.get("uuid").toString(),params.get("captcha").toString());
// boolean captcha = sysCaptchaService.validate(domesticCodeVo.getUuid(), domesticCodeVo.getCaptcha());
// if(!captcha){
// return R.error("验证码不正确");
// }
// return R.ok().put("data",logLoginService.loginNew2024(params,request,response));
//}
//
//@RequestMapping("/authApi/checkPassWord")
//@Login
//// @RequiresPermissions("manage:member:list")
//public R checkPassWord(@RequestBody Map<String, Object> params, HttpServletRequest request, HttpServletResponse response){
//
// String passWord = params.get("passWord").toString();
// if(!PasswordValidator.isValidPassword(passWord)) {
// return R.error("密码错误");
// } else{
// return R.ok();
// }
//
//}
......
package io.office.modules.manage.controller;
import java.util.Arrays;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import io.office.modules.app.annotation.Login;
import io.office.common.utils.PageUtils;
import io.office.common.utils.R;
import io.office.modules.manage.entity.MemberEntity;
import io.office.modules.manage.service.MemberService;
import io.office.modules.sys.controller.AbstractController;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import io.office.modules.manage.entity.MemberEntity;
import io.office.modules.manage.service.MemberService;
import io.office.common.utils.PageUtils;
import io.office.common.utils.R;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Arrays;
import java.util.Map;
/**
* ${comments}
*
* @author wudi
* @email
* @email
* @date 2021-12-08 13:54:50
*/
@RestController
......@@ -38,44 +31,44 @@ public class MemberController extends AbstractController {
/**
* 用户注册
*/
@Login
@RequestMapping("/api/userRegistered")
// @RequiresPermissions("manage:member:list")
public R userRegistered(@RequestBody Map<String, Object> params, HttpServletRequest request, HttpServletResponse response){
memberService.userRegistered(params,request,response);
return R.ok();
}
//@Login
//@RequestMapping("/api/userRegistered")
//// @RequiresPermissions("manage:member:list")
//public R userRegistered(@RequestBody Map<String, Object> params, HttpServletRequest request, HttpServletResponse response){
// memberService.userRegistered(params,request,response);
// return R.ok();
//}
/**
* 用户信息管理-修改登录密码
*/
@RequestMapping("/authApi/updatePass")
// @RequiresPermissions("manage:member:list")
public R updatePass(@RequestBody Map<String, Object> params){
memberService.updatePass(params);
return R.ok();
}
//@RequestMapping("/authApi/updatePass")
//// @RequiresPermissions("manage:member:list")
//public R updatePass(@RequestBody Map<String, Object> params){
// memberService.updatePass(params);
// return R.ok();
//}
/**
* 用户信息管理-修改手机号码
*/
@RequestMapping("/authApi/updatephone")
// @RequiresPermissions("manage:member:list")
public R updatephone(@RequestBody Map<String, Object> params, HttpServletRequest request, HttpServletResponse response){
memberService.updatephone(params,request,response);
return R.ok();
}
//@RequestMapping("/authApi/updatephone")
//// @RequiresPermissions("manage:member:list")
//public R updatephone(@RequestBody Map<String, Object> params, HttpServletRequest request, HttpServletResponse response){
// memberService.updatephone(params,request,response);
// return R.ok();
//}
/**
* 获取验证码
*/
@RequestMapping("/api/getVerificationCode")
// @RequiresPermissions("manage:timescoderegi:list")
@Login
public R getVerificationCode(@RequestBody Map<String, Object> params, HttpServletRequest request, HttpServletResponse response){
String msg = memberService.getVerificationCode(params,request,response);
return R.ok();
}
//@RequestMapping("/api/getVerificationCode")
//// @RequiresPermissions("manage:timescoderegi:list")
//@Login
//public R getVerificationCode(@RequestBody Map<String, Object> params, HttpServletRequest request, HttpServletResponse response){
// String msg = memberService.getVerificationCode(params,request,response);
// return R.ok();
//}
/**
* 列表
......@@ -89,20 +82,20 @@ public class MemberController extends AbstractController {
}
/**
* 信息
*/
@RequestMapping("/authApi/info")
// @RequiresPermissions("manage:member:info")
public R info(){
Long memberUserId = getMemberUserId();
/*
QueryWrapper<MemberEntity> queryWrapper = new QueryWrapper<MemberEntity>();
queryWrapper.eq("phone",memberUserId);*/
MemberEntity member = memberService.getById(memberUserId);
return R.ok().put("data", member);
}
// /**
// * 信息
// */
// @RequestMapping("/authApi/info")
// // @RequiresPermissions("manage:member:info")
// public R info(){
// Long memberUserId = getMemberUserId();
///*
// QueryWrapper<MemberEntity> queryWrapper = new QueryWrapper<MemberEntity>();
// queryWrapper.eq("phone",memberUserId);*/
// MemberEntity member = memberService.getById(memberUserId);
//
// return R.ok().put("data", member);
// }
/**
* 保存
......@@ -115,27 +108,27 @@ public class MemberController extends AbstractController {
return R.ok();
}
/**
* 修改
*/
@RequestMapping("/authApi/update")
// @RequiresPermissions("manage:member:update")
public R update(@RequestBody MemberEntity member){
MemberEntity memberUser = getMemberUser();
MemberEntity memberUpdate = new MemberEntity();
//System.out.println(memberUser);
UpdateWrapper<MemberEntity> memberEntityUpdateWrapper = new UpdateWrapper<>();
if(StringUtils.isNoneBlank(member.getEmail())) {
memberEntityUpdateWrapper.eq("id",member.getId());
memberUpdate.setEmail(member.getEmail());
}
memberService.update(memberUpdate,memberEntityUpdateWrapper);
return R.ok();
}
// /**
// * 修改
// */
// @RequestMapping("/authApi/update")
//// @RequiresPermissions("manage:member:update")
// public R update(@RequestBody MemberEntity member){
//
// MemberEntity memberUser = getMemberUser();
//
// MemberEntity memberUpdate = new MemberEntity();
//
// //System.out.println(memberUser);
// UpdateWrapper<MemberEntity> memberEntityUpdateWrapper = new UpdateWrapper<>();
// if(StringUtils.isNoneBlank(member.getEmail())) {
// memberEntityUpdateWrapper.eq("id",member.getId());
// memberUpdate.setEmail(member.getEmail());
// }
// memberService.update(memberUpdate,memberEntityUpdateWrapper);
//
// return R.ok();
// }
/**
* 删除
......
package io.office.modules.manage.controller;
import java.util.Arrays;
import java.util.Map;
import io.office.modules.app.annotation.Login;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import io.office.modules.manage.entity.TimescodeFindpsEntity;
import io.office.modules.manage.service.TimescodeFindpsService;
import io.office.common.utils.PageUtils;
import io.office.common.utils.R;
import io.office.modules.manage.entity.TimescodeFindpsEntity;
import io.office.modules.manage.service.TimescodeFindpsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.Arrays;
import java.util.Map;
......@@ -23,7 +16,7 @@ import io.office.common.utils.R;
* 忘记密码
*
* @author wudi
* @email
* @email
* @date 2021-12-09 17:41:41
*/
@RestController
......@@ -35,27 +28,27 @@ public class TimescodeFindpsController {
/**
*忘记密码(手机号找回)
*/
@RequestMapping("api/forgotPasswordPhone")
@Login
// @RequiresPermissions("manage:timescodefindps:list")
public R forgotPasswordPhone(@RequestBody Map<String, Object> params){
timescodeFindpsService.forgotPasswordPhone(params);
return R.ok();
}
//@RequestMapping("api/forgotPasswordPhone")
//@Login
//// @RequiresPermissions("manage:timescodefindps:list")
//public R forgotPasswordPhone(@RequestBody Map<String, Object> params){
// timescodeFindpsService.forgotPasswordPhone(params);
//
// return R.ok();
//}
/**
*忘记密码(邮箱找回)
*/
@RequestMapping("api/forgotPasswordEmiail")
@Login
// @RequiresPermissions("manage:timescodefindps:list")
public R forgotPasswordEmiail(@RequestBody Map<String, Object> params){
timescodeFindpsService.forgotPasswordEmiail(params);
return R.ok();
}
//@RequestMapping("api/forgotPasswordEmiail")
//@Login
//// @RequiresPermissions("manage:timescodefindps:list")
//public R forgotPasswordEmiail(@RequestBody Map<String, Object> params){
// timescodeFindpsService.forgotPasswordEmiail(params);
//
// return R.ok();
//}
/**
* 列表
......
package io.office.modules.manage.controller;
import java.util.Arrays;
import java.util.Map;
import io.office.modules.app.annotation.Login;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import io.office.modules.manage.entity.TimescodeRegiEntity;
import io.office.modules.manage.service.TimescodeRegiService;
import io.office.common.utils.PageUtils;
import io.office.common.utils.R;
import io.office.modules.manage.entity.TimescodeRegiEntity;
import io.office.modules.manage.service.TimescodeRegiService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Arrays;
import java.util.Map;
/**
* 验证码获取
*
* @author tgl
* @email
* @email
* @date 2021-12-07 16:52:34
*/
@RestController
......@@ -38,13 +29,13 @@ public class TimescodeRegiController {
/**
* 获取验证码
*/
@Login
@RequestMapping("/api/getVerificationCode")
// @RequiresPermissions("manage:timescoderegi:list")
public R getVerificationCode(@RequestBody Map<String, Object> params, HttpServletRequest request, HttpServletResponse response){
String msg = timescodeRegiService.getVerificationCode(params,request,response);
return R.ok();
}
//@Login
//@RequestMapping("/api/getVerificationCode")
//// @RequiresPermissions("manage:timescoderegi:list")
//public R getVerificationCode(@RequestBody Map<String, Object> params, HttpServletRequest request, HttpServletResponse response){
// String msg = timescodeRegiService.getVerificationCode(params,request,response);
// return R.ok();
//}
/**
* 列表
......
......@@ -22,7 +22,7 @@ import io.office.common.utils.R;
* ${comments}
*
* @author wudi
* @email
* @email
* @date 2021-12-11 15:15:19
*/
@RestController
......@@ -34,26 +34,26 @@ public class TycpdmFirmChangeController {
/**
* 列表
*/
@RequestMapping("/authApi/findlist")
// @RequiresPermissions("manage:tycpdmfirmchange:list")
public R list(@RequestBody Map<String, Object> params){
Page<TycpdmFirmChangeEntity> findlist = tycpdmFirmChangeService.findlist(params,
new Page(Integer.valueOf(params.get("page").toString()),
Integer.valueOf(params.get("limit").toString())));
PageUtils pageUtils = new PageUtils(findlist);
return R.ok().put("data", pageUtils);
}
// @RequestMapping("/authApi/findlist")
//// @RequiresPermissions("manage:tycpdmfirmchange:list")
// public R list(@RequestBody Map<String, Object> params){
// Page<TycpdmFirmChangeEntity> findlist = tycpdmFirmChangeService.findlist(params,
// new Page(Integer.valueOf(params.get("page").toString()),
// Integer.valueOf(params.get("limit").toString())));
// PageUtils pageUtils = new PageUtils(findlist);
// return R.ok().put("data", pageUtils);
// }
/**
* 根据用户名获取企业认证信息
*/
@RequestMapping("/authApi/findUserName")
// @RequiresPermissions("manage:tycpdmfirm:save")
public R findUserName(@RequestParam("userName") String userName){
TycpdmFirmChangeEntity userName1 = tycpdmFirmChangeService.findUserName(userName);
return R.ok().put("data",userName1);
}
//@RequestMapping("/authApi/findUserName")
//// @RequiresPermissions("manage:tycpdmfirm:save")
//public R findUserName(@RequestParam("userName") String userName){
// TycpdmFirmChangeEntity userName1 = tycpdmFirmChangeService.findUserName(userName);
//
// return R.ok().put("data",userName1);
//}
/**
* 信息
......
......@@ -77,14 +77,14 @@ public class TycpdmFirmController extends AbstractController {
/**
* 列表
*/
@RequestMapping("/authApi/findlist")
public R findlist(@RequestBody Map<String, Object> params) {
Page<TycpdmFirmEntity> findlist = tycpdmFirmService.findlist(params,
new Page(Integer.valueOf(params.get("page").toString()),
Integer.valueOf(params.get("limit").toString())));
PageUtils pageUtils = new PageUtils(findlist);
return R.ok().put("data", pageUtils);
}
//@RequestMapping("/authApi/findlist")
//public R findlist(@RequestBody Map<String, Object> params) {
// Page<TycpdmFirmEntity> findlist = tycpdmFirmService.findlist(params,
// new Page(Integer.valueOf(params.get("page").toString()),
// Integer.valueOf(params.get("limit").toString())));
// PageUtils pageUtils = new PageUtils(findlist);
// return R.ok().put("data", pageUtils);
//}
/**
......@@ -105,15 +105,15 @@ public class TycpdmFirmController extends AbstractController {
* @param
* @return
*/
@RequestMapping("/authApi/save")
// @RequiresPermissions("manage:tycpdmfirm:save")
public R save(@RequestBody Map body) throws InvocationTargetException, IllegalAccessException {
MemberEntity memberUser = getMemberUser();
Integer id = tycpdmFirmService.saveTycpdmFirmInfo(body, memberUser.getUsername());
return R.ok().put("data", id);
}
//@RequestMapping("/authApi/save")
//// @RequiresPermissions("manage:tycpdmfirm:save")
//public R save(@RequestBody Map body) throws InvocationTargetException, IllegalAccessException {
//
// MemberEntity memberUser = getMemberUser();
// Integer id = tycpdmFirmService.saveTycpdmFirmInfo(body, memberUser.getUsername());
//
// return R.ok().put("data", id);
//}
public static void main(String[] args) throws InvocationTargetException, IllegalAccessException {
......@@ -132,36 +132,36 @@ public class TycpdmFirmController extends AbstractController {
/**
* 根据用户名获取企业认证信息
*/
@RequestMapping("/authApi/findUserName")
// @RequiresPermissions("manage:tycpdmfirm:save")
public R findUserName(@RequestParam("userName") String userName) {
//查询 业务类型 1.首次 2.变更
int logoutFlag = tycpdmFirmService.findLogoutFlag(userName);
JSONObject tycpdmFirmEntity = tycpdmFirmService.findUserName(logoutFlag, userName);
R ok = R.ok();
tycpdmFirmEntity.put("status", logoutFlag);
ok.put("data", tycpdmFirmEntity);
return ok;
}
//@RequestMapping("/authApi/findUserName")
//// @RequiresPermissions("manage:tycpdmfirm:save")
//public R findUserName(@RequestParam("userName") String userName) {
// //查询 业务类型 1.首次 2.变更
// int logoutFlag = tycpdmFirmService.findLogoutFlag(userName);
// JSONObject tycpdmFirmEntity = tycpdmFirmService.findUserName(logoutFlag, userName);
// R ok = R.ok();
// tycpdmFirmEntity.put("status", logoutFlag);
// ok.put("data", tycpdmFirmEntity);
// return ok;
//}
/**
* 修改
*/
@RequestMapping("/authApi/update")
// @RequiresPermissions("manage:tycpdmfirm:update")
public R update(@RequestBody Map body) {
TycpdmFirmEntity tycpdmFirm = new TycpdmFirmEntity();
try {
BeanUtils.populate(tycpdmFirm, body);
Integer fId = Integer.valueOf(String.valueOf(body.get("fid")));
tycpdmFirm.setFId(fId);
tycpdmFirmService.updateById(tycpdmFirm);
return R.ok();
} catch (Exception e) {
e.printStackTrace();
return R.error("修改失败");
}
}
//@RequestMapping("/authApi/update")
//// @RequiresPermissions("manage:tycpdmfirm:update")
//public R update(@RequestBody Map body) {
// TycpdmFirmEntity tycpdmFirm = new TycpdmFirmEntity();
// try {
// BeanUtils.populate(tycpdmFirm, body);
// Integer fId = Integer.valueOf(String.valueOf(body.get("fid")));
// tycpdmFirm.setFId(fId);
// tycpdmFirmService.updateById(tycpdmFirm);
// return R.ok();
// } catch (Exception e) {
// e.printStackTrace();
// return R.error("修改失败");
// }
//}
/**
* 删除
......@@ -178,76 +178,76 @@ public class TycpdmFirmController extends AbstractController {
/**
* 查询企业实名认证各个状态的数量(中心管理员查询所有,分中心查询)
*/
@RequestMapping("/authApi/findTycpdmFirmLogoutFlagCount")
// @RequiresPermissions("manage:tycpdmfirm:delete")
public R findTycpdmFirmLogoutFlagCount() {
/*Integer id=getMemberUserId().intValue();
if(id==null){
return R.error("用户信息有误");
}
MemberEntity userMember = getMemberUser();*/
MemberEntity memberUser = getMemberUser();
Map<String, Integer> map = tycpdmFirmService.findTycpdmFirmLogoutFlagCount(memberUser);
return R.ok().put("data", map);
}
//@RequestMapping("/authApi/findTycpdmFirmLogoutFlagCount")
//// @RequiresPermissions("manage:tycpdmfirm:delete")
//public R findTycpdmFirmLogoutFlagCount() {
// /*Integer id=getMemberUserId().intValue();
// if(id==null){
// return R.error("用户信息有误");
// }
// MemberEntity userMember = getMemberUser();*/
// MemberEntity memberUser = getMemberUser();
//
// Map<String, Integer> map = tycpdmFirmService.findTycpdmFirmLogoutFlagCount(memberUser);
// return R.ok().put("data", map);
//}
/**
* 上传文件(第二步)
*/
@RequestMapping("/authApi/uploadFile")
// @RequiresPermissions("manage:tycpdmfirm:delete")
public R uploadFile(@RequestParam("file") MultipartFile file, @RequestParam("id") Integer id, @RequestParam("status") Integer status) {
try {
if (status == 1) {
tycpdmFirmService.uploadFile(file, id);
return R.ok();
} else if (status == 2) {
tycpdmFirmChangeService.uploadFile(file, id);
return R.ok();
} else {
return R.error("请前端人员传递业务类型 变更过新增");
}
} catch (Exception e) {
return R.error(e.getLocalizedMessage());
}
}
//@RequestMapping("/authApi/uploadFile")
//// @RequiresPermissions("manage:tycpdmfirm:delete")
//public R uploadFile(@RequestParam("file") MultipartFile file, @RequestParam("id") Integer id, @RequestParam("status") Integer status) {
// try {
// if (status == 1) {
// tycpdmFirmService.uploadFile(file, id);
// return R.ok();
// } else if (status == 2) {
// tycpdmFirmChangeService.uploadFile(file, id);
// return R.ok();
// } else {
// return R.error("请前端人员传递业务类型 变更过新增");
// }
//
// } catch (Exception e) {
// return R.error(e.getLocalizedMessage());
// }
//}
/**
* 上传文件(第一步)
*/
@RequestMapping("/authApi/uploadFileOne")
// @RequiresPermissions("manage:tycpdmfirm:delete")
@Login
public R uploadFileOne(@RequestParam("file") MultipartFile file) {
try {
String filePath = tycpdmFirmService.uploadFileOne(file);
return R.ok().put("data", filePath);
} catch (Exception e) {
return R.error(e.getLocalizedMessage());
}
}
//@RequestMapping("/authApi/uploadFileOne")
//// @RequiresPermissions("manage:tycpdmfirm:delete")
//@Login
//public R uploadFileOne(@RequestParam("file") MultipartFile file) {
// try {
// String filePath = tycpdmFirmService.uploadFileOne(file);
// return R.ok().put("data", filePath);
// } catch (Exception e) {
// return R.error(e.getLocalizedMessage());
// }
//}
/**
* 审批
*/
@RequestMapping("/authApi/audit")
// @RequiresPermissions("manage:tycpdmfirm:delete")
public R audit(@RequestBody Map map) {
MemberEntity memberUser = getMemberUser();
Long memberUserId = getMemberUserId();
try {
tycpdmFirmService.audit(map, memberUserId, memberUser.getUsername());
} catch (InvocationTargetException e) {
e.printStackTrace();
} catch (IllegalAccessException e) {
e.printStackTrace();
}
return R.ok();
}
//@RequestMapping("/authApi/audit")
//// @RequiresPermissions("manage:tycpdmfirm:delete")
//public R audit(@RequestBody Map map) {
// MemberEntity memberUser = getMemberUser();
// Long memberUserId = getMemberUserId();
// try {
// tycpdmFirmService.audit(map, memberUserId, memberUser.getUsername());
// } catch (InvocationTargetException e) {
// e.printStackTrace();
// } catch (IllegalAccessException e) {
// e.printStackTrace();
// }
//
// return R.ok();
//}
/**
......@@ -264,87 +264,87 @@ public class TycpdmFirmController extends AbstractController {
/**
* 返回文件 url
*/
@RequestMapping("/authApi/returnFileUrl")
public R returnFileUrl(@RequestBody Map name) {
String url = tycpdmFirmService.returnFileUrl(name);
return R.ok().put("data", url);
}
//@RequestMapping("/authApi/returnFileUrl")
//public R returnFileUrl(@RequestBody Map name) {
// String url = tycpdmFirmService.returnFileUrl(name);
// return R.ok().put("data", url);
//}
/**
* 切换分中心管理员
*/
@RequestMapping("/authApi/updateSystem")
public R updateSystem(@RequestBody Map<String, Object> params) {
tycpdmFirmService.updateSystem(params);
return R.ok();
}
//@RequestMapping("/authApi/updateSystem")
//public R updateSystem(@RequestBody Map<String, Object> params) {
// tycpdmFirmService.updateSystem(params);
// return R.ok();
//}
/**
* 跳转GDS页面
*/
@RequestMapping("/authApi/redirectGDS")
public R redirectGDS(@RequestBody Map<String, Object> params, HttpServletResponse response) {
//由于member表中没有手机用户的信息 通过memberDao获取
String url = tycpdmFirmService.redirectGDSURLNew();
return R.ok().put("data", url);
}
//@RequestMapping("/authApi/redirectGDS")
//public R redirectGDS(@RequestBody Map<String, Object> params, HttpServletResponse response) {
// //由于member表中没有手机用户的信息 通过memberDao获取
// String url = tycpdmFirmService.redirectGDSURLNew();
// return R.ok().put("data", url);
//
//}
/**
* 跳转GLN页面
*/
@RequestMapping("/authApi/redirectGLN")
public R redirectGLN(HttpServletResponse response) {
MemberEntity memberUser = getMemberUser();
String url = tycpdmFirmService.redirectGDSGLN(memberUser);
return R.ok().put("data", url);
}
//@RequestMapping("/authApi/redirectGLN")
//public R redirectGLN(HttpServletResponse response) {
// MemberEntity memberUser = getMemberUser();
// String url = tycpdmFirmService.redirectGDSGLN(memberUser);
//
// return R.ok().put("data", url);
//
//}
/**
* 跳转业务大厅页面
*/
@RequestMapping("/authApi/redirectBusinessHall")
public R redirectBusinessHall(String id, String userType, HttpServletResponse response) {
//由于member表中没有手机用户的信息 通过memberDao获取
Map<String, Object> params = new HashMap<>();
params.put("id", id);
params.put("userType", userType);
/*MemberEntity memberEntity = memberDao.selectById(Long.valueOf(id.toString()));
if (memberEntity==null){
memberEntity=new MemberEntity();
}*/
MemberEntity memberEntity = getMemberUser();
log.info(JSONUtil.toJsonStr(memberEntity));
String url = tycpdmFirmService.redirectBusinessHall(params, memberEntity);
return R.ok().put("data", url);
}
//@RequestMapping("/authApi/redirectBusinessHall")
//public R redirectBusinessHall(String id, String userType, HttpServletResponse response) {
//
// //由于member表中没有手机用户的信息 通过memberDao获取
// Map<String, Object> params = new HashMap<>();
// params.put("id", id);
// params.put("userType", userType);
// /*MemberEntity memberEntity = memberDao.selectById(Long.valueOf(id.toString()));
// if (memberEntity==null){
// memberEntity=new MemberEntity();
// }*/
//
// MemberEntity memberEntity = getMemberUser();
// log.info(JSONUtil.toJsonStr(memberEntity));
//
// String url = tycpdmFirmService.redirectBusinessHall(params, memberEntity);
// return R.ok().put("data", url);
//
//}
/**
* 修改企业信息回显(不需要审批)
*/
@RequestMapping("/authApi/findByUserName")
public R findByUserName(@RequestBody Map name) {
String userNameR = String.valueOf(name.get("name"));
TycpdmFirmEntity userName = tycpdmFirmDao.findUserName(userNameR);
return R.ok().put("data", userName);
}
//@RequestMapping("/authApi/findByUserName")
//public R findByUserName(@RequestBody Map name) {
// String userNameR = String.valueOf(name.get("name"));
// TycpdmFirmEntity userName = tycpdmFirmDao.findUserName(userNameR);
// return R.ok().put("data", userName);
//}
/**
* 企业信息回显(系统成员)
*/
@RequestMapping("/api/findFirmInfoXT")
@Login
public R findFirmInfoXT(@RequestBody Map name) {
String carno = String.valueOf(name.get("carno"));
FirmEntity data = tycpdmFirmService.findFirmInfoXT(carno);
return R.ok().put("data", data);
}
//@RequestMapping("/api/findFirmInfoXT")
//@Login
//public R findFirmInfoXT(@RequestBody Map name) {
// String carno = String.valueOf(name.get("carno"));
// FirmEntity data = tycpdmFirmService.findFirmInfoXT(carno);
// return R.ok().put("data", data);
//}
}
......@@ -33,65 +33,65 @@ public class UserFunctionBindingController extends AbstractController {
/**
* 查询
*/
@RequestMapping("/authApi/find")
public R find(){
Integer id=getMemberUserId().intValue();
if(id==null){
return R.error("用户信息有误");
}
Object[] functionids = userFunctionBindingService.queryList(id);
return R.ok().put("functionids", functionids);
}
//@RequestMapping("/authApi/find")
//public R find(){
// Integer id=getMemberUserId().intValue();
// if(id==null){
// return R.error("用户信息有误");
// }
// Object[] functionids = userFunctionBindingService.queryList(id);
// return R.ok().put("functionids", functionids);
//}
/**
* 修改
*/
@RequestMapping("/authApi/update")
// @RequiresPermissions("manage:userfunctionbinding:update")
public R update(@RequestBody Integer[] functionids){
Integer id=getMemberUserId().intValue();
if(id==null){
return R.error("用户信息有误");
}
userFunctionBindingService.Modify(functionids,id);
return R.ok();
}
/**
* 保存
*/
@RequestMapping("/authApi/save")
// @RequiresPermissions("manage:userfunctionbinding:save")
public R save(@RequestBody Integer[] functionids){
//遍历插入数据
for (int functionid : functionids) {
UserFunctionBindingEntity ufb=new UserFunctionBindingEntity();
ufb.setUserId(getMemberUserId().intValue());
ufb.setFuncId(functionid);
userFunctionBindingService.save(ufb);
}
return R.ok();
}
//@RequestMapping("/authApi/update")
//// @RequiresPermissions("manage:userfunctionbinding:update")
//public R update(@RequestBody Integer[] functionids){
// Integer id=getMemberUserId().intValue();
// if(id==null){
// return R.error("用户信息有误");
// }
// userFunctionBindingService.Modify(functionids,id);
// return R.ok();
//}
///**
// * 保存
// */
//@RequestMapping("/authApi/save")
//// @RequiresPermissions("manage:userfunctionbinding:save")
//public R save(@RequestBody Integer[] functionids){
// //遍历插入数据
// for (int functionid : functionids) {
// UserFunctionBindingEntity ufb=new UserFunctionBindingEntity();
// ufb.setUserId(getMemberUserId().intValue());
// ufb.setFuncId(functionid);
// userFunctionBindingService.save(ufb);
// }
// return R.ok();
//}
/**
* 列表
*/
@Login
@RequestMapping("/api/list")
// @RequiresPermissions("manage:userfunctionbinding:list")
public R list(@RequestParam Map<String, Object> params){
PageUtils page = userFunctionBindingService.queryPage(params);
return R.ok().put("page", page);
}
//@Login
//@RequestMapping("/api/list")
//// @RequiresPermissions("manage:userfunctionbinding:list")
//public R list(@RequestParam Map<String, Object> params){
// PageUtils page = userFunctionBindingService.queryPage(params);
//
// return R.ok().put("page", page);
//}
/**
* 信息
*/
@Login
@RequestMapping("/api/info/{id}")
// @RequiresPermissions("manage:userfunctionbinding:info")
public R info(@PathVariable("id") Integer id){
UserFunctionBindingEntity userFunctionBinding = userFunctionBindingService.getById(id);
return R.ok().put("userFunctionBinding", userFunctionBinding);
}
//@Login
//@RequestMapping("/api/info/{id}")
//// @RequiresPermissions("manage:userfunctionbinding:info")
//public R info(@PathVariable("id") Integer id){
// UserFunctionBindingEntity userFunctionBinding = userFunctionBindingService.getById(id);
//
// return R.ok().put("userFunctionBinding", userFunctionBinding);
//}
/**
* 删除
*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment