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);
//}
/**
* 信息
......
......@@ -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