src/com/dream/action/ProductOutActionM.java
(开头部分) 5KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
package com.dream.action;
import java.util.Date;
import java.util.List;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import org.apache.struts2.ServletActionContext;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;
import com.dream.bean.Product;
import com.dream.bean.ProductOut;
import com.dream.bean.Respo;
import com.dream.bean.User;
import com.dream.service.ProductOutService;
import com.dream.service.ProductService;
import com.dream.service.RespoService;
import com.dream.service.UserService;
import com.dream.util.SiteUrl;
import com.opensymphony.xwork2.ActionSupport;
import com.opensymphony.xwork2.ModelDriven;
@Controller
@Scope(value = "prototype")
public class ProductOutActionM extends ActionSupport implements ModelDriven<ProductOut> {
private ProductOut productOut = new ProductOut();
@Resource(name = "productOutServiceImpl")
private ProductOutService productOutService;
@Resource(name="productServiceImpl")
private ProductService productService;
@Resource(name="userServiceImpl")
private UserService userService;
@Resource(name="respoServiceImpl")
private RespoService respoService;
private String[] ids;
/**
* 添加商品
*
* @return
* @throws Exception
*/
public String add() throws Exception {
HttpServletRequest request = ServletActionContext.getRequest();
String pid = request.getParameter("productid");
Long id = Long.parseLong(pid);
Product product = new Product(id);
productOut.setProduct(product);
productOut.setPoutdate(new Date());
String userid1 = request.getParameter("userid1");
Long uid = Long.parseLong(userid1);
User jinban = new User(uid);
后面还有 131 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。