package com.red.circle.other.app.service.user.user;

import com.red.circle.framework.core.dto.CommonCommand;
import com.red.circle.other.app.command.user.UploadLanguageCmdExe;
import com.red.circle.other.app.command.user.query.UserExpandGetOrCreateQryExe;
import com.red.circle.other.app.dto.clientobject.user.user.UserExpandProfileCO;
import com.red.circle.other.app.dto.cmd.user.user.LanguageUploadCmd;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

/**
 * @author pengliang on 2023/5/31
 */
@Service
@RequiredArgsConstructor
public class UserExpandServiceImpl implements UserExpandService {

  private final UploadLanguageCmdExe uploadLanguageCmdExe;
  private final UserExpandGetOrCreateQryExe userExpandGetOrCreateQryExe;

  @Override
  public void uploadLanguage(LanguageUploadCmd cmd) {
    uploadLanguageCmdExe.execute(cmd);
  }

  @Override
  public UserExpandProfileCO getUserExpand(CommonCommand cmd) {
    return userExpandGetOrCreateQryExe.execute(cmd);
  }

}
