package com.bizzan.bitrade.controller.authno;

import com.bizzan.bitrade.entity.Member;
import com.bizzan.bitrade.service.ExperienceGiftRecordService;
import com.bizzan.bitrade.service.MemberService;
import com.bizzan.bitrade.util.MessageResult;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.math.BigDecimal;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;

/**
 * 无需任何验证的测试接口，仅用于健康检查或连通性测试
 */
@RestController
@RequestMapping("noauth/test")
@Slf4j
public class TestController {

    @Autowired
    private MemberService memberService;

    @Autowired
    private ExperienceGiftRecordService experienceGiftRecordService;

    @GetMapping("ping")
    public MessageResult ping() {
        log.info("测试接口正常");
        Map<String, Object> data = new HashMap<>();
        data.put("status", "ok");
        data.put("timestamp", System.currentTimeMillis());
        return MessageResult.success("pong", data);
    }

}
