package com.chushang.system.service;

import com.chushang.common.core.exception.ResultException;
import com.chushang.common.core.web.Result;
import com.chushang.system.entity.bo.LoginBody;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

/**
 * @auther: zhao
 * @date: 2024/6/12 17:26
 */
@Slf4j
@Service
public class TaskServiceTest {

    public Result<String> test(String code, LoginBody loginBody)
    {

        log.info("code {}", code);
        log.info("loginBody {}", loginBody);
        return Result.ok("test");
    }

    public Result<String> testError(String code, LoginBody loginBody)
    {
        log.info("code {}", code);
        log.info("loginBody {}", loginBody);

        return Result.failed("test", "test");
    }

    public void testError2(String code, LoginBody loginBody)
    {

        log.info("code {}", code);
        log.info("loginBody {}", loginBody);
        throw new ResultException("error");
    }


}
