提交 7ceac309 authored 作者: 窦斌's avatar 窦斌

edit

上级 080db232
...@@ -38,7 +38,7 @@ class Kernel extends ConsoleKernel ...@@ -38,7 +38,7 @@ class Kernel extends ConsoleKernel
// $schedule->command('inspire') // $schedule->command('inspire')
// ->hourly(); // ->hourly();
$schedule->command('getOrder')->everyFiveMinutes();//每五分钟执行一次 $schedule->command('getOrder')->everyFiveMinutes();//每五分钟执行一次
$schedule->command('decJdOrder')->everyFiveMinutes();//每五分钟执行一次 // $schedule->command('decJdOrder')->everyFiveMinutes();//每五分钟执行一次
$schedule->command('SynJdPopCancel')->everyFiveMinutes();//每五分钟一次抓取十二小时内撤销的pop订单 $schedule->command('SynJdPopCancel')->everyFiveMinutes();//每五分钟一次抓取十二小时内撤销的pop订单
// $schedule->command('getJdSelfOrder')->everyFiveMinutes();//每五分钟执行一次 // $schedule->command('getJdSelfOrder')->everyFiveMinutes();//每五分钟执行一次
$schedule->command('getJdSelfRefund')->everyFiveMinutes();//每五分钟执行一次 $schedule->command('getJdSelfRefund')->everyFiveMinutes();//每五分钟执行一次
......
...@@ -823,7 +823,7 @@ class SynJdPopDataController extends BaseController ...@@ -823,7 +823,7 @@ class SynJdPopDataController extends BaseController
*/ */
public function decOrder(){ public function decOrder(){
$token = DB::table('jdpop_token')->where('status',1)->select('app_key','app_secret','access_token','pt_id')->get()->toarray(); /*$token = DB::table('jdpop_token')->where('status',1)->select('app_key','app_secret','access_token','pt_id')->get()->toarray();
foreach ($token as $k =>$v) { foreach ($token as $k =>$v) {
// CommonService::addLog('token', json_encode($v['app_key']), $v['pt_id'],'jd_token'); // CommonService::addLog('token', json_encode($v['app_key']), $v['pt_id'],'jd_token');
$res_ult = []; $res_ult = [];
...@@ -861,7 +861,7 @@ class SynJdPopDataController extends BaseController ...@@ -861,7 +861,7 @@ class SynJdPopDataController extends BaseController
} }
} }
} }*/
} }
......
...@@ -475,7 +475,7 @@ $url = 'jx.bluearp.com/m/index.php/Automatic/TzPopOrderGetPhone'; ...@@ -475,7 +475,7 @@ $url = 'jx.bluearp.com/m/index.php/Automatic/TzPopOrderGetPhone';
return $this->decrypt($data,$str); return $this->decrypt($data,$str);
exit;*/ exit;*/
$token = DB::table('jdpop_token')->where('status',1)->select('app_key','app_secret','access_token','pt_id')->get()->toarray(); /* $token = DB::table('jdpop_token')->where('status',1)->select('app_key','app_secret','access_token','pt_id')->get()->toarray();
foreach ($token as $k =>$v) { foreach ($token as $k =>$v) {
// CommonService::addLog('token', json_encode($v['app_key']), $v['pt_id'],'jd_token'); // CommonService::addLog('token', json_encode($v['app_key']), $v['pt_id'],'jd_token');
$res_ult = []; $res_ult = [];
...@@ -513,7 +513,7 @@ $url = 'jx.bluearp.com/m/index.php/Automatic/TzPopOrderGetPhone'; ...@@ -513,7 +513,7 @@ $url = 'jx.bluearp.com/m/index.php/Automatic/TzPopOrderGetPhone';
} }
} }
} }*/
} }
......
...@@ -557,7 +557,7 @@ $url = 'jx.bluearp.com/m/index.php/Automatic/TzPopOrderGetPhone'; ...@@ -557,7 +557,7 @@ $url = 'jx.bluearp.com/m/index.php/Automatic/TzPopOrderGetPhone';
return $this->decrypt($data,$str); return $this->decrypt($data,$str);
exit;*/ exit;*/
$token = DB::table('jdpop_token')->where('status',1)->select('app_key','app_secret','access_token','pt_id')->get()->toarray(); /*$token = DB::table('jdpop_token')->where('status',1)->select('app_key','app_secret','access_token','pt_id')->get()->toarray();
foreach ($token as $k =>$v) { foreach ($token as $k =>$v) {
// CommonService::addLog('token', json_encode($v['app_key']), $v['pt_id'],'jd_token'); // CommonService::addLog('token', json_encode($v['app_key']), $v['pt_id'],'jd_token');
$res_ult = []; $res_ult = [];
...@@ -595,7 +595,7 @@ $url = 'jx.bluearp.com/m/index.php/Automatic/TzPopOrderGetPhone'; ...@@ -595,7 +595,7 @@ $url = 'jx.bluearp.com/m/index.php/Automatic/TzPopOrderGetPhone';
} }
} }
} }*/
} }
......
...@@ -569,7 +569,7 @@ $url = 'jx.bluearp.com/m/index.php/Automatic/TzPopOrderGetPhone'; ...@@ -569,7 +569,7 @@ $url = 'jx.bluearp.com/m/index.php/Automatic/TzPopOrderGetPhone';
return $this->decrypt($data,$str); return $this->decrypt($data,$str);
exit;*/ exit;*/
$token = DB::table('jdpop_token')->where('status',1)->select('app_key','app_secret','access_token','pt_id')->get()->toarray(); /*$token = DB::table('jdpop_token')->where('status',1)->select('app_key','app_secret','access_token','pt_id')->get()->toarray();
foreach ($token as $k =>$v) { foreach ($token as $k =>$v) {
// CommonService::addLog('token', json_encode($v['app_key']), $v['pt_id'],'jd_token'); // CommonService::addLog('token', json_encode($v['app_key']), $v['pt_id'],'jd_token');
$res_ult = []; $res_ult = [];
...@@ -607,7 +607,7 @@ $url = 'jx.bluearp.com/m/index.php/Automatic/TzPopOrderGetPhone'; ...@@ -607,7 +607,7 @@ $url = 'jx.bluearp.com/m/index.php/Automatic/TzPopOrderGetPhone';
} }
} }
} }*/
} }
......
...@@ -1360,9 +1360,9 @@ class MyTestController extends BaseController ...@@ -1360,9 +1360,9 @@ class MyTestController extends BaseController
try { try {
//获取取消的订单信息 //获取取消的订单信息
$order1 = RechargeOrder::where('reo_company_id', $v) $order1 = RechargeOrder::where('reo_company_id', $v)
->where('reo_sg', 1) ->where('reo_sg', 1)//是否已经上图1否2是
->where('reo_type', 2) ->where('reo_type', 2)//类型1充值2扣费
->where('reo_refund', 1) ->where('reo_refund', 1)//退费类型1未退费2取消退费3阶梯退费
->whereBetween('reo_create_time', [$start_time, $end_time]) ->whereBetween('reo_create_time', [$start_time, $end_time])
->leftjoin('orders', 'orders.order_num', '=', 'recharge_order.reo_order_number') ->leftjoin('orders', 'orders.order_num', '=', 'recharge_order.reo_order_number')
->whereIn('order_status', [50, 55]) ->whereIn('order_status', [50, 55])
......
...@@ -1569,11 +1569,13 @@ class OrderListController extends BaseController ...@@ -1569,11 +1569,13 @@ class OrderListController extends BaseController
$MsgArr = OrderListService::getOrderMsgById($orderListArr['order_goods_id']); $MsgArr = OrderListService::getOrderMsgById($orderListArr['order_goods_id']);
$supply_price = GhPrice::where('goods_id',$MsgArr['goods_id']) $supply_price = GhPrice::where('goods_id',$MsgArr['goods_id'])
->where('ser_id',$orderListArr['ser_id']) ->where('ser_id',$orderListArr['ser_id'])
->where('company_id',$orderListArr['company_id'])
->orderBy('id','Desc') ->orderBy('id','Desc')
->value('supply_price'); ->value('supply_price');
if(!$supply_price){ if(!$supply_price){
$supply_price = GhPrice::where('goods_id',$MsgArr['goods_id']) $supply_price = GhPrice::where('goods_id',$MsgArr['goods_id'])
->where('ser_id',0) ->where('ser_id',0)
->where('company_id',$orderListArr['company_id'])
->orderBy('id','Desc') ->orderBy('id','Desc')
->value('supply_price'); ->value('supply_price');
if(!$supply_price){ if(!$supply_price){
......
...@@ -565,7 +565,7 @@ public function index(Request $request) ...@@ -565,7 +565,7 @@ public function index(Request $request)
}else{ }else{
$poss['ser_id'] = $data['ser_id']; $poss['ser_id'] = $data['ser_id'];
if($data['ser_name']!='统一结算价'){ if($data['ser_name']!='统一结算价'){
$ser_id = Admin::where("company_name",$data['ser_name'])->where("company_id",$data['company_id'])->value("id"); $ser_id = Admin::where("company_name",$data['ser_name'])->where("id",$data['ser_id'])->value("id");
if(empty($ser_id) || $data['ser_id']!=$ser_id){ if(empty($ser_id) || $data['ser_id']!=$ser_id){
$res = GhPriceLead::where('id',$data['id'])->where('is_state',1)->update(['is_state'=>'2','state_explain'=>'服务商id与服务商名称不符','update_time'=>date("Y-m-d H:i:s")]); $res = GhPriceLead::where('id',$data['id'])->where('is_state',1)->update(['is_state'=>'2','state_explain'=>'服务商id与服务商名称不符','update_time'=>date("Y-m-d H:i:s")]);
return $this->error('操作失败', ErrorInc::MYSQL_STEP_FAILED, []); return $this->error('操作失败', ErrorInc::MYSQL_STEP_FAILED, []);
......
...@@ -411,11 +411,13 @@ class OrderListService extends Model ...@@ -411,11 +411,13 @@ class OrderListService extends Model
} }
$supply_price = GhPrice::where('goods_id',$MsgArr['goods_id']) $supply_price = GhPrice::where('goods_id',$MsgArr['goods_id'])
->where('ser_id',$orderListArr['ser_id']) ->where('ser_id',$orderListArr['ser_id'])
->where('company_id',$orderListArr['company_id'])
->orderBy('id','Desc') ->orderBy('id','Desc')
->value('supply_price'); ->value('supply_price');
if(!$supply_price){ if(!$supply_price){
$supply_price = GhPrice::where('goods_id',$MsgArr['goods_id']) $supply_price = GhPrice::where('goods_id',$MsgArr['goods_id'])
->where('ser_id',0) ->where('ser_id',0)
->where('company_id',$orderListArr['company_id'])
->orderBy('id','Desc') ->orderBy('id','Desc')
->value('supply_price'); ->value('supply_price');
if(!$supply_price){ if(!$supply_price){
...@@ -582,7 +584,7 @@ class OrderListService extends Model ...@@ -582,7 +584,7 @@ class OrderListService extends Model
} else { } else {
CommonService::addLog('派单出库失败', $result, $order_num, $filename); CommonService::addLog('派单出库失败', $result, $order_num, $filename);
} }
}elseif ($token['type'] == 3 && $order_num=='202606301725'){ }elseif ($token['type'] == 3 && $order_num=='2026063017251526'){
$data['order_num'] = $order_num; $data['order_num'] = $order_num;
$data['accessToken'] = $token['access_token']; $data['accessToken'] = $token['access_token'];
$data['appKey'] = $token['app_key']; $data['appKey'] = $token['app_key'];
...@@ -598,7 +600,7 @@ class OrderListService extends Model ...@@ -598,7 +600,7 @@ class OrderListService extends Model
} else { } else {
CommonService::addLog('派单出库失败', $result, $order_num, $filename); CommonService::addLog('派单出库失败', $result, $order_num, $filename);
} }
}elseif ($token['type'] == 4){ }elseif ($token['type'] == 4 && $order_num=='2026070611021526'){
$data['orderId'] = $order_num; $data['orderId'] = $order_num;
$data['access_token'] = $token['access_token']; $data['access_token'] = $token['access_token'];
$data['app_key'] = $token['app_key']; $data['app_key'] = $token['app_key'];
......
...@@ -19,7 +19,7 @@ class WashPayservice extends Service ...@@ -19,7 +19,7 @@ class WashPayservice extends Service
public static $instance; public static $instance;
public $modelMain = null; public $modelMain = null;
public $mainValidator = null; public $mainValidator = null;
public function __construct() public function __construct()
{ {
$this->mainValidator = new WashPayValidator(); $this->mainValidator = new WashPayValidator();
...@@ -312,9 +312,9 @@ class WashPayservice extends Service ...@@ -312,9 +312,9 @@ class WashPayservice extends Service
} }
/** /**
* [getEncrypt V3敏感信息进行加密] * [getEncrypt V3敏感信息进行加密]
* 使用的是公钥 ok * 使用的是公钥 ok
* @param string str要加密的内容 * @param string str要加密的内容
*/ */
public static function getEncrypt($str) public static function getEncrypt($str)
{ {
...@@ -327,7 +327,7 @@ class WashPayservice extends Service ...@@ -327,7 +327,7 @@ class WashPayservice extends Service
$encrypted = ''; $encrypted = '';
if (openssl_public_encrypt($str, $encrypted, $mch_public_key, OPENSSL_PKCS1_OAEP_PADDING)) { if (openssl_public_encrypt($str, $encrypted, $mch_public_key, OPENSSL_PKCS1_OAEP_PADDING)) {
//base64编码 //base64编码
$sign = base64_encode($encrypted); $sign = base64_encode($encrypted);
} else { } else {
throw new WxPayv3Exception('加密encrypt failed'); throw new WxPayv3Exception('加密encrypt failed');
...@@ -335,7 +335,7 @@ class WashPayservice extends Service ...@@ -335,7 +335,7 @@ class WashPayservice extends Service
return $sign; return $sign;
} }
/** /**
* [getPrivateEncrypt V3敏感信息进行解密] * [getPrivateEncrypt V3敏感信息进行解密]
* @param string str 需要解密的秘闻 ok * @param string str 需要解密的秘闻 ok
*/ */
public static function getPrivateEncrypt($str) public static function getPrivateEncrypt($str)
...@@ -350,7 +350,7 @@ class WashPayservice extends Service ...@@ -350,7 +350,7 @@ class WashPayservice extends Service
} }
} }
/** /**
* [decryptToString V3 证书和回调报文解密] * [decryptToString V3 证书和回调报文解密]
* @param stingr $aesKey V3签名 * @param stingr $aesKey V3签名
* @param string $associatedData 附加数据包 * @param string $associatedData 附加数据包
* @param string $nonceStr 加密使用的随机串初始化向量) * @param string $nonceStr 加密使用的随机串初始化向量)
...@@ -418,7 +418,7 @@ class WashPayservice extends Service ...@@ -418,7 +418,7 @@ class WashPayservice extends Service
return $time; return $time;
} }
/** /**
* [certificates 保存获取的平台证书,且返回证书的序列号serial_no] 缓存一天时间 * [certificates 保存获取的平台证书,且返回证书的序列号serial_no] 缓存一天时间
* @return string serial_no证书的序列号 * @return string serial_no证书的序列号
*/ */
...@@ -432,9 +432,9 @@ class WashPayservice extends Service ...@@ -432,9 +432,9 @@ class WashPayservice extends Service
return $serial_nos['serial_no']; return $serial_nos['serial_no'];
} }
} }
} }
} }
$url = 'https://api.mch.weixin.qq.com/v3/certificates'; $url = 'https://api.mch.weixin.qq.com/v3/certificates';
$r = self::_Getresponse($url); $r = self::_Getresponse($url);
$r = json_decode($r, true); $r = json_decode($r, true);
...@@ -581,18 +581,18 @@ class WashPayservice extends Service ...@@ -581,18 +581,18 @@ class WashPayservice extends Service
return ['code'=>500, 'msg'=>'请选择门店', 'data'=>'']; return ['code'=>500, 'msg'=>'请选择门店', 'data'=>''];
} }
$url = 'https://api.mch.weixin.qq.com/v3/pay/partner/transactions/jsapi'; $url = 'https://api.mch.weixin.qq.com/v3/pay/partner/transactions/jsapi';
$settle_info = $settle_info =
[ [
'profit_sharing' => false, //是否分账,与外层profit_sharing同时存在时,以本字段为准。 示例值:true 'profit_sharing' => false, //是否分账,与外层profit_sharing同时存在时,以本字段为准。 示例值:true
]; ];
$description = '半径服务-'.$find_data->orgo_goo_name; $description = '半径服务-'.$find_data->orgo_goo_name;
$out_trade_no = $find_data->ord_order_number; $out_trade_no = $find_data->ord_order_number;
$amount = [ $amount = [
'total' => $find_data->ord_order_price, //订单总金额,单位为分。 'total' => $find_data->ord_order_price, //订单总金额,单位为分。
'currency' => 'CNY' //CNY:人民币,境内商户号仅支持人民币。 'currency' => 'CNY' //CNY:人民币,境内商户号仅支持人民币。
]; ];
$payer = [ $payer = [
'sub_openid' => $request['weus_openid'] //用户在子商户appid下的唯一标识。若传sub_openid,那sub_appid必填 'sub_openid' => $request['weus_openid'] //用户在子商户appid下的唯一标识。若传sub_openid,那sub_appid必填
]; ];
// $notify_url = 'https://xm.bluearp.com/index.php/api/u1/Pay/notifyPay'; // $notify_url = 'https://xm.bluearp.com/index.php/api/u1/Pay/notifyPay';
$notify_url = config('apisystem.server_name_https').'/index.php/api/u1/Pay/notifyPay'; $notify_url = config('apisystem.server_name_https').'/index.php/api/u1/Pay/notifyPay';
...@@ -625,7 +625,7 @@ class WashPayservice extends Service ...@@ -625,7 +625,7 @@ class WashPayservice extends Service
return ['code'=>500, 'msg'=>'请选择小程序', 'data'=>'']; return ['code'=>500, 'msg'=>'请选择小程序', 'data'=>''];
} }
if ($request['XCX_MCHID']) { if ($request['XCX_MCHID']) {
$XCX_MCHID = $request['XCX_MCHID']; $XCX_MCHID = $request['XCX_MCHID'];
} else { } else {
...@@ -633,12 +633,12 @@ class WashPayservice extends Service ...@@ -633,12 +633,12 @@ class WashPayservice extends Service
} }
$url = 'https://api.mch.weixin.qq.com/v3/pay/partner/transactions/jsapi'; $url = 'https://api.mch.weixin.qq.com/v3/pay/partner/transactions/jsapi';
if ($request['profit_sharing'] == 1) { if ($request['profit_sharing'] == 1) {
$settle_info = $settle_info =
[ [
'profit_sharing' => true, //是否分账,与外层profit_sharing同时存在时,以本字段为准。 示例值:true 'profit_sharing' => true, //是否分账,与外层profit_sharing同时存在时,以本字段为准。 示例值:true
]; ];
} elseif ($request['profit_sharing'] == 2) { } elseif ($request['profit_sharing'] == 2) {
$settle_info = $settle_info =
[ [
'profit_sharing' => false, //是否分账,与外层profit_sharing同时存在时,以本字段为准。 示例值:true 'profit_sharing' => false, //是否分账,与外层profit_sharing同时存在时,以本字段为准。 示例值:true
]; ];
...@@ -646,11 +646,11 @@ class WashPayservice extends Service ...@@ -646,11 +646,11 @@ class WashPayservice extends Service
$description = $request['XCX_Name'].'-'.$request['orgo_goo_name']; $description = $request['XCX_Name'].'-'.$request['orgo_goo_name'];
$out_trade_no = $request['ord_order_number']; $out_trade_no = $request['ord_order_number'];
$amount = [ $amount = [
'total' => (int)$request['ord_order_price'], //订单总金额,单位为分。 'total' => (int)$request['ord_order_price'], //订单总金额,单位为分。
'currency' => 'CNY' //CNY:人民币,境内商户号仅支持人民币。 'currency' => 'CNY' //CNY:人民币,境内商户号仅支持人民币。
]; ];
$payer = [ $payer = [
'sub_openid' => $request['weus_openid'] //用户在子商户appid下的唯一标识。若传sub_openid,那sub_appid必填 'sub_openid' => $request['weus_openid'] //用户在子商户appid下的唯一标识。若传sub_openid,那sub_appid必填
]; ];
// $notify_url = 'https://xm.bluearp.com/index.php/api/u1/Pay/notifyPay'; // $notify_url = 'https://xm.bluearp.com/index.php/api/u1/Pay/notifyPay';
$notify_url = config('apisystem.server_name_https').'/index.php/api/u1/Pay/otherNotifyPay'; $notify_url = config('apisystem.server_name_https').'/index.php/api/u1/Pay/otherNotifyPay';
...@@ -717,7 +717,7 @@ class WashPayservice extends Service ...@@ -717,7 +717,7 @@ class WashPayservice extends Service
} }
/** /**
* 退款申请API 收付通 * 退款申请API 收付通
* 备注:交易时间超过一年的订单无法提交退款;每个支付订单的部分退款次数不能超过50次 * 备注:交易时间超过一年的订单无法提交退款;每个支付订单的部分退款次数不能超过50次
* @param string sub_mchid 微信支付分配二级商户的商户号 * @param string sub_mchid 微信支付分配二级商户的商户号
* @param string out_refund_no 商户系统内部的退款单号 * @param string out_refund_no 商户系统内部的退款单号
...@@ -750,7 +750,7 @@ class WashPayservice extends Service ...@@ -750,7 +750,7 @@ class WashPayservice extends Service
$ret = self::_Postresponse($url, json_encode($post)); $ret = self::_Postresponse($url, json_encode($post));
return $ret; return $ret;
} }
/** /**
* 发起订单 * 发起订单
* @param float $totalFee 收款总费用 单位元 * @param float $totalFee 收款总费用 单位元
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论