指数第一步
2022-11-09 16:18:21 0 举报
指数第一步
作者其他创作
大纲/内容
结束
Y
新增水泥价格同步表数据
N
where cp_procement.PC_State=1 and cp_procement.PC_SendPrice=1
遍历products在样本表中,根据products每条数据的省市品牌品种查找样本表数据
cementpi_pricesync$limit['PS_Id'] = $id['PS_Id'];$limit['PS_PriceUpdatetime'] = $value1['PC_UpdateTime'];$limit['PS_Price'] = $value1[ 'PC_MarketPriceValue' ] ? $value1[ 'PC_MarketPriceValue' ] : $value1['PC_PriceGuide'];$limit['PS_UpdownReason'] = $value1['PC_Comment'];$limit['PS_SyncTime'] = date(\"Y-m-d H:i:s\
products
产品表查询已审核已上架产品数据:products
set cp_procement.PC_Is_Sample=0
根据条件查到样本数据
查找水泥价格同步表是否已同步过该条价格
该条价格数据更新时间 > 水泥价格同步表该条价格同步时间?
更新水泥价格同步表
where 'PC_Id' = $value['PC_Id'];set 'PC_Is_Sample' => 1
清空产品表中样本数据
cementpi_pricesync$limit['PS_PriceId'] = $value1['PC_Id'];$limit['PS_PriceTime'] = $value1['PC_AddTime'];$limit['PS_ProId'] = $value1['PC_PC_Id'];$limit['PS_S_Id'] = $sampleDetail['S_Id'];$limit['PS_PriceUpdatetime'] = $value1['PC_UpdateTime'];$limit['PS_ProvinceCode'] = $value1['PC_ProvinceCode'];$limit['PS_Province'] = $value1['PC_Province'];$limit['PS_CityCode'] = $value1['PC_CityCode'];if ($value1['PC_ProvinceCode'] == $value1['PC_CityCode']) { $limit['PS_CityCode'] = $value1['PC_ProvinceCode'];}$limit['PS_City'] = $value1['PC_City'];$limit['PS_Brand'] = $value1['PC_BName'];$limit['PS_BrandId'] = $value1['PC_B_Id'];$limit['PS_Price'] = $value1[ 'PC_MarketPriceValue' ] ? $value1[ 'PC_MarketPriceValue' ] : $value1['PC_PriceGuide'];$limit['PS_UpdownReason'] = $value1['PC_Comment'];$limit['PS_Intervene'] = 1;$limit['PS_SyncTime'] = date(\"Y-m-d H:i:s\
更新产品表中的样本
开始
根据条件查找价格
产品表:cp_procement样本表:cementpi_sample水泥价格同步表:cementpi_pricesync
0 条评论
回复 删除
下一页