src/com/dream/action/MovePAction.java

(开头部分) 2KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

package com.dream.action;

import java.util.ArrayList;
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.MoveP;
import com.dream.page.PageModel;
import com.dream.page.PageView;
import com.dream.page.QueryResult;
import com.dream.service.MovePService;
import com.opensymphony.xwork2.ActionSupport;
import com.opensymphony.xwork2.ModelDriven;

@Controller @Scope(value="prototype")
public class MovePAction extends ActionSupport implements ModelDriven<PageModel>{

	@Resource(name="movePServiceImpl")
	private MovePService movePService;

	private PageModel pageModel = new PageModel();
	
	@Resource(name="pageView")
	private PageView<MoveP> pageView;
	/**
	 * 分页显示用户信息
	 * @return
	 * @throws Exception
	 */
	public String list() throws Exception {
		HttpServletRequest request  = ServletActionContext.getRequest();	
		
		pageView.setCurrentpage(pageModel.getPage());
		pageView.setMaxresult(pageModel.getMaxresult());
		int fristindex = (pageModel.getPage()-1)*(pageModel.getMaxresult());
		QueryResult<MoveP> qr = null;
		String query = request.getParameter("query");
		StringBuffer wherejpql = new StringBuffer();
		List<Object> params = new ArrayList<Object>();
		if("query".equals(query)){//查询页面
			String rinid = request.getParameter("rinid");
			 if(rinid!=null&&!"".equals(rinid.trim())){
				 Long id = Long.parseLong(rinid);
				 if(params.size()>0){
					  wherejpql.append(" and");
				  }
		        	wherejpql.append(" o.rin.id=?"+(params.size()+1));
		        	params.add(id);
		     request.setAttribute("rinid", id);
			}
			 String routid = request.getParameter("routid");
			 if(routid!=null&&!"".equals(routid.trim())){
				 Long id = Long.parseLong(routid);
				 if(params.size()>0){
后面还有 32 行代码,购买后查看完整代码

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

AI 解读 AI

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

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