member.php 29 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025
  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. 'getSearch' => array
  745. (
  746. # 匹配的正则或函数 选填项
  747. 'option' => array
  748. (
  749. 'col' => array('yes-mobile,name', 'like'),
  750. ),
  751. 'type' => 'all',
  752. 'col' => '*|id',
  753. ),
  754. 'getShopAll' => array
  755. (
  756. # 匹配的正则或函数 选填项
  757. 'option' => array
  758. (
  759. 'shop_id' => array('yes','>='),
  760. 'state' => 1,
  761. ),
  762. 'type' => 'all',
  763. 'col' => '*',
  764. ),
  765. 'getCount' => array
  766. (
  767. # 匹配的正则或函数 选填项
  768. 'option' => array
  769. (
  770. 'id' => 'yes',
  771. 'role' => array('yes','in'),
  772. 'prize_type' => 'yes',
  773. 'state' => 1,
  774. ),
  775. 'type' => 'count',
  776. 'col' => '*',
  777. ),
  778. 'getOutAll' => array
  779. (
  780. # 匹配的正则或函数 选填项
  781. 'option' => array
  782. (
  783. 'id' => 'yes',
  784. 'role' => 'yes',
  785. 'prize_type' => 'yes',
  786. 'state' => 1,
  787. ),
  788. 'type' => 'all',
  789. 'col' => '*',
  790. ),
  791. 'getCountByRole' => array
  792. (
  793. # 匹配的正则或函数 选填项
  794. 'option' => array
  795. (
  796. 'role' => 'yes',
  797. 'parent_mid' => 'yes',
  798. 'status' => 2,
  799. 'state' => 1,
  800. ),
  801. 'type' => 'count',
  802. 'col' => '*',
  803. ),
  804. 'search' => array
  805. (
  806. 'option' => array
  807. (
  808. 'ids' => array('yes-id', 'in'),
  809. 'name' => array('yes-name,mobile', 'like'),
  810. 'id' => 'yes',
  811. 'state' => 1,
  812. ),
  813. 'type' => 'all',
  814. 'order' => array('reorder' => 'desc', 'id' => 'desc'),
  815. 'limit' => '0,20',
  816. 'col' => 'concat(name, "(", mobile , ")") as name, id, id as value, "" as selected, "" as disabled|id',
  817. ),
  818. 'getAll' => array
  819. (
  820. # 匹配的正则或函数 选填项
  821. 'option' => array
  822. (
  823. 'start' => array('yes-rdate', '>='),
  824. 'end' => array('yes-rdate', '<='),
  825. 'status' => 'yes',
  826. 'state' => 1,
  827. ),
  828. 'type' => 'all',
  829. // 'limit' => 10,
  830. 'page' => array(20, 'list'),
  831. 'col' => 'id,name,mobile,idcard,role,group_sell',
  832. ),
  833. 'getNewParent' => array
  834. (
  835. # 匹配的正则或函数 选填项
  836. 'option' => array
  837. (
  838. 'start' => array('yes-rdate','>='),
  839. 'end' => array('yes-rdate','<='),
  840. 'parent_mid' => 'yes',
  841. 'state' => 1,
  842. ),
  843. 'type' => 'all',
  844. 'col' => 'id,group_sell,sell',
  845. ),
  846. 'getDataByArea' => array
  847. (
  848. # 匹配的正则或函数 选填项
  849. 'option' => array
  850. (
  851. 'area' => array('yes', 'like'),
  852. 'state' => 1,
  853. ),
  854. 'order' => array('id' => 'desc'),
  855. 'type' => 'all',
  856. 'col' => '*',
  857. ),
  858. 'getDataByRole' => array
  859. (
  860. # 匹配的正则或函数 选填项
  861. 'option' => array
  862. (
  863. 'role' => array('yes', 'in'),
  864. 'state' => 1,
  865. ),
  866. 'order' => array('id' => 'desc'),
  867. 'type' => 'all',
  868. 'col' => '*',
  869. ),
  870. 'getExcelAll' => array
  871. (
  872. # 匹配的正则或函数 选填项
  873. 'option' => array
  874. (
  875. 'start' => array('yes-rdate','>='),
  876. 'end' => array('yes-rdate','<='),
  877. 'area' => array('yes','like'),
  878. 'role' =>'yes',
  879. 'source_id' => 'yes',
  880. 'title_id' =>'yes',
  881. 'level_id' => 'yes',
  882. 'id' => 'yes',
  883. 'state' => 1,
  884. 'status' => 'yes',
  885. ),
  886. 'type' => 'all',
  887. 'col' => '*',
  888. ),
  889. 'getAreaAll' => array
  890. (
  891. # 匹配的正则或函数 选填项
  892. 'option' => array
  893. (
  894. 'area' => array('yes','like'),
  895. 'state' => 1,
  896. ),
  897. // 'order' => array('id' => 'desc'),
  898. 'type' => 'one',
  899. 'col' => 'id',
  900. ),
  901. 'getOne' => array
  902. (
  903. # 匹配的正则或函数 选填项
  904. 'option' => array
  905. (
  906. 'role' => 'yes',
  907. 'area' => 'yes',
  908. 'status' => 2,
  909. 'state' => 1,
  910. ),
  911. 'type' => 'one',
  912. 'col' => '*',
  913. ),
  914. 'guidian' => array
  915. (
  916. # 匹配的正则或函数 选填项
  917. 'option' => array
  918. (
  919. 'role' => 'yes',
  920. 'start' => array('yes-cdate','>='),
  921. 'parent_mid' => 'yes',
  922. 'prize_type' => 'yes',
  923. 'state' => 1,
  924. ),
  925. 'type' => 'all',
  926. 'col' => '*',
  927. ),
  928. 'getDataByName' => array
  929. (
  930. # 匹配的正则或函数 选填项
  931. 'option' => array
  932. (
  933. 'name' =>'yes',
  934. 'state' => 1,
  935. ),
  936. 'type' => 'all',
  937. 'order' => array('role' => 'asc', 'id' => 'desc'),
  938. 'col' => '*',
  939. ),
  940. ),
  941. );