qidongsheng 0619

This commit is contained in:
qidongsheng
2020-06-19 14:11:37 +08:00
parent baf505b677
commit c88b737478
9 changed files with 292 additions and 30 deletions

View File

@@ -4447,3 +4447,20 @@ func GetStoreSkuAudit(ctx *jxcontext.Context, storeIDs, nameIDs, skuIDs []int, s
pagedInfo, err = dao.GetStoreSkuAudit(dao.GetDB(), storeIDs, nameIDs, skuIDs, status, name, remark, applyTimeStart, applyTimeEnd, auditTimeStart, auditTimeEnd, pageSize, offset)
return pagedInfo, err
}
func SetJxPrice(jxSkuInfoDataMulti *dao.StoreSkuNamesInfo,storeId int) (err error){
db := dao.GetDB()
storeDetail, err := dao.GetStoreDetail(dao.GetDB(), storeId, model.VendorIDJX)
if err != nil {
dao.Rollback(db)
return err
}
/*重新计算京西价格*/
for _,values := range jxSkuInfoDataMulti.SkuNames{
for _,value := range values.Skus{
value.JxPrice = jxutils.CaculatePriceByPricePack(storeDetail.PricePercentagePackObj, int(storeDetail.PricePercentage), value.JxPrice)
}
}
/*重新计算京西价格*/
return nil
}