member.php 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026
  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. $title = function()
  13. {
  14. $array = array();
  15. $data = Dever::load('setting/title-state');
  16. if($data)
  17. {
  18. $array += $data;
  19. }
  20. return $array;
  21. };
  22. $status = array
  23. (
  24. 1 => array('name' => '未认证', 'style' => 'font-weight:bold;color:#436EEE'),
  25. 2 => array('name' => '正常', 'style' => 'font-weight:bold;color:green'),
  26. //3 => '驳回',
  27. //4 => '已删除',
  28. 5 => array('name' => '已禁用', 'style' => 'font-weight:bold;color:#CD3700'),
  29. );
  30. $type = array
  31. (
  32. 1 => '个人',
  33. 2 => '公司',
  34. );
  35. $prize_type = array
  36. (
  37. 1 => '名额外',
  38. 2 => '名额内',
  39. );
  40. $is_shop = array
  41. (
  42. 1 => '无法修改',
  43. 2 => '可以修改',
  44. );
  45. $import = array
  46. (
  47. 1 => '最新系统',
  48. 2 => 'v2旧系统导入',
  49. 3 => 'v1旧系统导入',
  50. );
  51. $is_area = array
  52. (
  53. 1 => '是',
  54. 2 => '否',
  55. );
  56. $source_id = function()
  57. {
  58. $array = array
  59. (
  60. -1 => array
  61. (
  62. 'id' => '-1',
  63. 'name' => '无来源',
  64. ),
  65. );
  66. $data = Dever::load('setting/source-state');
  67. if($data)
  68. {
  69. $array += $data;
  70. }
  71. return $array;
  72. };
  73. $level = function()
  74. {
  75. $array = array
  76. (
  77. -1 => array
  78. (
  79. 'id' => -1,
  80. 'name' => '普通',
  81. ),
  82. );
  83. $data = Dever::load('setting/level-state');
  84. if($data)
  85. {
  86. $array += $data;
  87. }
  88. return $array;
  89. };
  90. $excel = false;
  91. if (Dever::load('manage/auth')->checkFunc('agent.member', 'agent_member_excel1', '代理商数据导出')) {
  92. $excel[] = array('代理商数据导出', '代理商列表', 'agent/lib/manage.agentOut');
  93. }
  94. if (Dever::load('manage/auth')->checkFunc('agent.member', 'agent_member_excel12', '代理商资金数据导出')) {
  95. $excel[] = array('代理商资金数据导出', '代理商资金列表', 'agent/lib/manage.agentCashOut');
  96. }
  97. if (Dever::load('manage/auth')->checkFunc('agent.member', 'agent_member_excel13', '代理商直推奖励导出')) {
  98. $excel[] = array('代理商直推奖励导出', '代理商直推奖励列表', 'agent/lib/manage.out_zhitui');
  99. }
  100. # 权限设置 1是查看详情、2是头衔统计
  101. $search_auth = Dever::input('search_option_dever_auth', 1);
  102. $info = '';
  103. $button = array();
  104. $list_button = array();
  105. if($search_auth == 1){
  106. $list_button['list'] = array('查看详情', '"member_area&mid={id}&page_type=1&[refer]"');
  107. }
  108. if($search_auth == 2){
  109. if(Dever::load('manage/auth')->checkFunc('agent.member_title', 'editTitleout', '头衔数据导出')){
  110. $excel[] = array('头衔数据导出', '头衔数据导出', 'agent/lib/member.out_member');
  111. }
  112. }
  113. /*
  114. if (Dever::load('manage/auth')->checkFunc('agent.member', 'edit6', '查看关系图谱')) {
  115. $list_button['list1'] = array('查看关系图谱',Dever::url('lib/manage.relation?mid={id}&[refer].manage', 'agent'));
  116. }
  117. */
  118. # id小于50000为导入的数据
  119. return array
  120. (
  121. # 表名
  122. 'name' => 'member',
  123. # 显示给用户看的名称
  124. 'lang' => '代理商管理',
  125. 'order' => 100,
  126. 'auto' => 50000,
  127. 'config_type' => $type,
  128. 'config_status' => $status,
  129. 'info' => $info,
  130. 'start' => array
  131. (
  132. 'update' => 'agent/lib/manage.updateArea',
  133. ),
  134. # 数据结构
  135. 'struct' => array
  136. (
  137. 'id' => array
  138. (
  139. 'type' => 'int-11',
  140. 'name' => '代理商姓名/手机号',
  141. 'default' => '',
  142. 'desc' => '',
  143. 'match' => 'is_numeric',
  144. 'search' => 'order',
  145. //'list' => true,
  146. 'search' => array
  147. (
  148. 'api' => 'agent/member-getSearch',
  149. 'col' => 'col',
  150. 'result' => 'id',
  151. 'search' => 'id',
  152. ),
  153. 'list_name' => '代理商信息',
  154. 'list' => $search_auth == 1 ? 'Dever::load("agent/lib/member.getOne", {id}, "agent/member", true)' : false,
  155. ),
  156. 'name' => array
  157. (
  158. 'type' => 'varchar-100',
  159. 'name' => '代理商姓名',
  160. 'default' => '',
  161. 'desc' => '姓名',
  162. 'match' => 'is_string',
  163. 'update' => 'text',
  164. 'list_name' => $search_auth == 2 ? '姓名': false,
  165. 'list' => $search_auth == 2 ? true : false,
  166. ),
  167. 'rdate' => array
  168. (
  169. 'type' => 'int-11',
  170. 'name' => '认证时间',
  171. 'match' => 'option',
  172. 'default' => '0',
  173. 'desc' => '',
  174. 'update' => 'date',
  175. 'callback' => 'maketime',
  176. 'search' => 'date',
  177. // 'list' => '{rdate} > 0 ? date("Y-m-d H:i", {rdate}) : "无"',
  178. 'list' => $search_auth == 1 ? 'Dever::load("agent/lib/member.set_rdate", {id})' : false,
  179. 'list_order' => 100,
  180. ),
  181. 'avatar' => array
  182. (
  183. 'type' => 'varchar-150',
  184. 'name' => '头像',
  185. 'default' => '',
  186. 'desc' => '请选择头像',
  187. 'match' => 'option',
  188. 'update' => 'image',
  189. 'key' => '1',
  190. //'place' => '150',
  191. ),
  192. 'mobile' => array
  193. (
  194. 'type' => 'bigint-11',
  195. 'name' => '手机号',
  196. 'default' => '',
  197. 'desc' => '请输入手机号',
  198. 'match' => Dever::rule('mobile'),
  199. 'update' => 'hidden',
  200. //'search' => 'fulltext',
  201. 'list' => $search_auth == 2 ? true : false,
  202. ),
  203. 'email' => array
  204. (
  205. 'type' => 'varchar-150',
  206. 'name' => '邮箱',
  207. 'default' => '',
  208. 'desc' => '请输入邮箱',
  209. 'match' => 'option||' . Dever::rule('email'),
  210. 'update' => 'text',
  211. ),
  212. 'username' => array
  213. (
  214. 'type' => 'varchar-100',
  215. 'name' => '昵称',
  216. 'default' => '',
  217. 'desc' => '昵称',
  218. 'match' => 'is_string',
  219. 'update' => 'text',
  220. ),
  221. 'birthday' => array
  222. (
  223. 'type' => 'int-11',
  224. 'name' => '生日',
  225. 'default' => '',
  226. 'match' => 'option',
  227. 'desc' => '生日',
  228. 'update' => 'time',
  229. 'callback' => 'maketime',
  230. ),
  231. 'password' => array
  232. (
  233. 'type' => 'varchar-50',
  234. 'name' => '密码',
  235. 'default' => '',
  236. 'desc' => '请输入密码',
  237. 'match' => 'option',
  238. 'update' => 'password',
  239. 'callback' => 'sha1',
  240. ),
  241. 'parent_mid' => array
  242. (
  243. 'type' => 'int-11',
  244. 'name' => '上级姓名/手机号',
  245. 'default' => '-1',
  246. 'desc' => '邀请人',
  247. 'match' => 'is_string',
  248. //'update' => 'text',
  249. 'search' => $search_auth == 1 ? array
  250. (
  251. 'api' => 'agent/member-getSearch',
  252. 'col' => 'col',
  253. 'result' => 'id',
  254. 'search' => 'parent_mid',
  255. ) : false,
  256. 'list_name' => '上级信息',
  257. 'list' => $search_auth == 1 ? 'Dever::load("agent/lib/member.getOne", {parent_mid})' : false,
  258. ),
  259. 'source_id' => array
  260. (
  261. 'type' => 'int-11',
  262. 'name' => '注册来源',
  263. 'default' => '-1',
  264. 'desc' => '注册来源',
  265. 'match' => 'is_numeric',
  266. 'search' => 'select',
  267. //'update' => 'checkbox',
  268. 'option' => $source_id,
  269. ),
  270. 'code' => array
  271. (
  272. 'type' => 'varchar-50',
  273. 'name' => '邀请码',
  274. 'default' => '',
  275. 'desc' => '代理商邀请码',
  276. 'match' => 'option',
  277. //'update' => 'text',
  278. 'list_order'=>1,
  279. ),
  280. 'role' => array
  281. (
  282. 'type' => 'int-11',
  283. 'name' => '代理角色',
  284. 'default' => '',
  285. 'desc' => '代理角色',
  286. 'match' => 'is_numeric',
  287. 'search' => 'select',
  288. 'update' => 'select',
  289. 'option' => $role,
  290. 'list' => $search_auth == 2 ? true : false,
  291. ),
  292. 'level_id' => array
  293. (
  294. 'type' => 'int-11',
  295. 'name' => '代理商等级',
  296. 'default' => '-1',
  297. 'desc' => '代理商等级',
  298. 'match' => 'is_numeric',
  299. 'search' => 'select',
  300. 'update' => 'select',
  301. 'option' => $level,
  302. //'list' => true,
  303. ),
  304. 'title_id' => array
  305. (
  306. 'type' => 'int-11',
  307. 'name' => '代理商头衔',
  308. 'default' => '1',
  309. 'desc' => '代理商头衔',
  310. 'match' => 'is_numeric',
  311. 'search' => 'select',
  312. 'update' => 'radio',
  313. 'option' => $title,
  314. 'list' => $search_auth == 2 ? true : false,
  315. ),
  316. 'is_area' => array
  317. (
  318. 'type' => 'tinyint-1',
  319. 'name' => '是否有代理区域',
  320. 'default' => '1',
  321. 'desc' => '是否有代理区域',
  322. 'match' => 'is_numeric',
  323. 'option' => $is_area,
  324. 'update' => 'radio',
  325. ),
  326. 'area' => array
  327. (
  328. 'type' => 'varchar-500',
  329. 'name' => '代理区域',
  330. 'default' => '',
  331. 'desc' => '代理区域',
  332. 'match' => 'option',
  333. 'search' => 'linkage',
  334. 'update' => 'linkage',
  335. 'option' => Dever::url('api.get?level_total=4', 'area'),
  336. ),
  337. 'is_shop' => array
  338. (
  339. 'type' => 'tinyint-1',
  340. 'name' => '门店是否可以修改',
  341. 'default' => '2',
  342. 'desc' => '门店是否可以修改',
  343. 'match' => 'is_numeric',
  344. 'option' => $is_shop,
  345. 'update' => 'radio',
  346. ),
  347. 'shop_id' => array
  348. (
  349. 'type' => 'int-11',
  350. 'name' => '所属门店',
  351. 'default' => '',
  352. 'desc' => '所属门店',
  353. 'match' => 'is_numeric',
  354. 'update' => 'select',
  355. 'update_search' => 'shop/lib/manage.search',
  356. ),
  357. 'type' => array
  358. (
  359. 'type' => 'tinyint-1',
  360. 'name' => '类型',
  361. 'default' => '1',
  362. 'desc' => '类型',
  363. 'match' => 'is_numeric',
  364. 'option' => $type,
  365. 'update' => 'radio',
  366. 'control' => 'type',
  367. ),
  368. 'sign' => array
  369. (
  370. 'type' => 'varchar-150',
  371. 'name' => '手写签名',
  372. 'default' => '',
  373. 'desc' => '手写签名',
  374. 'match' => 'option',
  375. 'update' => 'image',
  376. 'key' => '7',
  377. ),
  378. 'idcard' => array
  379. (
  380. 'type' => 'varchar-32',
  381. 'name' => '身份证号码',
  382. 'default' => '',
  383. 'desc' => '身份证号码',
  384. 'match' => Dever::rule('idcard'),
  385. 'update' => 'text',
  386. ),
  387. 'idcard_front' => array
  388. (
  389. 'type' => 'varchar-150',
  390. 'name' => '身份证正面',
  391. 'default' => '',
  392. 'desc' => '身份证正面',
  393. 'match' => 'option',
  394. 'update' => 'image',
  395. 'key' => '8',
  396. //'place' => '660*660',
  397. ),
  398. 'idcard_back' => array
  399. (
  400. 'type' => 'varchar-150',
  401. 'name' => '身份证背面',
  402. 'default' => '',
  403. 'desc' => '身份证背面',
  404. 'match' => 'option',
  405. 'update' => 'image',
  406. 'key' => '8',
  407. //'place' => '660*660',
  408. ),
  409. 'company_name' => array
  410. (
  411. 'type' => 'varchar-100',
  412. 'name' => '公司名称',
  413. 'default' => '',
  414. 'desc' => '公司名称',
  415. 'match' => 'is_string',
  416. 'update' => 'text',
  417. //'search' => 'fulltext',
  418. //'list' => true,
  419. 'show' => 'type=2',
  420. ),
  421. 'company_pic' => array
  422. (
  423. 'type' => 'varchar-150',
  424. 'name' => '营业执照',
  425. 'default' => '',
  426. 'desc' => '营业执照',
  427. 'match' => 'option',
  428. 'update' => 'image',
  429. 'key' => '8',
  430. //'place' => '660*660',
  431. 'show' => 'type=2',
  432. ),
  433. 'company_number' => array
  434. (
  435. 'type' => 'varchar-80',
  436. 'name' => '营业执照号码',
  437. 'default' => '',
  438. 'desc' => '营业执照号码',
  439. 'match' => 'is_string',
  440. 'update' => 'text',
  441. 'show' => 'type=2',
  442. ),
  443. 'address' => array
  444. (
  445. 'type' => 'varchar-800',
  446. 'name' => '地址',
  447. 'default' => '',
  448. 'desc' => '地址',
  449. 'match' => 'is_string',
  450. 'update' => 'text',
  451. ),
  452. 'cash' => array
  453. (
  454. 'type' => 'decimal-11,2',
  455. 'name' => '余额',
  456. 'default' => '0',
  457. 'desc' => '余额',
  458. 'match' => 'is_numeric',
  459. 'search' => 'exp',
  460. 'update' => 'text',
  461. 'list_name' => '余额<br />直推业绩<br />团队业绩',
  462. 'list' => $search_auth == 1 ?'"{cash}<br />{sell}<br />{group_sell}"' : false,
  463. ),
  464. 'sell' => array
  465. (
  466. 'type' => 'decimal-11,2',
  467. 'name' => '直推业绩',
  468. 'default' => '0',
  469. 'desc' => '销售业绩',
  470. 'search' => 'exp',
  471. 'match' => 'is_numeric',
  472. 'update' => 'text',
  473. 'list' => $search_auth == 2 ? true : false,
  474. ),
  475. 'group_sell' => array
  476. (
  477. 'type' => 'decimal-11,2',
  478. 'name' => '团队业绩',
  479. 'default' => '0',
  480. 'desc' => '团队销售业绩',
  481. 'match' => 'is_numeric',
  482. 'search' => 'exp',
  483. 'update' => 'text',
  484. 'list' => $search_auth == 2 ? true : false,
  485. ),
  486. 'old_group_sell' => array
  487. (
  488. 'type' => 'decimal-11,2',
  489. 'name' => '历史团队业绩',
  490. 'default' => '0',
  491. 'desc' => '历史团队业绩',
  492. 'match' => 'is_numeric',
  493. 'update' => 'text',
  494. 'list_name' => $search_auth == 2 ? '新增业绩' : false,
  495. 'list' => $search_auth == 2 ? 'Dever::load("agent/lib/member.new_money",{id})': false,
  496. ),
  497. 'old_agentdownnum' => array
  498. (
  499. 'type' => 'int-11',
  500. 'name' => '历史直推人数',
  501. 'default' => '0',
  502. 'desc' => '历史团队业绩',
  503. 'match' => 'is_numeric',
  504. 'update' => 'text',
  505. 'list_name' => $search_auth == 2 ? '新增正常业绩' : false,
  506. 'list' => $search_auth == 2 ? 'Dever::load("agent/lib/member.new_zmoney",{id})': false,
  507. ),
  508. 'old_pwd' => array
  509. (
  510. 'type' => 'varchar-32',
  511. 'name' => 'pwd',
  512. 'default' => '',
  513. 'desc' => 'pwd',
  514. 'match' => 'is_string',
  515. 'update' => 'text',
  516. ),
  517. 'old_salt' => array
  518. (
  519. 'type' => 'varchar-32',
  520. 'name' => 'salt',
  521. 'default' => '',
  522. 'desc' => 'salt',
  523. 'match' => 'is_string',
  524. 'update' => 'text',
  525. ),
  526. 'status' => array
  527. (
  528. 'type' => 'tinyint-1',
  529. 'name' => '状态',
  530. 'default' => '1',
  531. 'desc' => '状态',
  532. 'match' => 'is_numeric',
  533. 'option' => $status,
  534. 'search' => 'select',
  535. 'list' => $search_auth == 1 ? true : false,
  536. ),
  537. 'import' => array
  538. (
  539. 'type' => 'tinyint-1',
  540. 'name' => '是否导入',
  541. 'default' => '1',
  542. 'desc' => '是否导入',
  543. 'match' => 'is_numeric',
  544. 'option' => $import,
  545. 'update' => 'radio',
  546. ),
  547. 'prize_type' => array
  548. (
  549. 'type' => 'tinyint-1',
  550. 'name' => '是否名额内',
  551. 'default' => '1',
  552. 'desc' => '是否名额内',
  553. 'match' => 'is_numeric',
  554. 'option' => $prize_type,
  555. ),
  556. 'dever_auth' => array
  557. (
  558. 'name' => '业绩时间',
  559. 'default' => '',
  560. 'desc' => '类型',
  561. 'match' => 'is_string',
  562. 'search' => 'hidden',
  563. ),
  564. 'dever_time' => array
  565. (
  566. 'name' => '业绩时间',
  567. 'default' => '',
  568. 'desc' => '类型',
  569. 'match' => 'is_string',
  570. // 'search' => 'hidden',
  571. 'search' => $search_auth == 2 ? 'date' : false,
  572. ),
  573. 'idcard_path' => array
  574. (
  575. 'type' => 'varchar-800',
  576. 'name' => '身份证信息',
  577. 'default' => '',
  578. 'desc' => '身份证信息',
  579. 'match' => 'is_string',
  580. 'update' => 'text',
  581. ),
  582. 'reorder' => array
  583. (
  584. 'type' => 'int-11',
  585. 'name' => '排序(数值越大越靠前)',
  586. 'default' => '1',
  587. 'desc' => '请输入排序',
  588. 'match' => 'option',
  589. //'update' => 'text',
  590. //'search' => 'order',
  591. //'list' => true,
  592. //'order' => 'desc',
  593. //'edit' => true,
  594. ),
  595. 'state' => array
  596. (
  597. 'type' => 'tinyint-1',
  598. 'name' => '状态',
  599. 'default' => '1',
  600. 'desc' => '请选择状态',
  601. 'match' => 'is_numeric',
  602. ),
  603. 'cdate' => array
  604. (
  605. 'type' => 'int-11',
  606. 'name' => '加入日期',
  607. 'match' => array('is_numeric', time()),
  608. 'desc' => '',
  609. // 'search' => $search_auth == 2 ? 'date' : false,
  610. # 只有insert时才生效
  611. 'insert' => true,
  612. //'search' => 'date',
  613. ),
  614. ),
  615. 'alter' => array
  616. (
  617. 5 => array
  618. (
  619. array('update', 'cash', 'cash', 'decimal-11,2 0 余额'),
  620. array('update', 'sell', 'sell', 'decimal-11,2 0 直推业绩'),
  621. array('update', 'group_sell', 'group_sell', 'decimal-11,2 0 团队业绩'),
  622. array('update', 'old_group_sell', 'old_group_sell', 'decimal-11,2 0 历史团队业绩'),
  623. ),
  624. 'version' => 5,
  625. ),
  626. 'index' => array
  627. (
  628. 1 => array
  629. (
  630. 'parent_mid' => 'parent_mid',
  631. ),
  632. # 版本号 更改版本号会更新当前表的索引
  633. 'version' => 1,
  634. ),
  635. 'manage' => array
  636. (
  637. //'list_table' => 'js',
  638. 'insert' => false,
  639. 'delete' => false,
  640. 'edit' => false,
  641. 'excel' => $excel,
  642. 'button' => $button,
  643. 'list_button' => $list_button,
  644. ),
  645. 'request' => array
  646. (
  647. 'getInfo' => array
  648. (
  649. # 匹配的正则或函数 选填项
  650. 'option' => array
  651. (
  652. 'status' => 2,
  653. 'state' => 1,
  654. ),
  655. 'order' => array('id' => 'desc'),
  656. 'type' => 'one',
  657. 'col' => '*',
  658. ),
  659. 'getData' => array
  660. (
  661. # 匹配的正则或函数 选填项
  662. 'option' => array
  663. (
  664. 'idcard' => 'yes',
  665. 'id' => array('yes', '!='),
  666. 'status' => array('yes', 'in'),
  667. 'state' => 1,
  668. ),
  669. 'order' => array('id' => 'desc'),
  670. 'type' => 'all',
  671. 'page' => array(20, 'list'),
  672. 'col' => '*',
  673. ),
  674. 'upCash' => array
  675. (
  676. 'type' => 'update',
  677. 'where' => array
  678. (
  679. 'id' => 'yes',
  680. ),
  681. 'set' => array
  682. (
  683. 'cash' => array('yes', '+='),
  684. ),
  685. ),
  686. 'upSell' => array
  687. (
  688. 'type' => 'update',
  689. 'where' => array
  690. (
  691. 'id' => 'yes',
  692. ),
  693. 'set' => array
  694. (
  695. 'cash' => array('yes', '+='),
  696. 'upcol' => array('yes-sell', '+='),
  697. 'level_id' => 'yes',
  698. ),
  699. ),
  700. 'upGroupSell' => array
  701. (
  702. 'type' => 'update',
  703. 'where' => array
  704. (
  705. 'id' => 'yes',
  706. ),
  707. 'set' => array
  708. (
  709. 'cash' => array('yes', '+='),
  710. 'upcol' => array('yes-group_sell', '+='),
  711. 'level_id' => 'yes',
  712. ),
  713. ),
  714. 'upGroupSellOne' => array
  715. (
  716. 'type' => 'update',
  717. 'where' => array
  718. (
  719. 'id' => 'yes',
  720. ),
  721. 'set' => array
  722. (
  723. 'sell' => array('yes', '+='),
  724. 'group_sell' => array('yes', '+='),
  725. ),
  726. ),
  727. # 获取订单数量
  728. 'getNum' => array
  729. (
  730. # 匹配的正则或函数 选填项
  731. 'option' => array
  732. (
  733. 'start' => array('yes-cdate', '>='),
  734. 'end' => array('yes-cdate', '<='),
  735. 'fstart' => array('yes-rdate', '>='),
  736. 'fend' => array('yes-rdate', '<='),
  737. 'status' => 'yes',
  738. 'role' => 'yes',
  739. 'parent_mid' =>'yes',
  740. 'state' => 1,
  741. ),
  742. 'type' => 'count',
  743. 'col' => '*',
  744. ),
  745. 'getSearch' => array
  746. (
  747. # 匹配的正则或函数 选填项
  748. 'option' => array
  749. (
  750. 'col' => array('yes-mobile,name', 'like'),
  751. ),
  752. 'type' => 'all',
  753. 'col' => '*|id',
  754. ),
  755. 'getShopAll' => array
  756. (
  757. # 匹配的正则或函数 选填项
  758. 'option' => array
  759. (
  760. 'shop_id' => array('yes','>='),
  761. 'state' => 1,
  762. ),
  763. 'type' => 'all',
  764. 'col' => '*',
  765. ),
  766. 'getCount' => array
  767. (
  768. # 匹配的正则或函数 选填项
  769. 'option' => array
  770. (
  771. 'id' => 'yes',
  772. 'role' => array('yes','in'),
  773. 'prize_type' => 'yes',
  774. 'state' => 1,
  775. ),
  776. 'type' => 'count',
  777. 'col' => '*',
  778. ),
  779. 'getOutAll' => array
  780. (
  781. # 匹配的正则或函数 选填项
  782. 'option' => array
  783. (
  784. 'id' => 'yes',
  785. 'role' => 'yes',
  786. 'prize_type' => 'yes',
  787. 'state' => 1,
  788. ),
  789. 'type' => 'all',
  790. 'col' => '*',
  791. ),
  792. 'getCountByRole' => array
  793. (
  794. # 匹配的正则或函数 选填项
  795. 'option' => array
  796. (
  797. 'role' => 'yes',
  798. 'parent_mid' => 'yes',
  799. 'status' => 2,
  800. 'state' => 1,
  801. ),
  802. 'type' => 'count',
  803. 'col' => '*',
  804. ),
  805. 'search' => array
  806. (
  807. 'option' => array
  808. (
  809. 'ids' => array('yes-id', 'in'),
  810. 'name' => array('yes-name,mobile', 'like'),
  811. 'id' => 'yes',
  812. 'state' => 1,
  813. ),
  814. 'type' => 'all',
  815. 'order' => array('reorder' => 'desc', 'id' => 'desc'),
  816. 'limit' => '0,20',
  817. 'col' => 'concat(name, "(", mobile , ")") as name, id, id as value, "" as selected, "" as disabled|id',
  818. ),
  819. 'getAll' => array
  820. (
  821. # 匹配的正则或函数 选填项
  822. 'option' => array
  823. (
  824. 'start' => array('yes-rdate', '>='),
  825. 'end' => array('yes-rdate', '<='),
  826. 'status' => 'yes',
  827. 'state' => 1,
  828. ),
  829. 'type' => 'all',
  830. // 'limit' => 10,
  831. 'page' => array(20, 'list'),
  832. 'col' => 'id,name,mobile,idcard,role,group_sell',
  833. ),
  834. 'getNewParent' => array
  835. (
  836. # 匹配的正则或函数 选填项
  837. 'option' => array
  838. (
  839. 'start' => array('yes-rdate','>='),
  840. 'end' => array('yes-rdate','<='),
  841. 'parent_mid' => 'yes',
  842. 'state' => 1,
  843. ),
  844. 'type' => 'all',
  845. 'col' => 'id,group_sell,sell',
  846. ),
  847. 'getDataByArea' => array
  848. (
  849. # 匹配的正则或函数 选填项
  850. 'option' => array
  851. (
  852. 'area' => array('yes', 'like'),
  853. 'state' => 1,
  854. ),
  855. 'order' => array('id' => 'desc'),
  856. 'type' => 'all',
  857. 'col' => '*',
  858. ),
  859. 'getDataByRole' => array
  860. (
  861. # 匹配的正则或函数 选填项
  862. 'option' => array
  863. (
  864. 'role' => array('yes', 'in'),
  865. 'state' => 1,
  866. ),
  867. 'order' => array('id' => 'desc'),
  868. 'type' => 'all',
  869. 'col' => '*',
  870. ),
  871. 'getExcelAll' => array
  872. (
  873. # 匹配的正则或函数 选填项
  874. 'option' => array
  875. (
  876. 'start' => array('yes-rdate','>='),
  877. 'end' => array('yes-rdate','<='),
  878. 'area' => array('yes','like'),
  879. 'role' =>'yes',
  880. 'source_id' => 'yes',
  881. 'title_id' =>'yes',
  882. 'level_id' => 'yes',
  883. 'id' => 'yes',
  884. 'state' => 1,
  885. 'status' => 'yes',
  886. ),
  887. 'type' => 'all',
  888. 'col' => '*',
  889. ),
  890. 'getAreaAll' => array
  891. (
  892. # 匹配的正则或函数 选填项
  893. 'option' => array
  894. (
  895. 'area' => array('yes','like'),
  896. 'state' => 1,
  897. ),
  898. // 'order' => array('id' => 'desc'),
  899. 'type' => 'one',
  900. 'col' => 'id',
  901. ),
  902. 'getOne' => array
  903. (
  904. # 匹配的正则或函数 选填项
  905. 'option' => array
  906. (
  907. 'role' => 'yes',
  908. 'area' => 'yes',
  909. 'status' => 2,
  910. 'state' => 1,
  911. ),
  912. 'type' => 'one',
  913. 'col' => '*',
  914. ),
  915. 'guidian' => array
  916. (
  917. # 匹配的正则或函数 选填项
  918. 'option' => array
  919. (
  920. 'role' => 'yes',
  921. 'start' => array('yes-cdate','>='),
  922. 'parent_mid' => 'yes',
  923. 'prize_type' => 'yes',
  924. 'state' => 1,
  925. ),
  926. 'type' => 'all',
  927. 'col' => '*',
  928. ),
  929. 'getDataByName' => array
  930. (
  931. # 匹配的正则或函数 选填项
  932. 'option' => array
  933. (
  934. 'name' =>'yes',
  935. 'state' => 1,
  936. ),
  937. 'type' => 'all',
  938. 'order' => array('role' => 'asc', 'id' => 'desc'),
  939. 'col' => '*',
  940. ),
  941. ),
  942. );