package com.iotechn.unimall.app.api.commonUser;

import com.iotechn.unimall.core.Const;
import com.iotechn.unimall.core.annotation.HttpMethod;
import com.iotechn.unimall.core.annotation.HttpOpenApi;
import com.iotechn.unimall.core.annotation.HttpParam;
import com.iotechn.unimall.core.annotation.HttpParamType;
import com.iotechn.unimall.core.annotation.param.NotNull;
import com.iotechn.unimall.core.annotation.param.TextFormat;
import com.iotechn.unimall.core.exception.ServiceException;
import com.iotechn.unimall.data.dto.UserDTO;
import com.iotechn.unimall.data.domain.CommonUserInfo;

import java.io.IOException;

/**
 * Created by rize on 2019/6/30.
 */
@HttpOpenApi(group = "commonUserApp", description = "用户服务")
public interface CommonUserService {

    @HttpMethod(description = "小程序登录")
    public CommonUserInfo commonUserLogin(
            @NotNull @HttpParam(name = "ip", type = HttpParamType.IP, description = "用户Ip") String ip,
            @NotNull @HttpParam(name = "raw", type = HttpParamType.COMMON, description = "第三方平台返回的数据") String raw) throws ServiceException, IOException;


    @HttpMethod(description = "同步信息")
    public CommonUserInfo edit(
            @NotNull @HttpParam(name = "commonUserInfo", type = HttpParamType.COMMON, description = "同步信息") CommonUserInfo commonUserInfo) ;


}
