src/com/ccit/action/GoodsAction.java

(开头部分) 3KB

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

package com.ccit.action;

import java.util.*;
import com.ccit.model.Type;
import com.ccit.model.Goods;
import com.ccit.manager.ObjectManager;
import com.opensymphony.xwork2.*;

@SuppressWarnings({ "unchecked", "serial" })
public class GoodsAction extends ActionSupport {
	private Goods util;
	private List<Goods> list;
	private List<Type> listType;
	private String message;
	private String errMsg;
	private String str;
	private ObjectManager objectManager;

	public String initUtil() throws Exception{
		listType = objectManager.getUtil("from Type");
		util = null;
		return "saveOrUpdate";
	}

	public String saveOrUpdateObject() throws Exception{
		objectManager.saveOrUpdateObject(util);
		util = null;
		return getAllUtil();
	}
	
	public String saveOrUpdateObjects() throws Exception{
		int num1 = Integer.parseInt(util.getS_6());
		int num2 = Integer.parseInt(util.getS_7());
		if(num1 < num2){
			errMsg = "上限必须大于下限";
			return "saveOrUpdates";
		}
		objectManager.saveOrUpdateObject(util);
		util = null;
		return getAllUtils();
	}

	public String deleteUtil() throws Exception{
		objectManager.deleteObject(util);
		return getAllUtil();
	}

	public String selectUtil() throws Exception{
		listType = objectManager.getUtil("from Type");
		util = (Goods) objectManager.getObject(new Goods(), util.getId());
		return "saveOrUpdate";
	}
	
	public String selectUtils() throws Exception{
		listType = objectManager.getUtil("from Type");
		util = (Goods) objectManager.getObject(new Goods(), util.getId());
		return "saveOrUpdates";
	}

	public String getAllUtil() throws Exception{
后面还有 84 行代码,购买后查看完整代码

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

AI 解读 AI

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

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