@@ -286,25 +286,47 @@ class ProductService extends ServiceBase {
* @returns {Promise<void>}
*/
asyncupdateProductPrice(actionBody,appInfo){
// let productPrice = await this.findOne({pay_code:actionBody.payCode});
letarr=actionBody.data;
letsuccessRet=[];
letfailRet=[];
for(leti=0;i<arr.length;i++){
constitem=arr[i];
letmsg='';
if(!item.price||!item.payCode){
msg=JSON.stringify(item)+" 参数错误!"
failRet.push(msg)
continue;
}
letsql="SELECT a.uapp_id,a.item_name,b.id,b.product_id,b.pay_code,b.price,b.supply_price FROM `p_product` a LEFT JOIN `p_product_price` b ON a.id = b.product_id where b.pay_code = :payCode and a.uapp_id = :uapp_id";