gogs 1 рік тому
батько
коміт
038348835b

+ 17 - 0
app/Http/Controllers/Api/TestController.php

@@ -25,6 +25,23 @@ class TestController extends BaseController
     }
 
     public function aa(){
+
+        $params = json_decode('{"api_key":"d3848b47-4179-4b02-8d32-b78cd7672c6c","return_url":"https://payment.rummyliver.in/notify/s2pay/payment","mode":"LIVE","order_id":"1710493215363410880003","amount":"501.00","currency":"INR","description":"for payment","name":"iahfi","email":"jvqbgvv2908699@outlook.com","phone":"9329086994","city":"Mumbai","zip_code":"400002","country":"IND"}',true);
+
+        $hash_columns = ['merchant_reference_number','Amount','account_name','account_number','ifsc_code','bank_name','bank_branch','transfer_type','address_line_1', 'address_line_2', 'amount', 'api_key', 'city', 'country', 'currency', 'description', 'email', 'mode', 'name', 'order_id', 'phone', 'return_url', 'state', 'udf1', 'udf2', 'udf3', 'udf4', 'udf5', 'zip_code',];
+        sort($hash_columns);
+        $hash_data = '3b1db341fa70abc03af5c3676811a82bec99673f';
+        foreach ($hash_columns as $column) {
+            if (isset($params[$column])) {
+                if (strlen($params[$column]) > 0) {
+                    $hash_data .= '|' . trim($params[$column]);
+                }
+            }
+        }
+        $hash = strtoupper(hash("sha512", $hash_data));
+        var_dump($hash);die;
+        return $hash;
+
         $text = '这是测试';
         $key = '72f8c912d462b1md034ff46cbedaskc80bf';
         $sign = Hash::make($text.$key);

+ 1 - 1
app/Service/OaService.php

@@ -698,7 +698,7 @@ class OaService extends Service
         $order_no = $data['order_no'];
         $menu_id = $data['menu_id'];
         $detail = OaOrder::where('order_no', $order_no)->where('channel',$this->user['depart_top'][0]['depart_id'])->orderBy('id', 'desc')->where('menu_id', $menu_id)->first();
-        if (empty($detail)) return [false, '审核不存在'];
+        if (empty($detail))  return [true, ['state' => 0]];
         if ($detail->state == 2) return [true, ['state' => 0]];
         $oa_detail = OaOrderSubEmployee::where('employee_id', $user_id)->where('oa_order_id', $detail->id)->pluck('oa_order_sub_id')->toArray();
         if (empty($oa_detail)) return [true, ['state' => 0]];

+ 47 - 47
app/Service/OperationLogService.php

@@ -76,53 +76,53 @@ class OperationLogService extends Service
             $v['data'] = $tmp;
         }
         //todo
-        $log_list = [
-            [
-                'type' => 1,
-                'user_id' => 1,
-                'user_name' => '赤心巡天',
-                'crt_time' => date("Y-m-d H:i:s"),
-                'order_number' => '单据编号',
-                'data' => [
-                    [
-                        'key' => '金额',
-                        'old_data' => '100',
-                        'new_data' => '200',
-                    ]
-
-                ]
-            ],
-            [
-                'type' => 2,
-                'user_id' => 1,
-                'user_name' => "赘婿",
-                'crt_time' => date("Y-m-d H:i:s"),
-                'order_number' => '单据编号',
-                'data' => [
-                    [
-                        'key' => '金额',
-                        'old_data' => '100',
-                        'new_data' => '200',
-                    ]
-
-                ]
-            ],
-            [
-                'type' => 3,
-                'user_id' => 1,
-                'user_name' => "万相之王",
-                'crt_time' => date("Y-m-d H:i:s"),
-                'order_number' => '单据编号',
-                'data' => [
-                    [
-                        'key' => '金额',
-                        'old_data' => '100',
-                        'new_data' => '200',
-                    ]
-
-                ]
-            ]
-        ];
+//        $log_list = [
+//            [
+//                'type' => 1,
+//                'user_id' => 1,
+//                'user_name' => '赤心巡天',
+//                'crt_time' => date("Y-m-d H:i:s"),
+//                'order_number' => '单据编号',
+//                'data' => [
+//                    [
+//                        'key' => '金额',
+//                        'old_data' => '100',
+//                        'new_data' => '200',
+//                    ]
+//
+//                ]
+//            ],
+//            [
+//                'type' => 2,
+//                'user_id' => 1,
+//                'user_name' => "赘婿",
+//                'crt_time' => date("Y-m-d H:i:s"),
+//                'order_number' => '单据编号',
+//                'data' => [
+//                    [
+//                        'key' => '金额',
+//                        'old_data' => '100',
+//                        'new_data' => '200',
+//                    ]
+//
+//                ]
+//            ],
+//            [
+//                'type' => 3,
+//                'user_id' => 1,
+//                'user_name' => "万相之王",
+//                'crt_time' => date("Y-m-d H:i:s"),
+//                'order_number' => '单据编号',
+//                'data' => [
+//                    [
+//                        'key' => '金额',
+//                        'old_data' => '100',
+//                        'new_data' => '200',
+//                    ]
+//
+//                ]
+//            ]
+//        ];
 
         //按钮类功能的操作日志
         $log_list2 = OrderOperation::where('del_time',0)