member.php 30 KB

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