基于javaweb+mysql的ssm+maven学校社团管理系统(java+ssm+jsp+javascript+mysql)
运行环境
Java≥8、MySQL≥5.7、Tomcat≥8
开发工具
eclipse/idea/myeclipse/sts等均可配置运行
适用
课程设计,大作业,毕业设计,项目练习,学习演示等
功能说明
基于javaweb+mysql的SSM+Maven学校社团管理系统(java+ssm+jsp+javascript+mysql)
项目介绍
超级管理员角色包含以下功能: 会员管理,物品管理,活动审批,系统用户管理,社团添加删除等功能。
社团管理员角色包含以下功能: 社团管理员登录,会员管理,物品管理,活动管理,查询社团信息,密码修改等功能。
普通社员角色包含以下功能: 社员登录,申请入社,物品查看,活动申请等功能。
环境需要
1.运行环境:最好是java jdk 1.8,我们在这个平台上运行的。其他版本理论上也可以。 2.IDE环境:IDEA,Eclipse,Myeclipse都可以。推荐IDEA; 3.tomcat环境:Tomcat 7.x,8.x,9.x版本均可 4.硬件环境:windows 7/8/10 1G内存以上;或者 Mac OS; 5.数据库:MySql 5.7版本;
技术栈
- 后端:Spring+SpringMVC+Mybatis 2. 前端:HTML+CSS+JavaScript+jsp
使用说明
- 使用Navicat或者其它工具,在mysql中创建对应名称的数据库,并导入项目的sql文件; 2. 使用IDEA/Eclipse/MyEclipse导入项目,Eclipse/MyEclipse导入时,若为maven项目请选择maven; 若为maven项目,导入成功后请执行maven clean;maven install命令,然后运行; 3. 将项目中application.yml配置文件中的数据库配置改为自己的配置; 4. 运行项目,输入localhost:8080/ 登录
return "jsp/sonpage/member/memberson/findMember";
}
if(type.equals("show2")){
return "jsp/sonpage/member/memberson/delMember";
}
return "";
}
//3根据名字模糊查询
@RequestMapping(value ="/findLikeNameMember")
public String findLikeNameMember(String m_id, String m_name, Model model,String type){
System.out.println("===========模糊查询会员信息============");
System.out.println("m_id:"+m_id);
System.out.println("m_name:"+m_name);
System.out.println("type:"+type);
//String m_id=id;
//String m_name=name;
Map map = new HashMap();
map.put("m_id", m_id);
map.put("m_name", m_name);
List<Member> memberList=memberService.findLikeNameMember(map);
model.addAttribute("memberList", memberList);
if (type.equals("show1")) {
System.out.println("===========从查询会员信息页面===========");
if(("").equals(m_id) && ("").equals(m_name)){
System.out.println("1没有传值");
return "jsp/sonpage/member/memberson/findMember";
}
System.out.println("===================跳回查询页面======================");
return "jsp/sonpage/member/memberson/findMember";
}
if (type.equals("show2")) {
System.out.println("===========从删除会员信息品页面===========");
if(("").equals(m_id) && ("").equals(m_name)){
System.out.println("2没有传值");
return "forward:findAllMember.action?type?type=show";
}
System.out.println("===================跳回删除页面======================");
return "jsp/sonpage/member/memberson/delMember";
}
return "";
}
//4添加会员
@RequestMapping("/addMember")
public String addMember(Member member,String type){
System.out.println("===============addMember=================");
if(member.getM_id() != 0) {
return false;
}
}
}
@Controller
@RequestMapping(value="/Goods")
public class GoodsController {
@Autowired
private GoodsService goodsService;
//1根据id查询
@RequestMapping("/findGoodsById")
public @ResponseBody Goods findGoodsById(Model model,String g_id){
System.out.println("===============findGoodsById=================");
System.out.println("g_id:"+g_id);
int id=Integer.parseInt(g_id);
Goods goods=goodsService.findGoodsById(id);
System.out.println("member:"+goods.getG_name());
return goods;
}
//2查询所有(分页)
@RequestMapping("/findAllGoods")
public String findAllGoods(Model model,String type,Integer pageNo,Integer pageSize){
System.out.println("===========findAllGoods==============");
System.out.println("传到type的值:"+type);
PagedResult<Goods> pagedResult= (PagedResult<Goods>) goodsService.findAllGoods(pageNo, pageSize);
model.addAttribute("pagedResult", pagedResult);
List<Goods> goodsList=pagedResult.getDataList();
System.out.println("当前页码:"+pageNo);
System.out.println("总页数:"+pageSize);
System.out.println(pagedResult.getPages());
model.addAttribute("goodsList", goodsList);
if (type.equals("show3")) {
return "jsp/sonpage/goods/goodsson/delGoods";
}
}
// 8批量删除已审批活动信息
@RequestMapping("/delItem")
public @ResponseBody boolean delItem(Model model, String ids) {
System.out.println("==========批量删除已审批活动信息==========");
System.out.println("ids:" + ids);
// 用数组接收获取的选中集合
String[] str = ids.split("_");
for (int i = 0; i < str.length; i++) {
int id = Integer.parseInt(str[i]);
activityService.delActivity(id);
System.out.println("删除的方法执行了");
}
// return "forward:findAllMember.action?type=show2";
return true;
}
//审批(同意)
@RequestMapping("/updateActivityById")
public @ResponseBody boolean updateActivityById(String id){
System.out.println("===========updateActivityById==============");
int AC_id=Integer.parseInt(id);
activityService.updateActivityById(AC_id);
return true;
}
//审批(不同意)
@RequestMapping("/updateActivityNById")
public @ResponseBody boolean updateActivityNById(String id,String AC_remark){
System.out.println("===========updateActivityNById==============");
int AC_id=Integer.parseInt(id);
activityService.updateActivityNById(AC_remark,AC_id);
return true;
}
//首页显示
@RequestMapping("/show")
public String show(HttpServletRequest request,Model model){
System.out.println("===========show==============");
List<Activity> activityList=activityService.findshow();
request.getSession().setAttribute("activityList", activityList);
return "redirect:../jsp/sonpage/index.jsp";
}
return "jsp/sonpage/manager/managerson/findManager";
}
System.out
.println("===================跳回查询页面======================");
return "jsp/sonpage/manager/managerson/findManager";
}
if (type.equals("show2")) {
System.out.println("===========从删除管理员信息页面===========");
if (("").equals(ma_id) && ("").equals(ma_name)) {
System.out.println("2没有传值");
System.out.println("1没有传值");
System.out.println("===========findAllManager==============");
System.out.println("传到type的值:" + type);
PagedResult<Manager> pagedResult = (PagedResult<Manager>) managerService
.findAllManager(0, 5);
model.addAttribute("pagedResult", pagedResult);
managerList = pagedResult.getDataList();
System.out.println("当前页码:" + 1);
System.out.println("总页数:" + 5);
System.out.println(pagedResult.getPages());
model.addAttribute("managerList", managerList);
return "jsp/sonpage/manager/managerson/findManager";
}
System.out
.println("===================跳回删除页面======================");
return "jsp/sonpage/manager/managerson/delManager";
}
return "";
}
// 4添加系统管理员
@RequestMapping("/addManager")
public String addManager(Manager manager) {
System.out.println("=========添加系统管理员=========");
System.out.println("姓名:" + manager.getMA_name());
managerService.addManager(manager);
return "jsp/sonpage/manager/managerson/addManager";
}
// 5删除系统管理员
@RequestMapping("/delManager")
public String delManager(String MA_id) {
System.out.println("===========删除系统管理员===========");
System.out.println("MA_id:" + MA_id);
int id = Integer.parseInt(MA_id);
managerService.delManager(id);
return "forward:findAllManager.action?type=show2";
}
// 6修改系统管理员
@RequestMapping("/updateManager")
public String updateManager(Manager manager) {
System.out.println("=========修改系统管理员=========");
System.out.println("名字:"+manager.getMA_name());
@RequestMapping("/addActivity")
public String addActivity(HttpServletRequest request, Activity activity) {
System.out.println("=========添加活动信息==========");
activityService.addActivity(activity);
// 查询所有物品
List<Goods> goodsList = activityService.findAllGoods();
request.getSession().setAttribute("goodsList", goodsList);
// 将刚添加的活动id保存,供添加活动物品时使用
request.getSession().setAttribute("AC_id", activity.getAC_id());
// 跳转到添加物品
return "redirect:../jsp/sonpage/activity/activityson/addActivityGoods.jsp";
}
// 5删除活动信息
@RequestMapping("/delActivity")
public String delActivity(int AC_id) {
System.out.println("============根据id删除活动信息============");
System.out.println("页面传值:" + AC_id);
activityService.delActivity(AC_id);
return "forward:findAllCActivity.action?type=show1";
}
// 6修改活动信息
@RequestMapping("/updateActivity")
public String updateActivity(Activity activity){
System.out.println("===========updateActivity==============");
System.out.println("活动编号:"+activity.getAC_theme());
activityService.updateActivity(activity);
return "forward:findAllCActivity.action?type=show";
}
// 7查询所有已审核活动信息(分页)
@RequestMapping("/findAllCActivity")
public String findAllCActivity(Model model, String type, Integer pageNo,
Integer pageSize) {
System.out.println("===========查询所有已审核活动信息==============");
System.out.println("传到type的值:" + type);
PagedResult<Activity> pagedResult = (PagedResult<Activity>) activityService
.findAllCActivity(pageNo, pageSize);
model.addAttribute("pagedResult", pagedResult);
List<Activity> activityList = pagedResult.getDataList();
System.out.println("当前页码:" + pageNo);
System.out.println("总页数:" + pageSize);
return "jsp/sonpage/goods/goodsson/findGoods";
}
//7根据活动编号查询物品详细
@RequestMapping("/findDetailGoods")
public String findDetailGoods(String AC_id, Model model,String type){
System.out.println("============根据活动编号查询物品详细===========");
System.out.println("AC_id:"+AC_id);
System.out.println("type:"+type);
int id=Integer.parseInt(AC_id);
List<Goods> goodsList=goodsService.findDetailGoods(id);
model.addAttribute("goodsList", goodsList);
model.addAttribute("AC_id", AC_id);
if(type.equals("show1")){
System.out.println("=============返回查询已审核活动信息页面=============");
return "jsp/sonpage/activity/activityson/findDetailGoods";
}
if(type.equals("show2")){
System.out.println("=============返回查询未审核活动信息页面=============");
return "jsp/sonpage/activity/activityson/findDetailGoods1";
}
if(type.equals("show3")){
System.out.println("=============返回删除活动信息页面=============");
return "jsp/sonpage/activity/activityson/findDetailGoods2";
}
return "";
}
//8批量删除物品
@RequestMapping("/delItem")
public @ResponseBody boolean delItem(Model model, String ids) {
System.out.println("==========批量删除物品==========");
System.out.println("ids:"+ids);
// 用数组接收获取的选中集合
String[] str = ids.split("_");
for (int i = 0; i < str.length; i++) {
int id = Integer.parseInt(str[i]);
goodsService.delGoods(id);
System.out.println("删除的方法执行了");
}
//return "forward:findAllMember.action?type=show2";
return true;
}
}
activityService.updateActivityById(AC_id);
return true;
}
//审批(不同意)
@RequestMapping("/updateActivityNById")
public @ResponseBody boolean updateActivityNById(String id,String AC_remark){
System.out.println("===========updateActivityNById==============");
int AC_id=Integer.parseInt(id);
activityService.updateActivityNById(AC_remark,AC_id);
return true;
}
//首页显示
@RequestMapping("/show")
public String show(HttpServletRequest request,Model model){
System.out.println("===========show==============");
List<Activity> activityList=activityService.findshow();
request.getSession().setAttribute("activityList", activityList);
return "redirect:../jsp/sonpage/index.jsp";
}
// 添加活动物品
@RequestMapping("/addActivityGoods")
@ResponseBody
public boolean addActivityGoods(HttpServletRequest request, String strnums, String strids) {
System.out.println("数量:" + strnums);
System.out.println("ID:" + strids);
String[] arrNums = strnums.split(",");
String[] arrIds = strids.split(",");
if (arrNums.length < 1 || arrIds.length < 1) {
return false;
} else {
// 获取活动ID
System.out.println(request.getSession().getAttribute("AC_id"));
Integer AC_id = (Integer) request.getSession().getAttribute("AC_id");
boolean result = activityService.addActivityGoods(AC_id, arrNums, arrIds);
return result;
}
}
}
@Controller
@RequestMapping(value = "/Manager")
public class ManagerController {
@Autowired
private ManagerService managerService;
// 1根据id查询
@RequestMapping("/findManagerById")
public @ResponseBody Manager findManagerById(Model model,String ma_id){
System.out.println("===============findManagerById=================");
System.out.println("MA_id:"+ma_id);
int id=Integer.parseInt(ma_id);
Manager manager=managerService.findManagerById(id);
System.out.println("manager:"+manager.getMA_name());
model.addAttribute("manager", manager);
return manager;
}
// 2查询所有(分页显示)
@RequestMapping("/findAllManager")
public String findAllManager(Model model, String type, Integer pageNo,
Integer pageSize) {
System.out.println("===========findAllManager==============");
System.out.println("传到type的值:" + type);
PagedResult<Manager> pagedResult = (PagedResult<Manager>) managerService
.findAllManager(pageNo, pageSize);
model.addAttribute("pagedResult", pagedResult);
List<Manager> managerList = pagedResult.getDataList();
System.out.println("当前页码:" + pageNo);
System.out.println("总页数:" + pageSize);
System.out.println(pagedResult.getPages());
model.addAttribute("managerList", managerList);
if (type.equals("show1")) {
return "jsp/sonpage/manager/managerson/findManager";
}
if (type.equals("show2")) {
return "jsp/sonpage/manager/managerson/delManager";
}
return "";
}
// 3模糊查询
@RequestMapping("/findLikeNameManager")
public String findLikeNameManager(String ma_id, String ma_name,
Model model, String type) {
System.out.println("===========模糊查询系统管理员信息============");
//String ma_id=id;
//String ma_name=name;
System.out.println("ma_id:" + ma_id);
System.out.println("ma_name:" + ma_name);
@Controller
@RequestMapping(value = "/Manager")
public class ManagerController {
@Autowired
private ManagerService managerService;
// 1根据id查询
@RequestMapping("/findManagerById")
public @ResponseBody Manager findManagerById(Model model,String ma_id){
System.out.println("===============findManagerById=================");
System.out.println("MA_id:"+ma_id);
int id=Integer.parseInt(ma_id);
Manager manager=managerService.findManagerById(id);
System.out.println("manager:"+manager.getMA_name());
model.addAttribute("manager", manager);
return manager;
}
// 2查询所有(分页显示)
@RequestMapping("/findAllManager")
public String findAllManager(Model model, String type, Integer pageNo,
Integer pageSize) {
System.out.println("===========findAllManager==============");
System.out.println("传到type的值:" + type);
PagedResult<Manager> pagedResult = (PagedResult<Manager>) managerService
.findAllManager(pageNo, pageSize);
model.addAttribute("pagedResult", pagedResult);
List<Manager> managerList = pagedResult.getDataList();
System.out.println("当前页码:" + pageNo);
System.out.println("总页数:" + pageSize);
System.out.println(pagedResult.getPages());
List<Member> memberList=pagedResult.getDataList();
System.out.println("当前页码:"+pageNo);
System.out.println("条数:"+pageSize);
System.out.println("总页面数目:"+pagedResult.getPages());
model.addAttribute("memberList", memberList);
if(type.equals("show1")){
return "jsp/sonpage/member/memberson/findMember";
}
if(type.equals("show2")){
return "jsp/sonpage/member/memberson/delMember";
}
return "";
}
//3根据名字模糊查询
@RequestMapping(value ="/findLikeNameMember")
public String findLikeNameMember(String m_id, String m_name, Model model,String type){
System.out.println("===========模糊查询会员信息============");
System.out.println("m_id:"+m_id);
System.out.println("m_name:"+m_name);
System.out.println("type:"+type);
//String m_id=id;
//String m_name=name;
Map map = new HashMap();
map.put("m_id", m_id);
map.put("m_name", m_name);
List<Member> memberList=memberService.findLikeNameMember(map);
model.addAttribute("memberList", memberList);
if (type.equals("show1")) {
System.out.println("===========从查询会员信息页面===========");
if(("").equals(m_id) && ("").equals(m_name)){
System.out.println("1没有传值");
return "jsp/sonpage/member/memberson/findMember";
}
System.out.println("===================跳回查询页面======================");
return "jsp/sonpage/member/memberson/findMember";
}
if (type.equals("show2")) {
System.out.println("===========从删除会员信息品页面===========");
if(("").equals(m_id) && ("").equals(m_name)){
System.out.println("2没有传值");
return "forward:findAllMember.action?type?type=show";
//String ma_id=id;
//String ma_name=name;
System.out.println("ma_id:" + ma_id);
System.out.println("ma_name:" + ma_name);
System.out.println("type:" + type);
Map map = new HashMap();
map.put("ma_id", ma_id);
map.put("ma_name", ma_name);
List<Manager> managerList = managerService.findLikeNameManager(map);
model.addAttribute("managerList", managerList);
if (type.equals("show1")) {
System.out.println("===========从查询管理员信息页面===========");
if (("").equals(ma_id) && ("").equals(ma_name)) {
System.out.println("1没有传值");
System.out.println("===========findAllManager==============");
System.out.println("传到type的值:" + type);
PagedResult<Manager> pagedResult = (PagedResult<Manager>) managerService
.findAllManager(0, 5);
model.addAttribute("pagedResult", pagedResult);
managerList = pagedResult.getDataList();
System.out.println("当前页码:" + 1);
System.out.println("总页数:" + 5);
System.out.println(pagedResult.getPages());
model.addAttribute("managerList", managerList);
return "jsp/sonpage/manager/managerson/findManager";
}
System.out
.println("===================跳回查询页面======================");
return "jsp/sonpage/manager/managerson/findManager";
}
if (type.equals("show2")) {
System.out.println("===========从删除管理员信息页面===========");
if (("").equals(ma_id) && ("").equals(ma_name)) {
System.out.println("2没有传值");
System.out.println("1没有传值");
System.out.println("===========findAllManager==============");
System.out.println("传到type的值:" + type);
PagedResult<Manager> pagedResult = (PagedResult<Manager>) managerService
.findAllManager(0, 5);
model.addAttribute("pagedResult", pagedResult);
managerList = pagedResult.getDataList();
System.out.println("当前页码:" + 1);
// }else{
// return false;
// }
}
//9修改密码
@RequestMapping("/updateCommunityPwd")
public @ResponseBody boolean updateCommunityPwd(Model model,String num,String oldPwd,String newPwd){
System.out.println("===============updateCommunityPwd=================");
System.out.println("新密码:"+newPwd);
System.out.println("num:"+num);
Community community=communityService.findCommunityByNum(num);
String pwd=community.getC_pwd();
if(pwd.equals(oldPwd)){
communityService.updateCommunityPwd(newPwd,num);
return true;
}else{
return false;
}
}
//查询所有
@RequestMapping("/findAllCommunity1")
public String findAllCommunity1(Model model, String type) {
System.out.println("===========findAllAdmin==============");
System.out.println("传到type的值:" + type);
List<Community> communityList=communityService.findAllCommunity();
model.addAttribute("communityList", communityList);
if(type.equals("show2")){
return "jsp/sonpage/member/memberson/addMember";
}
if(type.equals("show1")){
return "jsp/sonpage/manager/managerson/addManager";
}
return "";
}
// 查询所有协会(分页查询)
@RequestMapping("/findCommunity")
public String findCommunity(Model model, String type, Integer pageNo,
Integer pageSize) {
System.out.println("===========findAllAdmin==============");
System.out.println("传到type的值:" + type);
PagedResult<Community> pagedResult = (PagedResult<Community>) communityService
.findCommunity(pageNo, pageSize);
model.addAttribute("pagedResult", pagedResult);
List<Community> communityList = pagedResult.getDataList();
System.out.println("当前页码:" + pageNo);
System.out.println("总页数:" + pageSize);
System.out.println(pagedResult.getPages());
model.addAttribute("communityList", communityList);
return "jsp/sonpage/member/memberson/inCommunity";
}
}
System.out.println("===========查询所有已审核活动信息==============");
System.out.println("传到type的值:" + type);
PagedResult<Activity> pagedResult = (PagedResult<Activity>) activityService
.findAllCActivity(pageNo, pageSize);
model.addAttribute("pagedResult", pagedResult);
List<Activity> activityList = pagedResult.getDataList();
System.out.println("当前页码:" + pageNo);
System.out.println("总页数:" + pageSize);
System.out.println(pagedResult.getPages());
model.addAttribute("activityList", activityList);
if (type.equals("show1")) {
return "jsp/sonpage/activity/activityson/delActivity";
}
if (type.equals("show")) {
return "jsp/sonpage/activity/activityson/findCActivity";
}
return "jsp/sonpage/activity/activityson/findCActivity";
}
// 8模糊查询已审核活动信息
@RequestMapping("/findLikeNameCActivity")
public String findLikeNameCActivity(String AC_id, String AC_theme,
Model model, String type) {
System.out.println("===========模糊查询已审核活动信息============");
//String AC_id=id;
//String AC_theme=theme;
System.out.println("AC_id:" + AC_id);
System.out.println("AC_theme:" + AC_theme);
Map map = new HashMap();
map.put("AC_id", AC_id);
map.put("AC_theme", AC_theme);
List<Activity> activityList = activityService
.findLikeNameCActivity(map);
model.addAttribute("activityList", activityList);
if (type.equals("show")) {
if (("").equals(AC_id) && ("").equals(AC_theme)) {
return "forward:findAllCActivity.action?type";
}
return "jsp/sonpage/activity/activityson/findCActivity";
}
if (type.equals("show1")) {
if (("").equals(AC_id) && ("").equals(AC_theme)) {
return "forward:findAllCActivity.action?type";
}
return "jsp/sonpage/activity/activityson/delActivity";
}
return "";
}
e.printStackTrace();
System.out.println("MemberCotroller-->>findMemberByNum-->>登录失败");
return false;
}
// Member member=memberService.findMemberByNum(num);
// System.out.println("manager:"+member.getM_pwd());
// String m_pwd=member.getM_pwd();
// session.setAttribute("num", num);
// session.setAttribute("role", "3");
// if(m_pwd.equals(pwd)){
// System.out.println("返回值是真");
// return true;
// }else{
// return false;
// }
}
//9修改密码
@RequestMapping("/updateMemberPwd")
public @ResponseBody boolean updateMemberPwd(Model model,String num,String oldPwd,String newPwd){
System.out.println("===============updateManagerPwd=================");
System.out.println("旧密码:"+oldPwd);
System.out.println("新密码:"+newPwd);
String M_pwd=newPwd;
String M_num=num;
Member manager=memberService.findMemberByNum(num);
String pwd=manager.getM_pwd();
if(pwd.equals(oldPwd)){
memberService.updateMemberPwd(M_pwd,M_num);
return true;
}else{
return false;
}
}
}
@Controller
@RequestMapping(value="/Goods")
public class GoodsController {
@Autowired
private GoodsService goodsService;
//1根据id查询
@RequestMapping("/findGoodsById")
public @ResponseBody Goods findGoodsById(Model model,String g_id){
System.out.println("===============findGoodsById=================");
System.out.println("g_id:"+g_id);
int id=Integer.parseInt(g_id);
Goods goods=goodsService.findGoodsById(id);
System.out.println("member:"+goods.getG_name());
return goods;
}
//2查询所有(分页)
@RequestMapping("/findAllGoods")
public String findAllGoods(Model model,String type,Integer pageNo,Integer pageSize){
System.out.println("===========findAllGoods==============");
System.out.println("传到type的值:"+type);
PagedResult<Goods> pagedResult= (PagedResult<Goods>) goodsService.findAllGoods(pageNo, pageSize);
model.addAttribute("pagedResult", pagedResult);
List<Goods> goodsList=pagedResult.getDataList();
System.out.println("当前页码:"+pageNo);
System.out.println("总页数:"+pageSize);
System.out.println(pagedResult.getPages());
model.addAttribute("goodsList", goodsList);
if (type.equals("show3")) {
return "jsp/sonpage/goods/goodsson/delGoods";
}
if (type.equals("show2")) {
return "jsp/sonpage/goods/goodsson/findGoods";
}
List<Community> communityList = pagedResult.getDataList();
System.out.println("当前页码:" + pageNo);
System.out.println("总页数:" + pageSize);
System.out.println(pagedResult.getPages());
model.addAttribute("communityList", communityList);
return "jsp/sonpage/member/memberson/inCommunity";
}
}
@Controller
@RequestMapping(value = "/Manager")
public class ManagerController {
@Autowired
private ManagerService managerService;
// 1根据id查询
@RequestMapping("/findManagerById")
public @ResponseBody Manager findManagerById(Model model,String ma_id){
System.out.println("===============findManagerById=================");
System.out.println("MA_id:"+ma_id);
int id=Integer.parseInt(ma_id);
Manager manager=managerService.findManagerById(id);
System.out.println("manager:"+manager.getMA_name());
model.addAttribute("manager", manager);
return manager;
}
// 2查询所有(分页显示)
System.out.println("用户传过来的id值:" + AC_id);
int id = Integer.parseInt(AC_id);
Activity activity = activityService.findActivityById(id);
System.out.println("查到的值:"+activity.getAC_theme());
return activity;
}
// 2查询所有未审核活动信息(分页)
@RequestMapping("/findAllActivity")
public String findAllActivity(Model model, String type, Integer pageNo,
Integer pageSize) {
System.out.println("===========查询所有未审核活动信息==============");
System.out.println("传到type的值:" + type);
PagedResult<Activity> pagedResult = (PagedResult<Activity>) activityService
.findAllActivity(pageNo, pageSize);
model.addAttribute("pagedResult", pagedResult);
List<Activity> activityList = pagedResult.getDataList();
System.out.println("当前页码:" + pageNo);
System.out.println("总页数:" + pageSize);
System.out.println(pagedResult.getPages());
model.addAttribute("activityList", activityList);
return "jsp/sonpage/activity/activityson/findActivity";
}
// 3模糊查询未审核活动信息
@RequestMapping("/findLikeNameActivity")
public String findLikeNameActivity(String AC_id, String AC_theme,
Model model, String type) {
System.out.println("===========模糊查询未审核活动信息============");
System.out.println("AC_id:" + AC_id);
System.out.println("AC_theme:" + AC_theme);
//String AC_id=ac_id;
//String AC_theme=ac_theme;
Map map = new HashMap();
map.put("AC_id", AC_id);
map.put("AC_theme", AC_theme);
List<Activity> activityList = activityService.findLikeNameActivity(map);
model.addAttribute("activityList", activityList);
if (type.equals("show")) {
if (("").equals(AC_id) && ("").equals(AC_theme)) {
System.out.println("========输入为空跳转查询所有的方法=========");
return "forward:findAllActivity.action?type";