package com.tmerclub.cloud.systemtest.api.platform;

import com.moyuer.cloud.systemtest.constants.Constant;
import com.moyuer.cloud.systemtest.util.HttpUtil;
import com.moyuer.cloud.systemtest.util.UrlEnum;
import com.tmerclub.cloud.user.dto.UserLevelDTO;
import com.tmerclub.cloud.user.vo.UserLevelVO;

/**
 * @author lpj
 */
public class UserLevelApi {
    /**
     * 获取用户等级信息
     */
    public static UserLevelVO info(Long userLevelId) {
        String url = Constant.API_URL + "/tmerclub_user/p/userLevel?userLevelId=" + userLevelId;
        return HttpUtil.get(url, UserLevelVO.class, UrlEnum.PLATFORM);
    }

    /**
     * 更新用户等级
     */
    public static void update(UserLevelDTO userLevelDTO) {
        String url = Constant.API_URL + "/tmerclub_user/p/userLevel";
        HttpUtil.put(url, userLevelDTO, UrlEnum.PLATFORM);
    }
}
