CardServer.php 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235
  1. <?php
  2. namespace app\admin\server\index;
  3. use app\admin\model\CardOrder;
  4. use app\admin\model\User;
  5. /**
  6. * 会员服务层
  7. * Class UsersServer
  8. * @package app\api\server\user
  9. */
  10. class CardServer
  11. {
  12. /**
  13. * Notes:获取会员账户
  14. * @return \support\Response
  15. * User: ycp
  16. * Date: 2023/4/24
  17. */
  18. public static function getCardList($member_id,$mobile)
  19. {
  20. $url = "http://core.wanyuewellness.cn/api.php";
  21. $params['func'] = "functions.funcMemberAccountList";
  22. if($member_id != ""){
  23. $params['join_account_member_id'] = $member_id;
  24. }
  25. if($mobile != ''){
  26. $params['member_sys_mobile'] = $mobile;
  27. }
  28. $result = curlPost($url,$params);
  29. return $result;
  30. }
  31. /**
  32. * Notes:会员绑定卡
  33. * @return \support\Response
  34. * User: ycp
  35. * Date: 2023/4/24
  36. */
  37. public static function memberBindCard($cardno,$verifycode,$cardpswd,$cardmonies,$cardadded,$member_id)
  38. {
  39. $url = "http://core.wanyuewellness.cn/api.php";
  40. $params['func'] = "functions.funcMemberBindCard";
  41. $params['cardno'] = $cardno;
  42. $params['verifycode'] = $verifycode;
  43. $params['cardpswd'] = $cardpswd;
  44. $params['cardmonies'] = $cardmonies;
  45. $params['cardadded'] = $cardadded;
  46. $params['member_id'] = $member_id;
  47. $result = curlPost($url,$params);
  48. return $result;
  49. }
  50. /**
  51. * Notes:会员账户出入账
  52. * @return \support\Response
  53. * User: ycp
  54. * Date: 2023/5/5
  55. */
  56. public static function memberAccountPay($member_id,$cardno,$orderno,$io,$expenses,$added,$detail)
  57. {
  58. $url = "http://core.wanyuewellness.cn/api.php";
  59. $params['func'] = "functions.funcMemberAccountPay";
  60. $params['member_id'] = $member_id;
  61. $params['cardno'] = $cardno;
  62. $params['orderno'] = $orderno;
  63. $params['io'] = $io;
  64. $params['expenses'] = $expenses;
  65. $params['added'] = $added;
  66. $params['detail'] = $detail;
  67. $result = curlPost($url,$params);
  68. return $result;
  69. }
  70. /**
  71. * Notes:卡品种列表
  72. * @return \support\Response
  73. * User: ycp
  74. * Date: 2023/4/24
  75. */
  76. public static function cardMainCategoryList()
  77. {
  78. $url = "http://core.wanyuewellness.cn/api.php";
  79. $params['func'] = "functions.funcCardMainCategoryList";
  80. $result = curlPost($url,$params);
  81. return $result;
  82. }
  83. /**
  84. * Notes:添加卡品种
  85. * @return \support\Response
  86. * User: ycp
  87. * Date: 2023/4/24
  88. */
  89. public static function cardMainCategoryAdd($card_main_category_name)
  90. {
  91. $url = "http://core.wanyuewellness.cn/api.php";
  92. $params['func'] = "functions.funcCardMainCategoryAdd";
  93. $params['card_main_category_name'] = $card_main_category_name;
  94. $result = curlPost($url,$params);
  95. return $result;
  96. }
  97. /**
  98. * Notes:删除卡品种
  99. * @return \support\Response
  100. * User: ycp
  101. * Date: 2023/4/24
  102. */
  103. public static function cardMainCategoryDel($card_main_category_name)
  104. {
  105. $url = "http://core.wanyuewellness.cn/api.php";
  106. $params['func'] = "functions.funcCardMainCategoryDel";
  107. $params['card_main_category_name'] = $card_main_category_name;
  108. $result = curlPost($url,$params);
  109. return $result;
  110. }
  111. /**
  112. * Notes:编辑卡品种
  113. * @return \support\Response
  114. * User: ycp
  115. * Date: 2023/4/24
  116. */
  117. public static function cardMainCategoryUpd($card_main_category_name,$card_main_category_configs,$card_main_category_addtimes)
  118. {
  119. $url = "http://core.wanyuewellness.cn/api.php";
  120. $params['func'] = "functions.funcCardMainCategoryUpd";
  121. $params['card_main_category_name'] = $card_main_category_name;
  122. $data['card_main_category_configs'] = $card_main_category_configs;
  123. $data['card_main_category_addtimes'] = $card_main_category_addtimes;
  124. $params['data'] = $data;
  125. $result = curlPost($url,json_encode($params));
  126. //$result = $params;
  127. return $result;
  128. }
  129. /**
  130. * Notes:储值卡-卡分类-读取[R]
  131. * @return \support\Response
  132. * User: ycp
  133. * Date: 2023/4/24
  134. */
  135. public static function cardMainList($card_main_category)
  136. {
  137. $url = "http://core.wanyuewellness.cn/api.php";
  138. $params['func'] = "functions.funcCardMainList";
  139. $params['card_main_category'] = $card_main_category;
  140. $result = curlPost($url,$params);
  141. return $result;
  142. }
  143. /**
  144. * Notes:储值卡-卡分类-创建[C]
  145. * @return \support\Response
  146. * User: ycp
  147. * Date: 2023/8/15
  148. */
  149. public static function cardMainAdd($card_main_status,$card_main_name,$card_main_category,$card_main_validday,$card_main_configs)
  150. {
  151. $url = "http://core.wanyuewellness.cn/api.php";
  152. $params['func'] = "functions.funcCardMainAdd";
  153. $params['card_main_status'] = $card_main_status;
  154. $params['card_main_name'] = $card_main_name;
  155. $params['card_main_category']= $card_main_category;
  156. $params['card_main_validday']= $card_main_validday;
  157. $params['card_main_configs']= $card_main_configs;
  158. $result = curlPost($url,$params);
  159. return $result;
  160. }
  161. /**
  162. * Notes:编辑卡品种
  163. * @return \support\Response
  164. * User: ycp
  165. * Date: 2023/4/24
  166. */
  167. public static function cardMainUpd($card_main_id,$card_main_status,$card_main_name,$card_main_category,$card_main_validday,$card_main_configs)
  168. {
  169. $url = "http://core.wanyuewellness.cn/api.php";
  170. $params['func'] = "functions.funcCardMainUpd";
  171. $params['card_main_id'] = $card_main_id;
  172. $data['card_main_status'] = $card_main_status;
  173. $data['card_main_name'] = $card_main_name;
  174. $data['card_main_category'] = $card_main_category;
  175. $data['card_main_validday'] = $card_main_validday;
  176. $data['card_main_configs'] = $card_main_configs;
  177. $data['card_main_addtimes'] = '';
  178. $params['data'] = $data;
  179. $result = curlPost($url,json_encode($params));
  180. return $result;
  181. }
  182. /**
  183. * Notes:删除卡分类
  184. * @return \support\Response
  185. * User: ycp
  186. * Date: 2023/8/16
  187. */
  188. public static function cardMainDel($card_main_id)
  189. {
  190. $url = "http://core.wanyuewellness.cn/api.php";
  191. $params['func'] = "functions.funcCardMainDel";
  192. $params['card_main_id'] = $card_main_id;
  193. $result = curlPost($url,$params);
  194. return $result;
  195. }
  196. }