package com.ytpm.lemonios.service;

import com.ytpm.agent.model.YtDitch;
import com.ytpm.app.enums.LoginType;
import com.ytpm.app.model.YtDyzUser;
import com.ytpm.app.param.IosLoginParam;
import com.ytpm.app.param.WxLoginParam;
import com.ytpm.app.view.IosUserInfo;
import com.ytpm.app.view.WxLoginResult;
import com.ytpm.app.view.WxUserInfo;
import com.ytpm.general.Result;

public interface AppUserService {
    /**
     * openid查询用户信息
     */
    YtDyzUser selectByOpenid(String openid, Long ditchId);

    /**
     * 子事务处理用户crud
     */
    YtDyzUser crudForNewTrans(WxLoginParam param, WxUserInfo wxUserInfo, WxLoginResult loginResult);

    /**
     * 子事务处理用户crud
     */
    YtDyzUser crudForNewTransIos(IosLoginParam param, IosUserInfo userInfo, LoginType loginType);

    Result<?> addDefaultConfig(YtDitch param);

    /**
     * 新增体力
     */
    void addPower(String userId);
}
