Procházet zdrojové kódy

1.查客户资料 证件地址不需要解密
2.查融资明细(合同) 合同id字段类型修改

zou.yingbin před 4 roky
rodič
revize
7463567684
6 změnil soubory, kde provedl 10 přidání a 10 odebrání
  1. 3 3
      controllers/qhj/qryQhj.go
  2. 1 1
      docs/docs.go
  3. 1 1
      docs/swagger.json
  4. 1 1
      docs/swagger.yaml
  5. 1 1
      models/ermcpCommon.go
  6. 3 3
      models/qhj.go

+ 3 - 3
controllers/qhj/qryQhj.go

@@ -27,11 +27,11 @@ import (
 func QueryContract(c *gin.Context) {
 	a := app.GinUtils{Gin: app.Gin{C: c}}
 	req := struct {
-		USERID        int64 `form:"userid" binding:"required"` // 用户id
-		SCFCONTRACTID int64 `form:"scfcontractid"`             // scf合同id
+		USERID        int64  `form:"userid" binding:"required"` // 用户id
+		SCFCONTRACTID string `form:"scfcontractid"`             // scf合同id
 	}{}
 	a.DoBindReq(&req)
-	m := models.QhjContract{USERID: req.USERID}
+	m := models.QhjContract{USERID: req.USERID, SCFCONTRACTID: req.SCFCONTRACTID}
 	a.DoGetDataI(&m)
 }
 

+ 1 - 1
docs/docs.go

@@ -22059,7 +22059,7 @@ var doc = `{
                 },
                 "scfcontractid": {
                     "description": "SCF合同ID(310+Unix秒时间戳(10位)+xxxxxx)",
-                    "type": "integer"
+                    "type": "string"
                 },
                 "scfcontracttype": {
                     "description": "合同类型 - 1:仓单回购 2:仓单质押 3:合作套保 4:资金贷款 5:融资单",

+ 1 - 1
docs/swagger.json

@@ -22043,7 +22043,7 @@
                 },
                 "scfcontractid": {
                     "description": "SCF合同ID(310+Unix秒时间戳(10位)+xxxxxx)",
-                    "type": "integer"
+                    "type": "string"
                 },
                 "scfcontracttype": {
                     "description": "合同类型 - 1:仓单回购 2:仓单质押 3:合作套保 4:资金贷款 5:融资单",

+ 1 - 1
docs/swagger.yaml

@@ -9566,7 +9566,7 @@ definitions:
         type: number
       scfcontractid:
         description: SCF合同ID(310+Unix秒时间戳(10位)+xxxxxx)
-        type: integer
+        type: string
       scfcontracttype:
         description: 合同类型 - 1:仓单回购 2:仓单质押 3:合作套保 4:资金贷款 5:融资单
         type: integer

+ 1 - 1
models/ermcpCommon.go

@@ -24,7 +24,7 @@ type IErmcp interface {
 // DecryptField 解密字段
 func DecryptField(oriStr string) string {
 	nLen := len(oriStr)
-	if nLen < 32 && nLen%2 != 0 {
+	if nLen < 32 || nLen%16 != 0 {
 		// 非加密字符串
 		return oriStr
 	}

+ 3 - 3
models/qhj.go

@@ -19,7 +19,7 @@ import (
 // QhjContract 千海金融资明细(合同)
 type QhjContract struct {
 	USERID              int64   `json:"userid"  xorm:"USERID"`                             // 用户ID
-	SCFCONTRACTID       int64   `json:"scfcontractid"  xorm:"SCFCONTRACTID"`               // SCF合同ID(310+Unix秒时间戳(10位)+xxxxxx)
+	SCFCONTRACTID       string  `json:"scfcontractid"  xorm:"SCFCONTRACTID"`               // SCF合同ID(310+Unix秒时间戳(10位)+xxxxxx)
 	SCFCONTRACTTYPE     int32   `json:"scfcontracttype"  xorm:"SCFCONTRACTTYPE"`           // 合同类型 - 1:仓单回购 2:仓单质押 3:合作套保 4:资金贷款 5:融资单
 	GOODSID             int32   `json:"goodsid"  xorm:"GOODSID"`                           // 商品ID [5:融资单]
 	CONTRACTCONFIRMTIME string  `json:"contractconfirmtime"  xorm:"CONTRACTCONFIRMTIME"`   // 合同确认时间(时间)
@@ -51,7 +51,7 @@ func (r *QhjContract) calc() {
 
 func (r *QhjContract) buildSql() string {
 	var sqlId utils.SQLVal = "select t.borroweruserid userid," +
-		"       t.scfcontractid," +
+		"       to_char(t.scfcontractid) scfcontractid," +
 		"       t.scfcontracttype," +
 		"       t.goodsid," +
 		"       to_char(t.contractconfirmtime, 'yyyy-mm-dd hh24:mi:ss') contractconfirmtime," +
@@ -75,7 +75,7 @@ func (r *QhjContract) buildSql() string {
 		"    on t.goodsid = g.goodsid" +
 		"  where 1=1"
 	sqlId.And("t.borroweruserid", r.USERID)
-	sqlId.AndEx("t.SCFCONTRACTID", r.SCFCONTRACTID, r.SCFCONTRACTID > 0)
+	sqlId.AndEx("t.SCFCONTRACTID", r.SCFCONTRACTID, len(r.SCFCONTRACTID) > 0)
 	return sqlId.String()
 }