member.php 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963
  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' => 'date',
  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. 'search' => 'exp',
  453. 'update' => 'text',
  454. 'list_name' => '余额<br />直推业绩<br />团队业绩',
  455. 'list' => $search_auth == 1 ?'"{cash}<br />{sell}<br />{group_sell}"' : false,
  456. ),
  457. 'sell' => array
  458. (
  459. 'type' => 'decimal-11,2',
  460. 'name' => '直推业绩',
  461. 'default' => '0',
  462. 'desc' => '销售业绩',
  463. 'search' => 'exp',
  464. 'match' => 'is_numeric',
  465. 'update' => 'text',
  466. 'list' => $search_auth == 2 ? 'Dever::load("agent/lib/member.new_sell",{id})' : false,
  467. ),
  468. 'group_sell' => array
  469. (
  470. 'type' => 'decimal-11,2',
  471. 'name' => '团队业绩',
  472. 'default' => '0',
  473. 'desc' => '团队销售业绩',
  474. 'match' => 'is_numeric',
  475. 'search' => 'exp',
  476. 'update' => 'text',
  477. 'list' => $search_auth == 2 ? 'Dever::load("agent/lib/member.new_groupsell",{id})' : false,
  478. ),
  479. 'old_group_sell' => array
  480. (
  481. 'type' => 'decimal-11,2',
  482. 'name' => '历史团队业绩',
  483. 'default' => '0',
  484. 'desc' => '历史团队业绩',
  485. 'match' => 'is_numeric',
  486. 'update' => 'text',
  487. 'list_name' => $search_auth == 2 ? '新增业绩' : false,
  488. 'list' => $search_auth == 2 ? 'Dever::load("agent/lib/member.new_money",{id})': false,
  489. ),
  490. 'old_agentdownnum' => array
  491. (
  492. 'type' => 'int-11',
  493. 'name' => '历史直推人数',
  494. 'default' => '0',
  495. 'desc' => '历史团队业绩',
  496. 'match' => 'is_numeric',
  497. 'update' => 'text',
  498. 'list_name' => $search_auth == 2 ? '新增正常业绩' : false,
  499. 'list' => $search_auth == 2 ? 'Dever::load("agent/lib/member.new_zmoney",{id})': false,
  500. ),
  501. 'old_pwd' => array
  502. (
  503. 'type' => 'varchar-32',
  504. 'name' => 'pwd',
  505. 'default' => '',
  506. 'desc' => 'pwd',
  507. 'match' => 'is_string',
  508. 'update' => 'text',
  509. ),
  510. 'old_salt' => array
  511. (
  512. 'type' => 'varchar-32',
  513. 'name' => 'salt',
  514. 'default' => '',
  515. 'desc' => 'salt',
  516. 'match' => 'is_string',
  517. 'update' => 'text',
  518. ),
  519. 'status' => array
  520. (
  521. 'type' => 'tinyint-1',
  522. 'name' => '状态',
  523. 'default' => '1',
  524. 'desc' => '状态',
  525. 'match' => 'is_numeric',
  526. 'option' => $status,
  527. 'search' => 'select',
  528. 'list' => $search_auth == 1 ? true : false,
  529. ),
  530. 'import' => array
  531. (
  532. 'type' => 'tinyint-1',
  533. 'name' => '是否导入',
  534. 'default' => '1',
  535. 'desc' => '是否导入',
  536. 'match' => 'is_numeric',
  537. 'option' => $import,
  538. 'update' => 'radio',
  539. ),
  540. 'prize_type' => array
  541. (
  542. 'type' => 'tinyint-1',
  543. 'name' => '是否名额内',
  544. 'default' => '1',
  545. 'desc' => '是否名额内',
  546. 'match' => 'is_numeric',
  547. 'option' => $prize_type,
  548. ),
  549. 'dever_auth' => array
  550. (
  551. 'name' => '业绩时间',
  552. 'default' => '',
  553. 'desc' => '类型',
  554. 'match' => 'is_string',
  555. 'search' => 'hidden',
  556. ),
  557. 'dever_time' => array
  558. (
  559. 'name' => '业绩时间',
  560. 'default' => '',
  561. 'desc' => '类型',
  562. 'match' => 'is_string',
  563. // 'search' => 'hidden',
  564. 'search' => $search_auth == 2 ? 'date' : false,
  565. ),
  566. 'reorder' => array
  567. (
  568. 'type' => 'int-11',
  569. 'name' => '排序(数值越大越靠前)',
  570. 'default' => '1',
  571. 'desc' => '请输入排序',
  572. 'match' => 'option',
  573. //'update' => 'text',
  574. //'search' => 'order',
  575. //'list' => true,
  576. //'order' => 'desc',
  577. //'edit' => true,
  578. ),
  579. 'state' => array
  580. (
  581. 'type' => 'tinyint-1',
  582. 'name' => '状态',
  583. 'default' => '1',
  584. 'desc' => '请选择状态',
  585. 'match' => 'is_numeric',
  586. ),
  587. 'cdate' => array
  588. (
  589. 'type' => 'int-11',
  590. 'name' => '加入日期',
  591. 'match' => array('is_numeric', time()),
  592. 'desc' => '',
  593. // 'search' => $search_auth == 2 ? 'date' : false,
  594. # 只有insert时才生效
  595. 'insert' => true,
  596. //'search' => 'date',
  597. ),
  598. ),
  599. 'alter' => array
  600. (
  601. 5 => array
  602. (
  603. array('update', 'cash', 'cash', 'decimal-11,2 0 余额'),
  604. array('update', 'sell', 'sell', 'decimal-11,2 0 直推业绩'),
  605. array('update', 'group_sell', 'group_sell', 'decimal-11,2 0 团队业绩'),
  606. array('update', 'old_group_sell', 'old_group_sell', 'decimal-11,2 0 历史团队业绩'),
  607. ),
  608. 'version' => 5,
  609. ),
  610. 'index' => array
  611. (
  612. 1 => array
  613. (
  614. 'parent_mid' => 'parent_mid',
  615. ),
  616. # 版本号 更改版本号会更新当前表的索引
  617. 'version' => 1,
  618. ),
  619. 'manage' => array
  620. (
  621. 'insert' => false,
  622. 'delete' => false,
  623. 'edit' => false,
  624. 'button' => $button,
  625. 'list_button' => $list_button,
  626. ),
  627. 'request' => array
  628. (
  629. 'getInfo' => array
  630. (
  631. # 匹配的正则或函数 选填项
  632. 'option' => array
  633. (
  634. 'status' => 2,
  635. 'state' => 1,
  636. ),
  637. 'order' => array('id' => 'desc'),
  638. 'type' => 'one',
  639. 'col' => '*',
  640. ),
  641. 'getData' => array
  642. (
  643. # 匹配的正则或函数 选填项
  644. 'option' => array
  645. (
  646. 'idcard' => 'yes',
  647. 'id' => array('yes', '!='),
  648. 'status' => array('yes', 'in'),
  649. 'state' => 1,
  650. ),
  651. 'order' => array('id' => 'desc'),
  652. 'type' => 'all',
  653. 'page' => array(20, 'list'),
  654. 'col' => '*',
  655. ),
  656. 'upCash' => array
  657. (
  658. 'type' => 'update',
  659. 'where' => array
  660. (
  661. 'id' => 'yes',
  662. ),
  663. 'set' => array
  664. (
  665. 'cash' => array('yes', '+='),
  666. ),
  667. ),
  668. 'upSell' => array
  669. (
  670. 'type' => 'update',
  671. 'where' => array
  672. (
  673. 'id' => 'yes',
  674. ),
  675. 'set' => array
  676. (
  677. 'cash' => array('yes', '+='),
  678. 'upcol' => array('yes-sell', '+='),
  679. 'level_id' => 'yes',
  680. ),
  681. ),
  682. 'upGroupSell' => array
  683. (
  684. 'type' => 'update',
  685. 'where' => array
  686. (
  687. 'id' => 'yes',
  688. ),
  689. 'set' => array
  690. (
  691. 'cash' => array('yes', '+='),
  692. 'upcol' => array('yes-group_sell', '+='),
  693. 'level_id' => 'yes',
  694. ),
  695. ),
  696. 'upGroupSellOne' => array
  697. (
  698. 'type' => 'update',
  699. 'where' => array
  700. (
  701. 'id' => 'yes',
  702. ),
  703. 'set' => array
  704. (
  705. 'sell' => array('yes', '+='),
  706. 'group_sell' => array('yes', '+='),
  707. ),
  708. ),
  709. # 获取订单数量
  710. 'getNum' => array
  711. (
  712. # 匹配的正则或函数 选填项
  713. 'option' => array
  714. (
  715. 'start' => array('yes-cdate', '>='),
  716. 'end' => array('yes-cdate', '<='),
  717. 'fstart' => array('yes-rdate', '>='),
  718. 'fend' => array('yes-rdate', '<='),
  719. 'status' => 'yes',
  720. 'role' => 'yes',
  721. 'parent_mid' =>'yes',
  722. 'state' => 1,
  723. ),
  724. 'type' => 'count',
  725. 'col' => '*',
  726. ),
  727. 'getSearch' => array
  728. (
  729. # 匹配的正则或函数 选填项
  730. 'option' => array
  731. (
  732. 'col' => array('yes-mobile,name', 'like'),
  733. ),
  734. 'type' => 'all',
  735. 'col' => '*|id',
  736. ),
  737. 'getShopAll' => array
  738. (
  739. # 匹配的正则或函数 选填项
  740. 'option' => array
  741. (
  742. 'shop_id' => array('yes','>='),
  743. 'state' => 1,
  744. ),
  745. 'type' => 'all',
  746. 'col' => '*',
  747. ),
  748. 'getCount' => array
  749. (
  750. # 匹配的正则或函数 选填项
  751. 'option' => array
  752. (
  753. 'id' => 'yes',
  754. 'role' => array('yes','in'),
  755. 'prize_type' => 'yes',
  756. 'state' => 1,
  757. ),
  758. 'type' => 'count',
  759. 'col' => '*',
  760. ),
  761. 'getOutAll' => array
  762. (
  763. # 匹配的正则或函数 选填项
  764. 'option' => array
  765. (
  766. 'id' => 'yes',
  767. 'role' => 'yes',
  768. 'prize_type' => 'yes',
  769. 'state' => 1,
  770. ),
  771. 'type' => 'all',
  772. 'col' => '*',
  773. ),
  774. 'getCountByRole' => array
  775. (
  776. # 匹配的正则或函数 选填项
  777. 'option' => array
  778. (
  779. 'role' => 'yes',
  780. 'parent_mid' => 'yes',
  781. 'status' => 2,
  782. 'state' => 1,
  783. ),
  784. 'type' => 'count',
  785. 'col' => '*',
  786. ),
  787. 'search' => array
  788. (
  789. 'option' => array
  790. (
  791. 'ids' => array('yes-id', 'in'),
  792. 'name' => array('yes-name,mobile', 'like'),
  793. 'id' => 'yes',
  794. 'state' => 1,
  795. ),
  796. 'type' => 'all',
  797. 'order' => array('reorder' => 'desc', 'id' => 'desc'),
  798. 'limit' => '0,20',
  799. 'col' => 'concat(name, "(", mobile , ")") as name, id, id as value, "" as selected, "" as disabled|id',
  800. ),
  801. 'getAll' => array
  802. (
  803. # 匹配的正则或函数 选填项
  804. 'option' => array
  805. (
  806. 'start' => array('yes-rdate', '>='),
  807. 'end' => array('yes-rdate', '<='),
  808. 'status' => 'yes',
  809. 'state' => 1,
  810. ),
  811. 'type' => 'all',
  812. // 'limit' => 10,
  813. 'page' => array(20, 'list'),
  814. 'col' => 'id,name,mobile,idcard,role,group_sell',
  815. ),
  816. 'getNewParent' => array
  817. (
  818. # 匹配的正则或函数 选填项
  819. 'option' => array
  820. (
  821. 'start' => array('yes-rdate','>='),
  822. 'end' => array('yes-rdate','<='),
  823. 'parent_mid' => 'yes',
  824. 'state' => 1,
  825. ),
  826. 'type' => 'all',
  827. 'col' => 'id,group_sell,sell',
  828. ),
  829. 'getDataByArea' => array
  830. (
  831. # 匹配的正则或函数 选填项
  832. 'option' => array
  833. (
  834. 'area' => array('yes', 'like'),
  835. 'state' => 1,
  836. ),
  837. 'order' => array('id' => 'desc'),
  838. 'type' => 'all',
  839. 'col' => '*',
  840. ),
  841. 'getDataByRole' => array
  842. (
  843. # 匹配的正则或函数 选填项
  844. 'option' => array
  845. (
  846. 'role' => array('yes', 'in'),
  847. 'state' => 1,
  848. ),
  849. 'order' => array('id' => 'desc'),
  850. 'type' => 'all',
  851. 'col' => '*',
  852. ),
  853. 'getExcelAll' => array
  854. (
  855. # 匹配的正则或函数 选填项
  856. 'option' => array
  857. (
  858. 'start' => array('yes-rdate','>='),
  859. 'end' => array('yes-rdate','<='),
  860. 'area' => array('yes','like'),
  861. 'role' =>'yes',
  862. 'source_id' => 'yes',
  863. 'title_id' =>'yes',
  864. 'level_id' => 'yes',
  865. 'id' => 'yes',
  866. 'state' => 1,
  867. 'status' => 'yes',
  868. ),
  869. 'type' => 'all',
  870. 'col' => '*',
  871. ),
  872. 'getAreaAll' => array
  873. (
  874. # 匹配的正则或函数 选填项
  875. 'option' => array
  876. (
  877. 'area' => array('yes','like'),
  878. 'state' => 1,
  879. ),
  880. // 'order' => array('id' => 'desc'),
  881. 'type' => 'one',
  882. 'col' => 'id',
  883. ),
  884. ),
  885. );