|
|
@@ -136,7 +136,7 @@ type QueryArbitrageStrategyReq struct {
|
|
|
|
|
|
// QueryArbitrageStrategyRsp 期现套利策略表信息
|
|
|
type QueryArbitrageStrategyRsp struct {
|
|
|
- Asapplyid int64 `json:"asapplyid" xorm:"'ASAPPLYID'" binding:"required"` // 策略申请ID(702+Unix秒时间戳(10位)+xxxxxx)
|
|
|
+ Asapplyid string `json:"asapplyid" xorm:"'ASAPPLYID'" binding:"required"` // 策略申请ID(702+Unix秒时间戳(10位)+xxxxxx)
|
|
|
Asno string `json:"asno" xorm:"'ASNO'"` // 策略编号
|
|
|
Biztype int64 `json:"biztype" xorm:"'BIZTYPE'"` // 业务类型 - 1:正向套利 -1:反向套利
|
|
|
Userid int64 `json:"userid" xorm:"'USERID'"` // 所属机构
|
|
|
@@ -203,7 +203,7 @@ func QueryArbitrageStrategy(c *gin.Context) {
|
|
|
engine := db.GetEngine()
|
|
|
datas := make([]QueryArbitrageStrategyRsp, 0)
|
|
|
sql := fmt.Sprintf(`select
|
|
|
- t.ASApplyID,
|
|
|
+ to_char(t.ASApplyID) ASApplyID,
|
|
|
t.ASNo,
|
|
|
t.ASName,
|
|
|
t.BizType,
|
|
|
@@ -263,13 +263,13 @@ func QueryArbitrageStrategy(c *gin.Context) {
|
|
|
|
|
|
// QuerySpotContractReq 查询现货合同表信息请求参数
|
|
|
type QuerySpotContractReq struct {
|
|
|
- AsApplyID int `form:"asapplyid" binding:"required"`
|
|
|
- SpotContractID int `form:"spotcontractid"`
|
|
|
+ AsApplyID uint64 `form:"asapplyid" binding:"required"`
|
|
|
+ SpotContractID uint64 `form:"spotcontractid"`
|
|
|
}
|
|
|
|
|
|
// QuerySpotContractRsp 现货合同表
|
|
|
type QuerySpotContractRsp struct {
|
|
|
- Spotcontractid int64 `json:"spotcontractid" xorm:"'SPOTCONTRACTID'" binding:"required"` // 现货合同ID(701+Unix秒时间戳(10位)+xxxxxx)
|
|
|
+ Spotcontractid string `json:"spotcontractid" xorm:"'SPOTCONTRACTID'" binding:"required"` // 现货合同ID(701+Unix秒时间戳(10位)+xxxxxx)
|
|
|
Tradedate string `json:"tradedate" xorm:"'TRADEDATE'"` // 交易日(yyyyMMdd)
|
|
|
Contractno string `json:"contractno" xorm:"'CONTRACTNO'"` // 现货合同编号
|
|
|
Contracttype int64 `json:"contracttype" xorm:"'CONTRACTTYPE'"` // 现货合同类型 - 1:采购合同 -1:销售合同
|
|
|
@@ -319,8 +319,8 @@ type QuerySpotContractRsp struct {
|
|
|
// @Summary 查询现货合同表信息(指定策略ID、未结束的)
|
|
|
// @Produce json
|
|
|
// @Security ApiKeyAuth
|
|
|
-// @Param asapplyid query int true "策略申请ID"
|
|
|
-// @Param spotcontractid query int false "现货合同ID"
|
|
|
+// @Param asapplyid query uint64 true "策略申请ID"
|
|
|
+// @Param spotcontractid query uint64 false "现货合同ID"
|
|
|
// @Success 200 {object} QuerySpotContractRsp
|
|
|
// @Failure 500 {object} app.Response
|
|
|
// @Router /Erms2/QuerySpotContract [get]
|
|
|
@@ -340,7 +340,7 @@ func QuerySpotContract(c *gin.Context) {
|
|
|
engine := db.GetEngine()
|
|
|
datas := make([]QuerySpotContractRsp, 0)
|
|
|
sql := fmt.Sprintf(`select
|
|
|
- t.SpotContractID,
|
|
|
+ to_char(t.SpotContractID) SpotContractID,
|
|
|
t.TradeDate,
|
|
|
t.ContractNo,
|
|
|
t.ContractType,
|