hsun 2 年之前
父节点
当前提交
62257bfa91
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      models/fms/contract_invoice.go

+ 1 - 0
models/fms/contract_invoice.go

@@ -56,6 +56,7 @@ func (c *ContractInvoice) Update(updateCols []string) (err error) {
 func (c *ContractInvoice) Sum(field, condition string, pars []interface{}) (total float64, err error) {
 	totalList := make([]float64, 0)
 	err = global.DEFAULT_MYSQL.Model(c).
+		Where("is_deleted = 0").
 		Where(condition, pars...).
 		Pluck(field, &totalList).Error
 	for i := range totalList {