|
@@ -143,11 +143,13 @@ func GetUserWallet(c *gin.Context) {
|
|
|
userWallet, err := dao.GetUserWalletByUserId(id)
|
|
userWallet, err := dao.GetUserWalletByUserId(id)
|
|
|
if err != nil {
|
|
if err != nil {
|
|
|
c.JSON(200, CreateResultError(500, "获取钱包失败"))
|
|
c.JSON(200, CreateResultError(500, "获取钱包失败"))
|
|
|
|
|
+ return
|
|
|
}
|
|
}
|
|
|
vo.Wallet = userWallet
|
|
vo.Wallet = userWallet
|
|
|
vo.CouponUserJDM, err = dao.GetUserCouponByUserId(id)
|
|
vo.CouponUserJDM, err = dao.GetUserCouponByUserId(id)
|
|
|
if err != nil {
|
|
if err != nil {
|
|
|
c.JSON(200, CreateResultError(500, "获取优惠券失败"))
|
|
c.JSON(200, CreateResultError(500, "获取优惠券失败"))
|
|
|
|
|
+ return
|
|
|
}
|
|
}
|
|
|
c.JSON(200, CreateResultData(vo))
|
|
c.JSON(200, CreateResultData(vo))
|
|
|
}
|
|
}
|
|
@@ -184,6 +186,7 @@ func GetUserOrder(c *gin.Context) {
|
|
|
vo, err := dao.GetListGoodsOrder(cast.ToString(state), id, cast.ToInt(pageNum), cast.ToInt(pageSize))
|
|
vo, err := dao.GetListGoodsOrder(cast.ToString(state), id, cast.ToInt(pageNum), cast.ToInt(pageSize))
|
|
|
if err != nil {
|
|
if err != nil {
|
|
|
c.JSON(200, CreateResultError(500, "获取订单失败"))
|
|
c.JSON(200, CreateResultError(500, "获取订单失败"))
|
|
|
|
|
+ return
|
|
|
}
|
|
}
|
|
|
c.JSON(200, CreateResultData(vo))
|
|
c.JSON(200, CreateResultData(vo))
|
|
|
}
|
|
}
|