公众号 视频号 商家用户管理 字典标识字段
This commit is contained in:
@@ -23,7 +23,6 @@ import org.springframework.data.domain.Pageable;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import io.swagger.annotations.*;
|
||||
@@ -46,7 +45,6 @@ public class TbShopUserController {
|
||||
@Log("导出数据")
|
||||
@ApiOperation("导出数据")
|
||||
@GetMapping(value = "/download")
|
||||
@PreAuthorize("@el.check('tbShopUser:list')")
|
||||
public void exportTbShopUser(HttpServletResponse response, TbShopUserQueryCriteria criteria) throws IOException {
|
||||
tbShopUserService.download(tbShopUserService.queryAll(criteria), response);
|
||||
}
|
||||
@@ -54,15 +52,21 @@ public class TbShopUserController {
|
||||
@GetMapping
|
||||
@Log("查询/shop/user")
|
||||
@ApiOperation("查询/shop/user")
|
||||
@PreAuthorize("@el.check('tbShopUser:list')")
|
||||
public ResponseEntity<Object> queryTbShopUser(TbShopUserQueryCriteria criteria, Pageable pageable){
|
||||
return new ResponseEntity<>(tbShopUserService.queryAll(criteria,pageable),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@GetMapping("queryAllShopUser")
|
||||
@Log("查询商家用户")
|
||||
@ApiOperation("查询商家用户")
|
||||
public ResponseEntity<Object> queryAllShopUser(TbShopUserQueryCriteria criteria, Pageable pageable){
|
||||
return new ResponseEntity<>(tbShopUserService.queryAllShopUser(criteria,pageable),HttpStatus.OK);
|
||||
}
|
||||
|
||||
|
||||
@PostMapping
|
||||
@Log("新增/shop/user")
|
||||
@ApiOperation("新增/shop/user")
|
||||
@PreAuthorize("@el.check('tbShopUser:add')")
|
||||
public ResponseEntity<Object> createTbShopUser(@Validated @RequestBody TbShopUser resources){
|
||||
return new ResponseEntity<>(tbShopUserService.create(resources),HttpStatus.CREATED);
|
||||
}
|
||||
@@ -70,7 +74,6 @@ public class TbShopUserController {
|
||||
@PutMapping
|
||||
@Log("修改/shop/user")
|
||||
@ApiOperation("修改/shop/user")
|
||||
@PreAuthorize("@el.check('tbShopUser:edit')")
|
||||
public ResponseEntity<Object> updateTbShopUser(@Validated @RequestBody TbShopUser resources){
|
||||
tbShopUserService.update(resources);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
@@ -79,7 +82,6 @@ public class TbShopUserController {
|
||||
@DeleteMapping
|
||||
@Log("删除/shop/user")
|
||||
@ApiOperation("删除/shop/user")
|
||||
@PreAuthorize("@el.check('tbShopUser:del')")
|
||||
public ResponseEntity<Object> deleteTbShopUser(@RequestBody Integer[] ids) {
|
||||
tbShopUserService.deleteAll(ids);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
|
||||
@@ -17,8 +17,8 @@ import io.swagger.annotations.*;
|
||||
**/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@Api(tags = "商户视频号管理")
|
||||
@RequestMapping("/api/tbShopVideo")
|
||||
@Api(tags = "商户视频号/公众号管理")
|
||||
@RequestMapping("/api/tbShopSource")
|
||||
public class TbShopVideoController {
|
||||
|
||||
private final TbShopVideoService tbShopVideoService;
|
||||
@@ -27,6 +27,15 @@ public class TbShopVideoController {
|
||||
@Log("查询商户视频号")
|
||||
@ApiOperation("查询商户视频号")
|
||||
public ResponseEntity<Object> queryTbShopVideo(TbShopVideoQueryCriteria criteria){
|
||||
criteria.setType(3);
|
||||
return new ResponseEntity<>(tbShopVideoService.queryAllPage(criteria), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@GetMapping("media")
|
||||
@Log("查询公众号")
|
||||
@ApiOperation("查询公众号")
|
||||
public ResponseEntity<Object> queryMediaPlatform(TbShopVideoQueryCriteria criteria){
|
||||
criteria.setType(1);
|
||||
return new ResponseEntity<>(tbShopVideoService.queryAllPage(criteria), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@@ -38,10 +47,19 @@ public class TbShopVideoController {
|
||||
return tbShopVideoService.findById(id);
|
||||
}
|
||||
|
||||
@PostMapping("media")
|
||||
@Log("新增公众号")
|
||||
@ApiOperation("新增公众号")
|
||||
public ResponseEntity<Object> createMediaPlatform(@Validated @RequestBody TbShopVideo resources){
|
||||
resources.setType(1);
|
||||
return new ResponseEntity<>(tbShopVideoService.create(resources),HttpStatus.CREATED);
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@Log("新增商户视频号")
|
||||
@ApiOperation("新增商户视频号")
|
||||
public ResponseEntity<Object> createTbShopVideo(@Validated @RequestBody TbShopVideo resources){
|
||||
resources.setType(3);
|
||||
return new ResponseEntity<>(tbShopVideoService.create(resources),HttpStatus.CREATED);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user