|
@@ -8,7 +8,7 @@ import com.sqx.modules.address.dto.InsideAddressDTO;
|
|
|
import com.sqx.modules.address.query.InsideAddressQuery;
|
|
import com.sqx.modules.address.query.InsideAddressQuery;
|
|
|
import com.sqx.modules.address.service.InsideAddressService;
|
|
import com.sqx.modules.address.service.InsideAddressService;
|
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.Api;
|
|
|
-import io.swagger.annotations.ApiModelProperty;
|
|
|
|
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
import lombok.RequiredArgsConstructor;
|
|
|
import org.springframework.web.bind.annotation.DeleteMapping;
|
|
import org.springframework.web.bind.annotation.DeleteMapping;
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
@@ -31,21 +31,21 @@ public class AdminInsideAddressController {
|
|
|
private final InsideAddressService insideAddressService;
|
|
private final InsideAddressService insideAddressService;
|
|
|
|
|
|
|
|
@GetMapping("pages")
|
|
@GetMapping("pages")
|
|
|
- @ApiModelProperty(name = "分页查询内部地址列表")
|
|
|
|
|
|
|
+ @ApiOperation("分页查询内部地址列表")
|
|
|
public Result pages(@Valid InsideAddressQuery query) {
|
|
public Result pages(@Valid InsideAddressQuery query) {
|
|
|
PageUtils pageUtils = insideAddressService.pages(query);
|
|
PageUtils pageUtils = insideAddressService.pages(query);
|
|
|
return Result.success().put("data", pageUtils);
|
|
return Result.success().put("data", pageUtils);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@PostMapping
|
|
@PostMapping
|
|
|
- @ApiModelProperty(name = "新增内部地址")
|
|
|
|
|
|
|
+ @ApiOperation("新增内部地址")
|
|
|
public Result add(@Valid InsideAddressDTO insideAddressDTO) {
|
|
public Result add(@Valid InsideAddressDTO insideAddressDTO) {
|
|
|
insideAddressService.addInsideAddress(insideAddressDTO);
|
|
insideAddressService.addInsideAddress(insideAddressDTO);
|
|
|
return Result.success();
|
|
return Result.success();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@PutMapping
|
|
@PutMapping
|
|
|
- @ApiModelProperty(name = "更新内部地址")
|
|
|
|
|
|
|
+ @ApiOperation("更新内部地址")
|
|
|
public Result update(@Valid InsideAddressDTO insideAddressDTO) {
|
|
public Result update(@Valid InsideAddressDTO insideAddressDTO) {
|
|
|
if (ObjectUtil.isNull(insideAddressDTO.getId())) {
|
|
if (ObjectUtil.isNull(insideAddressDTO.getId())) {
|
|
|
throw new SqxException("id不能为空");
|
|
throw new SqxException("id不能为空");
|
|
@@ -55,7 +55,7 @@ public class AdminInsideAddressController {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@DeleteMapping
|
|
@DeleteMapping
|
|
|
- @ApiModelProperty(name = "删除内部地址")
|
|
|
|
|
|
|
+ @ApiOperation("删除内部地址")
|
|
|
public Result delete(@RequestBody List<Long> ids) {
|
|
public Result delete(@RequestBody List<Long> ids) {
|
|
|
insideAddressService.deleteByIds(ids);
|
|
insideAddressService.deleteByIds(ids);
|
|
|
return Result.success();
|
|
return Result.success();
|