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";
		}
	}
	

}
最近下载更多
pureshyness  LV6 2022年5月22日
wanglinddad  LV54 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日
wang512237140  LV20 2021年4月6日
最近浏览更多
sz1111111  LV2 3月26日
WBelong  LV7 2023年12月19日
周敏国  LV9 2023年9月21日
矿泉水  LV30 2023年8月20日
hkxyyz  LV6 2023年7月16日
1614076596  LV1 2023年6月29日
tangyongheng08  LV6 2023年6月15日
sjl821120  LV6 2023年6月10日
yangbulx  LV3 2023年6月7日
liyc_ayer  LV1 2023年5月30日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友