member.php 31 KB

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