JSP+SQL体育信息发布平台;(Java+JSP+SQL)

说明:

本篇博客以代码展示为主,具体功能实现的详细步骤请返回目录阅读其他章节内容;
本篇博客展示的代码与其他章节所展示的代码略有不同,在前面章节的基础上增加了一些CSS样式。

JSP+SQL体育信息发布平台;SSM前端前端框架 : layui数据可视化框架 : echarts后端IOC容器 : SpringMVC框架 : SpringMVC缓存技术:Redis数据库:Mysql日志框架 : Log4j安全框架 : Shiro

代码已经上传github,下载地址:https://github.com/21503882/news

JSP+SQL体育信息发布平台;(Java+JSP+SQL)_第1张图片

JSP+SQL体育信息发布平台;(Java+JSP+SQL)_第2张图片

JSP+SQL体育信息发布平台;(Java+JSP+SQL)_第3张图片

JSP+SQL体育信息发布平台;(Java+JSP+SQL)_第4张图片

JSP+SQL体育信息发布平台;(Java+JSP+SQL)_第5张图片

 

 

前台系统功能划分
前台系统主要包括用户浏览模块、评论模块、搜索模块。前台系统模块如图3-1。
前台系统模块图
后台系统功能划分
后台系统可分为用户管理模块、添加体育信息内容模块、体育信息内容管理模块、评论管理模块、体育信息类别管理模块。后台系统如图。
后台系统模块
前台主页面
新闻详情 
用户评论
管理员登录 
添加新闻
管理新闻 
管理评论
类别管理
用户管理

import java.io.UnsupportedEncodingException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import com.crm.biz.MailFlowBiz;
import com.crm.info.HrEmployee;
import com.crm.info.MailFlow;
import com.crm.info.ParamSysparam;
import com.crm.tools.Scopes;
import com.crm.tools.WebTools;
import com.crm.vobj.PageInfo;
import com.opensymphony.xwork2.ActionSupport;
@Scope("prototype")
@Controller("mailFlowAction")
public class MailFlowAction extends ActionSupport {
    
    private MailFlowBiz mailFlowBiz;

    public void setMailFlowBiz(MailFlowBiz mailFlowBiz) {
        this.mailFlowBiz = mailFlowBiz;
    }

    public String execute() {
        
        return SUCCESS;
    }
    private String emps;
    public String getEmps() {
        return emps;
    }

    public void setEmps(String emps) {
        this.emps = emps;
    }
    private MailFlow mailflow;
    private int index;//页码
    
    public void setIndex(int index) {
        this.index = index;
    }

    public MailFlow getMailflow() {
        return mailflow;
    }

    public void setMailflow(MailFlow mailflow) {
        this.mailflow = mailflow;
    }

    public String ajaxSendMail(){
        int[] mailIdEs = mailFlowBiz.addMail(mailflow,emps);
        if (mailIdEs!=null) {
            WebTools.mailIdes=mailIdEs;
            Scopes.getRequestMap().put("data", "success");
        }else{
            Scopes.getRequestMap().put("data", "failed");
        }
        return "ajax";
    }
    
    public String ajaxLoadNewMail(){
        PageInfo info=new PageInfo(8, index);
        List mailFlows=mailFlowBiz.loadNewMail(info);
        Map jobj=new HashMap();
        jobj.put("pi", info);
        WebTools.jsonClearMailFlows(mailFlows);
        jobj.put("fs", mailFlows);
        String data=WebTools.convertJson(jobj);
        Scopes.getRequestMap().put("data", data);
        return "ajax";
    }
    
    public String ajaxLoadNewCount(){
        Scopes.getRequestMap().put("data", mailFlowBiz.getNewMail());
        return "ajax";
    }
    
    public String ajaxLoadAllMail(){
        PageInfo info=new PageInfo(8, index);
        List mailFlows=mailFlowBiz.loadAllMail(info);
        Map jobj=new HashMap();
        jobj.put("pi", info);
        WebTools.jsonClearMailFlows(mailFlows);
        jobj.put("fs", mailFlows);
        String data=WebTools.convertJson(jobj);
        Scopes.getRequestMap().put("data", data);
        return "ajax";
    }
    public String ajaxLoadSendMail(){
        PageInfo info=new PageInfo(8, index);
        List mailFlows=mailFlowBiz.loadSendMail(info);
        Map jobj=new HashMap();
        jobj.put("pi", info);
        WebTools.jsonClearMailFlows(mailFlows);
        jobj.put("fs", mailFlows);
        String data=WebTools.convertJson(jobj);
        Scopes.getRequestMap().put("data", data);
        return "ajax";
    }
    public String ajaxLoadStarMail(){
        PageInfo info=new PageInfo(8, index);
        List mailFlows=mailFlowBiz.loadStarMail(info);
        Map jobj=new HashMap();
        jobj.put("pi", info);
        WebTools.jsonClearMailFlows(mailFlows);
        jobj.put("fs", mailFlows);
        String data=WebTools.convertJson(jobj);
        Scopes.getRequestMap().put("data", data);
        return "ajax";
    }
    public String ajaxLoadTrashMail(){
        PageInfo info=new PageInfo(8, index);
        List mailFlows=mailFlowBiz.loadTrashMail(info);
        Map jobj=new HashMap();
        jobj.put("pi", info);
        WebTools.jsonClearMailFlows(mailFlows);
        jobj.put("fs", mailFlows);
        String data=WebTools.convertJson(jobj);
        Scopes.getRequestMap().put("data", data);
        return "ajax";
    }
    private int id;
    public void setId(int id) {
        this.id = id;
    }

