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.UserRightsDTO;

/**
 * @author lpj
 */
public class UserRightsApi {
    /**
     * 新增用户权益
     */
    public static Long save(UserRightsDTO userRightsDTO) {
        String url = Constant.API_URL + "/tmerclub_user/p/userRights";
        return HttpUtil.post(url, userRightsDTO, UrlEnum.PLATFORM, Long.class);
    }

    /**
     * 删除用户权益
     */
    public static void delete(Long rightsId) {
        String url = Constant.API_URL + "/tmerclub_user/p/userRights?rightsId=" + rightsId;
        HttpUtil.delete(url, UrlEnum.PLATFORM);
    }
}
