• 大小: 16.54MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-08-01
  • 语言: Java
  • 标签: SSH  

资源简介

接着上次的项目,上次只有一个服务器端,这个是客户端,可以在AndroidStudio运行。

资源截图

代码片段和文件信息

package com.sunset.admin.action;

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

import org.springframework.beans.factory.annotation.Autowired;

import com.opensymphony.xwork2.ModelDriven;
import com.sunset.core.service.CashierService;
import com.sunset.core.service.StrongholdService;
import com.sunset.core.web.SuperAction;
import com.sunset.model.Cashier;
import com.sunset.model.Stronghold;
import com.sunset.model.User;
public class AdminCashierAction extends SuperAction implements ModelDriven{

/**
 * 
 */
private static final long serialVersionUID = 1L;
private Cashier cashier = new Cashier();

@Autowired
private CashierService cashierServiceImpl;
@Autowired
private StrongholdService strongholdServiceImpl;

 
 
public StrongholdService getStrongholdServiceImpl() {
return strongholdServiceImpl;
}


public void setStrongholdServiceImpl(StrongholdService strongholdServiceImpl) {
this.strongholdServiceImpl = strongholdServiceImpl;
}


public void setCashierServiceImpl(CashierService cashierServiceImpl) {
this.cashierServiceImpl = cashierServiceImpl;
}
 
 
 public String manage()
 {
 
 return “manage“;
 }
 
  public String list() throws IOException
{
 
    if(cashier.getParkId()==null){
    String parkId = request.getParameter(“parkId“);
        cashier.setParkId(parkId);
    }
    Stronghold d= strongholdServiceImpl.queryStrongholdById(cashier.getParkId());
 
List dataList = cashierServiceImpl.queryCashierList(cashier);
request.setAttribute(“dataList“dataList);
request.setAttribute(“parkName“d.getName());
request.setAttribute(“cashier“cashier);
request.setAttribute(“parentId“d.getParentId());
request.setAttribute(“count“dataList==null?0:dataList.size());
return “list“;
}
  
  public String add() throws IOException  
 {
 
 cashier.setParkId(request.getParameter(“parkId“));
 cashier.setName(request.getParameter(“name“));
 cashier.setAccount(request.getParameter(“account“));
 cashier.setTelephone(request.getParameter(“telephone“));
 Cashier c = cashierServiceImpl.queryCashierByAccount(cashier.getAccount());
 if(c != null)
 {
 response.getWriter().print(2);
 return null;
 }
 try{
 cashierServiceImpl.addCashier(cashier);
 response.getWriter().print(1);
 }catch(Exception e)
 {
 e.printStackTrace();
 response.getWriter().print(0);
 }
 return null;
 }
  
  public String update() throws IOException  
 {
 
     Cashier u = cashierServiceImpl.queryCashier(cashier.getCashierId());
 u.setName(cashier.getName());
 u.setTelephone(cashier.getTelephone());
 try{
 cashierServiceImpl.updateCashier(u);
 response.getWriter().print(1);
 }catch(Exception e)
 {
 e.printStackTrace();
 response.getWriter().print(0);
 }
 return null;
 }

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2017-10-13 15:52  ParkServer\
     文件         889  2017-10-07 16:00  ParkServer\.classpath
     文件         910  2017-10-07 15:30  ParkServer\.project
     目录           0  2017-10-13 15:52  ParkServer\.settings\
     文件         567  2017-10-07 15:30  ParkServer\.settings\.jsdtscope
     文件         364  2017-10-07 15:30  ParkServer\.settings\org.eclipse.jdt.core.prefs
     文件         561  2017-10-07 15:53  ParkServer\.settings\org.eclipse.wst.common.component
     文件         345  2017-10-07 16:00  ParkServer\.settings\org.eclipse.wst.common.project.facet.core.xml
     文件          49  2017-10-07 15:30  ParkServer\.settings\org.eclipse.wst.jsdt.ui.superType.container
     文件           6  2017-10-07 15:30  ParkServer\.settings\org.eclipse.wst.jsdt.ui.superType.name
     目录           0  2017-10-13 15:52  ParkServer\build\
     目录           0  2017-10-13 15:52  ParkServer\build\classes\
     目录           0  2017-10-13 15:52  ParkServer\build\classes\com\
     目录           0  2017-10-13 15:52  ParkServer\build\classes\com\sunset\
     目录           0  2017-10-13 15:52  ParkServer\build\classes\com\sunset\admin\
     目录           0  2017-10-13 15:52  ParkServer\build\classes\com\sunset\admin\action\
     文件        5670  2017-10-12 12:23  ParkServer\build\classes\com\sunset\admin\action\AdminCashierAction.class
     文件        3720  2017-10-12 12:23  ParkServer\build\classes\com\sunset\admin\action\AdminConfigAction.class
     文件        6184  2017-10-12 12:23  ParkServer\build\classes\com\sunset\admin\action\AdminDepartmentAction.class
     文件        4670  2017-10-12 12:23  ParkServer\build\classes\com\sunset\admin\action\AdminFeeRuleAction.class
     文件        4027  2017-10-12 12:23  ParkServer\build\classes\com\sunset\admin\action\AdminPortalAction.class
     文件        3931  2017-10-12 12:23  ParkServer\build\classes\com\sunset\admin\action\AdminRecordAction.class
     文件        4879  2017-10-12 12:23  ParkServer\build\classes\com\sunset\admin\action\AdminStrongholdAction.class
     文件        7136  2017-10-12 12:23  ParkServer\build\classes\com\sunset\admin\action\AdminUserAction.class
     文件        4362  2017-10-12 12:23  ParkServer\build\classes\com\sunset\admin\action\AdminVipCarAction.class
     目录           0  2017-10-13 15:52  ParkServer\build\classes\com\sunset\api\
     目录           0  2017-10-13 15:52  ParkServer\build\classes\com\sunset\api\action\
     文件        3682  2017-10-12 12:23  ParkServer\build\classes\com\sunset\api\action\APICashierAction.class
     文件        2679  2017-10-12 12:23  ParkServer\build\classes\com\sunset\api\action\APIFeeRuleAction.class
     文件        2614  2017-10-12 12:23  ParkServer\build\classes\com\sunset\api\action\APIPortalAction.class
     文件        6525  2017-10-12 12:23  ParkServer\build\classes\com\sunset\api\action\APIRecordAction.class
............此处省略324个文件信息

评论

共有 条评论