    public String ajaxLoadOneById(){
        MailFlow mailFlow=mailFlowBiz.findOne(id);
        mailFlowBiz.setIsView(id);
        int currentemp=((HrEmployee)Scopes.getSessionMap().get("emp")).getId();
        ParamSysparam p=new ParamSysparam();
        p.setId(currentemp);
        mailFlow.setParamSysparamByReciveTypeId(p);
        WebTools.clearEmployee(mailFlow.getHrEmployeeByReceiveId());
        WebTools.clearEmployee(mailFlow.getHrEmployeeBySenderId());
        if (mailFlow.getParamSysparamByImportant()!=null) {
            WebTools.clearSysParams(mailFlow.getParamSysparamByImportant());
        }
        if (mailFlow.getParamSysparamByReciveTypeId()!=null) {
            WebTools.clearSysParams(mailFlow.getParamSysparamByReciveTypeId());
        }
        String data=WebTools.convertJson(mailFlow);
        Scopes.getRequestMap().put("data", data);
        return "ajax";
    }
    private String searchname;

    public void setSearchname(String searchname) {
        this.searchname = searchname;
    }

    public String ajaxSearchMailByName() throws UnsupportedEncodingException{
        searchname=new String(searchname.getBytes("iso-8859-1"),"UTF-8");
        PageInfo info=new PageInfo(8, index);
        List flows = mailFlowBiz.findBymailTitle(searchname,info);
        Map jobj=new HashMap();
        jobj.put("pi", info);
        WebTools.jsonClearMailFlows(flows);
        jobj.put("fs", flows);
        String data=WebTools.convertJson(jobj);
        Scopes.getRequestMap().put("data", data);
        return "ajax";
    }
    
    public String del(){
        mailFlowBiz.delFalse(id);
        return "del";
    }
    public String delete(){
        mailFlowBiz.delete(id);
        return "del";
    }
    public String setStar(){
        String data="";
        if (mailFlowBiz.setStar(id)) {
            data="success";
        }else{
            data="failed";
        }
        Scopes.getRequestMap().put("data", data);
        return "ajax";
    }
}

<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://"
            + request.getServerName() + ":" + request.getServerPort()
            + path + "/";
%>



index.jsp







    
    
    


        
        
        

            
            
            

                
                

                    

                        
                        
                         
                        
                        


                            我的桌面 我的办公信息导航页
                        


                        
                        
                    

                

                
                
                

                    

                        

                        

                            
我的便签

                            
6

                        

                    

                    

                        

                        

                            
我的日程

                            
12

                        

                    

                    

                        

                        

                        

                            

[email protected]


                            

Re:  Project Update!


                            

24 may 2017 12.30PM  the project plan update meeting...


                        

                        

                            

                            
14
 
                        

                    

                    

                        

                        

                            
                        

                        

                            
我的联系人

                            
452

                        

                    

                    

                        

                        

                            
                        

                        

                            
我的合同

                            
43

                        

                    

                    

                        

                        

                            
我的客户

                            
121

                        

                    

                    

                        

                            
                        

                        

                            
我的跟进

                            
12

                        

                    

                    

                        

                            
                        

                        

                            
我签名的发票

                            
12
                            

                        

                    

                    

                        

                            
                        

                        

                            

                                
                            

                            

                        

                    

                    

                        

                            
                        

                        

                            
我的订单

                            
12

                        

                    

                    

                        

                            
                        

                        

                            
我的收款

                            
3

                        

                    

                    

                        

                            
                        

                        

                            
公司新闻

                            
11

                        

                    

                    

                        

                            
                        

                        

                            
公司聊天室

                            
222

                        

                    

                    

                        

                        

                            
公司公告

                            
34

                        

                    

                    

                        

                        

                        

                            
                        

                        

                            
我的设置

                        

                    

                    

                        

                        

                        

                            
                        

                        

                            
锁屏

                        

                    

                

                

                
            

            
            
        

        
    

    
    
    
    
    
    

 代码已经上传github,下载地址:​​​​​​​​​​​​​​https://github.com/21503882/news


你可能感兴趣的:(JSP+SQL体育信息发布平台;(Java+JSP+SQL))