src/com/ccit/action/ProcureAction.java
(开头部分) 2KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
package com.ccit.action;
import java.util.*;
import com.ccit.model.Goods;
import com.ccit.model.Procure;
import com.ccit.manager.ObjectManager;
import com.opensymphony.xwork2.*;
@SuppressWarnings( { "unchecked", "serial" })
public class ProcureAction extends ActionSupport {
private Procure util;
private List<Procure> list;
private List<Goods> listGoods;
private String message;
private String str;
private ObjectManager objectManager;
public String initUtil() throws Exception {
listGoods = objectManager.getUtil("from Goods");
util = null;
return "saveOrUpdate";
}
public String saveOrUpdateObject() throws Exception {
int nowNum = Integer.parseInt(util.getS_2());
Goods goods = (Goods) objectManager.getObject(new Goods(), util
.getGoods().getId());
int goodsNum = Integer.parseInt(goods.getS_3());
int tmp = goodsNum - nowNum;
util.setS_3("" + tmp);
objectManager.saveOrUpdateObject(util);
util = null;
return getAllUtil();
}
public String deleteUtil() throws Exception {
objectManager.deleteObject(util);
return getAllUtil();
}
public String selectUtil() throws Exception {
listGoods = objectManager.getUtil("from Goods");
util = (Procure) objectManager.getObject(new Procure(), util.getId());
return "saveOrUpdate";
}
public String getAllUtil() throws Exception {
// Map session = ActionContext.getContext().getSession();
// String type = (String) session.get("type");
// int id = (Integer) session.get("id");
String sql = "";
if (null != message && message.trim().length() > 0) {
String _Str = new String(str.getBytes("iso-8859-1"), "utf-8");
str = _Str;
sql = "from Procure where " + message + " like '%" + str + "%'";
} else {
sql = "from Procure";
// if (!"admin".equals(type)) {
// sql = sql + " where user.id = " + id;
// }
后面还有 55 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。