package com.newfiber.api.pc.controller; import com.newfiber.api.core.annotation.SysLog; import com.newfiber.api.core.commons.ResultCode; import com.newfiber.api.core.commons.ResultObj; import com.newfiber.api.pc.dto.UserSiteDTO; import com.newfiber.api.pc.model.entity.UserSiteView; import com.newfiber.api.pc.service.UserSiteViewService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import java.util.List; /** * @description: TODO * @author: 张鸿志 * @date: 2021/1/12 15:21 * @version: v1.0 */ @RestController @RequestMapping("/user-site-config") @Api(value = "UserSiteViewController",tags = "用户站点配置关联控制层") public class UserSiteViewController { @Autowired private UserSiteViewService userSiteViewService; @PostMapping("/config") @ApiOperation("配置用户站点数据") @SysLog(actionType = "1",value = "配置用户站点数据") public ResultObj configUserSite(@RequestBody UserSiteDTO userSiteDTO){ userSiteViewService.configUserSite(userSiteDTO); return ResultObj.ok(); } @PostMapping("/queryList") @ApiOperation("根据用户查询自己所配置的站点") @SysLog(actionType = "4",value = "根据用户查询自己所配置的站点") public ResultObj<List<UserSiteView>> queryList(@RequestParam("userNo")String userNo){ return new ResultObj<>(ResultCode.OK,userSiteViewService.queryList(userNo)); } }