Sign.php 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569
  1. <?php
  2. namespace Shop\Lib;
  3. use Dever;
  4. header("Content-Type:text/html;charset=utf-8");
  5. Class Sign {
  6. /*
  7. static $key = "udik876ehjde32dU61edsxsf";
  8. static $accesser_id = 'zsma';
  9. private $url = 'https://selfapply-test.chinaums.com/self-contract-nmrs/interface/autoReg/';
  10. */
  11. static $key = "o5ho739mgrphdm28g5rwx1nw";
  12. static $accesser_id = '2d9081bd7db8ad75017dbbe68981314f';
  13. private $url = 'https://yinshangpai.chinaums.com/self-contract-nmrs/interface/autoReg/';
  14. static $sign_type = 'SHA-256';
  15. private $test = 2;
  16. //private $product_id = array('0','1','in1','in2','in3','in4');
  17. private $product_id = array('0');
  18. private $document_type = array
  19. (
  20. 'idcard_front' => ['document_type' => '0001','document_name' => '身份证正面'],
  21. 'idcard_back' => ['document_type' => '0011','document_name' => '身份证反面'],
  22. 'license' => ['document_type' => '0002','document_name' => '营业执照'],
  23. 'tax' => ['document_type' => '0003','document_name' => '税务登记证'],
  24. 'door' => ['document_type' => '0005','document_name' => '门头照'],
  25. 'hand_idcard' => ['document_type' => '0007','document_name' => '手持身份证自拍照'],
  26. 'open' => ['document_type' => '0006','document_name' => '开户许可证'],
  27. 'bank_fount' => ['document_type' => '0025','document_name' => '银行卡正面照'],
  28. 'bank_back' => ['document_type' => '0026','document_name' => '银行卡反面照'],
  29. 'house_pic' => ['document_type' => '0015','document_name' => '室内照片'],
  30. 'screen_pic' => ['document_type' => '0034','document_name' => '商户网站/APP截图'],
  31. );
  32. # 计划任务
  33. public function cron_api()
  34. {
  35. $where['step'] = '4,5';
  36. $data = Dever::db('shop/sign')->getData($where);
  37. if ($data) {
  38. foreach ($data as $k => $v) {
  39. $this->check($v);
  40. }
  41. }
  42. return 'ok';
  43. }
  44. # 绑定门店
  45. public function bind($sign_id, $shop_id)
  46. {
  47. $sign = Dever::db('shop/sign')->find($sign_id);
  48. if (!$sign) {
  49. Dever::alert('签约信息不存在');
  50. }
  51. $shop = Dever::db('shop/info')->find($shop_id);
  52. if (!$shop) {
  53. Dever::alert('门店不存在');
  54. }
  55. if ($shop['mid']) {
  56. Dever::alert('门店已绑定银联商户号');
  57. }
  58. $old_shop = Dever::db('shop/info')->find(array('mid' => $sign['mid']));
  59. $state = Dever::db('shop/info')->update(array('where_id' => $shop_id, 'mid' => $sign['mid'], 'sign_id' => $sign['id']));
  60. if ($state) {
  61. if ($old_shop && $old_shop['id'] != $shop_id) {
  62. Dever::db('shop/info')->update(array('where_id' => $old_shop['id'], 'mid' => 'null', 'sign_id' => '-1'));
  63. }
  64. $this->log(100, $sign, '门店['.$shop['name'].']绑定成功');
  65. } else {
  66. Dever::db('shop/sign')->update(array('where_id' => $sign_id, 'shop_id' => '-1'));
  67. Dever::alert('门店绑定失败');
  68. }
  69. }
  70. # 获取合同链接
  71. public function getAgreement_api($sign_id)
  72. {
  73. $sign = Dever::db('shop/sign')->find($sign_id);
  74. return $this->agreement($sign, false);
  75. }
  76. # 获取当前状态
  77. public function getStatus_api($sign_id)
  78. {
  79. $sign = Dever::db('shop/sign')->find($sign_id);
  80. return $this->check($sign);
  81. }
  82. # 获取最新一条日志
  83. public function getLog($sign_id)
  84. {
  85. $sign = Dever::db('shop/sign')->find($sign_id);
  86. $log = Dever::db('shop/sign_log')->find(array('sign_id' => $sign['id']));
  87. if ($log) {
  88. $date = date('Y-m-d H:i', $log['cdate']);
  89. $step = Dever::db('shop/sign_log')->config['step'][$log['step']];
  90. return $date . '<br />' . $step . '<br />' . $log['desc'];
  91. }
  92. }
  93. # 获取日志列表
  94. public function getLogList($sign_id)
  95. {
  96. $sign = Dever::db('shop/sign')->find($sign_id);
  97. if (!$sign) {
  98. return Dever::timeline('填写资料');
  99. }
  100. $result = array();
  101. $log = Dever::db('shop/sign_log')->select(array('sign_id' => $sign['id']));
  102. if ($log) {
  103. foreach ($log as $k => $v) {
  104. if ($v['step'] == 4) {
  105. //$v['response'] = Dever::json_decode($v['response']);
  106. $url = $this->agreement($sign, false);
  107. $v['desc'] .= ' <a href="'.$url.'" target="_blank">点此打开</a> <a style="cursor:pointer" data-clipboard-text="'.$url.'" class="clipboard">复制链接</a>';
  108. }
  109. $date = date('Y-m-d H:i', $v['cdate']);
  110. $name = '';
  111. if ($v['admin_id'] > 0) {
  112. $admin = Dever::db('manage/admin')->find($v['admin_id']);
  113. if ($admin) {
  114. $name = '[' . $admin['username'] . ']&nbsp;&nbsp;';
  115. }
  116. }
  117. $result[] = $date . '&nbsp;&nbsp;' . $name . ''. $v['desc'];
  118. }
  119. }
  120. if ($sign['step'] == -1) {
  121. $url = Dever::url('shop/lib/sign.handle?sign_id=' . $sign['id'] . '&json=1');
  122. $result[] = '<a href="javascript:;" onclick="load(\''.$url.'\')">点此上传资料</a>';
  123. }
  124. $result = Dever::timeline('签约记录', $result);
  125. return $result;
  126. }
  127. # 统一处理接口
  128. public function handle_api($sign_id)
  129. {
  130. $sign = Dever::db('shop/sign')->find($sign_id);
  131. if (!$sign) {
  132. Dever::alert('档案资料未上传');
  133. }
  134. $sign['bank_acct_no'] = str_replace(' ', '', $sign['bank_acct_no']);
  135. switch($sign['step']) {
  136. case -1:
  137. # 提交资料
  138. return $this->up($sign);
  139. break;
  140. case 1:
  141. case 6:
  142. if ($sign['bank_acct_type'] == 1) {
  143. # 对公打款
  144. return $this->account($sign);
  145. } else {
  146. # 签约
  147. return $this->agreement($sign);
  148. }
  149. break;
  150. case 2:
  151. # 打款验证
  152. return $this->account_check($sign);
  153. break;
  154. case 4:
  155. case 5:
  156. # 验证签约
  157. return $this->check($sign);
  158. break;
  159. case 6:
  160. # 签约成功,变更签约?
  161. return '签约已成功,后续可以变更签约';
  162. return $this->up($sign);
  163. break;
  164. }
  165. return 'ok';
  166. }
  167. # 上传图片
  168. public function upload_api()
  169. {
  170. $document_type = $this->document_type;
  171. $key = Dever::input('key');
  172. $upload = Dever::json_decode(Dever::input('upload'));
  173. if ($upload && isset($document_type[$key]) && isset($upload['url'])) {
  174. $url = md5($upload['url']);
  175. $sign_pic = Dever::db('shop/sign_pic')->find(array('key' => $key, 'url' => $url));
  176. if (!$sign_pic) {
  177. $pic = $this->pic($upload['url']);
  178. if ($pic && isset($pic['data']['file_path']) && $pic['data']['file_path']) {
  179. $insert = array();
  180. $insert['url'] = $url;
  181. $insert['document_type'] = $document_type[$key]['document_type'];
  182. $insert['document_name'] = $document_type[$key]['document_name'];
  183. $insert['key'] = $key;
  184. $insert['path'] = Dever::json_encode($pic['data']);
  185. Dever::db('shop/sign_pic')->insert($insert);
  186. }
  187. }
  188. }
  189. return 'ok';
  190. }
  191. #3.2 详细采集档案资料上传接口
  192. private function up($sign)
  193. {
  194. $service = 'complex_upload';
  195. $data['remark'] = '线上支付商户';
  196. $data['accesser_user_id'] = $sign['id'];
  197. if ($sign['reg_mer_type'] == 1) {
  198. $sign['reg_mer_type'] = '00';
  199. } elseif ($sign['reg_mer_type'] == 2) {
  200. $sign['reg_mer_type'] = '01';
  201. } elseif ($sign['reg_mer_type'] == 3) {
  202. $sign['reg_mer_type'] = '02';
  203. }
  204. $data['reg_mer_type'] = $sign['reg_mer_type'];#注册类型
  205. $data['legal_name'] = $sign['name'];#法人姓名
  206. $data['legal_idcard_no'] = $sign['idcard'];#法人身份证号
  207. $data['legal_mobile'] = $sign['mobile'];#法人手机号
  208. $data['legal_card_deadline'] = $sign['card_deadline'] == '长期' ? '9999-12-31' : date('Y-m-d',$sign['card_deadline']);#证件截止代表日期
  209. $data['shop_name'] = $sign['shop_name'];#店铺名称
  210. if ($sign['bank_acct_type'] == -1) {
  211. $data['bank_acct_type'] = 0;
  212. $data['bank_acct_name'] = $sign['name'];#开户账号名称
  213. } else {
  214. $data['bank_acct_type'] = 1;
  215. $data['bank_acct_name'] = $sign['company_name'];#开户账号名称
  216. }
  217. $data['bank_acct_no'] = $sign['bank_acct_no'];#开户行账号
  218. $data['mccCode'] = $sign['mccCode'];
  219. $area = explode(',', $sign['shop_area']);
  220. $data['shop_province_id'] = $area[0]/10000;
  221. $data['shop_city_id'] = $area[1]/100;
  222. $data['shop_country_id'] = $area[2];
  223. $sign_area = explode(',',$sign['area']);
  224. $data['shop_lic'] = $sign['license_number'];#营业执照号
  225. $bank = $this->bank_list($sign_area[0]/10000, $sign['bank_acct_noname']);
  226. if($bank && isset($bank['branchBankList']) && $bank['branchBankList']){
  227. $bank['branchBankList'] = $bank['branchBankList'][0];
  228. $in['where_id'] = $sign['id'];
  229. $in['bank_no'] = $bank['branchBankList']['code'];
  230. $in['shop_addr_ext'] = $bank['branchBankList']['bankBranchName'];
  231. Dever::db('shop/sign')->update($in);
  232. $data['bank_no'] = $bank['branchBankList']['code'];
  233. $data['shop_addr_ext'] = $bank['branchBankList']['bankBranchName'];
  234. } else {
  235. return $this->log(1, $sign, '开户行行号不存在');
  236. }
  237. if ($sign['reg_mer_type'] == '00' && $sign['bank_acct_type'] != '1') {
  238. return $this->log(1, $sign, '账户类型不正确1');
  239. }
  240. if ($sign['legalmanHomeAddr']) {
  241. $data['legalmanHomeAddr'] = $sign['legalmanHomeAddr'];
  242. }
  243. $document_type = $this->document_type;
  244. foreach ($document_type as $k => $v) {
  245. if (isset($sign[$k]) && $sign[$k]) {
  246. $sign[$k] = Dever::pic($sign[$k]);
  247. $url = md5($sign[$k]);
  248. $sign_pic = Dever::db('shop/sign_pic')->find(array('key' => $k, 'url' => $url));
  249. if (!$sign_pic) {
  250. $pic = $this->pic($sign[$k]);
  251. if ($pic && isset($pic['data']['file_path']) && $pic['data']['file_path']) {
  252. $insert = array();
  253. $insert['url'] = $url;
  254. $insert['document_type'] = $v['document_type'];
  255. $insert['document_name'] = $v['document_name'];
  256. $insert['key'] = $k;
  257. $insert['path'] = Dever::json_encode($pic['data']);
  258. Dever::db('shop/sign_pic')->insert($insert);
  259. $data['pic_list'][] = array('document_name' => $v['document_name'], 'document_type' => $v['document_type'] , 'file_path'=> $pic['data']['file_path'], 'file_size'=>$pic['data']['file_size']);
  260. }
  261. } else {
  262. $pic = Dever::json_decode($sign_pic['path']);
  263. $data['pic_list'][] = array('document_name' => $sign_pic['document_name'], 'document_type' => $sign_pic['document_type'] , 'file_path'=> $pic['file_path'], 'file_size'=>$pic['file_size']);
  264. }
  265. }
  266. }
  267. $ids = $this->product_id;
  268. $data['product'] = array();
  269. foreach ($ids as $k => $v) {
  270. $data['product'][$k] = ['product_id' => $v];
  271. }
  272. $result = $this->get($service, $data);
  273. if ($result && $result['code'] == 1 && isset($result['data']['ums_reg_id']) && $result['data']['ums_reg_id']) {
  274. $update = array();
  275. $update['where_id'] = $sign['id'];
  276. $sign['ums_reg_id'] = $update['ums_reg_id'] = $result['data']['ums_reg_id'];
  277. Dever::db('shop/sign')->update($update);
  278. $this->log(1, $sign, '资料上传成功', $data, $result['data'], $result['request_seq']);
  279. if ($data['bank_acct_type'] == 1) {
  280. return $this->account($sign);
  281. } else {
  282. return $this->agreement($sign);
  283. }
  284. } else {
  285. $this->log(1, $sign, $result['msg'], $data, $result['data'], $result['request_seq']);
  286. }
  287. return Dever::input('json') == 1 ? 'reload' : $result;
  288. }
  289. # 3.7 发起对公账户验证交易接口
  290. public function account($sign)
  291. {
  292. $step = 2;
  293. $service = 'request_account_verify';
  294. $data['ums_reg_id'] = $sign['ums_reg_id'];
  295. $data['company_account'] = $sign['bank_acct_no'];
  296. $result = $this->get($service, $data);
  297. if ($result && $result['code'] == 1 && isset($result['data']['request_seq']) && $result['data']['request_seq']) {
  298. $update = array();
  299. $update['where_id'] = $sign['id'];
  300. $update['step'] = $step;
  301. $update['clear'] = true;
  302. Dever::db('shop/sign')->update($update);
  303. $this->log($update['step'], $sign, '公户打款成功', $data, $result['data'], $result['request_seq']);
  304. } else {
  305. $this->log($step, $sign, $result['msg'], $data, $result['data'], $result['request_seq']);
  306. }
  307. return Dever::input('json') == 1 ? 'reload' : $result;
  308. }
  309. # 3.6 对公账户认证接口
  310. public function account_check($sign, $num)
  311. {
  312. $step = 3;
  313. $trans_amt = $num;
  314. $service = 'company_account_verify';
  315. $data['ums_reg_id'] = $sign['ums_reg_id'];
  316. $data['company_account'] = $sign['bank_acct_no'];
  317. $data['trans_amt'] = $trans_amt;
  318. $result = $this->get($service, $data, $sign['ums_reg_id']);
  319. if ($result && $result['code'] == 1 && isset($result['data']['request_seq']) && $result['data']['request_seq']) {
  320. $update = array();
  321. $update['where_id'] = $sign['id'];
  322. $update['step'] = $step;
  323. $update['clear'] = true;
  324. Dever::db('shop/sign')->update($update);
  325. $this->log($update['step'], $sign, '公户对账成功', $data, $result['data'], $result['request_seq']);
  326. return $this->agreement($sign);
  327. } else {
  328. $this->log($step, $sign, $result['msg'], $data, $result['data'], $result['request_seq']);
  329. }
  330. return $result;
  331. }
  332. # 3.3 前台签约接口
  333. public function agreement($sign, $log = true)
  334. {
  335. $step = 4;
  336. $service = 'agreement_sign';
  337. $data['ums_reg_id'] = $sign['ums_reg_id'];
  338. $data['pcOrH5'] = 'H5';
  339. $result = $this->get($service, $data);
  340. if ($result && $result['code'] == 1 && isset($result['data']['url']) && $result['data']['url']) {
  341. $update = array();
  342. $update['where_id'] = $sign['id'];
  343. $update['step'] = $step;
  344. $update['url'] = $result['data']['url'];
  345. $update['clear'] = true;
  346. Dever::db('shop/sign')->update($update);
  347. if ($log) {
  348. $this->log($update['step'], $sign, '请复制链接进行合同签署', $data, $result['data'], $result['request_seq']);
  349. } else {
  350. return $update['url'];
  351. }
  352. } else {
  353. $this->log($step, $sign, $result['msg'], $data, $result['data'], $result['request_seq']);
  354. }
  355. return Dever::input('json') == 1 ? 'reload' : $result;
  356. }
  357. # 3.4 入网状态查询接口
  358. public function check($sign)
  359. {
  360. $step = 5;
  361. $service = 'apply_qry';
  362. $data['ums_reg_id'] = $sign['ums_reg_id'];
  363. $result = $this->get($service, $data, $sign['ums_reg_id']);
  364. if ($result && $result['code'] == 1 && isset($result['data']['apply_status'])) {
  365. if ($result['data']['apply_status'] == '03') {
  366. $step = 6;
  367. }
  368. $update = array();
  369. $update['where_id'] = $sign['id'];
  370. $update['step'] = $step;
  371. $update['clear'] = true;
  372. if ($result['data']['apply_status'] == '03' && isset($result['data']['mer_no']) && $result['data']['mer_no']) {
  373. $update['mid'] = $result['data']['mer_no'];
  374. }
  375. Dever::db('shop/sign')->update($update);
  376. $this->log($update['step'], $sign, $result['data']['apply_status_msg'], $data, $result['data'], $result['request_seq']);
  377. } else {
  378. $this->log($step, $sign, $result['data']['apply_status_msg'], $data, $result['data'], $result['request_seq']);
  379. }
  380. return $result;
  381. }
  382. private function encrypt($data='', $key='', $use3des = true)
  383. {
  384. $key = self::$key;
  385. $res = bin2hex(openssl_encrypt($data, 'DES-EDE3', $key, OPENSSL_RAW_DATA));
  386. return $res;
  387. }
  388. private function decrypt($data='', $key='', $use3des = true)
  389. {
  390. $key = self::$key;
  391. return openssl_decrypt(pack('H*',$data), 'DES-EDE3', $key, OPENSSL_RAW_DATA);
  392. }
  393. private function get($service, $data)
  394. {
  395. $accesser_id = self::$accesser_id;
  396. $sign_type = self::$sign_type;
  397. $param = $data;
  398. $param['service'] = $service;
  399. $param['sign_type'] = $sign_type;
  400. $param['accesser_id'] = $accesser_id;
  401. $param['request_date'] = date('YmdHis');
  402. $param['request_seq'] = Dever::order();
  403. $sign_data = json_encode($param, JSON_UNESCAPED_SLASHES|JSON_UNESCAPED_UNICODE);
  404. $send['json_data'] = $this->encrypt($sign_data);
  405. $send['sign_data'] = hash('sha256', $sign_data);
  406. $send['accesser_id'] = $accesser_id;
  407. $url = $this->url;
  408. $result = array();
  409. $result['request_seq'] = $param['request_seq'];
  410. $result['code'] = 2;
  411. $result['msg'] = '请求失败';
  412. $result['data'] = array();
  413. if ($service == 'agreement_sign') {
  414. $result['code'] = 1;
  415. $result['msg'] = '请求成功';
  416. $result['data']['url'] = $url . '?' . http_build_query($send);
  417. return $result;
  418. }
  419. if ($this->test != 1) {
  420. $response = Dever::curl($url, $send, 'post');
  421. } else {
  422. # 数据模拟
  423. $response = $this->data($service, $param);
  424. }
  425. $result['data'] = $response;
  426. if ($response) {
  427. $response = Dever::json_decode($response);
  428. if (isset($response['res_code']) && ($response['res_code'] == '0000' || $response['res_code'] == '1446')) {
  429. $result['code'] = 1;
  430. $result['msg'] = '请求成功';
  431. $result['data'] = $response;
  432. } elseif (isset($response['res_msg']) && $response['res_msg']) {
  433. $result['code'] = 2;
  434. $result['msg'] = $response['res_msg'];
  435. $result['data'] = $response;
  436. } elseif (isset($response['apply_status_msg']) && $response['apply_status_msg']) {
  437. $result['code'] = 2;
  438. $result['msg'] = $response['apply_status_msg'];
  439. $result['data'] = $response;
  440. }
  441. }
  442. return $result;
  443. }
  444. private function data($service, $data)
  445. {
  446. $result = array();
  447. $result['res_code'] = '0000';
  448. $result['res_msg'] = 'ok';
  449. $result['request_seq'] = $data['request_seq'];
  450. if ($service == 'pic_upload') {
  451. $result['file_path'] = $data['request_seq'];
  452. $result['file_type'] = 'jpg';
  453. $result['file_size'] = strlen($result['file_path']);
  454. } elseif ($service == 'complex_upload') {
  455. $result['ums_reg_id'] = $data['request_seq'];
  456. } elseif ($service == 'agreement_sign') {
  457. $result['url'] = 'https://www.baidu.com/';
  458. } elseif ($service == 'apply_qry') {
  459. $result['apply_status'] = '03';
  460. $result['apply_status_msg'] = '入网成功(最终成功状态)';
  461. } elseif ($service == 'branch_bank_list') {
  462. $result['branchBankList'][] = array('code' => '308100005607', 'bankBranchName' => '招商银行股份有限公司北京天通苑支行');
  463. }
  464. return Dever::json_encode($result);
  465. }
  466. private function pic($pic)
  467. {
  468. $service = 'pic_upload';
  469. if ($pic) {
  470. $pic_base64 = $this->test != 1 ? file_get_contents($pic) : 'content';
  471. if ($pic_base64) {
  472. $temp = explode('?', $pic);
  473. if ($temp) {
  474. $one = pathinfo($temp[0]);
  475. } else {
  476. $one = pathinfo($pic);
  477. }
  478. $data['pic_base64'] = "data:image/".$one['extension'].";base64,".base64_encode($pic_base64);
  479. $result = $this->get($service, $data);
  480. return $result;
  481. }
  482. }
  483. return false;
  484. }
  485. # 查询支行
  486. private function bank_list($areaCode, $key)
  487. {
  488. $service = 'branch_bank_list';
  489. $data['areaCode'] = $areaCode;
  490. $data['key'] = $key;
  491. $result = $this->get($service,$data);
  492. return $result['data'];
  493. }
  494. # 记录日志
  495. private function log($step, $sign, $msg, $request = array(), $response = array(), $request_seq = '')
  496. {
  497. if (!$sign) {
  498. return $msg;
  499. }
  500. $data['step'] = $step;
  501. $data['sign_id'] = $sign['id'];
  502. $data['desc'] = $msg;
  503. $info = false;
  504. if ($step == 4 || $step == 5) {
  505. $info = Dever::db('shop/sign_log')->find($data);
  506. }
  507. $admin = Dever::load('manage/auth.info');
  508. if ($admin) {
  509. $data['admin_id'] = $admin['id'];
  510. }
  511. if ($request_seq) {
  512. $data['request_seq'] = $request_seq;
  513. }
  514. if ($request) {
  515. $data['request'] = Dever::json_encode($request);
  516. }
  517. if ($response) {
  518. if (is_array($response)) {
  519. $response = Dever::json_encode($response);
  520. }
  521. $data['response'] = $response;
  522. }
  523. if ($info) {
  524. $data['where_id'] = $info['id'];
  525. Dever::db('shop/sign_log')->update($data);
  526. } else {
  527. Dever::db('shop/sign_log')->insert($data);
  528. }
  529. return $msg;
  530. }
  531. }