5595ff9c71312ecdb0b652a69c8a7e1f60d7bded.svn-base 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <properties>
  3. <property name="order">
  4. <![CDATA[
  5. merge into TD_ORDER_RELATIONS a using (select #[cpid] cpid, #[spid] spid, #[userid] userid from dual) b
  6. on(a.cpid = b.cpid and a.spid = b.spid and a.userid = b.userid)
  7. when matched then update
  8. set ordertime=to_date(#[ordertime], 'yyyymmddhh24miss'),
  9. effecttime=to_date(#[effecttime], 'yyyymmddhh24miss'),
  10. canceltime='',
  11. #if($endtime && !$endtime.equals(""))endtime=to_date(#[endtime], 'yyyymmddhh24miss') #else endtime='' #end,
  12. status=#[status],synccount=0,syncsucceed='1',lastsynctime='',issms='1',
  13. orderchannel=#[orderchannel],channel=#[channel],
  14. type=#[type],orderstatus=#[orderstatus],
  15. ordertype=#[ordertype],apptype=#[apptype],
  16. isexperience=#[isexperience],
  17. videoid=#[videoid],
  18. videoname=#[videoname],
  19. cachesucceed=#[cachesucceed],
  20. cdnsucceed='1',
  21. showstatus=#[showstatus],
  22. #if($subchannel && !$subchannel.equals("")) orderchannel2 = #[subchannel] #else orderchannel2='' #end
  23. when not matched then insert (id,cpid,spid,userid,ordertime,effecttime,endtime,status,province,area,channel,orderchannel,synccount,syncsucceed,type,orderstatus,
  24. ordertype,apptype,isexperience,videoid,videoname,cachesucceed,cdnsucceed, showstatus,orderchannel2)values(
  25. to_char(sysdate,'yyyyMMddhh24miss')||SEQ_COMMON6.nextval,
  26. #[cpid],#[spid],#[userid],
  27. to_date(#[ordertime], 'yyyymmddhh24miss'),
  28. to_date(#[effecttime], 'yyyymmddhh24miss'),
  29. #if($endtime && !$endtime.equals(""))to_date(#[endtime], 'yyyymmddhh24miss') #else '' #end,
  30. #[status],#[province],#[area],#[channel],#[orderchannel],0,1,#[type],#[orderstatus],#[ordertype],#[apptype],#[isexperience],
  31. #[videoid],#[videoname],1,'1', #[showstatus],
  32. #if($subchannel && !$subchannel.equals("")) #[subchannel] #else '' #end)
  33. ]]>
  34. </property>
  35. <property name="countOrder">
  36. <![CDATA[
  37. insert into td_order_relations (id,cpid,spid,userid,ordertime,effecttime,endtime,status,province,area,channel,orderchannel,synccount,syncsucceed,type,orderstatus,ordertype,apptype,isexperience,videoid,videoname,cachesucceed,cdnsucceed, showstatus)values(
  38. to_char(sysdate,'yyyyMMddhh24miss')||SEQ_COMMON6.nextval,
  39. #[cpid],#[spid],#[userid],
  40. to_date(#[ordertime], 'yyyymmddhh24miss'),
  41. to_date(#[effecttime], 'yyyymmddhh24miss'),
  42. #if($endtime && !$endtime.equals(""))to_date(#[endtime], 'yyyymmddhh24miss') #else '' #end,
  43. #[status],#[province],#[area],#[channel],#[orderchannel],0,1,#[type],#[orderstatus],#[ordertype],#[apptype],#[isexperience],#[videoid],#[videoname],#[cachesucceed],'1', #[showstatus])
  44. ]]>
  45. </property>
  46. <property name="cancelOrder">
  47. <![CDATA[
  48. merge into TD_ORDER_RELATIONS a using (select #[cpid] cpid, #[spid] spid, #[userid] userid from dual) b
  49. on (a.userid = b.userid and a.cpid = b.cpid and a.spid = b.spid and a.status in ('0', '1'))
  50. when matched then update set
  51. canceltime=to_date(#[canceltime], 'yyyymmddhh24miss'),
  52. endtime=to_date(#[endtime], 'yyyymmddhh24miss'),
  53. status='1', synccount=0,syncsucceed='1',lastsynctime='',issms='1', cancelchannel=#[cancelchannel], channel=#[channel], orderstatus=#[orderstatus], type=#[type],cachesucceed=1,cdnsucceed='1',
  54. #if($subchannel && !$subchannel.equals("")) cancelchannel2 = #[subchannel] #else cancelchannel2='' #end
  55. when not matched then insert (id, cpid,spid,userid,ordertime,effecttime,canceltime,endtime,status,province,area,channel,
  56. cancelchannel,synccount,syncsucceed,type,orderstatus,ordertype,cachesucceed,cdnsucceed,cancelchannel2) values (
  57. to_char(sysdate,'yyyyMMddhh24miss')||SEQ_COMMON6.nextval,
  58. #[cpid], #[spid], #[userid],
  59. to_date(#[ordertime], 'yyyymmddhh24miss'),
  60. to_date(#[effecttime], 'yyyymmddhh24miss'),
  61. to_date(#[canceltime], 'yyyymmddhh24miss'),
  62. to_date(#[endtime], 'yyyymmddhh24miss'),
  63. '1', #[province], #[area], #[channel], #[cancelchannel], 0, 1, #[type], #[orderstatus], #[ordertype],1,'1',
  64. #if($subchannel && !$subchannel.equals("")) #[subchannel] #else '' #end)
  65. ]]>
  66. </property>
  67. <property name="findByUserAndSpid">
  68. <![CDATA[
  69. select id,cpid, spid, userid, to_char(ordertime, 'yyyymmddhh24miss') ordertime,
  70. to_char(endtime, 'yyyymmddhh24miss') endtime, to_char(canceltime, 'yyyymmddhh24miss') canceltime,
  71. to_char(effecttime, 'yyyymmddhh24miss') effecttime, status, orderchannel, cancelchannel,
  72. ordertype, orderstatus,videoid, videoname, type, apptype, province, area, isexperience
  73. from TD_ORDER_RELATIONS where userid=? and cpid=? and spid=? and (endtime is null or endtime > sysdate)
  74. ]]>
  75. </property>
  76. <property name="findByUserAndCpid">
  77. <![CDATA[
  78. select cpid, spid, userid, to_char(ordertime, 'yyyymmddhh24miss') ordertime,
  79. to_char(endtime, 'yyyymmddhh24miss') endtime, to_char(canceltime, 'yyyymmddhh24miss') canceltime,
  80. to_char(effecttime, 'yyyymmddhh24miss') effecttime, status, orderchannel, cancelchannel,
  81. ordertype, orderstatus,videoid, videoname, type, apptype, province, area, isexperience
  82. from TD_ORDER_RELATIONS where userid=? and cpid=? and (endtime is null or endtime > sysdate)
  83. ]]>
  84. </property>
  85. <property name="findByUser">
  86. <![CDATA[
  87. select a.cpid cpid, a.spid spid,B.VACPRODUCTID productid,userid, to_char(ordertime, 'yyyymmddhh24miss') ordertime,
  88. to_char(endtime, 'yyyymmddhh24miss') endtime, to_char(canceltime, 'yyyymmddhh24miss') canceltime,
  89. to_char(effecttime, 'yyyymmddhh24miss') effecttime, status, orderchannel, cancelchannel,
  90. ordertype, orderstatus,videoid, videoname, a.type type, apptype, province, area, isexperience
  91. from TD_ORDER_RELATIONS a,tb_sp_info b where (endtime is null or endtime > sysdate) and a.spid=b.spid and a.userid=?
  92. ]]>
  93. </property>
  94. <property name="findpassword">
  95. <![CDATA[
  96. select PASSWORD from TB_CHANNEL_ORG where STATUS = '0' and id = ?
  97. ]]>
  98. </property>
  99. <property name="addcoupon">
  100. <![CDATA[
  101. INSERT INTO td_coupon_rec(ID,USERID,ORDERID,SPID,STARTTIME,ENDTIME,STATUS,COUPONMONTH,INSERTTIME)
  102. VALUES(to_char(sysdate, 'yyyymmddhh24miss') || SEQ_COMMON6.nextval,#[userid],
  103. #[orderid],#[spid],to_char(sysdate,'yyyy-mm-dd'),to_char(last_day(sysdate), 'yyyy-mm-dd'),'0',to_char(sysdate,'yyyymm'),sysdate)
  104. ]]>
  105. </property>
  106. <property name="getorderid">
  107. <![CDATA[
  108. select id from td_order_relations where userid =? and spid = ?
  109. ]]>
  110. </property>
  111. <property name="getDictionryValue">
  112. <![CDATA[
  113. select value from TB_DICTIONRY_INFO where name = ?
  114. ]]>
  115. </property>
  116. <property name="getWYJSpid">
  117. <![CDATA[
  118. select EXTEND1 from TB_PRODUCT_CANCEL_CONF where status = '0' and spid = ?
  119. ]]>
  120. </property>
  121. <property name="addWYJLog">
  122. <![CDATA[
  123. insert into td_wyj_order_job (id,userid,province,area,cpid,spid,channel,extend1) values
  124. (TO_CHAR(SYSDATE, 'YYYYMMDDHH24MISS')||SEQ_COMMON6.NEXTVAL,#[userid],#[province],#[area],'wyj',#[spid],#[channel],#[extend1])
  125. ]]>
  126. </property>
  127. <property name="getSpname">
  128. <![CDATA[
  129. select spname from tb_sp_info where spid = ?
  130. ]]>
  131. </property>
  132. <property name="inserArrearageData">
  133. <![CDATA[
  134. insert into TD_REFLOW_LEVELTHREE (ID, USERID, SPID, RESULTCODE, RESULTINFO, ACTIVITYCODE)
  135. values (TO_CHAR(SYSDATE, 'YYYYMMDDHH24MISS') || SEQ_COMMON6.NEXTVAL, #[userid], #[spid], #[resultcode], #[resultinfo], #[activitycode])
  136. ]]>
  137. </property>
  138. </properties>