<?php
define('CDX_MS_CONTEXT',true);require __DIR__.'/preflight.php';$row=$q('SELECT ID,STRATEGY_NAME FROM '.$p.'marketing_strategy WHERE ID=(SELECT MIN(ID) FROM '.$p.'marketing_strategy WHERE IS_DELETE=0 AND STORE_ID=10001)')[0];$admin=$q('SELECT ID,UUID FROM '.$p.'user WHERE ID=(SELECT MIN(ID) FROM '.$p.'user WHERE TYPE=0 AND IS_DELETE=0)')[0];require_once $root.'/application/base/Security.php';$token=\app\base\Security::encrypt(implode("\t",[(string)$admin['id'],(string)$admin['uuid'],'CDXMS10READ','0','','','CDXMS10READ']));$out=['lane'=>$lane,'business_dml'=>0,'routes'=>[]];foreach(['detail'=>['id'=>(int)$row['id']],'lists'=>['strategyName'=>$row['strategy_name'],'page'=>1,'pageSize'=>5],'select'=>[]] as $action=>$params){$raw=file_get_contents('http://127.0.0.1:'.($lane==='B'?18301:18302).'/api/marketingStrategy/'.$action,false,stream_context_create(['http'=>['method'=>'POST','header'=>'token: '.$token."\r\nContent-Type: application/json\r\n",'content'=>json_encode($params),'timeout'=>30,'ignore_errors'=>true]]));$body=json_decode($raw,true);$out['routes'][$action]=['code'=>$body['code']??null,'raw_wire_sha256'=>hash('sha256',$raw)];}$out['controller_sha256']=hash_file('sha256',__DIR__.'/source/application/api/controller/MarketingStrategy.php');$out['service_sha256']=hash_file('sha256',__DIR__.'/source/application/api/service/MarketingStrategy.php');echo json_encode($out),"\n";
