order.php 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856
  1. <?php
  2. $role = function()
  3. {
  4. $array = array();
  5. $data = Dever::load('setting/role-state');
  6. if($data)
  7. {
  8. $array += $data;
  9. }
  10. return $array;
  11. };
  12. $source_id = function()
  13. {
  14. $array = array
  15. (
  16. -1 => array
  17. (
  18. 'id' => '-1',
  19. 'name' => '无来源',
  20. ),
  21. );
  22. $data = Dever::load('setting/source-state');
  23. if($data)
  24. {
  25. $array += $data;
  26. }
  27. return $array;
  28. };
  29. $status = array
  30. (
  31. -2 => array('name' => '待签名', 'style' => 'font-weight:bold;color:#00FFFF'),
  32. 1 => array('name' => '待业务初审', 'style' => 'font-weight:bold;color:#436EEE'),
  33. 2 => array('name' => '待财务终审', 'style' => 'font-weight:bold;color:#436EEE'),
  34. 3 => array('name' => '待权益发放', 'style' => 'font-weight:bold;color:#436EEE'),
  35. 4 => array('name' => '已完成', 'style' => 'font-weight:bold;color:green'),
  36. 5 => array('name' => '驳回', 'style' => 'font-weight:bold;color:#CD3700'),
  37. 6 => array('name' => '挂起', 'style' => 'font-weight:bold;color:#436EEE'),
  38. );
  39. $pay_status = array
  40. (
  41. 1 => '待支付',
  42. 2 => '已支付',
  43. 3 => '已退款',
  44. );
  45. $goods_status = array
  46. (
  47. 1 => array('name' => '未发放', 'style' => 'font-weight:bold;color:#436EEE'),
  48. 2 => array('name' => '无权益', 'style' => 'font-weight:bold;'),
  49. 3 => array('name' => '已发放', 'style' => 'font-weight:bold;color:green'),
  50. );
  51. $type = array
  52. (
  53. 1 => '个人',
  54. 2 => '公司',
  55. );
  56. $pay_type = array
  57. (
  58. 1 => '在线支付',
  59. 2 => '汇款',
  60. 3 => '个人转账',
  61. );
  62. $get_type = array
  63. (
  64. 1 => '购买',
  65. 2 => '赠送',
  66. );
  67. $level = function()
  68. {
  69. $array = array
  70. (
  71. -1 => array
  72. (
  73. 'id' => -1,
  74. 'name' => '普通',
  75. ),
  76. );
  77. $data = Dever::load('setting/level-state');
  78. if($data)
  79. {
  80. $array += $data;
  81. }
  82. return $array;
  83. };
  84. $import = array
  85. (
  86. 1 => '最新系统',
  87. 2 => 'v2旧系统导入',
  88. 3 => 'v1旧系统导入',
  89. );
  90. $order_type = array
  91. (
  92. 1 => '新购',
  93. 2 => '升级',
  94. );
  95. $button = array();
  96. $parent_mid = Dever::input('search_option_parent_mid');
  97. $mid = Dever::input('search_option_mid');
  98. $pmid = '';
  99. if ($parent_mid) {
  100. $pmid = $parent_mid;
  101. }
  102. if ($mid) {
  103. $pmid = $mid;
  104. }
  105. if ($pmid) {
  106. $button = array
  107. (
  108. '返回上一页' => array('location', 'l=project/database/list&project=agent&table=member_area&page_type=1&mid=' . $pmid),
  109. );
  110. }
  111. $invite_type = array
  112. (
  113. 1 => '邀请人',
  114. 2 => '来源',
  115. );
  116. # id小于50000为导入的数据
  117. return array
  118. (
  119. # 表名
  120. 'name' => 'order',
  121. # 显示给用户看的名称
  122. 'lang' => '代理商订单',
  123. 'auto' => 50000,
  124. 'set' => array
  125. (
  126. 'status' => $status,
  127. 'pay_status' => $pay_status,
  128. 'goods_status' => $goods_status,
  129. 'type' => $type,
  130. 'pay_type' => $pay_type,
  131. 'order_type' => $order_type,
  132. ),
  133. 'start' => array
  134. (
  135. 'update' => 'agent/lib/manage.orderUpdateParent',
  136. ),
  137. 'order' => 99,
  138. # 数据结构
  139. 'struct' => array
  140. (
  141. 'id' => array
  142. (
  143. 'type' => 'int-11',
  144. 'name' => 'ID',
  145. 'default' => '',
  146. 'desc' => '',
  147. 'match' => 'is_numeric',
  148. 'search' => 'order',
  149. //'list' => true,
  150. ),
  151. 'mid' => array
  152. (
  153. 'type' => 'int-11',
  154. 'name' => '代理商姓名/手机号',
  155. 'default' => '-1',
  156. 'desc' => '代理商',
  157. 'match' => 'is_string',
  158. 'update' => 'text',
  159. 'search' => array
  160. (
  161. 'api' => 'agent/member-getSearch',
  162. 'col' => 'col',
  163. 'result' => 'id',
  164. 'search' => 'mid',
  165. ),
  166. 'list_name' => '代理商信息',
  167. 'list' => 'Dever::load("agent/lib/member.getOne", {mid}, "agent/member", true)',
  168. 'list_order' => 3,
  169. ),
  170. 'order_num' => array
  171. (
  172. 'type' => 'varchar-100',
  173. 'name' => '订单号',
  174. 'default' => '',
  175. 'desc' => '订单号',
  176. 'match' => 'is_string',
  177. 'update' => 'text',
  178. //'search' => 'fulltext',
  179. //'list' => true,
  180. //'list_order' => 1,
  181. ),
  182. 'order_type' => array
  183. (
  184. 'type' => 'tinyint-1',
  185. 'name' => '订单类型',
  186. 'default' => '1',
  187. 'desc' => '订单类型',
  188. 'match' => 'is_numeric',
  189. 'option' => $order_type,
  190. ),
  191. 'mobile' => array
  192. (
  193. 'type' => 'bigint-11',
  194. 'name' => '手机号',
  195. 'default' => '',
  196. 'desc' => '请输入手机号',
  197. 'match' => Dever::rule('mobile'),
  198. 'update' => 'text',
  199. //'search' => 'fulltext',
  200. //'list' => true,
  201. ),
  202. 'invite_type' => array
  203. (
  204. 'type' => 'tinyint-1',
  205. 'name' => '邀请类型',
  206. 'default' => '1',
  207. 'desc' => '邀请类型',
  208. 'match' => 'is_numeric',
  209. //'search' => 'select',
  210. 'update' => 'radio',
  211. 'option' => $invite_type,
  212. //'list' => true,
  213. //'list_order' => 7,
  214. 'control' => 'invite_type',
  215. ),
  216. 'parent_code' => array
  217. (
  218. 'type' => 'varchar-100',
  219. 'name' => '上级邀请码',
  220. 'default' => '',
  221. 'desc' => '上级邀请码',
  222. 'match' => 'is_string',
  223. 'update' => 'text',
  224. # 绑定js脚本,更新时使用,第一个参数是执行的方式,第二个参数执行的方法,第三个参数是传值。
  225. 'bind' => array('onblur', 'loading', array('url' => Dever::url("lib/member.search", 'agent'))),
  226. 'show' => 'invite_type=1',
  227. ),
  228. 'parent_mid' => array
  229. (
  230. 'type' => 'int-11',
  231. 'name' => '上级姓名/手机号',
  232. 'default' => '-1',
  233. 'desc' => '邀请人',
  234. 'match' => 'is_string',
  235. //'update' => 'text',
  236. 'search' => array
  237. (
  238. 'api' => 'agent/member-getSearch',
  239. 'col' => 'col',
  240. 'result' => 'id',
  241. 'search' => 'parent_mid',
  242. ),
  243. 'list_name' => '上级信息',
  244. 'list' => 'Dever::load("agent/lib/member.getOne", {parent_mid})',
  245. ),
  246. 'source_id' => array
  247. (
  248. 'type' => 'int-11',
  249. 'name' => '注册来源',
  250. 'default' => '-1',
  251. 'desc' => '注册来源',
  252. 'match' => 'is_numeric',
  253. 'search' => 'select',
  254. 'update' => 'radio',
  255. 'option' => $source_id,
  256. // 'list' => true,
  257. // 'list_order' => 5,
  258. // 'show' => 'invite_type=2',
  259. ),
  260. 'name' => array
  261. (
  262. 'type' => 'varchar-100',
  263. 'name' => '姓名',
  264. 'default' => '',
  265. 'desc' => '姓名',
  266. 'match' => 'is_string',
  267. 'update' => 'text',
  268. //'search' => 'fulltext',
  269. ),
  270. 'role' => array
  271. (
  272. 'type' => 'int-11',
  273. 'name' => '代理角色',
  274. 'default' => '',
  275. 'desc' => '代理角色',
  276. 'match' => 'is_numeric',
  277. 'search' => 'select',
  278. 'update' => 'checkbox',
  279. 'option' => $role,
  280. //'list' => true,
  281. ),
  282. 'area' => array
  283. (
  284. 'type' => 'varchar-500',
  285. 'name' => '区域',
  286. 'default' => '',
  287. 'desc' => '区域',
  288. 'match' => 'option',
  289. 'search' => 'linkage',
  290. 'update' => 'linkage',
  291. 'option' => Dever::url('api.get?level_total=4', 'area'),
  292. // 'list' => 'Dever::load("area/api.string", "{area}")',
  293. ),
  294. 'desc' => array
  295. (
  296. 'type' => 'varchar-600',
  297. 'name' => '付款备注',
  298. 'default' => '',
  299. 'desc' => '付款备注',
  300. 'match' => 'is_string',
  301. 'update' => 'text',
  302. ),
  303. 'f_price' => array
  304. (
  305. 'type' => 'float-11,2',
  306. 'name' => '原价',
  307. 'default' => '0',
  308. 'desc' => '原价',
  309. 'match' => 'option',
  310. 'update' => 'text',
  311. ),
  312. 'price' => array
  313. (
  314. 'type' => 'float-11,2',
  315. 'name' => '金额',
  316. 'default' => '0',
  317. 'desc' => '金额',
  318. 'match' => 'option',
  319. 'update' => 'text',
  320. // 'list' => true,
  321. //'list_name' => '应付金额<br />实付金额<br />代理费<br />软件服务费<br />',
  322. 'list_name' => '实付金额',
  323. 'list' => true,
  324. //'list' =>'Dever::load("agent/lib/order.set_price", {id})',
  325. 'list_order' => 10,
  326. ),
  327. 'pay_type' => array
  328. (
  329. 'type' => 'tinyint-1',
  330. 'name' => '支付方式',
  331. 'default' => '1',
  332. 'desc' => '支付方式',
  333. 'match' => 'is_numeric',
  334. //'search' => 'select',
  335. //'update' => 'select',
  336. 'option' => $pay_type,
  337. //'list' => true,
  338. //'list_order' => 7,
  339. ),
  340. 'pay_pic' => array
  341. (
  342. 'type' => 'varchar-2000',
  343. 'name' => '打款凭证',
  344. 'default' => '',
  345. 'desc' => '打款凭证',
  346. 'match' => 'option',
  347. 'update' => 'images',
  348. 'key' => '1',
  349. 'place' => '150',
  350. ),
  351. 'pay_price' => array
  352. (
  353. 'type' => 'float-11,2',
  354. 'name' => '交款金额',
  355. 'default' => '0',
  356. 'desc' => '交款金额',
  357. 'match' => 'option',
  358. 'update' => 'text',
  359. ),
  360. 'option_price' => array
  361. (
  362. 'type' => 'float-11,2',
  363. 'name' => '赠送期权价值',
  364. 'default' => '0',
  365. 'desc' => '金额',
  366. 'match' => 'option',
  367. 'update' => 'text',
  368. // 'value' => Dever::input('soft_price', '0'),
  369. // 'show' => 'cstatus=2',
  370. ),
  371. 'bank_id' => array
  372. (
  373. 'type' => 'int-11',
  374. 'name' => '所属银行',
  375. 'default' => '',
  376. 'desc' => '所属银行',
  377. 'match' => 'is_numeric',
  378. ),
  379. 'bank_card' => array
  380. (
  381. 'type' => 'int-11',
  382. 'name' => '银行卡号',
  383. 'default' => '',
  384. 'desc' => '银行卡号',
  385. 'match' => 'is_numeric',
  386. ),
  387. 'type' => array
  388. (
  389. 'type' => 'tinyint-1',
  390. 'name' => '类型',
  391. 'default' => '1',
  392. 'desc' => '类型',
  393. 'match' => 'is_numeric',
  394. 'option' => $type,
  395. 'update' => 'radio',
  396. 'control' => 'type',
  397. ),
  398. 'sign' => array
  399. (
  400. 'type' => 'varchar-150',
  401. 'name' => '手写签名',
  402. 'default' => '',
  403. 'desc' => '手写签名',
  404. 'match' => 'option',
  405. 'update' => 'image',
  406. 'key' => '7',
  407. ),
  408. 'idcard' => array
  409. (
  410. 'type' => 'varchar-100',
  411. 'name' => '身份证号码',
  412. 'default' => '',
  413. 'desc' => '身份证号码',
  414. 'match' => 'is_string',
  415. 'match' => Dever::rule('idcard'),
  416. 'update' => 'text',
  417. //'search' => 'fulltext',
  418. ),
  419. 'idcard_front' => array
  420. (
  421. 'type' => 'varchar-150',
  422. 'name' => '身份证正面',
  423. 'default' => '',
  424. 'desc' => '身份证正面',
  425. 'match' => 'option',
  426. 'update' => 'image',
  427. 'key' => '8',
  428. //'place' => '660*660',
  429. ),
  430. 'idcard_back' => array
  431. (
  432. 'type' => 'varchar-150',
  433. 'name' => '身份证背面',
  434. 'default' => '',
  435. 'desc' => '身份证背面',
  436. 'match' => 'option',
  437. 'update' => 'image',
  438. 'key' => '8',
  439. //'place' => '660*660',
  440. ),
  441. 'company_name' => array
  442. (
  443. 'type' => 'varchar-100',
  444. 'name' => '公司名称',
  445. 'default' => '',
  446. 'desc' => '公司名称',
  447. 'match' => 'is_string',
  448. 'update' => 'text',
  449. //'search' => 'fulltext',
  450. //'list' => true,
  451. 'show' => 'type=2',
  452. ),
  453. 'company_pic' => array
  454. (
  455. 'type' => 'varchar-150',
  456. 'name' => '营业执照',
  457. 'default' => '',
  458. 'desc' => '营业执照',
  459. 'match' => 'option',
  460. 'update' => 'image',
  461. 'key' => '8',
  462. //'place' => '660*660',
  463. 'show' => 'type=2',
  464. ),
  465. 'company_number' => array
  466. (
  467. 'type' => 'varchar-80',
  468. 'name' => '营业执照号码',
  469. 'default' => '',
  470. 'desc' => '营业执照号码',
  471. 'match' => 'is_string',
  472. 'update' => 'text',
  473. 'show' => 'type=2',
  474. ),
  475. 'address' => array
  476. (
  477. 'type' => 'varchar-800',
  478. 'name' => '地址',
  479. 'default' => '',
  480. 'desc' => '地址',
  481. 'match' => 'is_string',
  482. 'update' => 'text',
  483. ),
  484. 'audit_desc' => array
  485. (
  486. 'type' => 'varchar-400',
  487. 'name' => '审核备注-从order_process中同步过来',
  488. 'default' => '',
  489. 'desc' => '审核备注',
  490. 'match' => 'is_string',
  491. //'update' => 'textarea',
  492. ),
  493. 'admin_desc' => array
  494. (
  495. 'type' => 'varchar-800',
  496. 'name' => '管理员备注',
  497. 'default' => '',
  498. 'desc' => '管理员备注',
  499. 'match' => 'is_string',
  500. 'update' => 'textarea',
  501. ),
  502. 'status' => array
  503. (
  504. 'type' => 'tinyint-1',
  505. 'name' => '订单状态',
  506. 'default' => '1',
  507. 'desc' => '状态',
  508. 'match' => 'is_numeric',
  509. 'option' => $status,
  510. 'search' => 'select',
  511. 'list' => true,
  512. 'list_order' => 8,
  513. ),
  514. 'history_status' => array
  515. (
  516. 'type' => 'tinyint-1',
  517. 'name' => '记录挂起之前的状态',
  518. 'default' => '1',
  519. 'desc' => '状态',
  520. 'match' => 'is_numeric',
  521. 'option' => $status,
  522. ),
  523. 'goods_status' => array
  524. (
  525. 'type' => 'tinyint-1',
  526. 'name' => '权益状态',
  527. 'default' => '1',
  528. 'desc' => '权益状态',
  529. 'match' => 'is_numeric',
  530. 'option' => $goods_status,
  531. 'search' => 'select',
  532. 'list' => true,
  533. 'list_order' => 9,
  534. ),
  535. 'pay_status' => array
  536. (
  537. 'type' => 'tinyint-1',
  538. 'name' => '支付状态',
  539. 'default' => '1',
  540. 'desc' => '状态',
  541. 'match' => 'is_numeric',
  542. 'option' => $pay_status,
  543. ),
  544. 'get_type' => array
  545. (
  546. 'type' => 'tinyint-1',
  547. 'name' => '获取方式',
  548. 'default' => '1',
  549. 'desc' => '获取方式',
  550. 'match' => 'is_numeric',
  551. 'update' => 'radio',
  552. 'option' => $get_type,
  553. ),
  554. 'agent_cash' => array
  555. (
  556. 'type' => 'float-11,2',
  557. 'name' => '代理费',
  558. 'default' => '0',
  559. 'desc' => '代理费',
  560. 'match' => 'option',
  561. 'update' => 'text',
  562. ),
  563. 'soft_cash' => array
  564. (
  565. 'type' => 'float-11,2',
  566. 'name' => '软件服务费',
  567. 'default' => '0',
  568. 'desc' => '软件服务费',
  569. 'match' => 'option',
  570. 'update' => 'text',
  571. ),
  572. 'goods_cash' => array
  573. (
  574. 'type' => 'float-11,2',
  575. 'name' => '商品价值-名额不算,商品价值第一次分配后保持不变',
  576. 'default' => '0',
  577. 'desc' => '商品价值',
  578. 'match' => 'option',
  579. 'update' => 'text',
  580. ),
  581. 'import' => array
  582. (
  583. 'type' => 'tinyint-1',
  584. 'name' => '是否导入',
  585. 'default' => '1',
  586. 'desc' => '是否导入',
  587. 'match' => 'is_numeric',
  588. 'option' => $import,
  589. 'update' => 'radio',
  590. ),
  591. 'state' => array
  592. (
  593. 'type' => 'tinyint-1',
  594. 'name' => '状态',
  595. 'default' => '1',
  596. 'desc' => '请选择状态',
  597. 'match' => 'is_numeric',
  598. ),
  599. 'fdate' => array
  600. (
  601. 'type' => 'int-11',
  602. 'name' => '完成时间',
  603. 'default' => '',
  604. 'match' => 'is_numeric',
  605. 'desc' => '',
  606. ),
  607. 'cdate' => array
  608. (
  609. 'type' => 'int-11',
  610. 'name' => '处理时间',
  611. 'match' => array('is_numeric', time()),
  612. 'default' => '',
  613. 'desc' => '',
  614. # 只有insert时才生效
  615. 'insert' => true,
  616. //'search' => 'date',
  617. // 'list' => 'date("Y-m-d H:i:s", {cdate})',
  618. 'list_name' => '注册时间<br />初审时间<br />终审时间<br />完成时间<br />',
  619. 'list' => 'Dever::load("agent/lib/order.set_cdate", {id})',
  620. 'list_order' => 200,
  621. ),
  622. ),
  623. 'alter' => array
  624. (
  625. 5 => array
  626. (
  627. array('update', 'price', 'price', 'float-11,2 0 实付金额'),
  628. array('update', 'f_price', 'f_price', 'float-11,2 0 原价'),
  629. array('update', 'agent_cash', 'agent_cash', 'float-11,2 0 代理费'),
  630. array('update', 'soft_cash', 'soft_cash', 'float-11,2 0 软件服务费'),
  631. array('update', 'goods_cash', 'goods_cash', 'float-11,2 0 商品价值'),
  632. ),
  633. 'version' => 5,
  634. ),
  635. 'manage' => array
  636. (
  637. 'insert' => false,
  638. 'delete' => false,
  639. 'edit' => false,
  640. 'button' => $button,
  641. 'list_button' => array
  642. (
  643. //fast_list
  644. 'list' => array('查看详情', '"order_process&project=agent&order_id={id}&page_type=1&[refer]"'),
  645. //'edit' => array('退款', 'status,tk_time,tk_pic,tk_desc,tk_admin,tk_status', '{status} == 6'),
  646. //'delete' => array('删除', '', '{status} == 1'),
  647. ),
  648. ),
  649. 'request' => array
  650. (
  651. 'getNew' => array
  652. (
  653. # 匹配的正则或函数 选填项
  654. 'option' => array
  655. (
  656. 'mid' => 'yes',
  657. 'status' => array('yes', 'in'),
  658. 'state' => 1,
  659. ),
  660. 'order' => array('id' => 'desc'),
  661. 'type' => 'one',
  662. 'col' => '*',
  663. ),
  664. 'getTotal' => array
  665. (
  666. # 匹配的正则或函数 选填项
  667. 'option' => array
  668. (
  669. 'mid' => 'yes',
  670. 'status' => array('yes', 'in'),
  671. 'state' => 1,
  672. ),
  673. 'order' => array('id' => 'desc'),
  674. 'type' => 'count',
  675. 'col' => '*',
  676. ),
  677. 'getData' => array
  678. (
  679. # 匹配的正则或函数 选填项
  680. 'option' => array
  681. (
  682. 'mid' => 'yes',
  683. 'status' => array('yes', 'in'),
  684. 'state' => 1,
  685. ),
  686. 'order' => array('id' => 'desc'),
  687. 'page' => array(10, 'list'),
  688. 'type' => 'all',
  689. 'col' => '*',
  690. ),
  691. # 获取订单数量
  692. 'getNum' => array
  693. (
  694. # 匹配的正则或函数 选填项
  695. 'option' => array
  696. (
  697. 'start' => array('yes-cdate', '>='),
  698. 'end' => array('yes-cdate', '<='),
  699. 'status' => array('yes', 'in'),
  700. 'state' => 1,
  701. ),
  702. 'type' => 'count',
  703. 'col' => '*',
  704. ),
  705. # 获取订单数量
  706. 'getCash' => array
  707. (
  708. # 匹配的正则或函数 选填项
  709. 'option' => array
  710. (
  711. 'start' => array('yes-cdate', '>='),
  712. 'end' => array('yes-cdate', '<='),
  713. 'status' => array('yes', 'in'),
  714. 'state' => 1,
  715. ),
  716. 'type' => 'one',
  717. 'col' => 'sum(price) as total',
  718. ),
  719. 'getDailiCash' => array
  720. (
  721. # 匹配的正则或函数 选填项
  722. 'option' => array
  723. (
  724. 'start' => array('yes-cdate', '>='),
  725. 'end' => array('yes-cdate', '<='),
  726. 'status' => array('yes', 'in'),
  727. 'state' => 1,
  728. ),
  729. 'type' => 'one',
  730. 'col' => 'sum(agent_cash) as total',
  731. ),
  732. 'getSoftCash' => array
  733. (
  734. # 匹配的正则或函数 选填项
  735. 'option' => array
  736. (
  737. 'start' => array('yes-cdate', '>='),
  738. 'end' => array('yes-cdate', '<='),
  739. 'status' => array('yes', 'in'),
  740. 'state' => 1,
  741. ),
  742. 'type' => 'one',
  743. 'col' => 'sum(soft_cash) as total',
  744. ),
  745. 'getGoodsCash' => array
  746. (
  747. # 匹配的正则或函数 选填项
  748. 'option' => array
  749. (
  750. 'start' => array('yes-cdate', '>='),
  751. 'end' => array('yes-cdate', '<='),
  752. 'status' => array('yes', 'in'),
  753. 'state' => 1,
  754. ),
  755. 'type' => 'one',
  756. 'col' => 'sum(goods_cash) as total',
  757. ),
  758. 'getFindOne' => array
  759. (
  760. # 匹配的正则或函数 选填项
  761. 'option' => array
  762. (
  763. 'id' => array('yes','!='),
  764. 'mid' => 'yes',
  765. 'order_type' => 'yes',
  766. 'state' => 1,
  767. ),
  768. 'type' => 'one',
  769. 'order' => array('cdate' => 'desc'),
  770. 'col' => '*',
  771. ),
  772. 'getPrice' => array
  773. (
  774. # 匹配的正则或函数 选填项
  775. 'option' => array
  776. (
  777. 'mid' => 'yes',
  778. 'status' => 4,
  779. 'state' => 1,
  780. ),
  781. 'type' => 'one',
  782. 'col' => 'sum(price) as total',
  783. ),
  784. ),
  785. );