瀏覽代碼

去掉无用代码

zhou.yingan 5 年之前
父節點
當前提交
b6e3a069cb
共有 1 個文件被更改,包括 0 次插入30 次删除
  1. 0 30
      models/erms3.go

+ 0 - 30
models/erms3.go

@@ -3,8 +3,6 @@ package models
 
 import (
 	"mtp2_if/db"
-	"strconv"
-	"strings"
 	"time"
 )
 
@@ -154,31 +152,3 @@ func AddSpotContractApply(spotContractApply Erms3SpotContractApply) error {
 
 	return err
 }
-
-// GetSpotContractByParams 根据参数来获取合同.
-func GetSpotContractByParams(accountids string, contracttype int32, contractmode int32, status int32) ([]Erms3Spotcontract, error) {
-	engine := db.GetEngine()
-	strids := strings.Split(accountids, ",")
-	ids := make([]int64, len(strids))
-	for i := range strids {
-		id, err := strconv.ParseInt(strids[i], 10, 64)
-		if err != nil {
-			return nil, err
-		}
-
-		ids[i] = id
-	}
-
-	scs := make([]Erms3Spotcontract, 0)
-	err := engine.Where("CONTRACTMODE = ? and CONTRACTTYPE = ? and CLOSESTATUS = ?", contractmode, contracttype, status).In("ACCOUNTID", ids).Find(&scs)
-
-	return scs, err
-}
-
-// GetSpotContractDetailByID 根据合同ID来获取明细.
-func GetSpotContractDetailByID(spotcontractids []string) ([]Erms3Spotcontractdetail, error) {
-	engine := db.GetEngine()
-	details := make([]Erms3Spotcontractdetail, 0)
-	err := engine.In("SPOTCONTRACTID", spotcontractids).Find(&details)
-	return details, err
-}