|
@@ -293,13 +293,13 @@ class Lave extends Api
|
|
|
|
|
|
$rs = WechatService::papPayApply($arr['out_trade_no'], $arr['total_fee'], "lave", '月捐款', 'PAP', [], $cid,$arr['mch_id'],$arr['contract_id']);
|
|
|
$where1['cid']=$cid;
|
|
|
- $where1['user_id']=$this->auth->getUserinfo()['id'];
|
|
|
- $where1['order_name']='月捐款';
|
|
|
- $where1['category_id']=81;
|
|
|
+ $where1['user_id']=$v['uid'];
|
|
|
+ $where1['order_name']=$v['order_name'];
|
|
|
+ $where1['category_id']=$v['category_id'];
|
|
|
$where1['amount']=$arr['total_fee'];
|
|
|
- $where1['name']=$this->auth->getUserinfo()['username'];
|
|
|
+ $where1['name']=$v['contract_display_account'];
|
|
|
$where1['contact']='';
|
|
|
- $where1['tel']=$this->auth->getUserinfo()['mobile'];
|
|
|
+ $where1['tel']=$v['tel'];
|
|
|
$where1['address']='用户未填写联系地址';
|
|
|
$where1['is_open']=$v['is_open'];
|
|
|
$where1['is_ticket']='0';
|
|
@@ -313,11 +313,17 @@ class Lave extends Api
|
|
|
public function deleteSign(Request $request){
|
|
|
$where = UtilService::postMore(
|
|
|
[
|
|
|
+ ['id',0],
|
|
|
['cid', $this->cid],
|
|
|
['user_id', $this->auth->getUserinfo()['id']],
|
|
|
], $request
|
|
|
);
|
|
|
- $sign_info=WechatPlanRecord::where('cid', $where['cid'])->where('uid', $where['user_id'])->where('is_signing',1)->find();
|
|
|
+ if ($where['id']==0){
|
|
|
+ $sign_info=WechatPlanRecord::where('cid', $where['cid'])->where('uid', $where['user_id'])->where('is_signing',0)->find();
|
|
|
+ }else{
|
|
|
+ $sign_info=WechatPlanRecord::where('id', $where['id'])->where('is_signing',0)->find();
|
|
|
+ }
|
|
|
+
|
|
|
if (!$sign_info){
|
|
|
$this->error('未找到签约信息!');
|
|
|
}
|
|
@@ -327,12 +333,13 @@ class Lave extends Api
|
|
|
|
|
|
$rs=WechatService::deleteSign($mch_id,$contract_code,$plan_id,'1.0',[],$where['cid']);
|
|
|
@file_put_contents("quanju.txt", json_encode($rs)."-解除签约返回结果\r\n", 8);
|
|
|
- if ($rs){
|
|
|
- WechatPlanRecord::where('cid', $where['cid'])->where('uid', $where['user_id'])->where('is_signing',0)->update(['is_signing'=>1]);
|
|
|
- $this->success('解除签约成功!');
|
|
|
- }else{
|
|
|
- $this->error('解除签约失败!');
|
|
|
- }
|
|
|
+ $this->success('解除签约成功!');
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
|
|
|
|
|
@@ -364,38 +371,6 @@ class Lave extends Api
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
- public function csquerySign(Request $request)
|
|
|
- {
|
|
|
- $where = UtilService::postMore(
|
|
|
- [
|
|
|
- ['cid', ''],
|
|
|
- ['user_id', ''],
|
|
|
- ['contract_code',''],
|
|
|
- ['plan_id', ''],
|
|
|
- ], $request
|
|
|
- );
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- $mch_id = Company::where('id', $where['cid'])->value('pay_weixin_mchid');
|
|
|
-
|
|
|
-
|
|
|
- $rs = WechatService::querySign($mch_id, $where['contract_code'], $where['plan_id']);
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- }
|
|
|
public function plan_lst(Request $request)
|
|
|
{
|
|
|
$where = UtilService::getMore(
|
|
@@ -443,8 +418,8 @@ class Lave extends Api
|
|
|
[
|
|
|
['id', 0],
|
|
|
|
|
|
- ['cid', 0],
|
|
|
- ['user_id', 0],
|
|
|
+ ['cid', $this->cid],
|
|
|
+ ['user_id', $this->auth->getUserinfo()['id']],
|
|
|
|
|
|
], $request
|
|
|
);
|