主题 : 从其他系统推送信息问题 |
级别: 秀才
|
21# 发表于:2014-04-22 14:35:55 IP:61.244.*.*
|
||||
---|---|---|---|---|---|
级别: 状元
|
22# 发表于:2014-04-22 14:41:10 IP:182.217.*.*
研发也说是通过自动增长来实现文章id的,你那那自己改的数据库曾长列这需要您自己去研究了
|
||
---|---|---|---|
级别: 秀才
|
23# 发表于:2014-04-22 14:42:34 IP:61.244.*.*
好吧
|
||
---|---|---|---|
级别: 秀才
|
25# 发表于:2014-04-22 14:51:07 IP:61.244.*.*
这是我们源程序public boolean insertcontent(String isportal,String lm,String title,String content){
Connection conn=null ; Statement st=null; ResultSet rs = null; try{ conn = this.getCCConn(); //conn.setAutoCommit(false); st = conn.createStatement(); String sql = "select S_JC_CONTENT.Nextval nexnum from dual"; long nextnum = 0; rs = st.executeQuery(sql); while(rs.next()){ nextnum = rs.getInt("nexnum"); } /** * 新闻基本参数 */ String jbsql = "insert into jc_content (content_id,channel_id,user_id,type_id,site_id,sort_date,top_level, "+ "has_title_img,is_recommend,status,views_day,comments_day,downloads_day,ups_day) "+ "values("+nextnum+","+lm+",1,1,1,sysdate,0, "+ "0,0,2,0,0,0,0)"; /** * 标题sql */ String btsql="insert into jc_content_ext (content_id,title,release_date,is_bold,need_regenerate) "+ "values("+nextnum+",'"+title+"',sysdate,0,1)"; /** * 内容sql */ String contentsql ="insert into jc_content_txt (content_id,txt) values("+nextnum+","+oracle.sql.CLOB.empty_lob()+")"; String jssql = "insert into jc_content_count (content_id,views,views_month,views_week,views_day,comments,comments_month, "+ " comments_week,comments_day,downloads,downloads_month,downloads_week,downloads_day,ups,ups_month, "+ " ups_week,ups_day,downs) "+ " values("+nextnum+",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)"; /** * 栏目sql */ String channelsql = "insert into JC_CONTENT_CHANNEL (channel_id,content_id) values("+lm+","+nextnum+")"; String checksql = "insert into JC_CONTENT_CHECK (content_id,check_step,is_rejected) values("+nextnum+",1,0)"; int jbint = st.executeUpdate(jbsql); if(jbint>0){ int btint = st.executeUpdate(btsql); if(btint > 0){ int jsint = st.executeUpdate(jssql); if(jsint > 0){ int channelint = st.executeUpdate(channelsql); if(channelint > 0){ int checkint = st.executeUpdate(checksql); if(checkint > 0){ this.insertClob(content,nextnum); } } } } } //conn.commit(); }catch(Exception e){ System.out.println(e); }finally{ Adapter.DB.close(conn,st,rs); } return true; } 麻烦问一下在SqlServer中要怎么修改。 |
||
---|---|---|---|
级别: 状元
|
26# 发表于:2014-04-22 14:53:08 IP:182.217.*.*
您好,涉及增加功能、编写代码的不在技术支持范围之内。如果您需要增加功能,可以联系我们售前人员,我们提供功能定制服务。
|
||
---|---|---|---|
级别: 秀才
|
27# 发表于:2014-04-22 15:27:25 IP:61.244.*.*
麻烦问一下在增加一个条目的时候的代码是在哪个类里面,谢谢。
|
||
---|---|---|---|
级别: 秀才
|
29# 发表于:2014-04-22 15:39:52 IP:61.244.*.*
添加一天新闻内容,标题
|
||
---|---|---|---|
级别: 秀才
|
30# 发表于:2014-04-22 15:41:58 IP:61.244.*.*
添加一个内容
|
||
---|---|---|---|