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.
63 lines
1.7 KiB
63 lines
1.7 KiB
package com.example.demo.controller;
|
|
|
|
import com.example.demo.domain.vo.AdminVo;
|
|
import com.example.demo.domain.vo.Result;
|
|
import com.example.demo.service.GeneralService;
|
|
import lombok.RequiredArgsConstructor;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
import java.util.List;
|
|
|
|
/**
|
|
* @program: GOLD
|
|
* @ClassName GeneralController
|
|
* @description:
|
|
* @author: huangqizhen
|
|
* @create: 2025−06-22 10:54
|
|
* @Version 1.0
|
|
**/
|
|
@RestController
|
|
@RequestMapping("/general")
|
|
@RequiredArgsConstructor
|
|
@Slf4j
|
|
@CrossOrigin
|
|
public class GeneralController {
|
|
|
|
@Autowired
|
|
private GeneralService generalService;
|
|
@PostMapping("/market")
|
|
public Result getMarket()
|
|
{
|
|
List<String> list = generalService.getMarket();
|
|
return Result.success(list);
|
|
}
|
|
//获取角色地区权限列表
|
|
@PostMapping("/roleMarkets")
|
|
public Result getRoleMarkets(@RequestBody AdminVo adminVo) throws Exception {
|
|
String account = adminVo.getAccount();
|
|
List<String> list = generalService.getRoleMarket(account);
|
|
return Result.success(list);
|
|
}
|
|
@PostMapping("/platform")
|
|
public Result getPlatform()
|
|
{
|
|
List<String> list = generalService.getPlatform();
|
|
return Result.success(list);
|
|
}
|
|
//获取商品名称
|
|
@PostMapping("/goods")
|
|
public Result getGoods()
|
|
{
|
|
List<String> list = generalService.getGoods();
|
|
return Result.success(list);
|
|
}
|
|
//获取活动名称
|
|
@PostMapping("/activity")
|
|
public Result getActivity()
|
|
{
|
|
List<String> list = generalService.getActivity();
|
|
return Result.success(list);
|
|
}
|
|
}
|