• 大小: 52.17M
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2022-07-25
  • 语言: 其他
  • 标签: 其他  

资源简介

crm.zip

资源截图

代码片段和文件信息

package com.lz.controller;

import java.io.IOException;
import java.util.List;

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

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.lz.pojo.House;
import com.lz.pojo.HouseType;
import com.lz.pojo.User;
import com.lz.service.HouseService;
import com.lz.service.HouseTypeService;
import com.lz.service.UserService;

@Controller
@RequestMapping(value = “/House“)
public class CarController {
@Resource
HouseService houseService;
@Resource
HouseTypeService houseTypeService;
@Resource
UserService userService;

@RequestMapping(value = “/HouseAdd“ method = RequestMethod.GET)
public void addDoGet(HttpServletRequest request HttpServletResponse response)
throws ServletException IOException {
// 查询房屋类型
List houseList = houseTypeService.query(null);
request.setAttribute(“houseList“ houseList);
// 查询房屋管理者

List userList = userService.getList(null null);
request.setAttribute(“userList“ userList);

request.getRequestDispatcher(“/view/house/house_add.jsp“).forward(request response);
}

@RequestMapping(value = “/HouseAdd“ method = RequestMethod.POST)
public void addDoPost(HttpServletRequest request HttpServletResponse response)
throws ServletException IOException {
request.setCharacterEncoding(“utf-8“);// 处理乱码

String houseType = request.getParameter(“houseType“);
String userName = request.getParameter(“userName“);
String houseAddress = request.getParameter(“houseAddress“);
String housePrice = request.getParameter(“housePrice“);
String houseAmbient = request.getParameter(“houseAmbient“);

House houseInfo = new House();

try {
houseInfo.setUserId(Integer.parseInt(userName));
houseInfo.setHousePrice(Double.parseDouble(housePrice));
houseInfo.setTypeId(Integer.parseInt(houseType));
} catch (Exception e) {
e.printStackTrace();
}
houseInfo.setHouseAddress(houseAddress);
houseInfo.setHouseAmbient(houseAmbient);

boolean mark = houseService.add(houseInfo);
if (mark) {
request.setAttribute(“info“ “房屋添加成功“);
} else {
request.setAttribute(“info“ “房屋添加失败“);
}

// 转发
request.getRequestDispatcher(“/view/house/house_save.jsp“).forward(request response);
}

@RequestMapping(value = “/HouseDelete“ method = RequestMethod.GET)
public void deleteDoGet(HttpServletRequest request HttpServletResponse response)
throws ServletException IOException {
try {
// 获取房屋编号
String houseid = request.getParameter(“houseId“);
int HouseId = Integer.parseInt(houseid);

boolean mark = houseService.delete(HouseId);
if (mark) {
request.setAttribute(“info“ “用户删除成功“);
} else {

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     文件        1093  2018-04-19 10:59  crm\.classpath
     文件        1186  2018-04-19 10:59  crm\.project
     文件         522  2018-04-19 10:59  crm\.settings\.jsdtscope
     文件         364  2018-04-19 10:59  crm\.settings\org.eclipse.jdt.core.prefs
     文件         468  2018-04-19 10:59  crm\.settings\org.eclipse.wst.common.component
     文件         414  2018-04-19 10:59  crm\.settings\org.eclipse.wst.common.project.facet.core.xml
     文件          49  2018-04-19 10:59  crm\.settings\org.eclipse.wst.jsdt.ui.superType.container
     文件           6  2018-04-19 10:59  crm\.settings\org.eclipse.wst.jsdt.ui.superType.name
     文件          39  2017-01-02 21:02  crm\WebRoot\meta-INF\MANIFEST.MF
     文件        1876  2017-01-18 10:26  crm\WebRoot\WEB-INF\classes\SqlMapConfig.xml
     文件        7498  2018-04-19 11:39  crm\WebRoot\WEB-INF\classes\com\lz\controller\CarController.class
     文件        3018  2018-04-19 11:39  crm\WebRoot\WEB-INF\classes\com\lz\controller\CarTypeController.class
     文件        6537  2018-04-19 11:39  crm\WebRoot\WEB-INF\classes\com\lz\controller\CustomerCareController.class
     文件        3337  2018-04-19 11:39  crm\WebRoot\WEB-INF\classes\com\lz\controller\CustomerConditionController.class
     文件       13535  2018-04-19 11:39  crm\WebRoot\WEB-INF\classes\com\lz\controller\CustomerController.class
     文件        3103  2018-04-19 11:39  crm\WebRoot\WEB-INF\classes\com\lz\controller\CustomerSourceController.class
     文件        3073  2018-04-19 11:39  crm\WebRoot\WEB-INF\classes\com\lz\controller\CustomerTypeController.class
     文件        3499  2018-04-19 11:39  crm\WebRoot\WEB-INF\classes\com\lz\controller\DepartmentController.class
     文件       11031  2018-04-19 11:39  crm\WebRoot\WEB-INF\classes\com\lz\controller\EmailController.class
     文件        6005  2018-04-19 11:39  crm\WebRoot\WEB-INF\classes\com\lz\controller\linkManController.class
     文件        4867  2018-04-19 11:39  crm\WebRoot\WEB-INF\classes\com\lz\controller\linkRecordController.class
     文件        2764  2018-04-19 11:39  crm\WebRoot\WEB-INF\classes\com\lz\controller\LoginController.class
     文件        4146  2018-04-19 11:39  crm\WebRoot\WEB-INF\classes\com\lz\controller\NoticeController.class
     文件        3663  2018-04-19 11:39  crm\WebRoot\WEB-INF\classes\com\lz\controller\ReportFormsController.class
     文件        3470  2018-04-19 11:39  crm\WebRoot\WEB-INF\classes\com\lz\controller\RoleController.class
     文件        8139  2018-04-19 11:39  crm\WebRoot\WEB-INF\classes\com\lz\controller\UserController.class
     文件        3044  2018-04-19 11:39  crm\WebRoot\WEB-INF\classes\com\lz\controller\WorkController.class
     文件         495  2018-04-19 11:39  crm\WebRoot\WEB-INF\classes\com\lz\dao\CustomerCareMapper.class
     文件        4973  2017-03-18 14:32  crm\WebRoot\WEB-INF\classes\com\lz\dao\CustomerCareMapper.xml
     文件         463  2018-04-19 11:39  crm\WebRoot\WEB-INF\classes\com\lz\dao\CustomerConditionMapper.class
     文件        3111  2017-01-19 20:38  crm\WebRoot\WEB-INF\classes\com\lz\dao\CustomerConditionMapper.xml
............此处省略814个文件信息

评论

共有 条评论