2
This commit is contained in:
@@ -409,7 +409,9 @@ func (r ReportPreRequest) ReportPre() (bool, error) {
|
||||
|
||||
// GetProdStock 获取商品库存
|
||||
func (r GetProdStockRequest) GetProdStock() (*GetProdStockDataResponse, error) {
|
||||
r.PharmacyCode = config.C.Pre.PrePlatPharmacyCode
|
||||
if r.PharmacyCode == "" {
|
||||
r.PharmacyCode = config.C.Pre.PrePlatPharmacyCode
|
||||
}
|
||||
jsonData, err := json.Marshal(r)
|
||||
if err != nil {
|
||||
utils.LogJsonErr("获取商品库存-序列化请求参数失败", err)
|
||||
@@ -483,5 +485,8 @@ func (r GetProdStockRequest) GetProdStock() (*GetProdStockDataResponse, error) {
|
||||
}
|
||||
|
||||
utils.LogJsonInfo("获取商品库存-成功", response.Data)
|
||||
if len(response.Data) == 0 {
|
||||
return &GetProdStockDataResponse{Quantity: "0"}, nil
|
||||
}
|
||||
return &response.Data[0], nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user