• 大小: 22MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-06-13
  • 语言: Java
  • 标签: ssh+mysql  完整项目  

资源简介

spring+struts2+hibernate +mysql ,前台jsp+ccs+jquery,myeclips开发的代理商管理系统,包括数据ddl dml,新手学习

资源截图

代码片段和文件信息

package cn.agent.action;

import java.io.IOException;
import java.io.PrintWriter;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts2.ServletActionContext;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;
import net.sf.json.JSONobject;
import cn.agent.entity.Client;
import cn.agent.entity.Logs;
import cn.agent.entity.User;
import cn.agent.service.CustomerTypeService;
import cn.agent.service.LogsService;
import cn.agent.util.Page;

import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;

@SuppressWarnings(“serial“)
@Scope(“prototype“)
@Controller()
//客户类型
public class CustomerTypeAction extends ActionSupport {

@Autowired
@Qualifier(“customerTypeService“)
private CustomerTypeService customerTypeBiz; //客户类型

@Autowired
@Qualifier(“LogsService“)
private LogsService logSer; //日志

private Logs logs= new Logs(); //日志
Mapject> session = ActionContext.getContext().getSession();

private String pageNo; // 当前页
private Page page; // 分页工具类
private List clientList;
private Client client;
private JSONobject jsonList;
private int clientID;
private String btnName;
private HttpServletResponse response = ServletActionContext.getResponse();

//检测客户类型是否存在
public String IsExistCustomer() throws IOException{
Mapject > message = new HashMapject>();
if (customerTypeBiz.IsExistCustomerType(client.getClientName())) {
message.put(“getdata“ “true“); // 不存在(可用)
} else {
message.put(“getdata“ “false“); // 存在(不可用)
}
jsonList = JSONobject.fromobject(message);
return “IsExistCustomer“;
}

/**
 * 查询全部类型信息
 * @return
 */
public String list() {
page = new Page(6);
if (!““.equals(pageNo) && null != pageNo) {
page.setPageNo(Integer.parseInt(pageNo)); // 设置当前页
}
page.setCountSize(customerTypeBiz.CustomerTypeCount());// 设置记录数
clientList = customerTypeBiz.clientList(page);
return “clientSuccess“;
}

/**
 * 删除类型信息
 * 
 * @return
 * @throws IOException 
 */
public String del() throws IOException {
response.setContentType(“text/html;charset=utf-8“);
PrintWriter out = response.getWriter();

Integer cId = client.getClientId();
String clientName = customerTypeBiz.findClientById(cId).getClientName();
Integer result= this.customerTypeBiz.delClientType(cId);
if(result==1){
out.print(“ript>location.href=‘customerType_list‘;ript>“);
User user = (User) session.get(“loginedUser“);
logs.setUser(user);
logs.setOperateInfo(“删除了客户类型《“+clientName+“》“);
logs.setOperateDatetime(new Date());
logSer.addLogs(logs);
}else{
out.print(“

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2017-02-18 13:26  AgentSystemSSH\
     文件         622  2017-01-02 18:07  AgentSystemSSH\.classpath
     目录           0  2017-02-18 13:28  AgentSystemSSH\.myeclipse\
     文件         559  2017-01-08 16:11  AgentSystemSSH\.myhibernatedata
     文件         315  2017-02-12 13:30  AgentSystemSSH\.mymetadata
     文件        1959  2017-01-03 16:45  AgentSystemSSH\.project
     目录           0  2017-02-18 13:26  AgentSystemSSH\.settings\
     文件         500  2017-01-02 18:04  AgentSystemSSH\.settings\.jsdtscope
     文件         169  2017-02-10 13:54  AgentSystemSSH\.settings\com.genuitec.eclipse.core.prefs
     文件        1035  2017-01-08 16:11  AgentSystemSSH\.settings\com.genuitec.eclipse.j2eedt.core.prefs
     文件          89  2017-01-08 16:11  AgentSystemSSH\.settings\com.genuitec.jboss.ide.eclipse.xdoclet.run.prefs
     文件        1353  2017-02-10 15:20  AgentSystemSSH\.settings\org.eclipse.core.resources.prefs
     文件         364  2017-01-02 18:04  AgentSystemSSH\.settings\org.eclipse.jdt.core.prefs
     文件         106  2017-01-08 16:11  AgentSystemSSH\.settings\org.eclipse.ltk.core.refactoring.prefs
     文件         480  2017-01-02 18:04  AgentSystemSSH\.settings\org.eclipse.wst.common.component
     文件         252  2017-01-02 18:04  AgentSystemSSH\.settings\org.eclipse.wst.common.project.facet.core.xml
     文件         153  2017-01-08 16:11  AgentSystemSSH\.settings\org.eclipse.wst.jsdt.ui.prefs
     文件          49  2017-01-02 18:04  AgentSystemSSH\.settings\org.eclipse.wst.jsdt.ui.superType.container
     文件           6  2017-01-02 18:04  AgentSystemSSH\.settings\org.eclipse.wst.jsdt.ui.superType.name
     目录           0  2017-02-18 13:26  AgentSystemSSH\WebRoot\
     文件        1880  2017-02-10 16:13  AgentSystemSSH\WebRoot\APPAddress.jsp
     文件        2962  2017-02-06 10:10  AgentSystemSSH\WebRoot\AccountDetail.jsp
     文件        5717  2017-02-06 10:21  AgentSystemSSH\WebRoot\Advancepay.jsp
     文件        4099  2017-01-02 14:45  AgentSystemSSH\WebRoot\AuthorityManagement.jsp
     文件        6867  2017-02-10 14:40  AgentSystemSSH\WebRoot\CardType.jsp
     文件        7169  2017-02-10 14:42  AgentSystemSSH\WebRoot\CustomerType.jsp
     文件       54254  2017-02-10 16:10  AgentSystemSSH\WebRoot\DLSmanage.jsp
     文件        8944  2017-02-12 15:50  AgentSystemSSH\WebRoot\DiscountType.jsp
     文件        5696  2017-02-11 19:52  AgentSystemSSH\WebRoot\FinanceManage.jsp
     文件        8932  2017-02-10 16:02  AgentSystemSSH\WebRoot\FinanceType.jsp
     文件        5939  2017-02-06 10:24  AgentSystemSSH\WebRoot\GatewayManage.jsp
............此处省略397个文件信息

评论

共有 条评论