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.
39 lines
1.2 KiB
39 lines
1.2 KiB
package com.softegg.freetogo.SendGuideService.controller;
|
|
|
|
import com.softegg.freetogo.SendGuideService.service.SendGuideServiceService;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
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;
|
|
|
|
/**
|
|
* @description:登录服务前后端交互
|
|
* @author:wuyifan
|
|
* @date:2024/5/13 10:47
|
|
*/
|
|
@RestController
|
|
//@CrossOrigin(origins = "*")
|
|
@RequestMapping("/SendGuideService")
|
|
public class SendGuideServiceController {
|
|
|
|
@Autowired
|
|
SendGuideServiceService sendGuideServiceService;
|
|
|
|
/**
|
|
* @description: 发送需求的交互逻辑
|
|
* @param: map
|
|
* @return: java.lang.String
|
|
* @author: wuyifan
|
|
* @date: 2024/5/13 10:48
|
|
*/
|
|
@PostMapping("register")
|
|
public int SendDemand(@RequestBody Map<String, Object> map) {
|
|
return switch (sendGuideServiceService.sendnewGuideServiceAccount(map.get("city").toString(), map.get("phone").toString())){
|
|
case 1005 -> 1;//需求发送成功
|
|
default -> 0;
|
|
};
|
|
}
|
|
} |