member.php 29 KB

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