|
|
@@ -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()
|
|
|
}
|
|
|
|