grs
yjxx 2 weeks ago
parent d3382cda09
commit 8a149c54b6

@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import jakarta.annotation.Resource;
import jakarta.validation.constraints.NotBlank;
import jty.expressdistributionsystem.DTO.AddresseeDTO;
import jty.expressdistributionsystem.DTO.GoodsDTO;
import jty.expressdistributionsystem.DTO.PickUpExpressDTO;
@ -242,9 +243,12 @@ public class UserController {
return new Result<>(200, "代取成功", "");
}
// 用户查询快递
// 用户查询快递(完成)
@GetMapping("/query")
public Result<Goods> queryGoods(@RequestParam Long queryCode, @RequestParam Long queryId) {
public Result<Goods> queryGoods(@RequestParam String queryCode, @RequestParam Long queryId) {
if (queryCode.isEmpty()) {
return new Result<>(400, "查询失败", null);
}
Long id = GetIdUtil.getId();
LambdaQueryWrapper<Goods> goodsLambdaQueryWrapper = new LambdaQueryWrapper<>();
if (Objects.equals(id, queryId)) {
@ -262,4 +266,20 @@ public class UserController {
}
}
}
// 用户查询用户信息(完成)
@GetMapping("/queryInfo")
public Result<String> queryInfo(@RequestParam Long otherId) {
User user = userService.getById(otherId);
return new Result<>(200, "", user.getUserName());
}
// 用户获取单个快递历史记录(完成)
@GetMapping("/singleHistory")
public Result<Records> singleHistory(@RequestParam String goodsId) {
LambdaQueryWrapper<Records> recordsLambdaQueryWrapper = new LambdaQueryWrapper<>();
recordsLambdaQueryWrapper.eq(Records::getGoodsId, goodsId);
Records records = recordsService.getOne(recordsLambdaQueryWrapper);
return new Result<>(200, "", records);
}
}

Loading…
Cancel
Save