Commit f531085f by 吴迪

注释登录相关代码

parent ce4db02b
...@@ -5,7 +5,6 @@ import io.office.common.utils.R; ...@@ -5,7 +5,6 @@ import io.office.common.utils.R;
import io.office.modules.app.annotation.Login; import io.office.modules.app.annotation.Login;
import io.office.modules.manage.entity.LogLoginEntity; import io.office.modules.manage.entity.LogLoginEntity;
import io.office.modules.manage.service.LogLoginService; 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.manage.vo.request.DomesticCodeVo;
import io.office.modules.sys.service.SysCaptchaService; import io.office.modules.sys.service.SysCaptchaService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -35,34 +34,34 @@ public class LogLoginController { ...@@ -35,34 +34,34 @@ public class LogLoginController {
private SysCaptchaService sysCaptchaService; private SysCaptchaService sysCaptchaService;
/** ///**
* 用户登录 // * 用户登录
*/ // */
@RequestMapping("/authApi/login") //@RequestMapping("/authApi/login")
@Login //@Login
// @RequiresPermissions("manage:member:list") //// @RequiresPermissions("manage:member:list")
public R login(@RequestBody Map<String, Object> params, HttpServletRequest request, HttpServletResponse response){ //public R login(@RequestBody Map<String, Object> params, HttpServletRequest request, HttpServletResponse response){
DomesticCodeVo domesticCodeVo = new DomesticCodeVo(params.get("uuid").toString(),params.get("captcha").toString()); // DomesticCodeVo domesticCodeVo = new DomesticCodeVo(params.get("uuid").toString(),params.get("captcha").toString());
boolean captcha = sysCaptchaService.validate(domesticCodeVo.getUuid(), domesticCodeVo.getCaptcha()); // boolean captcha = sysCaptchaService.validate(domesticCodeVo.getUuid(), domesticCodeVo.getCaptcha());
if(!captcha){ // if(!captcha){
return R.error("验证码不正确"); // return R.error("验证码不正确");
} // }
return R.ok().put("data",logLoginService.loginNew2024(params,request,response)); // return R.ok().put("data",logLoginService.loginNew2024(params,request,response));
} //}
//
@RequestMapping("/authApi/checkPassWord") //@RequestMapping("/authApi/checkPassWord")
@Login //@Login
// @RequiresPermissions("manage:member:list") //// @RequiresPermissions("manage:member:list")
public R checkPassWord(@RequestBody Map<String, Object> params, HttpServletRequest request, HttpServletResponse response){ //public R checkPassWord(@RequestBody Map<String, Object> params, HttpServletRequest request, HttpServletResponse response){
//
String passWord = params.get("passWord").toString(); // String passWord = params.get("passWord").toString();
if(!PasswordValidator.isValidPassword(passWord)) { // if(!PasswordValidator.isValidPassword(passWord)) {
return R.error("密码错误"); // return R.error("密码错误");
} else{ // } else{
return R.ok(); // return R.ok();
} // }
//
} //}
......
package io.office.modules.manage.controller; package io.office.modules.manage.controller;
import java.util.Arrays; import io.office.common.utils.PageUtils;
import java.util.Map; import io.office.common.utils.R;
import io.office.modules.manage.entity.MemberEntity;
import com.baomidou.mybatisplus.core.conditions.Wrapper; import io.office.modules.manage.service.MemberService;
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.modules.sys.controller.AbstractController; import io.office.modules.sys.controller.AbstractController;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import io.office.modules.manage.entity.MemberEntity;
import io.office.modules.manage.service.MemberService; import java.util.Arrays;
import io.office.common.utils.PageUtils; import java.util.Map;
import io.office.common.utils.R;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/** /**
...@@ -38,44 +31,44 @@ public class MemberController extends AbstractController { ...@@ -38,44 +31,44 @@ public class MemberController extends AbstractController {
/** /**
* 用户注册 * 用户注册
*/ */
@Login //@Login
@RequestMapping("/api/userRegistered") //@RequestMapping("/api/userRegistered")
// @RequiresPermissions("manage:member:list") //// @RequiresPermissions("manage:member:list")
public R userRegistered(@RequestBody Map<String, Object> params, HttpServletRequest request, HttpServletResponse response){ //public R userRegistered(@RequestBody Map<String, Object> params, HttpServletRequest request, HttpServletResponse response){
memberService.userRegistered(params,request,response); // memberService.userRegistered(params,request,response);
return R.ok(); // return R.ok();
} //}
/** /**
* 用户信息管理-修改登录密码 * 用户信息管理-修改登录密码
*/ */
@RequestMapping("/authApi/updatePass") //@RequestMapping("/authApi/updatePass")
// @RequiresPermissions("manage:member:list") //// @RequiresPermissions("manage:member:list")
public R updatePass(@RequestBody Map<String, Object> params){ //public R updatePass(@RequestBody Map<String, Object> params){
memberService.updatePass(params); // memberService.updatePass(params);
return R.ok(); // return R.ok();
} //}
/** /**
* 用户信息管理-修改手机号码 * 用户信息管理-修改手机号码
*/ */
@RequestMapping("/authApi/updatephone") //@RequestMapping("/authApi/updatephone")
// @RequiresPermissions("manage:member:list") //// @RequiresPermissions("manage:member:list")
public R updatephone(@RequestBody Map<String, Object> params, HttpServletRequest request, HttpServletResponse response){ //public R updatephone(@RequestBody Map<String, Object> params, HttpServletRequest request, HttpServletResponse response){
memberService.updatephone(params,request,response); // memberService.updatephone(params,request,response);
return R.ok(); // return R.ok();
} //}
/** /**
* 获取验证码 * 获取验证码
*/ */
@RequestMapping("/api/getVerificationCode") //@RequestMapping("/api/getVerificationCode")
// @RequiresPermissions("manage:timescoderegi:list") //// @RequiresPermissions("manage:timescoderegi:list")
@Login //@Login
public R getVerificationCode(@RequestBody Map<String, Object> params, HttpServletRequest request, HttpServletResponse response){ //public R getVerificationCode(@RequestBody Map<String, Object> params, HttpServletRequest request, HttpServletResponse response){
String msg = memberService.getVerificationCode(params,request,response); // String msg = memberService.getVerificationCode(params,request,response);
return R.ok(); // return R.ok();
} //}
/** /**
* 列表 * 列表
...@@ -89,20 +82,20 @@ public class MemberController extends AbstractController { ...@@ -89,20 +82,20 @@ public class MemberController extends AbstractController {
} }
/** // /**
* 信息 // * 信息
*/ // */
@RequestMapping("/authApi/info") // @RequestMapping("/authApi/info")
// @RequiresPermissions("manage:member:info") // // @RequiresPermissions("manage:member:info")
public R info(){ // public R info(){
Long memberUserId = getMemberUserId(); // Long memberUserId = getMemberUserId();
/* ///*
QueryWrapper<MemberEntity> queryWrapper = new QueryWrapper<MemberEntity>(); // QueryWrapper<MemberEntity> queryWrapper = new QueryWrapper<MemberEntity>();
queryWrapper.eq("phone",memberUserId);*/ // queryWrapper.eq("phone",memberUserId);*/
MemberEntity member = memberService.getById(memberUserId); // MemberEntity member = memberService.getById(memberUserId);
//
return R.ok().put("data", member); // return R.ok().put("data", member);
} // }
/** /**
* 保存 * 保存
...@@ -115,27 +108,27 @@ public class MemberController extends AbstractController { ...@@ -115,27 +108,27 @@ public class MemberController extends AbstractController {
return R.ok(); return R.ok();
} }
/** // /**
* 修改 // * 修改
*/ // */
@RequestMapping("/authApi/update") // @RequestMapping("/authApi/update")
// @RequiresPermissions("manage:member:update") //// @RequiresPermissions("manage:member:update")
public R update(@RequestBody MemberEntity member){ // public R update(@RequestBody MemberEntity member){
//
MemberEntity memberUser = getMemberUser(); // MemberEntity memberUser = getMemberUser();
//
MemberEntity memberUpdate = new MemberEntity(); // MemberEntity memberUpdate = new MemberEntity();
//
//System.out.println(memberUser); // //System.out.println(memberUser);
UpdateWrapper<MemberEntity> memberEntityUpdateWrapper = new UpdateWrapper<>(); // UpdateWrapper<MemberEntity> memberEntityUpdateWrapper = new UpdateWrapper<>();
if(StringUtils.isNoneBlank(member.getEmail())) { // if(StringUtils.isNoneBlank(member.getEmail())) {
memberEntityUpdateWrapper.eq("id",member.getId()); // memberEntityUpdateWrapper.eq("id",member.getId());
memberUpdate.setEmail(member.getEmail()); // memberUpdate.setEmail(member.getEmail());
} // }
memberService.update(memberUpdate,memberEntityUpdateWrapper); // memberService.update(memberUpdate,memberEntityUpdateWrapper);
//
return R.ok(); // return R.ok();
} // }
/** /**
* 删除 * 删除
......
package io.office.modules.manage.controller; 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.PageUtils;
import io.office.common.utils.R; 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;
...@@ -35,27 +28,27 @@ public class TimescodeFindpsController { ...@@ -35,27 +28,27 @@ public class TimescodeFindpsController {
/** /**
*忘记密码(手机号找回) *忘记密码(手机号找回)
*/ */
@RequestMapping("api/forgotPasswordPhone") //@RequestMapping("api/forgotPasswordPhone")
@Login //@Login
// @RequiresPermissions("manage:timescodefindps:list") //// @RequiresPermissions("manage:timescodefindps:list")
public R forgotPasswordPhone(@RequestBody Map<String, Object> params){ //public R forgotPasswordPhone(@RequestBody Map<String, Object> params){
timescodeFindpsService.forgotPasswordPhone(params); // timescodeFindpsService.forgotPasswordPhone(params);
//
return R.ok(); // return R.ok();
} //}
/** /**
*忘记密码(邮箱找回) *忘记密码(邮箱找回)
*/ */
@RequestMapping("api/forgotPasswordEmiail") //@RequestMapping("api/forgotPasswordEmiail")
@Login //@Login
// @RequiresPermissions("manage:timescodefindps:list") //// @RequiresPermissions("manage:timescodefindps:list")
public R forgotPasswordEmiail(@RequestBody Map<String, Object> params){ //public R forgotPasswordEmiail(@RequestBody Map<String, Object> params){
timescodeFindpsService.forgotPasswordEmiail(params); // timescodeFindpsService.forgotPasswordEmiail(params);
//
return R.ok(); // return R.ok();
} //}
/** /**
* 列表 * 列表
......
package io.office.modules.manage.controller; 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.PageUtils;
import io.office.common.utils.R; 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 java.util.Arrays;
import javax.servlet.http.HttpServletResponse; import java.util.Map;
/** /**
...@@ -38,13 +29,13 @@ public class TimescodeRegiController { ...@@ -38,13 +29,13 @@ public class TimescodeRegiController {
/** /**
* 获取验证码 * 获取验证码
*/ */
@Login //@Login
@RequestMapping("/api/getVerificationCode") //@RequestMapping("/api/getVerificationCode")
// @RequiresPermissions("manage:timescoderegi:list") //// @RequiresPermissions("manage:timescoderegi:list")
public R getVerificationCode(@RequestBody Map<String, Object> params, HttpServletRequest request, HttpServletResponse response){ //public R getVerificationCode(@RequestBody Map<String, Object> params, HttpServletRequest request, HttpServletResponse response){
String msg = timescodeRegiService.getVerificationCode(params,request,response); // String msg = timescodeRegiService.getVerificationCode(params,request,response);
return R.ok(); // return R.ok();
} //}
/** /**
* 列表 * 列表
......
...@@ -34,26 +34,26 @@ public class TycpdmFirmChangeController { ...@@ -34,26 +34,26 @@ public class TycpdmFirmChangeController {
/** /**
* 列表 * 列表
*/ */
@RequestMapping("/authApi/findlist") // @RequestMapping("/authApi/findlist")
// @RequiresPermissions("manage:tycpdmfirmchange:list") //// @RequiresPermissions("manage:tycpdmfirmchange:list")
public R list(@RequestBody Map<String, Object> params){ // public R list(@RequestBody Map<String, Object> params){
Page<TycpdmFirmChangeEntity> findlist = tycpdmFirmChangeService.findlist(params, // Page<TycpdmFirmChangeEntity> findlist = tycpdmFirmChangeService.findlist(params,
new Page(Integer.valueOf(params.get("page").toString()), // new Page(Integer.valueOf(params.get("page").toString()),
Integer.valueOf(params.get("limit").toString()))); // Integer.valueOf(params.get("limit").toString())));
PageUtils pageUtils = new PageUtils(findlist); // PageUtils pageUtils = new PageUtils(findlist);
return R.ok().put("data", pageUtils); // return R.ok().put("data", pageUtils);
} // }
/** /**
* 根据用户名获取企业认证信息 * 根据用户名获取企业认证信息
*/ */
@RequestMapping("/authApi/findUserName") //@RequestMapping("/authApi/findUserName")
// @RequiresPermissions("manage:tycpdmfirm:save") //// @RequiresPermissions("manage:tycpdmfirm:save")
public R findUserName(@RequestParam("userName") String userName){ //public R findUserName(@RequestParam("userName") String userName){
TycpdmFirmChangeEntity userName1 = tycpdmFirmChangeService.findUserName(userName); // TycpdmFirmChangeEntity userName1 = tycpdmFirmChangeService.findUserName(userName);
//
return R.ok().put("data",userName1); // return R.ok().put("data",userName1);
} //}
/** /**
* 信息 * 信息
......
...@@ -33,65 +33,65 @@ public class UserFunctionBindingController extends AbstractController { ...@@ -33,65 +33,65 @@ public class UserFunctionBindingController extends AbstractController {
/** /**
* 查询 * 查询
*/ */
@RequestMapping("/authApi/find") //@RequestMapping("/authApi/find")
public R find(){ //public R find(){
Integer id=getMemberUserId().intValue(); // Integer id=getMemberUserId().intValue();
if(id==null){ // if(id==null){
return R.error("用户信息有误"); // return R.error("用户信息有误");
} // }
Object[] functionids = userFunctionBindingService.queryList(id); // Object[] functionids = userFunctionBindingService.queryList(id);
return R.ok().put("functionids", functionids); // return R.ok().put("functionids", functionids);
} //}
/** /**
* 修改 * 修改
*/ */
@RequestMapping("/authApi/update") //@RequestMapping("/authApi/update")
// @RequiresPermissions("manage:userfunctionbinding:update") //// @RequiresPermissions("manage:userfunctionbinding:update")
public R update(@RequestBody Integer[] functionids){ //public R update(@RequestBody Integer[] functionids){
Integer id=getMemberUserId().intValue(); // Integer id=getMemberUserId().intValue();
if(id==null){ // if(id==null){
return R.error("用户信息有误"); // return R.error("用户信息有误");
} // }
userFunctionBindingService.Modify(functionids,id); // userFunctionBindingService.Modify(functionids,id);
return R.ok(); // return R.ok();
} //}
/** ///**
* 保存 // * 保存
*/ // */
@RequestMapping("/authApi/save") //@RequestMapping("/authApi/save")
// @RequiresPermissions("manage:userfunctionbinding:save") //// @RequiresPermissions("manage:userfunctionbinding:save")
public R save(@RequestBody Integer[] functionids){ //public R save(@RequestBody Integer[] functionids){
//遍历插入数据 // //遍历插入数据
for (int functionid : functionids) { // for (int functionid : functionids) {
UserFunctionBindingEntity ufb=new UserFunctionBindingEntity(); // UserFunctionBindingEntity ufb=new UserFunctionBindingEntity();
ufb.setUserId(getMemberUserId().intValue()); // ufb.setUserId(getMemberUserId().intValue());
ufb.setFuncId(functionid); // ufb.setFuncId(functionid);
userFunctionBindingService.save(ufb); // userFunctionBindingService.save(ufb);
} // }
return R.ok(); // return R.ok();
} //}
/** /**
* 列表 * 列表
*/ */
@Login //@Login
@RequestMapping("/api/list") //@RequestMapping("/api/list")
// @RequiresPermissions("manage:userfunctionbinding:list") //// @RequiresPermissions("manage:userfunctionbinding:list")
public R list(@RequestParam Map<String, Object> params){ //public R list(@RequestParam Map<String, Object> params){
PageUtils page = userFunctionBindingService.queryPage(params); // PageUtils page = userFunctionBindingService.queryPage(params);
//
return R.ok().put("page", page); // return R.ok().put("page", page);
} //}
/** /**
* 信息 * 信息
*/ */
@Login //@Login
@RequestMapping("/api/info/{id}") //@RequestMapping("/api/info/{id}")
// @RequiresPermissions("manage:userfunctionbinding:info") //// @RequiresPermissions("manage:userfunctionbinding:info")
public R info(@PathVariable("id") Integer id){ //public R info(@PathVariable("id") Integer id){
UserFunctionBindingEntity userFunctionBinding = userFunctionBindingService.getById(id); // UserFunctionBindingEntity userFunctionBinding = userFunctionBindingService.getById(id);
//
return R.ok().put("userFunctionBinding", userFunctionBinding); // 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