|
@@ -1,16 +1,18 @@
|
|
|
package com.fjhx.controller.logistics;
|
|
|
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
-import org.springblade.core.tool.api.R;
|
|
|
+import com.fjhx.constants.StatusConstant;
|
|
|
import com.fjhx.entity.logistics.LogisticsInfo;
|
|
|
import com.fjhx.params.logistics.LogisticsInfoVo;
|
|
|
import com.fjhx.service.logistics.LogisticsInfoService;
|
|
|
+import org.springblade.core.tool.api.R;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
+import java.util.List;
|
|
|
import java.util.Map;
|
|
|
|
|
|
/**
|
|
@@ -29,28 +31,34 @@ public class LogisticsInfoController {
|
|
|
private LogisticsInfoService logisticsInfoService;
|
|
|
|
|
|
@PostMapping("/page")
|
|
|
- public R page(@RequestBody Map<String, Object> condition){
|
|
|
+ public R page(@RequestBody Map<String, Object> condition) {
|
|
|
Page<LogisticsInfo> result = logisticsInfoService.getPage(condition);
|
|
|
return R.success(result);
|
|
|
}
|
|
|
|
|
|
@PostMapping("/add")
|
|
|
- public R add(@RequestBody LogisticsInfoVo logisticsInfoVo){
|
|
|
+ public R add(@RequestBody LogisticsInfoVo logisticsInfoVo) {
|
|
|
logisticsInfoService.add(logisticsInfoVo);
|
|
|
return R.success();
|
|
|
}
|
|
|
|
|
|
@PostMapping("/edit")
|
|
|
- public R edit(@RequestBody LogisticsInfoVo logisticsInfoVo){
|
|
|
+ public R edit(@RequestBody LogisticsInfoVo logisticsInfoVo) {
|
|
|
logisticsInfoService.edit(logisticsInfoVo);
|
|
|
return R.success();
|
|
|
}
|
|
|
|
|
|
@PostMapping("/delete")
|
|
|
- public R delete(@RequestBody LogisticsInfoVo logisticsInfoVo){
|
|
|
+ public R delete(@RequestBody LogisticsInfoVo logisticsInfoVo) {
|
|
|
logisticsInfoService.delete(logisticsInfoVo);
|
|
|
return R.success();
|
|
|
}
|
|
|
|
|
|
+ @PostMapping("/list")
|
|
|
+ public R list() {
|
|
|
+ List<LogisticsInfo> list = logisticsInfoService.list(q -> q.eq(LogisticsInfo::getStatus, StatusConstant.NO));
|
|
|
+ return R.success(list);
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|