| | |
| | | */ |
| | | package vip.xiaonuo.modular.blogfriendshiplink.controller; |
| | | |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import vip.xiaonuo.core.annotion.BusinessLog; |
| | | import vip.xiaonuo.core.annotion.Permission; |
| | | import vip.xiaonuo.core.enums.LogAnnotionOpTypeEnum; |
| | |
| | | import vip.xiaonuo.core.pojo.response.SuccessResponseData; |
| | | import vip.xiaonuo.modular.blogfriendshiplink.param.BlogFriendshipLinkParam; |
| | | import vip.xiaonuo.modular.blogfriendshiplink.service.BlogFriendshipLinkService; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | |
| | | @PostMapping("/blogFriendshipLink/add") |
| | | @BusinessLog(title = "友情链接_增加", opType = LogAnnotionOpTypeEnum.ADD) |
| | | public ResponseData add(@RequestBody @Validated(BlogFriendshipLinkParam.add.class) BlogFriendshipLinkParam blogFriendshipLinkParam) { |
| | | blogFriendshipLinkService.add(blogFriendshipLinkParam); |
| | | blogFriendshipLinkService.add(blogFriendshipLinkParam); |
| | | return new SuccessResponseData(); |
| | | } |
| | | |
| | |
| | | @PostMapping("/blogFriendshipLink/delete") |
| | | @BusinessLog(title = "友情链接_删除", opType = LogAnnotionOpTypeEnum.DELETE) |
| | | public ResponseData delete(@RequestBody @Validated(BlogFriendshipLinkParam.delete.class) List<BlogFriendshipLinkParam> blogFriendshipLinkParamList) { |
| | | blogFriendshipLinkService.delete(blogFriendshipLinkParamList); |
| | | blogFriendshipLinkService.delete(blogFriendshipLinkParamList); |
| | | return new SuccessResponseData(); |
| | | } |
| | | |
| | |
| | | @PostMapping("/blogFriendshipLink/edit") |
| | | @BusinessLog(title = "友情链接_编辑", opType = LogAnnotionOpTypeEnum.EDIT) |
| | | public ResponseData edit(@RequestBody @Validated(BlogFriendshipLinkParam.edit.class) BlogFriendshipLinkParam blogFriendshipLinkParam) { |
| | | blogFriendshipLinkService.edit(blogFriendshipLinkParam); |
| | | blogFriendshipLinkService.edit(blogFriendshipLinkParam); |
| | | return new SuccessResponseData(); |
| | | } |
| | | |