member.php 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071
  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' => 'text',
  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' => 'option',
  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. 'update' => 'hidden',
  623. ),
  624. 'cdate' => array
  625. (
  626. 'type' => 'int-11',
  627. 'name' => '加入日期',
  628. 'match' => array('is_numeric', time()),
  629. 'desc' => '',
  630. // 'search' => $search_auth == 2 ? 'date' : false,
  631. # 只有insert时才生效
  632. 'insert' => true,
  633. //'search' => 'date',
  634. ),
  635. ),
  636. 'alter' => array
  637. (
  638. 5 => array
  639. (
  640. array('update', 'cash', 'cash', 'decimal-11,2 0 余额'),
  641. array('update', 'sell', 'sell', 'decimal-11,2 0 直推业绩'),
  642. array('update', 'group_sell', 'group_sell', 'decimal-11,2 0 团队业绩'),
  643. array('update', 'old_group_sell', 'old_group_sell', 'decimal-11,2 0 历史团队业绩'),
  644. ),
  645. 6 => array
  646. (
  647. array('update', 'title_id', 'title_id', 'varchar-100 1 代理商头衔'),
  648. ),
  649. 'version' => 6,
  650. ),
  651. 'index' => array
  652. (
  653. 1 => array
  654. (
  655. 'parent_mid' => 'parent_mid',
  656. ),
  657. # 版本号 更改版本号会更新当前表的索引
  658. 'version' => 1,
  659. ),
  660. 'manage' => array
  661. (
  662. //'list_table' => 'js',
  663. 'insert' => false,
  664. 'delete' => false,
  665. 'edit' => false,
  666. 'excel' => $excel,
  667. 'button' => $button,
  668. 'list_button' => $list_button,
  669. ),
  670. 'request' => array
  671. (
  672. 'getInfo' => array
  673. (
  674. # 匹配的正则或函数 选填项
  675. 'option' => array
  676. (
  677. 'status' => 2,
  678. 'state' => 1,
  679. ),
  680. 'order' => array('id' => 'desc'),
  681. 'type' => 'one',
  682. 'col' => '*',
  683. ),
  684. 'getData' => array
  685. (
  686. # 匹配的正则或函数 选填项
  687. 'option' => array
  688. (
  689. 'idcard' => 'yes',
  690. 'id' => array('yes', '!='),
  691. 'status' => array('yes', 'in'),
  692. 'state' => 1,
  693. ),
  694. 'order' => array('id' => 'desc'),
  695. 'type' => 'all',
  696. 'page' => array(20, 'list'),
  697. 'col' => '*',
  698. ),
  699. 'upCash' => array
  700. (
  701. 'type' => 'update',
  702. 'where' => array
  703. (
  704. 'id' => 'yes',
  705. ),
  706. 'set' => array
  707. (
  708. 'cash' => array('yes', '+='),
  709. ),
  710. ),
  711. 'upSell' => array
  712. (
  713. 'type' => 'update',
  714. 'where' => array
  715. (
  716. 'id' => 'yes',
  717. ),
  718. 'set' => array
  719. (
  720. 'cash' => array('yes', '+='),
  721. 'upcol' => array('yes-sell', '+='),
  722. 'level_id' => 'yes',
  723. ),
  724. ),
  725. 'upGroupSell' => array
  726. (
  727. 'type' => 'update',
  728. 'where' => array
  729. (
  730. 'id' => 'yes',
  731. ),
  732. 'set' => array
  733. (
  734. 'cash' => array('yes', '+='),
  735. 'upcol' => array('yes-group_sell', '+='),
  736. 'level_id' => 'yes',
  737. ),
  738. ),
  739. 'upGroupSellOne' => array
  740. (
  741. 'type' => 'update',
  742. 'where' => array
  743. (
  744. 'id' => 'yes',
  745. ),
  746. 'set' => array
  747. (
  748. 'sell' => array('yes', '+='),
  749. 'group_sell' => array('yes', '+='),
  750. ),
  751. ),
  752. # 获取订单数量
  753. 'getNum' => array
  754. (
  755. # 匹配的正则或函数 选填项
  756. 'option' => array
  757. (
  758. 'start' => array('yes-cdate', '>='),
  759. 'end' => array('yes-cdate', '<='),
  760. 'fstart' => array('yes-rdate', '>='),
  761. 'fend' => array('yes-rdate', '<='),
  762. 'status' => 'yes',
  763. 'role' => 'yes',
  764. 'parent_mid' =>'yes',
  765. 'state' => 1,
  766. ),
  767. 'type' => 'count',
  768. 'col' => '*',
  769. ),
  770. # 获取余额
  771. 'getCash' => array
  772. (
  773. # 匹配的正则或函数 选填项
  774. 'option' => array
  775. (
  776. 'start' => array('yes-cdate', '>='),
  777. 'end' => array('yes-cdate', '<='),
  778. 'fstart' => array('yes-rdate', '>='),
  779. 'fend' => array('yes-rdate', '<='),
  780. 'status' => 'yes',
  781. 'role' => 'yes',
  782. 'parent_mid' =>'yes',
  783. 'state' => 1,
  784. ),
  785. 'type' => 'one',
  786. 'col' => 'sum(cash) as total',
  787. ),
  788. 'getSearch' => array
  789. (
  790. # 匹配的正则或函数 选填项
  791. 'option' => array
  792. (
  793. 'col' => array('yes-mobile,name', 'like'),
  794. ),
  795. 'type' => 'all',
  796. 'col' => '*|id',
  797. ),
  798. 'getShopAll' => array
  799. (
  800. # 匹配的正则或函数 选填项
  801. 'option' => array
  802. (
  803. 'shop_id' => array('yes','>='),
  804. 'state' => 1,
  805. ),
  806. 'type' => 'all',
  807. 'col' => '*',
  808. ),
  809. 'getCount' => array
  810. (
  811. # 匹配的正则或函数 选填项
  812. 'option' => array
  813. (
  814. 'id' => 'yes',
  815. 'role' => array('yes','in'),
  816. 'prize_type' => 'yes',
  817. 'state' => 1,
  818. ),
  819. 'type' => 'count',
  820. 'col' => '*',
  821. ),
  822. 'getOutAll' => array
  823. (
  824. # 匹配的正则或函数 选填项
  825. 'option' => array
  826. (
  827. 'id' => 'yes',
  828. 'role' => 'yes',
  829. 'prize_type' => 'yes',
  830. 'state' => 1,
  831. ),
  832. 'type' => 'all',
  833. 'col' => '*',
  834. ),
  835. 'getCountByRole' => array
  836. (
  837. # 匹配的正则或函数 选填项
  838. 'option' => array
  839. (
  840. 'role' => 'yes',
  841. 'parent_mid' => 'yes',
  842. 'status' => 2,
  843. 'state' => 1,
  844. ),
  845. 'type' => 'count',
  846. 'col' => '*',
  847. ),
  848. 'search' => array
  849. (
  850. 'option' => array
  851. (
  852. 'ids' => array('yes-id', 'in'),
  853. 'name' => array('yes-name,mobile', 'like'),
  854. 'id' => 'yes',
  855. 'state' => 1,
  856. ),
  857. 'type' => 'all',
  858. 'order' => array('reorder' => 'desc', 'id' => 'desc'),
  859. 'limit' => '0,20',
  860. 'col' => 'concat(name, "(", mobile , ")") as name, id, id as value, "" as selected, "" as disabled|id',
  861. ),
  862. 'getAll' => array
  863. (
  864. # 匹配的正则或函数 选填项
  865. 'option' => array
  866. (
  867. 'start' => array('yes-rdate', '>='),
  868. 'end' => array('yes-rdate', '<='),
  869. 'status' => 'yes',
  870. 'state' => 1,
  871. ),
  872. 'type' => 'all',
  873. // 'limit' => 10,
  874. 'page' => array(20, 'list'),
  875. 'col' => 'id,name,mobile,idcard,role,group_sell',
  876. ),
  877. 'getNewParent' => array
  878. (
  879. # 匹配的正则或函数 选填项
  880. 'option' => array
  881. (
  882. 'start' => array('yes-rdate','>='),
  883. 'end' => array('yes-rdate','<='),
  884. 'parent_mid' => 'yes',
  885. 'state' => 1,
  886. ),
  887. 'type' => 'all',
  888. 'col' => 'id,group_sell,sell',
  889. ),
  890. 'getDataByArea' => array
  891. (
  892. # 匹配的正则或函数 选填项
  893. 'option' => array
  894. (
  895. 'area' => array('yes', 'like'),
  896. 'state' => 1,
  897. ),
  898. 'order' => array('id' => 'desc'),
  899. 'type' => 'all',
  900. 'col' => '*',
  901. ),
  902. 'getDataByRole' => array
  903. (
  904. # 匹配的正则或函数 选填项
  905. 'option' => array
  906. (
  907. 'role' => array('yes', 'in'),
  908. 'state' => 1,
  909. ),
  910. 'order' => array('id' => 'desc'),
  911. 'type' => 'all',
  912. 'col' => '*',
  913. ),
  914. 'getExcelAll' => array
  915. (
  916. # 匹配的正则或函数 选填项
  917. 'option' => array
  918. (
  919. 'start' => array('yes-rdate','>='),
  920. 'end' => array('yes-rdate','<='),
  921. 'area' => array('yes','like'),
  922. 'role' =>'yes',
  923. 'source_id' => 'yes',
  924. 'title_id' =>'yes',
  925. 'level_id' => 'yes',
  926. 'id' => 'yes',
  927. 'state' => 1,
  928. 'status' => 'yes',
  929. ),
  930. 'type' => 'all',
  931. 'col' => '*',
  932. ),
  933. 'getAreaAll' => array
  934. (
  935. # 匹配的正则或函数 选填项
  936. 'option' => array
  937. (
  938. 'area' => array('yes','='),
  939. 'role' => 'yes',
  940. 'state' => 1,
  941. ),
  942. // 'order' => array('id' => 'desc'),
  943. 'type' => 'one',
  944. 'col' => 'id',
  945. ),
  946. 'getOne' => array
  947. (
  948. # 匹配的正则或函数 选填项
  949. 'option' => array
  950. (
  951. 'role' => 'yes',
  952. 'area' => 'yes',
  953. 'status' => 2,
  954. 'state' => 1,
  955. ),
  956. 'type' => 'one',
  957. 'col' => '*',
  958. ),
  959. 'guidian' => array
  960. (
  961. # 匹配的正则或函数 选填项
  962. 'option' => array
  963. (
  964. 'role' => 'yes',
  965. 'start' => array('yes-cdate','>='),
  966. 'parent_mid' => 'yes',
  967. 'prize_type' => 'yes',
  968. 'state' => 1,
  969. ),
  970. 'type' => 'all',
  971. 'col' => '*',
  972. ),
  973. 'getDataByName' => array
  974. (
  975. # 匹配的正则或函数 选填项
  976. 'option' => array
  977. (
  978. 'name' =>'yes',
  979. 'state' => 1,
  980. ),
  981. 'type' => 'all',
  982. 'order' => array('role' => 'asc', 'id' => 'desc'),
  983. 'col' => '*',
  984. ),
  985. ),
  986. );