package com.zanxiang.game.module.manage.controller.api;

import com.zanxiang.game.module.manage.pojo.params.UserAppletSubmitParam;
import com.zanxiang.game.module.manage.service.IUserAppletService;
import com.zanxiang.module.util.pojo.ResultVO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @author : lingfeng
 * @time : 2024-04-29
 * @description : 小程序接口
 */
@RestController
@RequestMapping("/api/applet")
@Slf4j
public class AppletServerApi {

    @Autowired
    private IUserAppletService userAppletService;

    @PostMapping(value = "/user/submit")
    public ResultVO<Map<String, String>> userAppletSubmit(@Validated @RequestBody UserAppletSubmitParam param) {
        return ResultVO.ok(userAppletService.userAppletSubmit(param));
    }
}
