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.settingscom.genuitec.eclipse.core.prefs
     文件        1035  2017-01-08 16:11  AgentSystemSSH.settingscom.genuitec.eclipse.j2eedt.core.prefs
     文件          89  2017-01-08 16:11  AgentSystemSSH.settingscom.genuitec.jboss.ide.eclipse.xdoclet.run.prefs
     文件        1353  2017-02-10 15:20  AgentSystemSSH.settingsorg.eclipse.core.resources.prefs
     文件         364  2017-01-02 18:04  AgentSystemSSH.settingsorg.eclipse.jdt.core.prefs
     文件         106  2017-01-08 16:11  AgentSystemSSH.settingsorg.eclipse.ltk.core.refactoring.prefs
     文件         480  2017-01-02 18:04  AgentSystemSSH.settingsorg.eclipse.wst.common.component
     文件         252  2017-01-02 18:04  AgentSystemSSH.settingsorg.eclipse.wst.common.project.facet.core.xml
     文件         153  2017-01-08 16:11  AgentSystemSSH.settingsorg.eclipse.wst.jsdt.ui.prefs
     文件          49  2017-01-02 18:04  AgentSystemSSH.settingsorg.eclipse.wst.jsdt.ui.superType.container
     文件           6  2017-01-02 18:04  AgentSystemSSH.settingsorg.eclipse.wst.jsdt.ui.superType.name
     目录           0  2017-02-18 13:26  AgentSystemSSHWebRoot
     文件        1880  2017-02-10 16:13  AgentSystemSSHWebRootAPPAddress.jsp
     文件        2962  2017-02-06 10:10  AgentSystemSSHWebRootAccountDetail.jsp
     文件        5717  2017-02-06 10:21  AgentSystemSSHWebRootAdvancepay.jsp
     文件        4099  2017-01-02 14:45  AgentSystemSSHWebRootAuthorityManagement.jsp
     文件        6867  2017-02-10 14:40  AgentSystemSSHWebRootCardType.jsp
     文件        7169  2017-02-10 14:42  AgentSystemSSHWebRootCustomerType.jsp
     文件       54254  2017-02-10 16:10  AgentSystemSSHWebRootDLSmanage.jsp
     文件        8944  2017-02-12 15:50  AgentSystemSSHWebRootDiscountType.jsp
     文件        5696  2017-02-11 19:52  AgentSystemSSHWebRootFinanceManage.jsp
     文件        8932  2017-02-10 16:02  AgentSystemSSHWebRootFinanceType.jsp
     文件        5939  2017-02-06 10:24  AgentSystemSSHWebRootGatewayManage.jsp
............此处省略397个文件信息

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。

发表评论

评论列表(条)