1
zj
2025-08-19 0b10f87268bd511c7d8dddad30060abefa49aab2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package com.ruoyi.im;
 
import com.ruoyi.common.core.domain.R;
import com.ruoyi.im.comm.Result;
import com.ruoyi.im.service.ImApiServcie;
import com.ruoyi.im.dto.RegisterDto;
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;
 
@RestController
@RequestMapping("/im/api")
@Slf4j
public class ImApiController {
 
    @Autowired
    private ImApiServcie imApiServcie;
 
    /**
     * 获取参数配置列表
     */
    @PostMapping("/register")
    public Result register(@Validated RegisterDto dto){
        try {
            return imApiServcie.register(dto);
        }catch (Exception e){
            log.error("注册报错:",e);
            return Result.error("注册失败,请稍后再试!");
        }
    }
}