|
|
@@ -557,3 +557,43 @@ func QueryHsbyMyPackages(c *gin.Context) {
|
|
|
logger.GetLogger().Debugln("QueryHsbyMyPackages successed: %v", goodsInfo)
|
|
|
appG.Response(http.StatusOK, e.SUCCESS, goodsInfo)
|
|
|
}
|
|
|
+
|
|
|
+// SetHsbyMyPackagesStatusReq 设置我的包裹已收货状态
|
|
|
+type SetHsbyMyPackagesStatusReq struct {
|
|
|
+ TakeOrderID string `form:"takeOrderID" binding:"required"`
|
|
|
+ AccountID int `form:"accountID" binding:"required"`
|
|
|
+}
|
|
|
+
|
|
|
+// SetHsbyMyPackagesStatus 设置我的包裹已收货状态
|
|
|
+// @Summary 设置我的包裹已收货状态
|
|
|
+// @Produce json
|
|
|
+// @Security ApiKeyAuth
|
|
|
+// @Param takeOrderID query string true "提货单号"
|
|
|
+// @Param accountID query int true "资金账号"
|
|
|
+// @Success 200 {object} app.Response
|
|
|
+// @Failure 500 {object} app.Response
|
|
|
+// @Router /HSBY/SetHsbyMyPackagesStatus [post]
|
|
|
+// @Tags 定制【海商报业】
|
|
|
+func SetHsbyMyPackagesStatus(c *gin.Context) {
|
|
|
+ appG := app.Gin{C: c}
|
|
|
+
|
|
|
+ // 获取请求参数
|
|
|
+ var req SetHsbyMyPackagesStatusReq
|
|
|
+ if err := appG.C.ShouldBind(&req); err != nil {
|
|
|
+ logger.GetLogger().Errorf("SetHsbyMyPackagesStatus failed: %s", err.Error())
|
|
|
+ appG.Response(http.StatusBadRequest, e.INVALID_PARAMS, nil)
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ // 3 - 已收货
|
|
|
+ if err := models.SetHsbyMyPackagesStatus(req.TakeOrderID, req.AccountID, 3); err != nil {
|
|
|
+ // 执行失败
|
|
|
+ logger.GetLogger().Errorf("SetHsbyMyPackagesStatus failed: %s", err.Error())
|
|
|
+ appG.Response(http.StatusBadRequest, e.ERROR_OPERATION_FAILED, nil)
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ // 执行成功
|
|
|
+ logger.GetLogger().Debugln("SetHsbyMyPackagesStatus successed: %v", "ok")
|
|
|
+ appG.Response(http.StatusOK, e.SUCCESS, "")
|
|
|
+}
|