member.php 27 KB

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