Commit c28caa8c authored by hangjun83's avatar hangjun83

百化产品接口更新

parent 02a09384
......@@ -38,42 +38,25 @@ class ProductsTransformer extends TransformerAbstract
}
$temp['price'] = $product['p_price'];//单价
$temp['market_price'] = $product['p_price'];//目录价格
if($product['r_gz_type'] == 2){
$temp['if_explode'] = 1;//是否易制爆
}else{
$temp['if_explode'] = 0;//是否易制爆
}
if($type == 'all'){
if($product['r_gz_type'] == 1){
$temp['if_drag'] = 1;//是否易制毒
}else{
$temp['if_drag'] = 0;//是否易制毒
}
}
if($product['c_if_dangers'] == 1){
$temp['if_dangers'] = 1;//是否危化品
}else{
$temp['if_dangers'] = 0;//是否危化品
}
if($product['r_status'] == 0 || $product['p_status'] == 0 || $product['p_show'] == 0 || $product['p_if_big'] == 1){
if($product['p_status'] == 0 || $product['p_show'] == 0){
$temp['status'] = 0;
$temp['price'] = 0;
$temp['market_price'] = 0;
}else{
$temp['status'] = 1;
}
$temp['pack'] = $product['p_pack'].$product['p_pack_unit'];//包装规格
$temp['pack'] = $product['p_pack'];//包装规格
$temp['weight'] = $product['p_weight'];//产品重量kg
if($product['p_stock'] > 0){
if($product['p_tod'] == '现货'){
$temp['tag'] = '当天发货';
}else{
$temp['tag'] = '';
}
if($type == 'bycas'){
$temp['city'] = '上海';
$temp['stock'] = $product['p_tod'];//货期
$temp['pacs'] = $product['p_pack'].$product['p_pack_unit'];//项目规格
}
array_push($productTransReturn,$temp);
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment