• 大小: 1.11MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-11-19
  • 语言: 其他
  • 标签: ssm  jQuery  mysql  

资源简介

基于maven的ssm项目,实现了用户的登陆修改注销以及注册,用户可以通过是否激活给定API来完成对设备,设备动作,以及设备上的传感器和传感器动作的各种操作。

资源截图

代码片段和文件信息

package com.controller;

import java.io.IOException;
import java.io.PrintWriter;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

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

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.mvc.support.RedirectAttributes;

import com.entity.DeviceAction;
import com.entity.Sensor;
import com.entity.SensorAction;
import com.service.intface.ActionServiceIntface;
import com.service.intface.DeviceServiceIntface;
@Controller
public class DeviceAvtionController {

@Autowired
private DeviceServiceIntface deviceService;

@Autowired
private ActionServiceIntface actionService;
@RequestMapping(“/toAction“)
public String toAction(){
return “action“;
}

@RequestMapping(“/queryAllDeviceAction“)
public String queryAllDeviceAction(HttpSession session){
List deviceActionList = actionService.queryAllDevicetion();
session.setAttribute(“deviceActionList“ deviceActionList);
return “redirect:/toAction“;
}
@RequestMapping(“/likeQueryDeviceAction“)
@ResponseBody
public Mapject> likeQueryDeviceAction(@RequestParam(value=“name“)String name1){
Mapject> deviceActionMap = new HashMapject>();
String name = “%“+name1+“%“; 
List deviceActionList = actionService.likeQueryDevice(name);
deviceActionMap.put(“deviceActionList“ deviceActionList);
return deviceActionMap;
}
@RequestMapping(“/tonewAction“)
public String tonewAction(){




return “new_action“;
}




@RequestMapping(“/deleteDeviceAction“)
public void deleteDeviceAction(@RequestParam(value=“deleteDeviceAction“)String deleteDeviceActionHttpServletResponse response) throws IOException{
PrintWriter out = response.getWriter();
System.out.println(deleteDeviceAction+“---------------==-=-“);
if(deleteDeviceAction !=null &&  !““.equals(deleteDeviceAction)){
int deviceId = Integer.parseInt(deleteDeviceAction.trim());
boolean b = actionService.deleteDeviceAction(deviceId);
out.print(b);
out.flush();
out.close();
}

}

@RequestMapping(“/addnewAction“)
public String addnewAction(DeviceAction deviceAction){
boolean b = actionService.insertDeviceAction(deviceAction);
System.out.println(b);
return “redirect:/queryAllDeviceAction“;
}
@RequestMapping(“/editAction/{actionId}“)
public String editAction(@PathVariable(value=“

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       1580  2018-10-03 15:28  geeklink\.classpath

     文件        548  2018-10-03 14:28  geeklink\.externalToolBuilders\org.eclipse.wst.jsdt.core.javascriptValidator.launch

     文件       1448  2018-10-03 14:28  geeklink\.project

     文件        503  2018-10-03 14:23  geeklink\.settings\.jsdtscope

     文件        108  2018-10-08 10:39  geeklink\.settings\org.eclipse.core.resources.prefs

     文件        430  2018-10-03 14:23  geeklink\.settings\org.eclipse.jdt.core.prefs

     文件         90  2018-10-03 14:23  geeklink\.settings\org.eclipse.m2e.core.prefs

     文件        660  2018-10-03 15:24  geeklink\.settings\org.eclipse.wst.common.component

     文件        292  2018-10-03 14:23  geeklink\.settings\org.eclipse.wst.common.project.facet.core.xml

     文件         49  2018-10-03 14:23  geeklink\.settings\org.eclipse.wst.jsdt.ui.superType.container

     文件          6  2018-10-03 14:23  geeklink\.settings\org.eclipse.wst.jsdt.ui.superType.name

     文件        232  2018-10-03 14:24  geeklink\.settings\org.eclipse.wst.xsl.core.prefs

     文件      16846  2018-06-24 14:38  geeklink\geeklink_mysql.sql

     文件       4495  2018-10-03 15:22  geeklink\pom.xml

     文件       7071  2018-10-11 09:41  geeklink\src\main\java\com\controller\DeviceAvtionController.java

     文件       7354  2018-10-11 08:57  geeklink\src\main\java\com\controller\DeviceController.java

     文件      10826  2018-10-11 11:30  geeklink\src\main\java\com\controller\LoginController.java

     文件       6897  2018-10-10 22:21  geeklink\src\main\java\com\controller\SensorController.java

     文件        896  2018-10-11 09:32  geeklink\src\main\java\com\dao\mapper\ActionMapper.java

     文件        613  2018-10-11 09:05  geeklink\src\main\java\com\dao\mapper\DeviceMapper.java

     文件        687  2018-10-10 20:58  geeklink\src\main\java\com\dao\mapper\SensorMapper.java

     文件        622  2018-10-07 11:50  geeklink\src\main\java\com\dao\mapper\UserDaoMapper.java

     文件       2830  2018-10-05 17:33  geeklink\src\main\java\com\entity\Device.java

     文件       1376  2018-10-07 13:43  geeklink\src\main\java\com\entity\DeviceAction.java

     文件       3012  2018-10-05 21:05  geeklink\src\main\java\com\entity\Sensor.java

     文件       1951  2018-10-09 21:03  geeklink\src\main\java\com\entity\SensorAction.java

     文件       2765  2018-10-04 16:13  geeklink\src\main\java\com\entity\User.java

     文件       2360  2018-10-05 15:46  geeklink\src\main\java\com\entity\UserMessage.java

     文件       3043  2018-10-11 09:31  geeklink\src\main\java\com\service\ActionService.java

     文件       2470  2018-10-10 22:45  geeklink\src\main\java\com\service\DeviceService.java

............此处省略178个文件信息

评论

共有 条评论