Explorar el Código

修改uint64的问题

Zhou Xiaoning hace 5 años
padre
commit
4c160dd0c7
Se han modificado 5 ficheros con 16 adiciones y 16 borrados
  1. 2 2
      config/config.xml
  2. 8 8
      controllers/erms2/erms2.go
  3. 2 2
      docs/docs.go
  4. 2 2
      docs/swagger.json
  5. 2 2
      docs/swagger.yaml

+ 2 - 2
config/config.xml

@@ -16,12 +16,12 @@
         <DbAddress value="192.168.31.117"/>
         <DbName    value="orcl"/>
         <DbPort    value="1521"/>
-        <DbUser    value="mtp2_test104"/>
+        <DbUser    value="mtp2_test118"/>
         <DbPwd     value="muchinfo"/>
     </DbSetting>
 
     <RedisSetting>
-        <Address   value="192.168.31.104"/>
+        <Address   value="192.168.31.118"/>
         <Port      value="5007"/>
         <Timeout   value="3"/>
         <ConnNum   value="1"/>

+ 8 - 8
controllers/erms2/erms2.go

@@ -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,

+ 2 - 2
docs/docs.go

@@ -1551,7 +1551,7 @@ var doc = `{
                 },
                 "asapplyid": {
                     "description": "策略申请ID(702+Unix秒时间戳(10位)+xxxxxx)",
-                    "type": "integer"
+                    "type": "string"
                 },
                 "asname": {
                     "description": "策略名称",
@@ -1985,7 +1985,7 @@ var doc = `{
                 },
                 "spotcontractid": {
                     "description": "现货合同ID(701+Unix秒时间戳(10位)+xxxxxx)",
-                    "type": "integer"
+                    "type": "string"
                 },
                 "spotdatetime": {
                     "description": "收发货更新时间",

+ 2 - 2
docs/swagger.json

@@ -1535,7 +1535,7 @@
                 },
                 "asapplyid": {
                     "description": "策略申请ID(702+Unix秒时间戳(10位)+xxxxxx)",
-                    "type": "integer"
+                    "type": "string"
                 },
                 "asname": {
                     "description": "策略名称",
@@ -1969,7 +1969,7 @@
                 },
                 "spotcontractid": {
                     "description": "现货合同ID(701+Unix秒时间戳(10位)+xxxxxx)",
-                    "type": "integer"
+                    "type": "string"
                 },
                 "spotdatetime": {
                     "description": "收发货更新时间",

+ 2 - 2
docs/swagger.yaml

@@ -724,7 +724,7 @@ definitions:
         type: number
       asapplyid:
         description: 策略申请ID(702+Unix秒时间戳(10位)+xxxxxx)
-        type: integer
+        type: string
       asname:
         description: 策略名称
         type: string
@@ -1049,7 +1049,7 @@ definitions:
         type: string
       spotcontractid:
         description: 现货合同ID(701+Unix秒时间戳(10位)+xxxxxx)
-        type: integer
+        type: string
       spotdatetime:
         description: 收发货更新时间
         type: string