基于javaweb+mysql的jsp+servlet高校社团信息管理系统(java+jsp+html+javascript+mysql)
私信源码获取及调试交流
运行环境
Java≥8、MySQL≥5.7、Tomcat≥8
开发工具
eclipse/idea/myeclipse/sts等均可配置运行
适用
课程设计,大作业,毕业设计,项目练习,学习演示等
功能说明
基于javaweb的JSP+Servlet高校社团信息管理系统(java+jsp+html+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版本;
技术栈
HTML+CSS+JavaScript+jsp+mysql
使用说明
- 使用Navicat或者其它工具,在mysql中创建对应名称的数据库,并导入项目的sql文件; 2. 使用IDEA/Eclipse/MyEclipse导入项目,Eclipse/MyEclipse导入时,若为maven项目请选择maven;若为maven项目,导入成功后请执行maven clean;maven install命令,然后运行; 3. 将项目中application.yml配置文件中的数据库配置改为自己的配置; 4. 运行项目,输入localhost:8080/login.jsp 登录
* @return void
*/
public void updatePicnews(Picnews picnews){
Connection conn = BaseDao.getConnection();
//图片新闻内容编码
picnews.setPicnews_content(Transcode.htmlEncode(picnews.getPicnews_content()));
picnewsDao.updatePicnews(picnews,conn);
BaseDao.closeDB(null, null, conn);
}
/**
* @Title: listActivitys
* @Description: 活动消息查询
* @param activity
* @return List<Activity>
*/
public List<Activity> listActivitys(Activity activity,int[] sum){
Connection conn = BaseDao.getConnection();
if (sum!=null) {
sum[0] = activityDao.listActivitysCount(activity, conn);
}
List<Activity> activitys = activityDao.listActivitys(activity,conn);
BaseDao.closeDB(null, null, conn);
return activitys;
}
/**
* @Title: getActivity
* @Description: 活动消息查询
* @param activity
* @return Activity
*/
public Activity getActivity(Activity activity){
Connection conn = BaseDao.getConnection();
Activity _activity = activityDao.getActivity(activity, conn);
BaseDao.closeDB(null, null, conn);
return _activity;
}
/**
sBuilder.append(" and user_pass ='" + user.getUser_pass() +"' ");
}
if (!StringUtil.isEmptyString(user.getUser_name())) {
sBuilder.append(" and user_name ='" + user.getUser_name() +"' ");
}
if (!StringUtil.isEmptyString(user.getUser_types())) {
sBuilder.append(" and user_type in (" + user.getUser_types() +") ");
}
if (user.getUser_type()!=0) {
sBuilder.append(" and user_type =" + user.getUser_type() +" ");
}
List<Object> list = BaseDao.executeQuery(User.class.getName(), sBuilder.toString(), null, conn);
if (list != null && list.size() > 0) {
_user = (User)list.get(0);
}
return _user;
}
public List<User> listUsers(User user, Connection conn){
List<User> users = null;
StringBuilder sBuilder = new StringBuilder();
sBuilder.append("SELECT * FROM (");
sBuilder.append("SELECT * FROM user WHERE 1=1");
if (user.getUser_id()!=0) {
sBuilder.append(" and user_id =" + user.getUser_id() +" ");
}
if (!StringUtil.isEmptyString(user.getUser_name())) {
sBuilder.append(" and user_name like '%" + user.getUser_name() +"%' ");
}
if (!StringUtil.isEmptyString(user.getNick_name())) {
sBuilder.append(" and nick_name like '%" + user.getNick_name() +"%' ");
}
if (!StringUtil.isEmptyString(user.getReal_name())) {
sBuilder.append(" and real_name like '%" + user.getReal_name() +"%' ");
}
if (!StringUtil.isEmptyString(user.getUser_dept())) {
sBuilder.append(" and user_dept like '%" + user.getUser_dept() +"%' ");
}
if (user.getUser_type()!=0) {
sBuilder.append(" and user_type =" + user.getUser_type() +" ");
}
if (!StringUtil.isEmptyString(user.getUser_types())) {
sBuilder.append(" and user_type in (" + user.getUser_types() +") ");
}
sBuilder.append(" order by user_id asc) t");
if (user.getStart() != -1) {
sBuilder.append(" limit " + user.getStart() + "," + user.getLimit());
* @Description: 查询活动消息
* @param activity
* @return List<Activity>
*/
public List<Activity> listActivitys(Activity activity,int[] sum){
Connection conn = BaseDao.getConnection();
if (sum!=null) {
sum[0] = activityDao.listActivitysCount(activity, conn);
}
List<Activity> activitys = activityDao.listActivitys(activity,conn);
BaseDao.closeDB(null, null, conn);
return activitys;
}
/**
* @Title: getActivity
* @Description: 查询活动消息详情
* @param activity
* @return Activity
*/
public Activity getActivity(Activity activity){
Connection conn = BaseDao.getConnection();
Activity _activity = activityDao.getActivity(activity,conn);
BaseDao.closeDB(null, null, conn);
return _activity;
}
/**
* @Title: listSblogs
* @Description: 查询留言信息
* @param sblog
* @return List<Sblog>
*/
public List<Sblog> listSblogs(Sblog sblog,int[] sum){
Connection conn = BaseDao.getConnection();
if (sum!=null) {
sum[0] = sblogDao.listSblogsCount(sblog, conn);
}
List<Sblog> sblogs = sblogDao.listSblogs(sblog,conn);
BaseDao.closeDB(null, null, conn);
return sblogs;
}
/**
* @Title: addSblog
* @Description: 新增留言
/**
* @Title: getCollege
* @Description: 社团详情查询
* @param college
* @return College
*/
public College getCollege(College college){
Connection conn = BaseDao.getConnection();
College _college = collegeDao.getCollege(college, conn);
BaseDao.closeDB(null, null, conn);
return _college;
}
/**
* @Title: createCollege
* @Description:申请创建社团
* @param college
* @return void
*/
public void createCollege(College college){
Connection conn = BaseDao.getConnection();
//申请时间
college.setCreate_date(DateUtil.dateToDateString(new Date(),"yyyy-MM-dd"));
//审批标志
college.setCollege_flag(1);
collegeDao.addCollege(college, conn);
BaseDao.closeDB(null, null, conn);
}
/**
* @Title: joinMember
* @Description:申请加入社团
* @param Member
* @return void
*/
public void joinMember(Member member){
Connection conn = BaseDao.getConnection();
//申请时间
member.setReg_date(DateUtil.dateToDateString(new Date()));
//审批标志
member.setMember_flag(1);
memberDao.addMember(member, conn);
BaseDao.closeDB(null, null, conn);
}
/**
}
public class NewsDao {
public int addNews(News news, Connection conn){
String sql = "INSERT INTO news(news_id,user_id,news_title,news_content,news_picture,news_date,news_type,news_flag) values(null,?,?,?,?,?,?,?)";
Object[] params = new Object[] {
news.getUser_id(),
news.getNews_title(),
news.getNews_content(),
news.getNews_picture(),
news.getNews_date(),
news.getNews_type(),
news.getNews_flag()
};
return BaseDao.executeUpdate(sql, params, conn );
}
public int delNews(String news_id, Connection conn){
String sql = "DELETE FROM news WHERE news_id=?";
Object[] params = new Object[] { new Integer(news_id)};
return BaseDao.executeUpdate(sql, params, conn);
}
public int delNewss(String[] news_ids, Connection conn){
StringBuilder sBuilder = new StringBuilder();
for (int i = 0; i <news_ids.length; i++) {
sBuilder.append("?");
if (i !=news_ids.length-1) {
sBuilder.append(",");
}
}
String sql = "DELETE FROM news WHERE news_id IN(" +sBuilder.toString()+")";
Object[] params = news_ids;
return BaseDao.executeUpdate(sql, params, conn); }
public int updateNews(News news, Connection conn){
StringBuilder sBuilder = new StringBuilder();
sBuilder.append("UPDATE news SET news_id = " + news.getNews_id() +" ");
if (!StringUtil.isEmptyString(news.getNews_title())) {
}
/**
* @Title: saveNews
* @Description: 保存编辑新闻资讯
* @return String
*/
public String saveNews(){
try {
//保存编辑新闻资讯
adminManager.updateNews(paramsNews);
} catch (Exception e) {
tip="编辑失败";
Param.setAttribute("news", paramsNews);
return "newsEdit";
}
setSuccessTip("编辑成功", "Admin_listNewss.action");
return "infoTip";
}
/**
* @Title: delNewss
* @Description: 删除新闻资讯
* @return String
*/
public String delNewss(){
try {
//删除新闻资讯
adminManager.delNewss(paramsNews);
} catch (Exception e) {
setErrorTip("删除异常", "Admin_listNewss.action");
}
setSuccessTip("删除成功", "Admin_listNewss.action");
return "infoTip";
}
/**
* @Title: listSblogs
* @Description: 查询留言
* @return String
*/
public String listSblogs(){
try {
//查询留言
if (paramsSblog==null) {
paramsSblog = new Sblog();
}
setPagination(paramsSblog);
int[] sum={0};
List<Sblog> sblogs = adminManager.listSblogs(paramsSblog,sum);
Param.setAttribute("sblogs", sblogs);
document.info.action="Admin_listUsers.action";
document.info.submit();
}
</script>
</head>
<body>
<div class="pageTitle">
<img src="images/right1.gif" align="middle" /> <span id="MainTitle" style="color:white">用户管理>>用户查询</span>
</div>
<form name="info" id="info" action="Admin_listUsers.action" method="post">
<input type="hidden" name="pageNo" id="pageNo" value="${pageNo}"/>
<table width="95%" align="center" cellpadding="0" cellspacing="0">
<tr><td colspan="2" height="10px"> </td></tr>
<tr>
<td width="">用户列表</td>
<td width="" align="right">
学号:
<input type="text" id="paramsUser.user_name" name="paramsUser.user_name" value="${paramsUser.user_name}" class="inputstyle"/>
用户类型:
<s:select name="paramsUser.user_type" id="paramsUser.user_type" list="#{1:'注册用户',2:'社团管理员'}" value="%{#attr.paramsUser.user_type}"
listKey="key" listValue="value" headerKey="0" headerValue="请选择"
cssClass="selectstyle" cssStyle="width:120px"></s:select>
<input type="button" value="搜索" onclick="serch();" class="btnstyle"/>
<input type="button" value="增加" onclick="window.location='Admin_addUserShow.action';" class="btnstyle"/>
<input type="button" value="删除" onclick="del();" class="btnstyle"/>
</td>
</tr>
<tr><td colspan="2" height="2px"></td></tr>
</table>
<table width="95%" align="center" class="table_list" cellpadding="0" cellspacing="0">
<tr class="listtitle">
<td width="40" align="center"><input type="checkbox" onclick="CheckAll(this);" style="vertical-align:text-bottom;" title="全选/取消全选"/></td>
<td width="40" align="center">序号</td>
<td width="" align="center">学号</td>
<td width="" align="center">姓名</td>
<td width="" align="center">性别</td>
<td width="" align="center">籍贯</td>
<td width="" align="center">年龄</td>
<td width="" align="center">邮箱</td>
<td width="" align="center">用户类型</td>
<td width="" align="center">注册时间</td>
<td width="" align="center">操作</td>
</tr>
<s:if test="#attr.users!=null && #attr.users.size()>0">
<s:iterator value="#attr.users" id="user" status="status">
<tr class="<s:if test='(#status.index + 1)%2==0'>list1</s:if><s:else>list0</s:else>" onmouseover="tr_mouseover(this)" onmouseout="tr_mouseout(this)">
<td width="" align="center"><s:checkbox name="chkid" fieldValue="%{#user.user_id}" cssStyle="vertical-align:text-bottom;"/></td>
<td width="" align="center"><s:property value="#status.index+1"/></td>
<td width="" align="center"><s:property value="#user.user_name"/></td>
<td width="" align="center"><s:property value="#user.real_name"/></td>
<td width="" align="center"><s:property value="#user.user_sexDesc"/></td>
<td width="" align="center"><s:property value="#user.nick_name"/></td>
<td width="" align="center"><s:property value="#user.user_age"/></td>
<td width="" align="center"><s:property value="#user.user_mail"/></td>
News paramsNews;
Picnews paramsPicnews;
Sblog paramsSblog;
User paramsUser;
String tip;
String key;
public String index(){
try {
//查询图片新闻
List<Picnews> picnewss = indexManager.listPicnews(new Picnews());
Param.setAttribute("picnewss", picnewss);
//查询社团新闻资讯前9条
News news = new News();
news.setStart(0);
news.setLimit(9);
//news.setNews_type(1);
news.setNews_flag(2);
List<News> newss1 = indexManager.listNewss(news,null);
Param.setAttribute("newss1", newss1);
//查询社团简介
College college = new College();
college.setStart(0);
college.setLimit(10);
college.setCollege_flag(2);
List<College> colleges = indexManager.listColleges(college,null);
Param.setAttribute("colleges", colleges);
//查询社团活动
Activity activity = new Activity();
activity.setStart(0);
activity.setLimit(5);
activity.setActivity_type(1);
activity.setActivity_flag(2);
List<Activity> activitys1 = indexManager.listActivitys(activity,null);
Param.setAttribute("activitys1", activitys1);
//查询校园活动
activity.setActivity_type(2);
List<Activity> activitys2 = indexManager.listActivitys(activity,null);
Param.setAttribute("activitys2", activitys2);
//查询社团新闻
news.setNews_type(1);
news.setStart(0);
news.setLimit(5);
List<News> newss2 = indexManager.listNewss(news,null);
StringBuilder sBuilder = new StringBuilder();
sBuilder.append("UPDATE user SET user_id = " + user.getUser_id() +" ");
if (!StringUtil.isEmptyString(user.getUser_pass())) {
sBuilder.append(" ,user_pass ='" + user.getUser_pass() +"' ");
}
if (!StringUtil.isEmptyString(user.getUser_mail())) {
sBuilder.append(" ,user_mail ='" + user.getUser_mail() +"' ");
}
if (!StringUtil.isEmptyString(user.getNick_name())) {
sBuilder.append(" ,nick_name ='" + user.getNick_name() +"' ");
}
if (!StringUtil.isEmptyString(user.getReal_name())) {
sBuilder.append(" ,real_name ='" + user.getReal_name() +"' ");
}
if (user.getUser_sex()!=0) {
sBuilder.append(" ,user_sex =" + user.getUser_sex() +" ");
}
if (user.getUser_age()!=0) {
sBuilder.append(" ,user_age =" + user.getUser_age() +" ");
}
sBuilder.append(" ,user_dept ='" + user.getUser_dept() +"' ");
sBuilder.append(" where user_id = " + user.getUser_id());
Object[] params = null;
return BaseDao.executeUpdate(sBuilder.toString(), params, conn);
}
public int updateUserType(User user, Connection conn){
StringBuilder sBuilder = new StringBuilder();
sBuilder.append("UPDATE user SET user_id = " + user.getUser_id() +" ");
if (user.getUser_type()!=0) {
sBuilder.append(" ,user_type =" + user.getUser_type() +" ");
}
sBuilder.append(" where user_id = " + user.getUser_id());
Object[] params = null;
return BaseDao.executeUpdate(sBuilder.toString(), params, conn);
}
public class ActivityDao {
public int addActivity(Activity activity, Connection conn){
String sql = "INSERT INTO activity(activity_id,user_id,activity_title,activity_content,activity_date,activity_address,activity_equip,activity_money,activity_type,activity_flag) values(null,?,?,?,?,?,?,?,?,?)";
Object[] params = new Object[] {
activity.getUser_id(),
activity.getActivity_title(),
activity.getActivity_content(),
activity.getActivity_date(),
activity.getActivity_address(),
activity.getActivity_equip(),
activity.getActivity_money(),
activity.getActivity_type(),
activity.getActivity_flag()
};
return BaseDao.executeUpdate(sql, params, conn );
}
public int delActivity(String activity_id, Connection conn){
String sql = "DELETE FROM activity WHERE activity_id=?";
Object[] params = new Object[] { new Integer(activity_id)};
return BaseDao.executeUpdate(sql, params, conn);
}
public int delActivitys(String[] activity_ids, Connection conn){
StringBuilder sBuilder = new StringBuilder();
for (int i = 0; i <activity_ids.length; i++) {
sBuilder.append("?");
if (i !=activity_ids.length-1) {
sBuilder.append(",");
}
}
String sql = "DELETE FROM activity WHERE activity_id IN(" +sBuilder.toString()+")";
private int pageNo = 1;
/**
* 行数.
*/
private int limit = DEFAULT_PAGE_LIMIT;
/**
* 返回总行数.
*/
private int totalCount = 0;
/**
* 排序字段(例sp.spCode).
*/
private String sort;
/**
* 正序|反序(例ASC).
*/
private String dir;
/**
* 得到http session.
*
* @return http session
*/
protected final HttpSession getSession() {
return getHttpServletRequest().getSession(true);
}
/**
* 得到http request.
*
* @return http request
*/
protected final HttpServletRequest getHttpServletRequest() {
HttpServletRequest request = ServletActionContext.getRequest();
return request;
}
* @Description: 添加新闻资讯
* @return String
*/
public String addNews(){
try {
//用户身份判断
User admin = (User) Param.getSession("admin");
paramsNews.setUser_id(admin.getUser_id());
if (admin.getUser_type()==2) {
//社团新闻需审核
paramsNews.setNews_flag(1);
//社团新闻
paramsNews.setNews_type(1);
}else {
//校园新闻无需审核
paramsNews.setNews_flag(2);
//校园新闻
paramsNews.setNews_type(2);
}
//添加新闻资讯
adminManager.addNews(paramsNews);
} catch (Exception e) {
setErrorTip("添加新闻异常", "Admin_listNewss.action");
}
setSuccessTip("添加成功", "Admin_listNewss.action");
return "infoTip";
}
/**
* @Title: editNews
* @Description: 编辑新闻资讯
* @return String
*/
public String editNews(){
try {
//得到新闻资讯
News news = adminManager.getNews(paramsNews);
Param.setAttribute("news", news);
} catch (Exception e) {
setErrorTip("查询新闻异常", "Admin_listNewss.action");
return "infoTip";
return "infoTip";
}
/**
* @Title: editUser
* @Description: 编辑用户
* @return String
*/
public String editUser(){
try {
//得到用户
User user = adminManager.getUser(paramsUser);
Param.setAttribute("user", user);
} catch (Exception e) {
setErrorTip("查询用户异常", "Admin_listUsers.action");
return "infoTip";
}
return "userEdit";
}
/**
* @Title: saveUser
* @Description: 保存编辑用户
* @return String
*/
public String saveUser(){
try {
//保存编辑用户
adminManager.updateUser(paramsUser);
} catch (Exception e) {
tip="编辑失败";
Param.setAttribute("user", paramsUser);
return "userEdit";
}
setSuccessTip("编辑用户成功", "Admin_listUsers.action");
return "infoTip";
}
/**
* @Title: delUsers
* @Description: 删除用户
* @return String
*/
public String delUsers(){
Object[] params = new Object[] { new Integer(college_id)};
return BaseDao.executeUpdate(sql, params, conn);
}
public int delColleges(String[] college_ids, Connection conn){
StringBuilder sBuilder = new StringBuilder();
for (int i = 0; i <college_ids.length; i++) {
sBuilder.append("?");
if (i !=college_ids.length-1) {
sBuilder.append(",");
}
}
String sql = "DELETE FROM college WHERE college_id IN(" +sBuilder.toString()+")";
Object[] params = college_ids;
return BaseDao.executeUpdate(sql, params, conn);
}
public int updateCollege(College college, Connection conn){
StringBuilder sBuilder = new StringBuilder();
sBuilder.append("UPDATE college SET college_id = " + college.getCollege_id() +" ");
if (!StringUtil.isEmptyString(college.getCollege_name())) {
sBuilder.append(" , college_name ='" + college.getCollege_name() + "' ");
}
if (!StringUtil.isEmptyString(college.getCollege_type())) {
sBuilder.append(" , college_type ='" + college.getCollege_type() + "' ");
}
if (college.getCollege_persons()!=0) {
sBuilder.append(" , college_persons =" + college.getCollege_persons() + " ");
}
if (college.getCollege_money()!=0) {
sBuilder.append(" , college_money =" + college.getCollege_money() + " ");
}
if (!StringUtil.isEmptyString(college.getCollege_pic())) {
sBuilder.append(" , college_pic ='" + college.getCollege_pic() + "' ");
}
if (!StringUtil.isEmptyString(college.getCollege_note())) {
sBuilder.append(" , college_note ='" + college.getCollege_note() + "' ");
}
if (!StringUtil.isEmptyString(college.getCollege_plan())) {
sBuilder.append(" , college_plan ='" + college.getCollege_plan() + "' ");
return user_age;
}
public void setReg_date(String reg_date){
this.reg_date=reg_date;
}
public String getReg_date(){
return reg_date;
}
public void setUser_type(int user_type){
this.user_type=user_type;
}
public int getUser_type(){
return user_type;
}
public String getRandom() {
return random;
}
public void setRandom(String random) {
this.random = random;
}
public String getIds() {
return ids;
}
public void setIds(String ids) {
this.ids = ids;
}
public String getUser_dept() {
return user_dept;
}
public void setUser_dept(String user_dept) {
this.user_dept = user_dept;
}
public String getUser_types() {
return user_types;
}
public void setUser_types(String user_types) {
this.user_types = user_types;
}
//查询校园新闻
news.setNews_type(2);
news.setStart(0);
news.setLimit(5);
List<News> newss3 = indexManager.listNewss(news,null);
Param.setAttribute("newss3", newss3);
//查询留言信息
Sblog sblog = new Sblog();
sblog.setStart(0);
sblog.setLimit(5);
sblog.setSblog_flag(2);
List<Sblog> sblogs = indexManager.listSblogs(sblog,null);
Param.setAttribute("sblogs", sblogs);
} catch (Exception e) {
e.printStackTrace();
return "error";
}
return "index";
}
/**
* @Title: queryPicnews
* @Description: 查询图片新闻
* @return String
*/
public String queryPicnews(){
try {
//查询图片新闻
Picnews picnews = indexManager.getPicnews(paramsPicnews);
Param.setAttribute("picnews", picnews);
} catch (Exception e) {
e.printStackTrace();
return "error";
}
public String listSblogs(){
try {
//查询留言板
if (paramsSblog==null) {
paramsSblog = new Sblog();
}
paramsSblog.setSblog_flag(2);
setPagination(paramsSblog);
int[] sum={0};
List<Sblog> sblogs = indexManager.listSblogs(paramsSblog,sum);
Param.setAttribute("sblogs", sblogs);
setTotalCount(sum[0]);
} catch (Exception e) {
e.printStackTrace();
return "error";
}
return "sblog";
}
/**
* @Title: addSblog
* @Description: 新增留言
* @return String
*/
public String addSblog(){
try {
//验证码验证
String random = (String)Param.getSession("random");
if (!random.equals(paramsSblog.getRandom())) {
setErrorReason("验证码错误!");
return "error2";
}
//新增留言
indexManager.addSblog(paramsSblog);
} catch (Exception e) {
e.printStackTrace();
return "error";
}
return "success";
*/
public void updatePicnews(Picnews picnews){
Connection conn = BaseDao.getConnection();
//图片新闻内容编码
picnews.setPicnews_content(Transcode.htmlEncode(picnews.getPicnews_content()));
picnewsDao.updatePicnews(picnews,conn);
BaseDao.closeDB(null, null, conn);
}
/**
* @Title: listActivitys
* @Description: 活动消息查询
* @param activity
* @return List<Activity>
*/
public List<Activity> listActivitys(Activity activity,int[] sum){
Connection conn = BaseDao.getConnection();
if (sum!=null) {
sum[0] = activityDao.listActivitysCount(activity, conn);
}
List<Activity> activitys = activityDao.listActivitys(activity,conn);
BaseDao.closeDB(null, null, conn);
return activitys;
}
/**
* @Title: getActivity
* @Description: 活动消息查询
* @param activity
* @return Activity
*/
public Activity getActivity(Activity activity){
Connection conn = BaseDao.getConnection();
Activity _activity = activityDao.getActivity(activity, conn);
BaseDao.closeDB(null, null, conn);
return _activity;
}
/**
* @Title: addActivity
* @Description: 添加活动消息
* @param activity
* @return void