src/com/dream/action/ProductInActionM.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.ProductIn;
import com.dream.bean.RProduct;
import com.dream.bean.Respo;
import com.dream.bean.User;
import com.dream.service.ProductInService;
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 ProductInActionM extends ActionSupport implements ModelDriven<ProductIn> {

	private ProductIn productIn = new ProductIn();
	@Resource(name = "productInServiceImpl")
	private ProductInService productInService;

	@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);
		productIn.setProduct(product);
		productIn.setPindate(new Date());
		String userid1 = request.getParameter("userid1");
		Long uid = Long.parseLong(userid1);
		User jinban = new User(uid);
		productIn.setJinban(jinban);
后面还有 132 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。