member.php 30 KB

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