member.php 25 KB

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