You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
1.1 KiB

package com.example.demo.controller;
import com.example.demo.domain.vo.Gold;
import com.example.demo.domain.vo.GoldUser;
import com.example.demo.domain.vo.Result;
import com.example.demo.service.ConsumeService;
import com.example.demo.service.UserService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
/**
* @program: gold-java
* @ClassName UserController
* @description:
* @author: Double
* @create: 2025−06-25 10:25
* @Version 1.0
**/
@RestController
@RequestMapping("/user")
@RequiredArgsConstructor
@Slf4j
@CrossOrigin
public class UserController {
@Autowired
private UserService userService;
@PostMapping("/selectUser")
public Result selectUser(@RequestBody GoldUser user) {
try {
user = userService.selectUser(user.getJwcode().toString());
return Result.success(user);
} catch (Exception e) {
return Result.error("请检查输入精网号");
}
}
}