In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
Today, I will talk to you about what it is like for JavaWeb to develop a campus service system based on ssm. Many people may not know much about it. In order to make you understand better, the editor has summarized the following contents for you. I hope you can get something from this article.
Using a campus service system developed by Javaweb, it is similar to bounty hunters by publishing their own tasks and setting the amount of reward.
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}, # {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}
Logout login interface
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.RequestMapping;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;/** * logout login * * asynchronously read the list of institutions * * read a user information * * @ author * / @ Controller@SessionAttributes ({"nowuser", "nowadmin"}) @ RequestMapping (value = "common/") public class CommonController {@ Resource (name = "schoolService") public SchoolService schoolService; @ Resource (name = "userService") public UserService userService / Log out @ RequestMapping ("logout.do") public String logout (HttpServletRequest request, Model model) {model.addAttribute ("msg", "exited"); 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 ("0000000000000000000000000000000000000000000000000000000000000000000"); 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", "error"); return "userInfo" } if (stuid==0) {model.addAttribute ("msg", "error"); return "userInfo";} User user = userService.getByUid (stuid); model.addAttribute ("theuser", user); return "userInfo";}}
User interface
Personal Center alert ("Please sign in first"); _ window.location.href= "login.jsp" rel= "external nofollow"; Campus Real-time Service platform
Mission center personal center ${nowuser.name} personal information modification security settings returned
Campus real-time service platform task management released tasks accepted tasks released new tasks personal information data modification security settings
Personal information
Information user number ${nowuser.stuid} user student number ${nowuser.studentid} user name ${nowuser.name} school number ${nowuser.schoolid} user gender male and female registration time user balance ${nowuser.money} user status is restricted
Alert ("${msg}"); ©- Campus Instant Service platform Office Tel: 6666666
/ / JavaScript code area layui.use ('element', function () {var element = layui.element; / / Monitor navigation, click element.on (' nav (test)', function (elem) {/ / console.log (elem) layer.msg (elem.text ());})
After reading the above, do you have any further understanding of how JavaWeb develops a campus service system based on ssm? If you want to know more knowledge or related content, please follow the industry information channel, thank you for your support.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.