member.php 30 KB

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