PlatformController.php 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443
  1. <?php
  2. /**
  3. * 重庆赤晓店信息科技有限公司
  4. * https://www.chixiaodian.com
  5. * Copyright (c) 2023 赤店商城 All rights reserved.
  6. */
  7. namespace app\modules\admin\controllers\cloud;
  8. use app\modules\admin\models\SupplierForm;
  9. use app\modules\admin\models\PlatformForm;
  10. use app\modules\admin\controllers\BaseController;
  11. class PlatformController extends BaseController
  12. {
  13. //创建会员
  14. public function actionStoreUserAdd(){
  15. $post = post_params();
  16. $form = new PlatformForm();
  17. $form->attributes = $post;
  18. $this->asJson($form->storeUserAdd());
  19. }
  20. //充值列表
  21. public function actionStoreGetRechargeList(){
  22. $post = post_params();
  23. $form = new PlatformForm();
  24. $form->attributes = $post;
  25. $this->asJson($form->storeGetRechargeList());
  26. }
  27. //编辑商户
  28. public function actionStoreMchEdit() {
  29. $post = post_params();
  30. $form = new PlatformForm();
  31. $form->attributes = $post;
  32. $this->asJson($form->storeMchEdit());
  33. }
  34. //删除商户
  35. public function actionStoreMchDel() {
  36. $post = post_params();
  37. $form = new PlatformForm();
  38. $form->attributes = $post;
  39. $this->asJson($form->storeMchDel());
  40. }
  41. //商户列表
  42. public function actionStoreMchList() {
  43. $post = post_params();
  44. $form = new PlatformForm();
  45. $form->attributes = $post;
  46. $this->asJson($form->storeMchList());
  47. // $this->asJson($form->newStoreMchList());
  48. }
  49. //云仓用户是否具备 一键铺货选品的权限
  50. public function actionSetCanDistribution() {
  51. $id = input_params('id', 0);
  52. $can_distribution = input_params('can_distribution', 0);
  53. $storeCloud = \app\models\StoreCloud::findOne($id);
  54. $storeCloud->can_distribution = $can_distribution;
  55. $save = $storeCloud->save();
  56. $this->asJson([
  57. 'code' => $save ? 0 : 1,
  58. 'msg' => $save ? '成功' : '失败',
  59. ]);
  60. }
  61. //商户禁用
  62. public function actionStoreMchEnable() {
  63. $post = post_params();
  64. $form = new PlatformForm();
  65. $form->attributes = $post;
  66. //$this->asJson($form->storeMchList());
  67. $this->asJson($form->storeMchEnable());
  68. }
  69. //关联供应商
  70. public function actionSetCloudPlatform() {
  71. $post = post_params();
  72. $form = new PlatformForm();
  73. $form->attributes = $post;
  74. $this->asJson($form->setCloudPlatform());
  75. }
  76. //商户充值
  77. public function actionStoreSubmitRecharge() {
  78. $post = post_params();
  79. $form = new PlatformForm();
  80. $form->attributes = $post;
  81. $this->asJson($form->storeSubmitRecharge());
  82. }
  83. //创建商户
  84. public function actionStoreMchAdd() {
  85. $post = post_params();
  86. $form = new PlatformForm();
  87. $form->attributes = $post;
  88. $this->asJson($form->storeMchAdd());
  89. }
  90. //余额记录
  91. public function actionStoreGetBalanceLog() {
  92. $post = post_params();
  93. $form = new PlatformForm();
  94. $form->attributes = $post;
  95. $this->asJson($form->storeGetBalanceLog());
  96. }
  97. //供货商提现列表
  98. public function actionStoregetCashList() {
  99. $post = post_params();
  100. $form = new PlatformForm();
  101. $form->attributes = $post;
  102. $this->asJson($form->storeGetCashList());
  103. }
  104. //供货商提现记录
  105. public function actionBalanceCashList() {
  106. $post = post_params();
  107. $form = new PlatformForm();
  108. $form->attributes = $post;
  109. $this->asJson($form->balanceCashList());
  110. }
  111. //供货商提现处理
  112. public function actionStoreActionSupplierCash() {
  113. $post = post_params();
  114. $form = new PlatformForm();
  115. $form->attributes = $post;
  116. $this->asJson($form->storeActionSupplierCash());
  117. }
  118. //获取供货商商品列表
  119. public function actionGoodsList() {
  120. $post = post_params();
  121. $form = new PlatformForm();
  122. $form->attributes = $post;
  123. $this->asJson($form->goodsList());
  124. }
  125. //获取供货商审核商品列表
  126. public function actionGoodsAuditList() {
  127. $post = post_params();
  128. $form = new PlatformForm();
  129. $form->attributes = $post;
  130. $this->asJson($form->goodsAuditList());
  131. }
  132. //操作余额信息
  133. public function actionBalance() {
  134. $post = post_params();
  135. $form = new PlatformForm();
  136. $form->attributes = $post;
  137. $this->asJson($form->setBalance());
  138. }
  139. //创建供货商
  140. public function actionRegist() {
  141. $post = post_params();
  142. $form = new PlatformForm();
  143. $form->attributes = $post;
  144. $this->asJson($form->createSupplier());
  145. }
  146. //查询供货商列表
  147. public function actionList() {
  148. $post = post_params();
  149. $form = new PlatformForm();
  150. $form->attributes = $post;
  151. $this->asJson($form->listSupplier());
  152. }
  153. //删除供货商
  154. public function actionDel() {
  155. $post = post_params();
  156. $form = new PlatformForm();
  157. $form->attributes = $post;
  158. $this->asJson($form->delSupplier());
  159. }
  160. //修改供货商状态
  161. public function actionSetSupplierStatus() {
  162. $post = post_params();
  163. $form = new PlatformForm();
  164. $form->attributes = $post;
  165. $this->asJson($form->setSupplierStatus());
  166. }
  167. //编辑供货商
  168. public function actionEdit() {
  169. $post = post_params();
  170. $form = new PlatformForm();
  171. $form->attributes = $post;
  172. $form->status = 1;
  173. $this->asJson($form->editSupplier());
  174. }
  175. //商品审核
  176. public function actionGoodsAuditHandle() {
  177. $post = post_params();
  178. $form = new PlatformForm();
  179. $form->attributes = $post;
  180. $this->asJson($form->auditHandle());
  181. }
  182. //添加商品分类
  183. public function actionSaveGoodsCat()
  184. {
  185. $post = post_params();
  186. $form = new PlatformForm();
  187. $form->attributes = $post;
  188. $this->asJson($form->saveGoodsCat());
  189. }
  190. //获取商品分类
  191. public function actionGetGoodsCat()
  192. {
  193. $post = get_params();
  194. $form = new PlatformForm();
  195. $form->attributes = $post;
  196. $this->asJson($form->getGoodsCatList());
  197. }
  198. //获取商品分类
  199. public function actionCatChange()
  200. {
  201. $post = get_params();
  202. $form = new PlatformForm();
  203. $form->attributes = $post;
  204. $this->asJson($form->catChange());
  205. }
  206. //获取商品分类
  207. public function actionGetGoodsCatList()
  208. {
  209. $post = get_params();
  210. $form = new PlatformForm();
  211. $form->attributes = $post;
  212. $this->asJson($form->getGoodsCatName());
  213. }
  214. //删除商品分类
  215. public function actionDelGoodsCat()
  216. {
  217. $post = get_params();
  218. $form = new PlatformForm();
  219. $form->attributes = $post;
  220. $this->asJson($form->goodsCatDel());
  221. }
  222. //更改配货单状态
  223. public function actionSetDistributionStatus() {
  224. $post = post_params();
  225. $form = new PlatformForm();
  226. $form->attributes = $post;
  227. $this->asJson($form->setDistributionStatus());
  228. }
  229. //打印配货单
  230. public function actionExportDistributionInfo()
  231. {
  232. $post = get_params();
  233. $form = new SupplierForm();
  234. $form->attributes = $post;
  235. $this->asJson($form->exportDistributionInfo());
  236. }
  237. //打印配货单
  238. public function actionGetExportDistributionInfo()
  239. {
  240. $post = get_params();
  241. $form = new SupplierForm();
  242. $form->attributes = $post;
  243. $this->asJson($form->getAgentOrderDistributionList());
  244. }
  245. //获取会员等级
  246. public function actionUserLevelSearch() {
  247. $form = new PlatformForm();
  248. $form->attributes = get_params();
  249. $this->asJson($form->userLevelSearch());
  250. }
  251. //设置会员等级
  252. public function actionSetUserLevel() {
  253. $form = new PlatformForm();
  254. $form->attributes = post_params();
  255. $this->asJson($form->setUserLevel());
  256. }
  257. //设置会员等级状态
  258. public function actionSetUserLevelStatus() {
  259. $form = new PlatformForm();
  260. $form->attributes = get_params();
  261. $this->asJson($form->setUserLevelStatus());
  262. }
  263. //设置产品代理佣金比例
  264. public function actionSetAgentGoodsPercent() {
  265. $form = new PlatformForm();
  266. $form->attributes = post_params();
  267. $this->asJson($form->setAgentGoodsPercent());
  268. }
  269. //获取会员等级
  270. public function actionGetUserLevel() {
  271. $form = new PlatformForm();
  272. $form->attributes = get_params();
  273. $this->asJson($form->getUserLevel());
  274. }
  275. //设置用户等级
  276. public function actionSetMchLevel() {
  277. $form = new PlatformForm();
  278. $form->attributes = post_params();
  279. $this->asJson($form->setMchLevel());
  280. }
  281. //获取分拣订单列表
  282. public function actionGetSortingOrder() {
  283. $form = new PlatformForm();
  284. $form->attributes = get_params();
  285. $this->asJson($form->getSortingOrder());
  286. }
  287. //更改分拣单状态
  288. // public function actionSetSortingStatus() {
  289. // $form = new PlatformForm();
  290. // $form->attributes = post_params();
  291. // $this->asJson($form->setSortingStatus());
  292. // }
  293. //修改域名
  294. public function actionSetCloudUrl() {
  295. $form = new PlatformForm();
  296. $form->attributes = post_params();
  297. $this->asJson($form->setCloudUrl());
  298. }
  299. //云仓库存详情
  300. public function actionGetCloudPreviewNumInfo(){
  301. $post = get_params();
  302. $form = new PlatformForm();
  303. $form->attributes = $post;
  304. $form->store_id = get_store_id();
  305. $this->asJson($form->getCloudPreviewNumInfo());
  306. }
  307. //云仓库存记录
  308. public function actionGetCloudPreviewNumLog(){
  309. $post = get_params();
  310. $form = new PlatformForm();
  311. $form->attributes = $post;
  312. $this->asJson($form->getCloudPreviewNumLog());
  313. }
  314. //新增云仓库存商品
  315. public function actionAddCloudPreviewGoods(){
  316. $post = post_params();
  317. $form = new PlatformForm();
  318. $form->attributes = $post;
  319. $this->asJson($form->addCloudPreviewGoods());
  320. }
  321. //修改云仓库存数量
  322. public function actionSetPreviewGoodsNum(){
  323. $post = post_params();
  324. $form = new PlatformForm();
  325. $form->attributes = $post;
  326. $this->asJson($form->setPreviewGoodsNum());
  327. }
  328. //修改云仓库存商品
  329. public function actionGetCloudPreviewGoodsList(){
  330. $post = post_params();
  331. $form = new PlatformForm();
  332. $form->attributes = $post;
  333. $this->asJson($form->getCloudPreviewGoodsList());
  334. }
  335. //增加供货渠道
  336. public function actionAddUserGoodsChannel(){
  337. $post = post_params();
  338. $form = new PlatformForm();
  339. $form->attributes = $post;
  340. $this->asJson($form->addUserGoodsChannel());
  341. }
  342. //供货渠道列表
  343. public function actionUserGoodsChannel(){
  344. $get = get_params();
  345. $form = new PlatformForm();
  346. $form->attributes = $get;
  347. $this->asJson($form->userGoodsChannel());
  348. }
  349. //供货渠道删除
  350. public function actionUserGoodsChannelStatus(){
  351. $post = post_params();
  352. $form = new PlatformForm();
  353. $form->attributes = $post;
  354. $this->asJson($form->userGoodsChannelStatus());
  355. }
  356. //设置用户供货渠道
  357. public function actionSetUserGoodsChannel() {
  358. $post = post_params();
  359. $form = new PlatformForm();
  360. $form->attributes = $post;
  361. $this->asJson($form->setUserGoodsChannel());
  362. }
  363. //云仓用户修改店铺
  364. public function actionSetCloudUserStore() {
  365. $post = post_params();
  366. $form = new PlatformForm();
  367. $form->attributes = $post;
  368. $this->asJson($form->setCloudUserStore());
  369. }
  370. //修改商品平台协议价
  371. public function actionSetGoodsPlatformNegotiatedPrice() {
  372. $post = post_params();
  373. $form = new PlatformForm();
  374. $form->attributes = $post;
  375. $this->asJson($form->setGoodsPlatformNegotiatedPrice());
  376. }
  377. //获取云仓报表
  378. public function actionCloudProfitList() {
  379. $get = get_params();
  380. $form = new PlatformForm();
  381. $form->attributes = $get;
  382. return $this->asJson($form->getCloudProfitList());
  383. }
  384. }