|
|
@@ -247,7 +247,7 @@ type LoginQueryRsp struct {
|
|
|
// @Security ApiKeyAuth
|
|
|
// @Param loginID query int true "登录账号"
|
|
|
// @Success 200 {object} LoginQueryRsp
|
|
|
-// @Failure 500 {object} app.Response
|
|
|
+// @Failure 500 {object} app.Response
|
|
|
// @Router /User/LoginQuery [get]
|
|
|
// @Tags 用户信息
|
|
|
func LoginQuery(c *gin.Context) {
|
|
|
@@ -432,7 +432,7 @@ type UpdateUserFavoriteGoodsReq struct {
|
|
|
// @Security ApiKeyAuth
|
|
|
// @Param userID query int true "用户ID"
|
|
|
// @Param goodsID query int true "商品ID"
|
|
|
-// @Success 200 {object} app.Response
|
|
|
+// @Success 200 {object} app.Response
|
|
|
// @Failure 500 {object} app.Response
|
|
|
// @Router /User/AddUserFavoriteGoods [post]
|
|
|
// @Tags 用户信息
|
|
|
@@ -581,7 +581,7 @@ type UpdateUserAccountStatusReq struct {
|
|
|
// @Summary 更新用户状态
|
|
|
// @Produce json
|
|
|
// @Security ApiKeyAuth
|
|
|
-// @Param userID query int true "用户ID"
|
|
|
+// @Param userID query int true "用户ID"
|
|
|
// @Param accountStatus query int true "账户状态 - 4:正常 6:注销(停用)"
|
|
|
// @Success 200 {object} app.Response
|
|
|
// @Failure 500 {object} app.Response
|
|
|
@@ -612,16 +612,15 @@ func UpdateUserAccountStatus(c *gin.Context) {
|
|
|
|
|
|
// UpdateUserHeadUrlReq 更新用户头像请求参数
|
|
|
type UpdateUserHeadUrlReq struct {
|
|
|
- UserID int `form:"userID" binding:"required"`
|
|
|
- Headurl string `form:"headurl" binding:"required"`
|
|
|
+ UserID int `json:"userID" binding:"required"`
|
|
|
+ Headurl string `json:"headurl" binding:"required"`
|
|
|
}
|
|
|
|
|
|
// UpdateUserHeadUrl 更新用户头像
|
|
|
// @Summary 更新用户头像
|
|
|
// @Produce json
|
|
|
// @Security ApiKeyAuth
|
|
|
-// @Param userID query int true "用户ID"
|
|
|
-// @Param headurl query string true "头像地址"
|
|
|
+// @Param data body UpdateUserHeadUrlReq true "入参"
|
|
|
// @Success 200 {object} app.Response
|
|
|
// @Failure 500 {object} app.Response
|
|
|
// @Router /User/UpdateUserHeadUrl [post]
|
|
|
@@ -631,7 +630,7 @@ func UpdateUserHeadUrl(c *gin.Context) {
|
|
|
|
|
|
// 获取请求参数
|
|
|
var req UpdateUserHeadUrlReq
|
|
|
- if err := appG.C.ShouldBind(&req); err != nil {
|
|
|
+ if err := appG.C.ShouldBindJSON(&req); err != nil {
|
|
|
logger.GetLogger().Errorf("UpdateUserHeadUrlReq failed: %s", err.Error())
|
|
|
appG.Response(http.StatusBadRequest, e.INVALID_PARAMS, nil)
|
|
|
return
|