首页>代码>maven的ssm+layui+bootstrap+shiro+fastDFS文件上传+百度分页+jsp网站后台管理系统的个人博客系统>/MyBox/src/main/java/com/box/controller/AccountController.java
package com.box.controller;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import com.box.entity.DbUsers;
import com.box.service.AccountService;
@Controller
@RequestMapping("/account")
public class AccountController {
@Autowired
private AccountService AccService;
@RequestMapping("/active/{eCode}")
public String active(@PathVariable("eCode")String eCode,Model model){
DbUsers user = AccService.selUserByCodeAndStatus(eCode,0+"");
if(user!=null){
//激活成功
//修改用户状态
user.setStatus(1);
AccService.updUserStatus(user);
model.addAttribute("msg", "激活成功,返回登陆吧!");
return "common/active";
}else{
//resp.getWriter().println("账户不存在或者已经激活,请重试!");
model.addAttribute("msg", "账户不存在或者已经激活,请重试!");
return "common/active";
}
}
}
最近下载更多
TY0165 LV20
2024年6月24日
pureshyness LV6
2022年5月22日
wanglinddad LV55
2022年4月9日
goohodo LV8
2022年3月2日
xiayan LV6
2021年12月7日
ljm2s LV3
2021年9月23日
芜湖1234 LV2
2021年6月14日
xiaoxiexie LV13
2021年5月16日
最代码-宋家辉 LV61
2021年5月1日
手落弦崩 LV13
2021年4月19日
最近浏览更多
奋斗的小蚂蚁 LV16
10月16日
哪里的完整版 LV8
4月1日
xiaoaitx LV8
1月1日
xianyu091012 LV5
2024年11月18日
yellow_flowers LV8
2024年7月8日
TY0165 LV20
2024年6月24日
花朝廿五 LV1
2024年6月10日
goccgoccgocc LV4
2024年5月9日
李俊雄 LV3
2024年5月8日
sz1111111 LV2
2024年3月26日

