• 大小: 12.52MB
    文件类型: .zip
    金币: 2
    下载: 1 次
    发布日期: 2023-07-28
  • 语言: 数据库
  • 标签: 典当系统  

资源简介

spring+springmvc+mybatis搭建的一个典当系统附带mysql数据库

资源截图

代码片段和文件信息

package com.gcl.controller;

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

import net.sf.json.JSONArray;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.gcl.po.Auctioncompany;
import com.gcl.service.AuctioncompanyService;
import com.gcl.service.impl.AuctioneerServiceImpl;
import com.gcl.util.query.Page;



/**
 * 拍卖行管理
 * 处理基础管理模块中的拍卖行管理模块
 * @author 崇良
 *
 */
@Controller
@RequestMapping(“auctioncompany“)
public class AuctioncompanyController extends baseController{

@Autowired
private AuctioncompanyService auctioncompanyService;

@RequestMapping(“list“)
public String list(String name String id) {

String currentpageString = request.getParameter(“currentPage“);
if (currentpageString == null || ““.equals(currentpageString)) {
currentpageString = “1“;
}
Page query = new Page();
query.setCurrentPage(Integer.parseInt(currentpageString));
query.setPageSize(8);

Page accounts;
if (id == null) {
accounts = auctioncompanyService.queryPage(name 0 query);
} else {
accounts = auctioncompanyService.queryPage(name Integer.parseInt(id) query);
}

if(id==null){
request.setAttribute(“name“ name);
request.setAttribute(“page“ accounts);
return “/basismanage/auctioncompany/auctioncompany_list“;
}else{
request.setAttribute(“auctioncompany“ accounts.result.get(0));

return “/basismanage/auctioncompany/auctioncompany_addandupdate“;
}

}

@RequestMapping(“toadd“)
public String toadd(){
return “/basismanage/auctioncompany/auctioncompany_addandupdate“;
}

@RequestMapping(“save“)
public String save(Auctioncompany auctioncompany){
if(auctioncompany.getIsuse()==null || ““.equals(auctioncompany.getIsuse())){
auctioncompany.setIsuse(1);
}
//因为新增和修改是同一个页面,故可通过该条数据是否存在id来判断是新增还是修改操作。
if(auctioncompany.getId()==null){
this.auctioncompanyService.insert(auctioncompany);
}else{
this.auctioncompanyService.updateByPrimaryKey(auctioncompany);
}

return this.list(null null);
}

@RequestMapping(“delete“)
public String delete(String id) {

//逻辑删除,只是页面不显示,但是数据库还是有记录的
Auctioncompany auctioncompany = this.auctioncompanyService.findbyid(Integer.parseInt(id));
auctioncompany.setIsuse(0);
this.auctioncompanyService.updateByPrimaryKey(auctioncompany);
return this.list(null null);
}

@RequestMapping(“findbyauctioncompanyname“)
public void findbyauctioncompanyname(String name) throws IOException{
JSONArray jsonArray=new JSONArray();
List auctioncompanies=this.auctioncompanyService.findbycompanyname(name);
for (Auctioncompany auctioncompany : auctioncompanies) {
jsonArray.add(auctioncompany);
}

response.getWriter().write(jsonArray.toString());
}
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2017-04-26 11:36  典当系统\
     目录           0  2017-03-15 16:29  典当系统\数据库\
     文件       28826  2017-03-15 16:29  典当系统\数据库\sql.sql
     目录           0  2017-03-15 16:30  典当系统\源码\
     目录           0  2017-03-15 16:30  典当系统\源码\DianDanSystem\
     文件        1029  2017-03-06 08:12  典当系统\源码\DianDanSystem\.classpath
     目录           0  2017-03-15 16:30  典当系统\源码\DianDanSystem\.externalToolBuilders\
     目录           0  2017-03-15 16:30  典当系统\源码\DianDanSystem\.externalToolBuilders\.svn\
     文件         414  2017-03-06 11:24  典当系统\源码\DianDanSystem\.externalToolBuilders\.svn\all-wcprops
     文件         530  2017-03-06 11:24  典当系统\源码\DianDanSystem\.externalToolBuilders\.svn\entries
     目录           0  2017-03-06 11:24  典当系统\源码\DianDanSystem\.externalToolBuilders\.svn\prop-base\
     目录           0  2017-03-06 11:24  典当系统\源码\DianDanSystem\.externalToolBuilders\.svn\props\
     目录           0  2017-03-15 16:30  典当系统\源码\DianDanSystem\.externalToolBuilders\.svn\text-base\
     文件         548  2017-03-06 11:24  典当系统\源码\DianDanSystem\.externalToolBuilders\.svn\text-base\org.eclipse.wst.jsdt.core.javascriptValidator.launch.svn-base
     目录           0  2017-03-15 16:30  典当系统\源码\DianDanSystem\.externalToolBuilders\.svn\tmp\
     目录           0  2017-03-06 11:24  典当系统\源码\DianDanSystem\.externalToolBuilders\.svn\tmp\prop-base\
     目录           0  2017-03-06 11:24  典当系统\源码\DianDanSystem\.externalToolBuilders\.svn\tmp\props\
     目录           0  2017-03-06 11:24  典当系统\源码\DianDanSystem\.externalToolBuilders\.svn\tmp\text-base\
     文件         548  2017-03-06 08:10  典当系统\源码\DianDanSystem\.externalToolBuilders\org.eclipse.wst.jsdt.core.javascriptValidator.launch
     目录           0  2017-03-15 16:30  典当系统\源码\DianDanSystem\.myeclipse\
     目录           0  2017-03-15 16:30  典当系统\源码\DianDanSystem\.myeclipse\.svn\
     文件         143  2017-03-06 08:06  典当系统\源码\DianDanSystem\.myeclipse\.svn\all-wcprops
     文件         326  2017-03-06 08:06  典当系统\源码\DianDanSystem\.myeclipse\.svn\entries
     目录           0  2017-03-06 08:06  典当系统\源码\DianDanSystem\.myeclipse\.svn\prop-base\
     目录           0  2017-03-06 08:06  典当系统\源码\DianDanSystem\.myeclipse\.svn\props\
     目录           0  2017-03-06 08:06  典当系统\源码\DianDanSystem\.myeclipse\.svn\text-base\
     目录           0  2017-03-15 16:30  典当系统\源码\DianDanSystem\.myeclipse\.svn\tmp\
     目录           0  2017-03-06 08:06  典当系统\源码\DianDanSystem\.myeclipse\.svn\tmp\prop-base\
     目录           0  2017-03-06 08:06  典当系统\源码\DianDanSystem\.myeclipse\.svn\tmp\props\
     目录           0  2017-03-06 08:06  典当系统\源码\DianDanSystem\.myeclipse\.svn\tmp\text-base\
     文件         312  2017-03-06 08:07  典当系统\源码\DianDanSystem\.mymetadata
............此处省略1854个文件信息

评论

共有 条评论

相关资源