docimage.java
来自「cwbbs 云网论坛源码」· Java 代码 · 共 32 行
JAVA
32 行
package cn.js.fan.module.cms;import com.redmoon.forum.SequenceMgr;import com.cloudwebsoft.framework.db.JdbcTemplate;import java.sql.SQLException;import com.cloudwebsoft.framework.util.LogUtil;public class DocImage { public static String KIND_DOCUMENT = "document"; public DocImage() { } public boolean create(String filePath, String mainKey, String kind, int subKey) { long imgId = SequenceMgr.nextID(SequenceMgr.CMS_IMAGES); String sql = "insert into cms_images (id,path,mainkey,kind,subkey) values (?,?,?,?,?)"; boolean re = false; try { JdbcTemplate jt = new JdbcTemplate(); re = jt.executeUpdate(sql, new Object[] {new Long(imgId), filePath, mainKey, kind, new Integer(subKey)}) == 1; } catch (SQLException e) { LogUtil.getLog(getClass()).error("create:" + e.getMessage()); } return re; }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?