info.php 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902
  1. <?php
  2. # 获取分类权限
  3. $status = array
  4. (
  5. 1 => '合作中',
  6. 2 => '已终止合作',
  7. //3 => '申请合作中',
  8. );
  9. $type = array
  10. (
  11. 1 => '体验店',
  12. 2 => '零售店',
  13. 10 => '平台商城',#'平台店',
  14. );
  15. $invoice = array
  16. (
  17. 1 => '可以开发票',
  18. 2 => '不可以开发票',
  19. );
  20. $is_agent = array
  21. (
  22. 1 => '代理商可以归店',
  23. 2 => '代理商不可以归店',
  24. );
  25. $col = 'id,name,`desc`,ps_cash,free_ps_cash,truename,mobile,lng,lat,address,open,worktime,method,gotime,city,area,province,county,town,coupon_city,pdesc,license,food_license,jy_license,license_number,company_name,coord_address,invoice,type,mid,sid';
  26. $act = function()
  27. {
  28. $info = Dever::db('act/info')->select();
  29. $id = Dever::input('where_id');
  30. $coupon = Dever::db('shop/coupon')->select(array('shop_id' => $id));
  31. if ($coupon) {
  32. foreach ($coupon as $k => $v) {
  33. $coupon_info = Dever::db('goods/coupon')->find($v['coupon_id']);
  34. if (isset($coupon_info['method'])) {
  35. $prefix = '('.Dever::db('goods/coupon')->config['method'][$coupon_info['method']].')';
  36. $coupon[$k]['name'] = $prefix . $coupon_info['name'];
  37. }
  38. }
  39. }
  40. foreach ($info as $k => $v) {
  41. if ($v['id'] == 1) {
  42. $info[$k]['child'] = $coupon;
  43. }
  44. }
  45. $info['state'] = 2;//1是无需记录上级id,字符串逗号隔开。2是需要记录上级id,json格式
  46. return $info;
  47. };
  48. $yes = array
  49. (
  50. 1 => '可用',
  51. 2 => '不可用',
  52. );
  53. $open = array
  54. (
  55. 1 => '开启',
  56. 2 => '关闭',
  57. );
  58. $method = array
  59. (
  60. 1 => '自提',
  61. 2 => '外送',
  62. 3 => '以上全支持',
  63. );
  64. $stat_type = Dever::db('cash/shop')->config['config_type'];
  65. return array
  66. (
  67. # 表名
  68. 'name' => 'info',
  69. # 显示给用户看的名称
  70. 'lang' => '门店列表',
  71. # 后台菜单排序
  72. 'order' => 99,
  73. 'act' => $act,
  74. 'config_col' => $col,
  75. 'check' => 'sid',
  76. 'config_type' => $type,
  77. 'end' => array
  78. (
  79. 'insert' => 'shop/lib/manage.infoUpdate',
  80. 'update' => 'shop/lib/manage.infoUpdate',
  81. ),
  82. # 数据结构
  83. 'struct' => array
  84. (
  85. 'id' => array
  86. (
  87. 'type' => 'int-11',
  88. 'name' => 'ID',
  89. 'default' => '',
  90. 'desc' => '',
  91. 'match' => 'is_numeric',
  92. 'search' => 'order',
  93. //'list' => true,
  94. 'order' => 'desc',
  95. ),
  96. 'hr1' => array
  97. (
  98. 'name' => '门店基本信息',
  99. 'class' => '',//本项必须填写
  100. 'attr' => '',
  101. ),
  102. 'uid' => array
  103. (
  104. 'type' => 'int-11',
  105. 'name' => '用户名',
  106. 'default' => '0',
  107. 'desc' => '请选择用户',
  108. 'match' => 'is_numeric',
  109. //'update' => 'text',
  110. //'search' => 'select',
  111. 'searchs' => array
  112. (
  113. 'api' => 'passport/user-select',
  114. 'col' => 'username',
  115. 'result' => 'id',
  116. ),
  117. //'list' => '{uid} > 0 ? Dever::load("passport/user-find#username", {uid}) : "匿名用户"',
  118. ),
  119. 'sid' => array
  120. (
  121. 'type' => 'varchar-30',
  122. 'name' => '店铺编号-一般为5位数字,不能重复',
  123. 'default' => '',
  124. 'desc' => '店铺编号',
  125. 'match' => 'is_string',
  126. 'update' => 'text',
  127. 'search' => 'fulltext',
  128. 'list' => true,
  129. ),
  130. 'name' => array
  131. (
  132. 'type' => 'varchar-32',
  133. 'name' => '门店名称',
  134. 'default' => '',
  135. 'desc' => '请输入门店名称',
  136. 'match' => 'is_string',
  137. 'update' => 'text',
  138. 'search' => 'fulltext',
  139. 'list' => true,
  140. ),
  141. 'desc' => array
  142. (
  143. 'type' => 'varchar-800',
  144. 'name' => '门店介绍',
  145. 'default' => '',
  146. 'desc' => '门店介绍',
  147. 'match' => 'is_string',
  148. 'update' => 'textarea',
  149. ),
  150. 'truename' => array
  151. (
  152. 'type' => 'varchar-100',
  153. 'name' => '联系人姓名',
  154. 'default' => '',
  155. 'desc' => '请输入联系人姓名',
  156. 'match' => 'is_string',
  157. 'update' => 'text',
  158. 'search' => 'fulltext',
  159. 'list' => true,
  160. ),
  161. 'mobile' => array
  162. (
  163. 'type' => 'bigint-11',
  164. 'name' => '联系人电话',
  165. 'default' => '',
  166. 'desc' => '请输入联系人电话',
  167. 'match' => 'is_numeric',
  168. 'update' => 'text',
  169. 'search' => 'fulltext',
  170. 'list' => true,
  171. ),
  172. 'area' => array
  173. (
  174. 'type' => 'varchar-500',
  175. 'name' => '所在街道',
  176. 'default' => '',
  177. 'desc' => '所在街道',
  178. 'match' => 'option',
  179. 'search' => 'linkage',
  180. 'update' => 'linkage',
  181. 'option' => Dever::url('api.get?level_total=4', 'area'),
  182. //'list' => 'Dever::load("area/api.string", "{area}")',
  183. ),
  184. 'province' => array
  185. (
  186. 'type' => 'int-11',
  187. 'name' => '省份',
  188. 'default' => '',
  189. 'desc' => '省份',
  190. 'match' => 'option',
  191. //'update' => 'text',
  192. ),
  193. 'city' => array
  194. (
  195. 'type' => 'int-11',
  196. 'name' => '城市',
  197. 'default' => '',
  198. 'desc' => '城市',
  199. 'match' => 'option',
  200. //'update' => 'text',
  201. ),
  202. 'county' => array
  203. (
  204. 'type' => 'int-11',
  205. 'name' => '县区',
  206. 'default' => '',
  207. 'desc' => '县区',
  208. 'match' => 'option',
  209. //'update' => 'text',
  210. ),
  211. 'town' => array
  212. (
  213. 'type' => 'int-11',
  214. 'name' => '街道',
  215. 'default' => '',
  216. 'desc' => '街道',
  217. 'match' => 'option',
  218. //'update' => 'text',
  219. ),
  220. 'map' => array
  221. (
  222. 'type' => 'varchar-300',
  223. 'name' => '地理位置',
  224. 'default' => '',
  225. 'desc' => '地理位置',
  226. 'match' => 'is_string',
  227. # 如果是map,必须在config的base.php中设置map信息
  228. //'update' => 'map',
  229. ),
  230. 'lng' => array
  231. (
  232. 'type' => 'varchar-100',
  233. 'name' => '经度',
  234. 'default' => '',
  235. 'desc' => '经度',
  236. 'match' => 'option',
  237. //'update' => 'text',
  238. //'list' => true,
  239. ),
  240. 'lat' => array
  241. (
  242. 'type' => 'varchar-100',
  243. 'name' => '纬度',
  244. 'default' => '',
  245. 'desc' => '纬度',
  246. 'match' => 'option',
  247. //'update' => 'text',
  248. //'list' => true,
  249. ),
  250. 'coord_address' => array
  251. (
  252. 'type' => 'varchar-1000',
  253. 'name' => '门店坐标地址',
  254. 'default' => '',
  255. 'desc' => '门店坐标地址',
  256. 'match' => 'option',
  257. //'update' => 'text',
  258. //'list' => true,
  259. ),
  260. 'address' => array
  261. (
  262. 'type' => 'varchar-1000',
  263. 'name' => '门店地址',
  264. 'default' => '',
  265. 'desc' => '门店地址',
  266. 'match' => 'option',
  267. 'update' => 'text',
  268. //'list' => true,
  269. ),
  270. 'goods' => array
  271. (
  272. 'type' => 'text-255',
  273. 'name' => '请先选择分类-选择分类,之后选择分类下的商品,点击商品名称可以设置库存',
  274. 'default' => '',
  275. 'desc' => '生产能力',
  276. 'match' => 'option',
  277. // 多级联动+多选
  278. 'update' => Dever::input('col') ? 'linkage' : false,
  279. 'option' => array(Dever::url('api.get', 'category'), 'cate_id', Dever::url('lib/info.getGoods', 'goods'), '快速设置', Dever::url('project/database/list?project=goods&table=info_sku&page_type=1&other=shop&other_id={where_id}&goods_id={id}', 'manage')),
  280. ),
  281. 'factory' => array
  282. (
  283. 'type' => 'text-255',
  284. 'name' => '分配工厂-请先选择地区,再选择工厂',
  285. 'default' => '',
  286. 'desc' => '分配工厂',
  287. 'match' => 'option',
  288. // 多级联动+多选
  289. 'update' => Dever::input('col') ? 'linkage' : false,
  290. 'option' => array(Dever::url('api.get?level_total=3', 'area'), 'city', Dever::url('lib/manage.getInfo', 'factory'), '分配工厂'),
  291. ),
  292. 'store' => array
  293. (
  294. 'type' => 'text-255',
  295. 'name' => '分配仓库-请先选择地区,再选择仓库',
  296. 'default' => '',
  297. 'desc' => '分配仓库',
  298. 'match' => 'option',
  299. // 多级联动+多选
  300. 'update' => Dever::input('col') ? 'linkage' : false,
  301. 'option' => array(Dever::url('api.get?level_total=3', 'area'), 'city', Dever::url('lib/manage.getInfo', 'store'), '分配仓库'),
  302. ),
  303. 'hr2' => array
  304. (
  305. 'name' => '门店营业设置',
  306. 'class' => '',//本项必须填写
  307. 'attr' => '',
  308. ),
  309. 'open' => array
  310. (
  311. 'type' => 'int-11',
  312. 'name' => '营业状态',
  313. 'default' => '1',
  314. 'desc' => '营业状态',
  315. 'match' => 'is_numeric',
  316. 'update' => 'radio',
  317. 'option' => $open,
  318. 'search' => 'select',
  319. 'list' => true,
  320. ),
  321. 'method' => array
  322. (
  323. 'type' => 'int-11',
  324. 'name' => '门店能力',
  325. 'default' => '3',
  326. 'desc' => '门店能力',
  327. 'match' => 'is_numeric',
  328. 'update' => 'radio',
  329. 'option' => $method,
  330. 'control' => 'method',
  331. ),
  332. 'worktime' => array
  333. (
  334. 'type' => 'varchar-100',
  335. 'name' => '营业时间-如10:00~22:00,24小时制',
  336. 'default' => '',
  337. 'desc' => '营业时间',
  338. 'match' => 'is_string',
  339. 'update' => 'text',
  340. //'show' => 'method=1,3',
  341. ),
  342. 'gotime' => array
  343. (
  344. 'type' => 'varchar-100',
  345. 'name' => '外送时间-如10:00~22:00,24小时制',
  346. 'default' => '',
  347. 'desc' => '外送时间',
  348. 'match' => 'is_string',
  349. //'update' => 'text',
  350. //'show' => 'method=2,3',
  351. ),
  352. 'hr3' => array
  353. (
  354. 'name' => '门店认证信息',
  355. 'class' => '',//本项必须填写
  356. 'attr' => '',
  357. ),
  358. 'license' => array
  359. (
  360. 'type' => 'varchar-150',
  361. 'name' => '营业执照',
  362. 'default' => '',
  363. 'desc' => '营业执照',
  364. 'match' => 'option',
  365. 'update' => 'image',
  366. 'key' => '8',
  367. 'place' => '660*660',
  368. ),
  369. 'license_number' => array
  370. (
  371. 'type' => 'varchar-200',
  372. 'name' => '营业执照号码',
  373. 'default' => '',
  374. 'desc' => '营业执照号码',
  375. 'match' => 'option',
  376. 'update' => 'text',
  377. ),
  378. 'company_name' => array
  379. (
  380. 'type' => 'varchar-200',
  381. 'name' => '公司名称',
  382. 'default' => '',
  383. 'desc' => '公司名称',
  384. 'match' => 'option',
  385. 'update' => 'text',
  386. ),
  387. 'idcard_front' => array
  388. (
  389. 'type' => 'varchar-150',
  390. 'name' => '身份证正面',
  391. 'default' => '',
  392. 'desc' => '身份证正面',
  393. 'match' => 'option',
  394. 'update' => 'image',
  395. 'key' => '8',
  396. 'place' => '660*660',
  397. ),
  398. 'idcard_back' => array
  399. (
  400. 'type' => 'varchar-150',
  401. 'name' => '身份证背面',
  402. 'default' => '',
  403. 'desc' => '身份证背面',
  404. 'match' => 'option',
  405. 'update' => 'image',
  406. 'key' => '8',
  407. 'place' => '660*660',
  408. ),
  409. 'jy_license' => array
  410. (
  411. 'type' => 'varchar-150',
  412. 'name' => '经营许可证',
  413. 'default' => '',
  414. 'desc' => '经营许可证',
  415. 'match' => 'option',
  416. 'update' => 'image',
  417. 'key' => '8',
  418. 'place' => '660*660',
  419. ),
  420. 'food_license' => 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. ),
  431. 'hr4' => array
  432. (
  433. 'name' => '其他设置',
  434. 'class' => '',//本项必须填写
  435. 'attr' => '',
  436. ),
  437. 'type' => array
  438. (
  439. 'type' => 'int-11',
  440. 'name' => '门店类型-自营为平台店,当没有找到加盟店时,将自动获取平台店',
  441. 'default' => '1',
  442. 'desc' => '门店类型',
  443. 'match' => 'is_numeric',
  444. 'update' => 'radio',
  445. 'option' => $type,
  446. 'search' => 'select',
  447. 'list' => true,
  448. ),
  449. 'invoice' => array
  450. (
  451. 'type' => 'int-11',
  452. 'name' => '是否可以开发票',
  453. 'default' => '1',
  454. 'desc' => '是否可以开发票',
  455. 'match' => 'is_numeric',
  456. 'update' => 'radio',
  457. 'option' => $invoice,
  458. ),
  459. 'is_agent' => array
  460. (
  461. 'type' => 'int-11',
  462. 'name' => '是否可以归店',
  463. 'default' => '1',
  464. 'desc' => '是否可以归店',
  465. 'match' => 'is_numeric',
  466. 'update' => 'radio',
  467. 'value' => '2',
  468. 'option' => $is_agent,
  469. ),
  470. 'agent_mid' => array
  471. (
  472. 'type' => 'int-11',
  473. 'name' => '所属代理商',
  474. 'default' => '-1',
  475. 'desc' => '代理商',
  476. 'match' => 'is_string',
  477. //'update' => 'text',
  478. 'update' => 'select',
  479. 'update_search' => 'agent/lib/manage.search',
  480. ),
  481. 'coupon_city' => array
  482. (
  483. 'type' => 'int-11',
  484. 'name' => '优惠券是否同城可用-废弃',
  485. 'default' => '2',
  486. 'desc' => '优惠券是否同城可用',
  487. 'match' => 'is_numeric',
  488. //'update' => 'radio',
  489. //'update' => Dever::input('col') ? 'radio' : false,
  490. 'option' => $yes,
  491. ),
  492. 'act' => array
  493. (
  494. 'type' => 'text-255',
  495. 'name' => '参与活动',
  496. 'default' => '',
  497. 'desc' => '参与活动',
  498. 'match' => 'option',
  499. 'update' => 'checkbox',
  500. 'update' => Dever::input('col') ? 'checkbox' : false,
  501. 'data' => 'parent',
  502. 'option' => $act,
  503. ),
  504. 'mid' => array
  505. (
  506. 'type' => 'varchar-50',
  507. 'name' => '分账商户号',
  508. 'default' => '',
  509. 'desc' => '分账商户号',
  510. 'match' => 'option',
  511. 'update' => 'text',
  512. ),
  513. 'ps_cash' => array
  514. (
  515. 'type' => 'varchar-50',
  516. 'name' => '运费-单位为元',
  517. 'default' => '0',
  518. 'desc' => '运费',
  519. 'match' => 'option',
  520. 'update' => 'text',
  521. ),
  522. 'free_ps_cash' => array
  523. (
  524. 'type' => 'varchar-50',
  525. 'name' => '免运费额度-满多少免运费,这里直接填写一个订单满多少金额就免费配送的金额,单位为元',
  526. 'default' => '0',
  527. 'desc' => '免运费额度',
  528. 'match' => 'option',
  529. 'update' => 'text',
  530. ),
  531. 'pdesc' => array
  532. (
  533. 'type' => 'text-255',
  534. 'name' => '配送与自提说明',
  535. 'default' => '',
  536. 'desc' => '配送与自提说明',
  537. 'match' => 'is_string',
  538. 'update' => 'textarea',
  539. ),
  540. 'price' => array
  541. (
  542. 'type' => 'varchar-50',
  543. 'name' => '资金账户-单位为元',
  544. 'default' => '0',
  545. 'desc' => '资金账户',
  546. 'match' => 'option',
  547. // 'update' => 'text',
  548. ),
  549. 'stat_type' => array
  550. (
  551. 'type' => 'int-11',
  552. 'name' => '对账周期-可以选择周期生成对账单,选择按天生成对账单,则每天会生成前一天的对账单',
  553. 'default' => '1',
  554. 'desc' => '对账周期',
  555. 'match' => 'is_numeric',
  556. 'update' => 'radio',
  557. 'option' => $stat_type,
  558. 'control' => 'stat_type',
  559. ),
  560. 'stat_day' => array
  561. (
  562. 'type' => 'int-11',
  563. 'name' => '对账单生成日期-这里直接填写对账周期内的第几天即可,如按月对账,这里填写10,就是本月10号生成上一个月的对账单,如按周对账,这里填写2,就是本周二生成上一周的对账单',
  564. 'default' => '10',
  565. 'desc' => '对账单生成日期',
  566. 'match' => 'option',
  567. 'update' => 'text',
  568. 'show' => 'stat_type=1,2',
  569. ),
  570. 'status' => array
  571. (
  572. 'type' => 'int-11',
  573. 'name' => '合作状态',
  574. 'default' => '1',
  575. 'desc' => '合作状态',
  576. 'match' => 'is_numeric',
  577. //'update' => 'select',
  578. 'option' => $status,
  579. 'search' => 'select',
  580. 'list' => true,
  581. 'edit' => true,
  582. ),
  583. 'reorder' => array
  584. (
  585. 'type' => 'int-11',
  586. 'name' => '排序(数值越大越靠前)',
  587. 'default' => '1',
  588. 'desc' => '请输入排序',
  589. 'match' => 'option',
  590. 'update' => 'text',
  591. 'search' => 'order',
  592. //'list' => true,
  593. 'order' => 'desc',
  594. //'edit' => true,
  595. ),
  596. 'state' => array
  597. (
  598. 'type' => 'tinyint-1',
  599. 'name' => '状态',
  600. 'default' => '1',
  601. 'desc' => '请选择状态',
  602. 'match' => 'is_numeric',
  603. ),
  604. 'cdate' => array
  605. (
  606. 'type' => 'int-11',
  607. 'name' => '录入时间',
  608. 'match' => array('is_numeric', time()),
  609. 'desc' => '',
  610. # 只有insert时才生效
  611. 'insert' => true,
  612. //'list' => 'date("Y-m-d H:i:s", {cdate})',
  613. ),
  614. ),
  615. 'alter' => array
  616. (
  617. 2 => array
  618. (
  619. array('update', 'sid', 'sid', 'varchar-30 店铺编号'),
  620. ),
  621. 'version' => 2,
  622. ),
  623. 'manage' => array
  624. (
  625. //'mul' => true,
  626. //'insert' => false,
  627. 'list_button' => array
  628. (
  629. 'delete' => '删除',
  630. 'br11' => array('<br /><br />'),
  631. 'location1' => array('分配工厂', Dever::url('lib/set.factory', 'shop')),
  632. 'location2' => array('分配仓库', Dever::url('lib/set.store', 'shop')),
  633. /*
  634. 'add12' => array('分配工厂', '"info&where_id={id}&col=factory&oper_save_jump=info&oper_table=info&oper_parent=info"'),
  635. 'add13' => array('分配仓库', '"info&where_id={id}&col=store&oper_save_jump=info&oper_table=info&oper_parent=info"'),
  636. */
  637. 'fast' => array('设置活动', '"info&where_id={id}&col=act&oper_save_jump=info&oper_table=info&oper_parent=info"'),
  638. 'br1' => array('<br /><br />'),
  639. 'location' => array('商品设置', Dever::url('lib/set.home', 'shop')),
  640. //'add1' => array('批量设置商品', '"info&where_id={id}&col=goods&oper_save_jump=info&oper_table=info&oper_parent=info"'),
  641. 'list22' => array('商品列表', '"goods&search_option_shop_id={id}&oper_table=info"'),
  642. 'list23' => array('账户管理', '"record&search_option_shop_id={id}&oper_table=info"'),
  643. 'br2' => array('<br /><br />'),
  644. 'list' => array('优惠券管理', '"coupon&search_option_shop_id={id}&oper_table=info"'),
  645. 'list1' => array('账号管理', '"member&search_option_shop_id={id}&oper_table=info"'),
  646. 'list2' => array('打印机管理', '"print&search_option_shop_id={id}&oper_table=info"'),
  647. //'br3' => array('<br /><br />'),
  648. //'list3' => array('销售订单', '"sell_order&search_option_shop_id={id}&oper_table=info"'),
  649. //'list4' => array('采购订单', '"buy_order&search_option_shop_id={id}&oper_table=info"'),
  650. ),
  651. ),
  652. 'request' => array
  653. (
  654. 'getSearch' => array
  655. (
  656. # 匹配的正则或函数 选填项
  657. 'option' => array
  658. (
  659. 'col' => array('yes-sid,name', 'like'),
  660. ),
  661. 'type' => 'all',
  662. 'col' => '*|id',
  663. ),
  664. # 获取单条数据
  665. 'getOne' => array
  666. (
  667. # 匹配的正则或函数 选填项
  668. 'option' => array
  669. (
  670. 'city' => 'yes',
  671. 'coupon_city' => 'yes',
  672. 'id' => 'yes',
  673. 'status' => 1,
  674. 'state' => 1,
  675. ),
  676. 'type' => 'one',
  677. 'col' => $col,
  678. ),
  679. # 获取城市
  680. 'getCity' => array
  681. (
  682. # 匹配的正则或函数 选填项
  683. 'option' => array
  684. (
  685. 'city' => 'yes',
  686. 'id' => 'yes',
  687. 'status' => 1,
  688. 'state' => 1,
  689. ),
  690. 'type' => 'all',
  691. 'group' => 'city',
  692. 'col' => $col,
  693. ),
  694. # 获取城市
  695. 'getDataByType' => array
  696. (
  697. # 匹配的正则或函数 选填项
  698. 'option' => array
  699. (
  700. 'type' => 'yes',
  701. 'id' => 'yes',
  702. 'status' => 1,
  703. 'state' => 1,
  704. ),
  705. 'type' => 'one',
  706. 'order' => array('reorder' => 'desc', 'id' => 'desc'),
  707. 'col' => $col,
  708. ),
  709. 'like' => array
  710. (
  711. # 匹配的正则或函数 选填项
  712. 'option' => array
  713. (
  714. 'name' => array('yes', 'like'),
  715. 'sid' => array('yes', 'like'),
  716. 'type' => array('yes', 'like'),
  717. 'id' => 'yes',
  718. 'status' => 1,
  719. 'state' => 1,
  720. ),
  721. 'type' => 'all',
  722. 'order' => array('reorder' => 'desc', 'id' => 'desc'),
  723. 'col' => $col . '|id',
  724. ),
  725. 'getAll' => array
  726. (
  727. # 匹配的正则或函数 选填项
  728. 'option' => array
  729. (
  730. 'type' => array('yes', '!='),
  731. 'town' => 'yes',
  732. 'area' => array('yes', 'like'),
  733. 'state' => 1,
  734. ),
  735. 'type' => 'all',
  736. 'order' => array('reorder' => 'desc', 'id' => 'desc'),
  737. 'col' => 'id,id as value, name',
  738. ),
  739. 'getAllByType' => array
  740. (
  741. # 匹配的正则或函数 选填项
  742. 'option' => array
  743. (
  744. 'town' => 'yes',
  745. 'is_agent' => 'yes',
  746. 'area' => array('yes', 'like'),
  747. 'state' => 1,
  748. ),
  749. 'type' => 'all',
  750. 'order' => array('type' => 'desc', 'reorder' => 'desc', 'id' => 'desc'),
  751. 'col' => 'id,id as value, concat(sid, name) as name',
  752. ),
  753. 'getInfo' => array
  754. (
  755. # 匹配的正则或函数 选填项
  756. 'option' => array
  757. (
  758. 'type' => 'yes',
  759. 'state' => 1,
  760. ),
  761. 'type' => 'one',
  762. 'order' => array('reorder' => 'desc', 'id' => 'desc'),
  763. 'col' => 'id,id as value, name',
  764. ),
  765. 'getAreaAll' => array
  766. (
  767. # 匹配的正则或函数 选填项
  768. 'option' => array
  769. (
  770. 'city' => 'yes',
  771. 'county' => 'yes',
  772. 'town' => 'yes',
  773. 'type' => 'yes',
  774. 'state' => 1,
  775. ),
  776. 'type' => 'all',
  777. 'order' => array('reorder' => 'desc', 'id' => 'desc'),
  778. 'col' => 'id,province,city,county,town',
  779. ),
  780. 'getSerachNum' => array
  781. (
  782. # 匹配的正则或函数 选填项
  783. 'option' => array
  784. (
  785. 'city' => 'yes',
  786. 'county' => 'yes',
  787. 'town' => 'yes',
  788. 'state' => 1,
  789. ),
  790. 'type' => 'count',
  791. 'col' => '*',
  792. ),
  793. 'getSerachTNum' => array
  794. (
  795. # 匹配的正则或函数 选填项
  796. 'option' => array
  797. (
  798. 'city' => 'yes',
  799. 'county' => 'yes',
  800. 'town' => 'yes',
  801. 'type' => 1,
  802. 'state' => 1,
  803. ),
  804. 'type' => 'count',
  805. 'col' => '*',
  806. ),
  807. 'upCash' => array
  808. (
  809. 'type' => 'update',
  810. 'where' => array
  811. (
  812. 'id' => 'yes',
  813. ),
  814. 'set' => array
  815. (
  816. 'price' => array('yes', '+='),
  817. ),
  818. ),
  819. ),
  820. );