linwe
2024-05-29 c10d6358b9f014375a13821465bc978d0c0da22e
src/main/java/org/springblade/modules/task/controller/ECallEventController.java
@@ -7,9 +7,12 @@
import lombok.AllArgsConstructor;
import javax.validation.Valid;
import org.springblade.core.log.annotation.ApiLog;
import org.springblade.core.log.logger.BladeLogger;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.jackson.JsonUtil;
import org.springblade.core.tool.utils.Func;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.core.metadata.IPage;
@@ -31,6 +34,7 @@
public class ECallEventController {
   private final IECallEventService eCallEventService;
   private final BladeLogger bladeLogger;
   /**
    * e呼即办表 详情
@@ -38,7 +42,9 @@
   @GetMapping("/detail")
   @ApiOperationSupport(order = 1)
   @ApiOperation(value = "详情", notes = "传入eCallEvent")
   @ApiLog("e呼即办表 详情")
   public R<ECallEventVO> detail(ECallEventEntity eCallEvent) {
      bladeLogger.info("e呼即办表 详情", JsonUtil.toJson(eCallEvent));
      ECallEventEntity detail = eCallEventService.getOne(Condition.getQueryWrapper(eCallEvent));
      return R.data(ECallEventWrapper.build().entityVO(detail));
   }
@@ -58,8 +64,10 @@
    */
   @GetMapping("/page")
   @ApiOperationSupport(order = 3)
   @ApiLog("e呼即办表 自定义分页")
   @ApiOperation(value = "分页", notes = "传入eCallEvent")
   public R<IPage<ECallEventVO>> page(ECallEventVO eCallEvent, Query query) {
      bladeLogger.info("e呼即办表 自定义分页", JsonUtil.toJson(eCallEvent));
      IPage<ECallEventVO> pages = eCallEventService.selectECallEventPage(Condition.getPage(query), eCallEvent);
      return R.data(pages);
   }
@@ -69,8 +77,10 @@
    */
   @PostMapping("/save")
   @ApiOperationSupport(order = 4)
   @ApiLog("e呼即办表 新增")
   @ApiOperation(value = "新增", notes = "传入eCallEvent")
   public R save(@Valid @RequestBody ECallEventEntity eCallEvent) {
      bladeLogger.info("e呼即办表 新增", JsonUtil.toJson(eCallEvent));
      return R.status(eCallEventService.save(eCallEvent));
   }
@@ -78,9 +88,11 @@
    * e呼即办表 修改
    */
   @PostMapping("/update")
   @ApiLog("e呼即办表 修改")
   @ApiOperationSupport(order = 5)
   @ApiOperation(value = "修改", notes = "传入eCallEvent")
   public R update(@Valid @RequestBody ECallEventEntity eCallEvent) {
      bladeLogger.info("e呼即办表 修改", JsonUtil.toJson(eCallEvent));
      return R.status(eCallEventService.updateById(eCallEvent));
   }
@@ -98,11 +110,32 @@
    * e呼即办表 删除
    */
   @PostMapping("/remove")
   @ApiLog("e呼即办表 删除")
   @ApiOperationSupport(order = 7)
   @ApiOperation(value = "逻辑删除", notes = "传入ids")
   public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
      bladeLogger.info("e呼即办表 删除", JsonUtil.toJson(ids));
      return R.status(eCallEventService.removeByIds(Func.toLongList(ids)));
   }
   /**
    * e呼即办数据处理
    */
   @GetMapping("/dataHandle")
   public R dataHandle() {
      return R.data(eCallEventService.dataHandle());
   }
   /**
    * e呼即办数据批量分享到圈子
    * @param type
    * @return
    */
   @GetMapping("/batchShareCircle")
   public R batchShareCircle(Integer type) {
      return R.status(eCallEventService.batchShareCircle(type));
   }
}