规范化类的名称
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
package com.rj.controller;
|
||||
|
||||
import com.rj.entity.FanManagement;
|
||||
import com.rj.service.IFanManagementService;
|
||||
import com.rj.entity.LbFanManagement;
|
||||
import com.rj.service.ILbFanManagementService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
@@ -12,39 +12,40 @@ import org.springframework.web.bind.annotation.*;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 粉丝管理(fan_management)前端控制器
|
||||
* 粉丝管理(lb_fan_management)前端控制器
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/api/fanManagement")
|
||||
@Tag(name = "粉丝管理", description = "fan_management 增删改查与分页")
|
||||
public class FanManagementController {
|
||||
@RequestMapping("/api/lbFanManagement")
|
||||
@Tag(name = "粉丝管理", description = "lb_fan_management 增删改查与分页")
|
||||
public class LbFanManagementController {
|
||||
|
||||
@Autowired
|
||||
private IFanManagementService fanManagementService;
|
||||
private ILbFanManagementService lbFanManagementService;
|
||||
|
||||
@PostMapping("/add")
|
||||
@Operation(summary = "新增粉丝")
|
||||
public ResponseEntity<Map<String, Object>> add(
|
||||
@Parameter(description = "粉丝实体(id 必填)", required = true)
|
||||
@RequestBody FanManagement entity) {
|
||||
Map<String, Object> result = fanManagementService.add(entity);
|
||||
@Parameter(description = "粉丝实体(tenant_id、id 必填;id_tenant_id 可省略,自动生成 id_tenantId)", required = true)
|
||||
@RequestBody LbFanManagement entity) {
|
||||
Map<String, Object> result = lbFanManagementService.add(entity);
|
||||
return toResponse(result);
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "修改粉丝")
|
||||
public ResponseEntity<Map<String, Object>> update(
|
||||
@Parameter(description = "粉丝实体(id 必填)", required = true)
|
||||
@RequestBody FanManagement entity) {
|
||||
Map<String, Object> result = fanManagementService.update(entity);
|
||||
@Parameter(description = "粉丝实体(tenant_id、id 必填;也可用 id_tenant_id 定位)", required = true)
|
||||
@RequestBody LbFanManagement entity) {
|
||||
Map<String, Object> result = lbFanManagementService.update(entity);
|
||||
return toResponse(result);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete/{id}")
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除粉丝")
|
||||
public ResponseEntity<Map<String, Object>> delete(
|
||||
@Parameter(description = "粉丝ID", required = true) @PathVariable Long id) {
|
||||
Map<String, Object> result = fanManagementService.deleteById(id);
|
||||
@Parameter(description = "唯一ID(id_tenant_id,格式 id_tenantId)", required = true)
|
||||
@RequestParam String idTenantId) {
|
||||
Map<String, Object> result = lbFanManagementService.deleteByIdTenantId(idTenantId);
|
||||
return toResponse(result);
|
||||
}
|
||||
|
||||
@@ -61,7 +62,7 @@ public class FanManagementController {
|
||||
@RequestParam(required = false) String createdAtStart,
|
||||
@Parameter(description = "创建时间止,格式 yyyy-MM-dd HH:mm:ss")
|
||||
@RequestParam(required = false) String createdAtEnd) {
|
||||
Map<String, Object> result = fanManagementService.pageQuery(
|
||||
Map<String, Object> result = lbFanManagementService.pageQuery(
|
||||
current, size, nickname, mobile, shareNumMin, shareNumMax,
|
||||
createdAtStart, createdAtEnd);
|
||||
Boolean success = (Boolean) result.get("success");
|
||||
Reference in New Issue
Block a user