JavaWeb开发基于ssm的校园服务系统(实例详解)

网友投稿 254 2022-12-15


JavaWeb开发基于ssm的校园服务系统(实例详解)

利用javaweb开发的一个校园服务系统,通过发布自己的任务并设置悬赏金额,有些类似于赏金猎人,在这里分享给大家,有需要可以联系我:2186527424:

stuid, studentid, password, schoolid, sex, name, registertime, money, state

select

from user

where stuid = #{stuid,jdbcType=INTEGER}

delete from user

where stuid = #{stuid,jdbcType=INTEGER}

insert into user (stuid, studentid, password,

schoolid, sex, name,

registertime, money, state

)

values (#{stuid,jdbcType=INTEGER}, #{studentid,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR},

http:// #{schoolid,jdbcType=INTEGER}, #{sex,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR},

#{registertime,jdbcType=TIMESTAMP}, #{money,jdbcType=DOUBLE}, #{state,jdbcType=INTEGER}

)

insert into user

stuid,

studentid,

password,

schoolid,

sex,

name,

registertime,

money,

state,

#{stuid,jdbcType=INTEGER},

#{studentid,jdbcType=VARCHAR},

#{password,jdbcType=VARCHAR},

#{schoolid,jdbcType=INTEGER},

#{sex,jdbcType=INTEGER},

#{name,jdbcType=VARCHAR},

#{registertime,jdbcType=TIMESTAMP},

#{money,jdbcType=DOUBLE},

#{state,jdbcType=INTEGER},

update user

studentid = #{studentid,jdbcType=VARCHAR},

password = #{password,jdbcType=VARCHAR},

schoolid = #{schoolid,jdbcType=INTEGER},

sex = #{sex,jdbcType=INTEGER},

name = #{name,jdbcType=VARCHAR},

registertime = #{registertime,jdbcType=TIMESTAMP},

money = #{money,jdbcType=DOUBLE},

state = #{state,jdbcType=INTEGER},

where stuid = #{stuid,jdbcType=INTEGER}

update user

set studentid = #{studentid,jdbcType=VARCHAR},

password = #{password,jdbcType=VARCHAR},

schoolid = #{schoolid,jdbcType=INTEGER},

sex = #{sex,jdbcType=INTEGER},

name = #{name,jdbcType=VARCHAR},

registertime = #{registertime,jdbcType=TIMESTAMP},

money = #{money,jdbcType=DOUBLE},

state = #{state,jdbcType=INTEGER}

where stuid = #{stuid,jdbcType=INTEGER}

SELECT

from `user` WHERE CONCAT(studentid,name) LIKE #{words,jdbcType=VARCHAR}

SELECT COUNT(*) FROM `user` WHERE studentid = #{account,jdbcType=VARCHAR};

SELECT FROM `user` WHERE studentid = #{account,jdbcType=VARCHAR};

注销登录界面

package com.ssm.controller;

import java.io.IOException;

import java.io.PrintWriter;

import java.util.List;

import javax.annotation.Resource;

import javax.servlet.http.HttpServletRequest;

import javax.servlet.http.HttpServletResponse;

import org.springframework.stereotype.Controller;

import org.springframework.ui.Model;

import org.springframework.web.bind.annotation.RequestMappinSfzULSng;

import org.springframework.web.bind.annotation.SessionAttributes;

import com.ssm.util.jsonUtil;

import com.ssm.po.School;

import com.ssm.po.User;

import com.ssm.service.SchoolService;

import com.ssm.service.UserService;

/**

* 注销登录*

* 异步读取院校列表*

* 读取一个用户信息*

* @author

*

*/

@Controller

@SessionAttributes({ "nowuser","nowadmin"})

@RequestMapping(value = "common/")

public class CommonController {

@Resource(name = "schoolService")

public SchoolService schoolService;

@Resource(name = "userService")

public UserService userService;

// 注销

@RequestMapping("logout.do")

public String logout(HttpServletRequest request, Model model) {

model.addAttribute("msg", "已退出");

request.getSession(false).removeAttribute("nowuser");

request.getSession(false).removeAttribute("nowadmin");

return "login";

}

@RequestMapping("getallschools.do")

public void getallschools(HttpServletResponse response) throws IOException{

System.out.println("000000000000000000000000000000000");

List list = schoolService.getAllSchoolsNoState();

response.setCharacterEncoding("UTF-8");

response.setContentType("text/html");

String list_String = JsonUtil.list2json(list);

PrintWriter out = response.getWriter();

out.println(list_String);

out.flush();

out.close();

}

@RequestMapping("getuser.do")

public String getuser(String stuidstr,HttpServletRequest request,Model model) {

int stuid = 0;

try {

stuid = Integer.parseInt(stuidstr);

} catch (Exception e) {

model.addAttribute("msg", "出现错误");

return "userInfo";

}

if (stuid==0) {

model.addAttribute("msg", "出现错误");

return "userInfo";

}

User user = userService.getByUid(stuid);

model.addAttribute("theuser", user);

return "userInfo";

}

}

用户界面

<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>

<%

String path = request.getContextPath();

String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()

+ path + "/";

%>

<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>

${nowuser.name }

个人信息

资料修改

安全设置

href="javascript:;" rel="external nofollow" rel="external nofollow" rel="external nofollow" >任务管理

已发布任务

已接受任务

发布新任务

href="javascript:;" rel="external nofollow" rel="external nofollow" rel="external nofollow" >个人中心

个人信息

资料修改

安全设置

class="layui-badge-dot layui-bg-orange">

class="layui-badge-dot layui-bg-green">

class="layui-badge-dot layui-bg-cyan">

class="layui-badge-dot layui-bg-blue">

class="layui-badge-dot layui-bg-black">

class="layui-badge-dot layui-bg-gray">

class="layui-badge-dot layui-bg-orange">

class="layui-badge-dot layui-bg-green">

class="layui-badge-dot layui-bg-cyan">

class="layui-badge-dot layui-bg-blue">

class="layui-badge-dot layui-bg-black">

class="layui-badge-dot layui-bg-gray">

style="margin-top: 30px;">

个人信息

信息

style="margin-bottom: 0px;">

 

 

pattern=" yyyy-MM-dd HH:mm:ss" />

正常

被限制

© - 校园即时服务平台办公电话:6666666

总结

以上所述是给大家介绍的JavaWeb开发基于ssm的校园服务系统,希望对大家有所帮助!


版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:Java lambda表达式实现Flink WordCount过程解析
下一篇:spring boot整合kafka过程解析
相关文章

 发表评论

暂时没有评论,来抢沙发吧~