资源简介

基于Spring+SpringMvc+Mybatis+Mysql的单体项目,前端技术使用jsp。项目功能涵盖基本的租车系统应用,当然也需要进一步的优化。后台用户有管理员、客服、维修人员,前端人员有用户,每一个角色进入对应的界面进行相关的操作。页面的样式是来源于网络。但是经过本人改造。

资源截图

代码片段和文件信息

package com.lyd.bikeController;

import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.Workbook;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;

import com.lyd.bikeEntity.Bike;
import com.lyd.bikeServiceDao.AdminServiceDao;
import com.lyd.bikeServiceDao.BikeServiceDao;
import com.lyd.bikeUtils.ExcelUtils;

@Controller
public class AdminBikeController {

public static final String ONE=“第一代“;
public static final String TWO=“第二代“;
public static final String THREE=“第三代“;
public static final String ISUSER=“可用“;
public static final String ISNOTUSE=“不可用“;
public static final String ADMIN_UPDATE_OK=“ok“;
public static final String ADMIN_UPDATE_FINAL=“no“;
public static final String ADMIN_UPDATE_USING=“骑行中“;
public static final String ADMIN_UPDATE_ISNOTUSING=“未骑行“;

//业务逻辑层BikeMapper的注入
@Resource(name=“adminServiceDao“)
private AdminServiceDao adminServiceDao;

//业务逻辑层BikeMapper的注入
@Resource(name=“bikeServiceDao“)
private BikeServiceDao bikeServiceDao;

//管理员新增单车
@RequestMapping(value=“/adminAddBike“method=RequestMethod.POST)
public void adminAddBike(Integer bikePassword String bikeGenerationnumString bikeIsuseString bikeAreaHttpServletRequest requestHttpServletResponse responseModelMap model){
response.setContentType(“text/html; charset=utf-8“);
PrintWriter out = null;
try {
out = response.getWriter();
} catch (IOException e) {
e.printStackTrace();
}
Integer Generationnum = null;
Integer Isuse = null;
if(ONE.equals(bikeGenerationnum)){
Generationnum=1;
}
if(TWO.equals(bikeGenerationnum)){
Generationnum=2;
}
if(THREE.equals(bikeGenerationnum)){
Generationnum=3;
}
if(ISUSER.equals(bikeIsuse)){
Isuse=1;
}
if(ISNOTUSE.equals(bikeIsuse)){
Isuse=0;
}
boolean adminAddBike = adminServiceDao.adminAddBike(bikePassword Generationnum Isuse bikeArea);
if(adminAddBike==true){
out.print(“ript language=\“javascript\“>alert(‘提交成功‘);window.location.href=‘adminaddbike.jsp‘ript>“);
}else{
out.print(“ript language=\“javascript\“>alert(‘提交失败‘);window.location.href=‘adminaddbike.jsp‘ript>“);
}
}

/**
 * 用户得到单车列表
 * @param offset 当前页
 * @p

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2018-07-08 23:14  bikeshare\
     文件         771  2018-05-20 23:35  bikeshare\.classpath
     文件         909  2018-02-12 10:43  bikeshare\.project
     目录           0  2018-07-08 23:14  bikeshare\.settings\
     文件         567  2018-01-25 10:31  bikeshare\.settings\.jsdtscope
     文件         197  2018-04-12 00:01  bikeshare\.settings\org.eclipse.core.resources.prefs
     文件         364  2018-01-25 10:31  bikeshare\.settings\org.eclipse.jdt.core.prefs
     文件         479  2018-02-12 10:43  bikeshare\.settings\org.eclipse.wst.common.component
     文件         345  2018-01-25 10:31  bikeshare\.settings\org.eclipse.wst.common.project.facet.core.xml
     文件          49  2018-01-25 10:31  bikeshare\.settings\org.eclipse.wst.jsdt.ui.superType.container
     文件           6  2018-01-25 10:31  bikeshare\.settings\org.eclipse.wst.jsdt.ui.superType.name
     文件          95  2018-02-12 09:07  bikeshare\.settings\org.jboss.ide.eclipse.as.core.prefs
     文件         162  2018-01-25 11:02  bikeshare\.tern-project
     目录           0  2018-07-08 23:14  bikeshare\build\
     目录           0  2018-07-08 23:14  bikeshare\build\classes\
     目录           0  2018-07-08 23:14  bikeshare\build\classes\com\
     目录           0  2018-07-08 23:14  bikeshare\build\classes\com\lyd\
     目录           0  2018-07-08 23:14  bikeshare\build\classes\com\lyd\bikeController\
     文件       11288  2018-05-20 23:35  bikeshare\build\classes\com\lyd\bikeController\AdminBikeController.class
     文件        4344  2018-05-20 23:35  bikeshare\build\classes\com\lyd\bikeController\ComplainController.class
     文件        5299  2018-05-20 23:35  bikeshare\build\classes\com\lyd\bikeController\ServiceController.class
     文件       12623  2018-05-20 23:35  bikeshare\build\classes\com\lyd\bikeController\UserBikeController.class
     文件       10368  2018-05-20 23:35  bikeshare\build\classes\com\lyd\bikeController\UserLoginController.class
     目录           0  2018-07-08 23:14  bikeshare\build\classes\com\lyd\bikeEntity\
     文件        1920  2018-05-20 23:35  bikeshare\build\classes\com\lyd\bikeEntity\Bike.class
     文件        1675  2018-05-20 23:35  bikeshare\build\classes\com\lyd\bikeEntity\Column.class
     文件        1819  2018-05-20 23:35  bikeshare\build\classes\com\lyd\bikeEntity\Complain.class
     文件        2617  2018-05-20 23:35  bikeshare\build\classes\com\lyd\bikeEntity\Employee.class
     文件        1164  2018-05-20 23:35  bikeshare\build\classes\com\lyd\bikeEntity\LimiteRole.class
     文件        1779  2018-05-20 23:35  bikeshare\build\classes\com\lyd\bikeEntity\Record.class
     文件        1798  2018-05-20 23:35  bikeshare\build\classes\com\lyd\bikeEntity\Service.class
............此处省略287个文件信息

评论

共有 条评论