Parcourir la source

fix(交付工单): 已删除的产品数据依然可以被查询到,导致数据冗余

lk il y a 2 ans
Parent
commit
d6e357fe83
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      opms_parent/app/service/work/deliver_order.go

+ 1 - 1
opms_parent/app/service/work/deliver_order.go

@@ -364,7 +364,7 @@ func DeliverOrderAdd(tx *gdb.TX, contractId int, userInfo request.UserInfo, prod
 	var product []*contractmodel.CtrContractProduct
 	remark := ""
 	if productInfo == nil {
-		err = tx.GetStructs(&product, "select * from ctr_contract_product where contract_id = ?", contractId)
+		err = tx.GetStructs(&product, "select * from ctr_contract_product where contract_id = ? AND deleted_time IS NULL", contractId)
 		if err == sql.ErrNoRows {
 			return nil, myerrors.TipsError(fmt.Sprintf("合同产品为空: %d", contractId))
 		}