cpbean.java

来自「WAP PUSH后台源码,WAP PUSH后台源码」· Java 代码 · 共 30 行

JAVA
30
字号
package com.sxit.wap.cp;import java.sql.*;import java.util.*;import com.sxit.wap.common.*;import com.sxit.wap.exception.*;public class CpBean extends CpDao{  public static void changeCpPwd(int id, String cpPwd) throws SysException {    String sql = "UPDATE " + tableName + " SET CP_PWD = '" + cpPwd + "'  WHERE ID = " + id;    updateBySql(sql);  }  public static boolean isExists(String spName) throws SysException {    return getRowCountBySql("SELECT COUNT(*) FROM " + tableName + " WHERE CP_NAME = '" + spName +"'")>=1;  }  public static boolean isExists(int id, String spName) throws SysException {    return getRowCountBySql("SELECT COUNT(*) FROM " + tableName + " WHERE CP_NAME = '" + spName +"'" + " AND ID <> '" + id + "'")>=1;  }  public static boolean isExists(int id) throws SysException {    try {      findByPK(id);      return true;    } catch (FinderException e) {      return false;    }  }  public static Collection queryCpOrderById(int beginRow, int endRow) throws SysException {    return queryBySql("SELECT * FROM " + tableName + " ORDER BY ID", beginRow, endRow);  }}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?