groupchannelbean.java

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

JAVA
63
字号
package com.sxit.wap.groupchannel;

import java.sql.*;
import java.util.*;
import com.sxit.wap.common.*;
import com.sxit.wap.exception.*;

public class GroupChannelBean
    extends GroupChannelDao {

  //删除集团频道
  public static void deleteGC(int channelId) throws SysException {
    Connection conn = null;
    try {
      conn = Database.getConnection();
      conn.setAutoCommit(false);

      updateBySql("UPDATE WAP_GROUP_CHANNEL SET CHANNEL_STATUS = 9 WHERE ID = " +
                  channelId);

      conn.commit();
    }
    catch (Exception e) {
      e.printStackTrace();
      try {
        conn.rollback();
      }
      catch (Exception ex) {}
      throw new SysException("Exception while execute delete");
    }
    finally {
      try {
        conn.setAutoCommit(false);
      }
      catch (Exception ex) {}
      try {
        conn.close();
      }
      catch (Exception ex) {}
    }
  }
 public static void main(String[] args){
   GroupChannelModel ch = new GroupChannelModel();
   ch.setId(39);
   ch.setChannelName("test");
   ch.setChannelTrade(471000);
   ch.setChannelAccess(0);
   ch.setChannelCode("test");
   ch.setChannelDescribe("test");
   ch.setChannelPublic(0);
   ch.setChannelRegdate(new Timestamp(1000));
   ch.setChannelStatus(1);
   ch.setChannelType(9);
   ch.setChannelUrl("test");
   try{
     insert(ch);
 }catch(Exception ex){
    System.out.println("22222222222222222222");
    ex.printStackTrace();
 }
}
}

⌨️ 快捷键说明

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