123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235 |
- <?php
- namespace app\admin\server\index;
- use app\admin\model\CardOrder;
- use app\admin\model\User;
- /**
- * 会员服务层
- * Class UsersServer
- * @package app\api\server\user
- */
- class CardServer
- {
- /**
- * Notes:获取会员账户
- * @return \support\Response
- * User: ycp
- * Date: 2023/4/24
- */
- public static function getCardList($member_id,$mobile)
- {
- $url = "http://core.wanyuewellness.cn/api.php";
- $params['func'] = "functions.funcMemberAccountList";
- if($member_id != ""){
- $params['join_account_member_id'] = $member_id;
- }
- if($mobile != ''){
- $params['member_sys_mobile'] = $mobile;
- }
-
- $result = curlPost($url,$params);
- return $result;
- }
- /**
- * Notes:会员绑定卡
- * @return \support\Response
- * User: ycp
- * Date: 2023/4/24
- */
- public static function memberBindCard($cardno,$verifycode,$cardpswd,$cardmonies,$cardadded,$member_id)
- {
- $url = "http://core.wanyuewellness.cn/api.php";
- $params['func'] = "functions.funcMemberBindCard";
- $params['cardno'] = $cardno;
- $params['verifycode'] = $verifycode;
- $params['cardpswd'] = $cardpswd;
- $params['cardmonies'] = $cardmonies;
- $params['cardadded'] = $cardadded;
- $params['member_id'] = $member_id;
- $result = curlPost($url,$params);
- return $result;
- }
- /**
- * Notes:会员账户出入账
- * @return \support\Response
- * User: ycp
- * Date: 2023/5/5
- */
- public static function memberAccountPay($member_id,$cardno,$orderno,$io,$expenses,$added,$detail)
- {
- $url = "http://core.wanyuewellness.cn/api.php";
- $params['func'] = "functions.funcMemberAccountPay";
- $params['member_id'] = $member_id;
- $params['cardno'] = $cardno;
- $params['orderno'] = $orderno;
- $params['io'] = $io;
- $params['expenses'] = $expenses;
- $params['added'] = $added;
- $params['detail'] = $detail;
- $result = curlPost($url,$params);
- return $result;
- }
- /**
- * Notes:卡品种列表
- * @return \support\Response
- * User: ycp
- * Date: 2023/4/24
- */
- public static function cardMainCategoryList()
- {
- $url = "http://core.wanyuewellness.cn/api.php";
- $params['func'] = "functions.funcCardMainCategoryList";
- $result = curlPost($url,$params);
- return $result;
- }
- /**
- * Notes:添加卡品种
- * @return \support\Response
- * User: ycp
- * Date: 2023/4/24
- */
- public static function cardMainCategoryAdd($card_main_category_name)
- {
- $url = "http://core.wanyuewellness.cn/api.php";
- $params['func'] = "functions.funcCardMainCategoryAdd";
- $params['card_main_category_name'] = $card_main_category_name;
- $result = curlPost($url,$params);
- return $result;
- }
- /**
- * Notes:删除卡品种
- * @return \support\Response
- * User: ycp
- * Date: 2023/4/24
- */
- public static function cardMainCategoryDel($card_main_category_name)
- {
- $url = "http://core.wanyuewellness.cn/api.php";
- $params['func'] = "functions.funcCardMainCategoryDel";
- $params['card_main_category_name'] = $card_main_category_name;
- $result = curlPost($url,$params);
- return $result;
- }
- /**
- * Notes:编辑卡品种
- * @return \support\Response
- * User: ycp
- * Date: 2023/4/24
- */
- public static function cardMainCategoryUpd($card_main_category_name,$card_main_category_configs,$card_main_category_addtimes)
- {
- $url = "http://core.wanyuewellness.cn/api.php";
- $params['func'] = "functions.funcCardMainCategoryUpd";
- $params['card_main_category_name'] = $card_main_category_name;
- $data['card_main_category_configs'] = $card_main_category_configs;
- $data['card_main_category_addtimes'] = $card_main_category_addtimes;
- $params['data'] = $data;
- $result = curlPost($url,json_encode($params));
- //$result = $params;
- return $result;
- }
- /**
- * Notes:储值卡-卡分类-读取[R]
- * @return \support\Response
- * User: ycp
- * Date: 2023/4/24
- */
- public static function cardMainList($card_main_category)
- {
- $url = "http://core.wanyuewellness.cn/api.php";
- $params['func'] = "functions.funcCardMainList";
- $params['card_main_category'] = $card_main_category;
- $result = curlPost($url,$params);
- return $result;
- }
- /**
- * Notes:储值卡-卡分类-创建[C]
- * @return \support\Response
- * User: ycp
- * Date: 2023/8/15
- */
- public static function cardMainAdd($card_main_status,$card_main_name,$card_main_category,$card_main_validday,$card_main_configs)
- {
- $url = "http://core.wanyuewellness.cn/api.php";
- $params['func'] = "functions.funcCardMainAdd";
- $params['card_main_status'] = $card_main_status;
- $params['card_main_name'] = $card_main_name;
- $params['card_main_category']= $card_main_category;
- $params['card_main_validday']= $card_main_validday;
- $params['card_main_configs']= $card_main_configs;
- $result = curlPost($url,$params);
- return $result;
- }
- /**
- * Notes:编辑卡品种
- * @return \support\Response
- * User: ycp
- * Date: 2023/4/24
- */
- public static function cardMainUpd($card_main_id,$card_main_status,$card_main_name,$card_main_category,$card_main_validday,$card_main_configs)
- {
- $url = "http://core.wanyuewellness.cn/api.php";
- $params['func'] = "functions.funcCardMainUpd";
- $params['card_main_id'] = $card_main_id;
- $data['card_main_status'] = $card_main_status;
- $data['card_main_name'] = $card_main_name;
- $data['card_main_category'] = $card_main_category;
- $data['card_main_validday'] = $card_main_validday;
- $data['card_main_configs'] = $card_main_configs;
- $data['card_main_addtimes'] = '';
- $params['data'] = $data;
- $result = curlPost($url,json_encode($params));
- return $result;
- }
- /**
- * Notes:删除卡分类
- * @return \support\Response
- * User: ycp
- * Date: 2023/8/16
- */
- public static function cardMainDel($card_main_id)
- {
- $url = "http://core.wanyuewellness.cn/api.php";
- $params['func'] = "functions.funcCardMainDel";
- $params['card_main_id'] = $card_main_id;
- $result = curlPost($url,$params);
- return $result;
- }
- }
|