创建的OrderAction的java class代码是什么?
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import cn.sxt.service.orderService;
import cn.sxt.service. detailservice;
import cn.sxt.vo.Order;
@Controller
@Scope(“prototype”)
public class OrderAction {
private List list;
private List details;
private int orderId;
private int detailId;
@Autowired
private OrderService orderService;
@Autowired
private DetailService detailservice;
//获取所有订单---getList
public string list() {
list = orderService.list();
return "success";
}
//获取订单详情
public string details() {
details = detailsService.listByOrderId(orderId);
return "success";
}
//删除订单详情中的一项
public string delete(){
detailService.delete(orderid, detailId);
return "success";l
}
public List getList( ) {
return list;
}
public void setList( List list) {
this.list = list;
}
public orderservice getorderService( ) {
return orderservice;
}
public void setOrderService(OrderService orderService) {
this.orderService = orderService;
}
public Detailservice getDetailService( ) {
return detailservice;
}
public void setDetailservice(DetailService detailService) {
this.detailService = detailservice;
}
public List getDetails( ) {
return details;
}
public void setDetails(List details) {
this.details = details ;
}
public int getorderId( ) {
return orderId;
}
public void setOrderId( int orderId) {
this.orderid = orderId;
}
public int getDetailId( ) {
return detailId;
}
public void setDetailId( int detailId) {
this.detailId = detailId;
}
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。