|
|
|
@ -1,12 +1,25 @@
@@ -1,12 +1,25 @@
|
|
|
|
|
package com.cloud.kicc.commonbiz.controller; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import cn.hutool.core.util.StrUtil; |
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|
|
|
|
import com.cloud.kicc.common.core.api.R; |
|
|
|
|
import com.cloud.kicc.common.core.constant.AppConstants; |
|
|
|
|
import com.cloud.kicc.commonbiz.api.entity.MapLogisticPoint; |
|
|
|
|
import com.cloud.kicc.commonbiz.api.entity.MapTask; |
|
|
|
|
import com.cloud.kicc.commonbiz.api.entity.MapTaskPreset; |
|
|
|
|
import com.cloud.kicc.commonbiz.service.IMapLogisticPointService; |
|
|
|
|
import com.cloud.kicc.commonbiz.service.IMapTaskService; |
|
|
|
|
import io.swagger.annotations.Api; |
|
|
|
|
import io.swagger.annotations.ApiOperation; |
|
|
|
|
import lombok.RequiredArgsConstructor; |
|
|
|
|
import org.springframework.web.bind.annotation.RequestMapping; |
|
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
|
|
|
|
|
|
import org.springframework.stereotype.Controller; |
|
|
|
|
import org.springframework.web.bind.annotation.RestController; |
|
|
|
|
|
|
|
|
|
import java.util.Arrays; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* <p> |
|
|
|
@ -19,7 +32,51 @@ import org.springframework.web.bind.annotation.RestController;
@@ -19,7 +32,51 @@ import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
@RestController |
|
|
|
|
@RequestMapping(AppConstants.APP_COMMON + "/mapLogisticPoint") |
|
|
|
|
@RequiredArgsConstructor |
|
|
|
|
@Api(tags = "地图物流标记点管理") |
|
|
|
|
public class MapLogisticPointController { |
|
|
|
|
|
|
|
|
|
private final IMapLogisticPointService iMapLogisticPointService; |
|
|
|
|
|
|
|
|
|
private LambdaQueryWrapper<MapLogisticPoint> getQueryWrapper(MapLogisticPoint mapLogisticPoint) { |
|
|
|
|
return new LambdaQueryWrapper<MapLogisticPoint>() |
|
|
|
|
.eq(StrUtil.isNotBlank(mapLogisticPoint.getType()), MapLogisticPoint::getType, mapLogisticPoint.getType()) |
|
|
|
|
.eq(StrUtil.isNotBlank(mapLogisticPoint.getMapLogisticId()), MapLogisticPoint::getMapLogisticId, mapLogisticPoint.getMapLogisticId()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@GetMapping("/list") |
|
|
|
|
@ApiOperation(value = "分页查询", notes = "分页查询") |
|
|
|
|
public R list(Page page, MapLogisticPoint mapLogisticPoint) { |
|
|
|
|
IPage<MapLogisticPoint> result = iMapLogisticPointService.page(page, getQueryWrapper(mapLogisticPoint)); |
|
|
|
|
return R.ok(result.getRecords(), result.getTotal()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@GetMapping("/{id:\\w+}") |
|
|
|
|
@ApiOperation(value = "根据id获取", notes = "根据id获取") |
|
|
|
|
public R getById(@PathVariable("id") String id) { |
|
|
|
|
MapLogisticPoint mapLogisticPoint = iMapLogisticPointService.getById(id); |
|
|
|
|
return R.ok(mapLogisticPoint); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@PostMapping("/save") |
|
|
|
|
@ApiOperation(value = "保存", notes = "保存") |
|
|
|
|
public R save(@RequestBody MapLogisticPoint mapLogisticPoint) { |
|
|
|
|
iMapLogisticPointService.save(mapLogisticPoint); |
|
|
|
|
return R.ok(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@PutMapping("/update") |
|
|
|
|
@ApiOperation(value = "修改", notes = "修改") |
|
|
|
|
public R update(@RequestBody MapLogisticPoint mapLogisticPoint) { |
|
|
|
|
iMapLogisticPointService.updateById(mapLogisticPoint); |
|
|
|
|
return R.ok(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@DeleteMapping("/remove/{ids:[\\w,]+}") |
|
|
|
|
@ApiOperation(value = "删除", notes = "删除") |
|
|
|
|
public R remove(@PathVariable String[] ids) { |
|
|
|
|
iMapLogisticPointService.removeByIds(Arrays.asList(ids)); |
|
|
|
|
return R.ok(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|