add
This commit is contained in:
@@ -21,7 +21,7 @@ services:
|
||||
- ai-trading-network
|
||||
|
||||
cn_futures_trading_records:
|
||||
build: services/cn_futures_trading_records
|
||||
build: services/cn_futures_trading_records/src
|
||||
container_name: cn_futures_trading_records_api
|
||||
restart: always
|
||||
ports:
|
||||
|
||||
@@ -51,7 +51,7 @@ func CreateHandler(c *gin.Context) {
|
||||
zap.Error(err),
|
||||
zap.Any("request_body", c.Request.Body),
|
||||
)
|
||||
c.JSON(http.StatusBadRequest, CreateResponse{
|
||||
c.JSON(http.StatusOK, CreateResponse{
|
||||
Success: false,
|
||||
Message: "请求参数错误:name和code为必填项",
|
||||
})
|
||||
@@ -72,7 +72,7 @@ func CreateHandler(c *gin.Context) {
|
||||
zap.String("req_id", reqID),
|
||||
zap.Error(err),
|
||||
)
|
||||
c.JSON(http.StatusInternalServerError, CreateResponse{
|
||||
c.JSON(http.StatusOK, CreateResponse{
|
||||
Success: false,
|
||||
Message: "系统错误,请稍后重试",
|
||||
})
|
||||
@@ -91,7 +91,7 @@ func CreateHandler(c *gin.Context) {
|
||||
zap.String("req_id", reqID),
|
||||
zap.Any("recover", r),
|
||||
)
|
||||
c.JSON(http.StatusInternalServerError, CreateResponse{
|
||||
c.JSON(http.StatusOK, CreateResponse{
|
||||
Success: false,
|
||||
Message: "系统错误,请稍后重试",
|
||||
})
|
||||
@@ -111,7 +111,7 @@ func CreateHandler(c *gin.Context) {
|
||||
zap.String("name", req.Name),
|
||||
zap.Error(err),
|
||||
)
|
||||
c.JSON(http.StatusInternalServerError, CreateResponse{
|
||||
c.JSON(http.StatusOK, CreateResponse{
|
||||
Success: false,
|
||||
Message: "系统错误,校验名称失败",
|
||||
})
|
||||
@@ -123,7 +123,7 @@ func CreateHandler(c *gin.Context) {
|
||||
zap.String("req_id", reqID),
|
||||
zap.String("name", req.Name),
|
||||
)
|
||||
c.JSON(http.StatusBadRequest, CreateResponse{
|
||||
c.JSON(http.StatusOK, CreateResponse{
|
||||
Success: false,
|
||||
Message: "国家名称已存在,请更换名称",
|
||||
})
|
||||
@@ -143,7 +143,7 @@ func CreateHandler(c *gin.Context) {
|
||||
zap.String("code", req.Code),
|
||||
zap.Error(err),
|
||||
)
|
||||
c.JSON(http.StatusInternalServerError, CreateResponse{
|
||||
c.JSON(http.StatusOK, CreateResponse{
|
||||
Success: false,
|
||||
Message: "系统错误,校验编码失败",
|
||||
})
|
||||
@@ -155,7 +155,7 @@ func CreateHandler(c *gin.Context) {
|
||||
zap.String("req_id", reqID),
|
||||
zap.String("code", req.Code),
|
||||
)
|
||||
c.JSON(http.StatusBadRequest, CreateResponse{
|
||||
c.JSON(http.StatusOK, CreateResponse{
|
||||
Success: false,
|
||||
Message: "国家编码已存在,请更换编码",
|
||||
})
|
||||
@@ -176,7 +176,7 @@ func CreateHandler(c *gin.Context) {
|
||||
zap.String("flag", req.Flag),
|
||||
zap.Error(err),
|
||||
)
|
||||
c.JSON(http.StatusInternalServerError, CreateResponse{
|
||||
c.JSON(http.StatusOK, CreateResponse{
|
||||
Success: false,
|
||||
Message: "系统错误,校验国旗失败",
|
||||
})
|
||||
@@ -188,7 +188,7 @@ func CreateHandler(c *gin.Context) {
|
||||
zap.String("req_id", reqID),
|
||||
zap.String("flag", req.Flag),
|
||||
)
|
||||
c.JSON(http.StatusBadRequest, CreateResponse{
|
||||
c.JSON(http.StatusOK, CreateResponse{
|
||||
Success: false,
|
||||
Message: "国旗信息已存在,请更换国旗",
|
||||
})
|
||||
@@ -205,7 +205,7 @@ func CreateHandler(c *gin.Context) {
|
||||
zap.String("req_id", reqID),
|
||||
zap.Error(err),
|
||||
)
|
||||
c.JSON(http.StatusInternalServerError, CreateResponse{
|
||||
c.JSON(http.StatusOK, CreateResponse{
|
||||
Success: false,
|
||||
Message: "创建国家记录失败",
|
||||
})
|
||||
@@ -226,7 +226,7 @@ func CreateHandler(c *gin.Context) {
|
||||
zap.String("country_id", countryID),
|
||||
zap.Error(err),
|
||||
)
|
||||
c.JSON(http.StatusInternalServerError, CreateResponse{
|
||||
c.JSON(http.StatusOK, CreateResponse{
|
||||
Success: false,
|
||||
Message: "保存名称信息失败",
|
||||
})
|
||||
@@ -242,7 +242,7 @@ func CreateHandler(c *gin.Context) {
|
||||
zap.String("country_id", countryID),
|
||||
zap.Error(err),
|
||||
)
|
||||
c.JSON(http.StatusInternalServerError, CreateResponse{
|
||||
c.JSON(http.StatusOK, CreateResponse{
|
||||
Success: false,
|
||||
Message: "保存代码信息失败",
|
||||
})
|
||||
@@ -259,7 +259,7 @@ func CreateHandler(c *gin.Context) {
|
||||
zap.String("country_id", countryID),
|
||||
zap.Error(err),
|
||||
)
|
||||
c.JSON(http.StatusInternalServerError, CreateResponse{
|
||||
c.JSON(http.StatusOK, CreateResponse{
|
||||
Success: false,
|
||||
Message: "保存国旗信息失败",
|
||||
})
|
||||
@@ -279,7 +279,7 @@ func CreateHandler(c *gin.Context) {
|
||||
zap.String("country_id", countryID),
|
||||
zap.Error(err),
|
||||
)
|
||||
c.JSON(http.StatusInternalServerError, CreateResponse{
|
||||
c.JSON(http.StatusOK, CreateResponse{
|
||||
Success: false,
|
||||
Message: "数据提交失败,请稍后重试",
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user