fix: 修复门店控制器
This commit is contained in:
parent
4c95bf585f
commit
f9b5a7abb3
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,2 +1,4 @@
|
||||
target/
|
||||
uploads/
|
||||
# 本地密钥,勿提交;用 application-example.yml 复制
|
||||
src/main/resources/application.yml
|
||||
|
||||
@ -42,12 +42,6 @@ public class StoreController {
|
||||
m.put("longitude", s.getLongitude());
|
||||
m.put("phone", s.getPhone());
|
||||
m.put("logo", s.getLogo());
|
||||
if (s.getBookingDayStart() != null) {
|
||||
m.put("bookingDayStart", s.getBookingDayStart().toString());
|
||||
}
|
||||
if (s.getBookingLastSlotStart() != null) {
|
||||
m.put("bookingLastSlotStart", s.getBookingLastSlotStart().toString());
|
||||
}
|
||||
return m;
|
||||
}).collect(Collectors.toList());
|
||||
return Map.of("code", 200, "data", rows);
|
||||
@ -69,7 +63,6 @@ public class StoreController {
|
||||
|
||||
@PutMapping("/update")
|
||||
public Map<String, Object> update(@RequestBody Store store) {
|
||||
try {
|
||||
Store updated = storeService.update(store);
|
||||
if (updated == null) {
|
||||
return Map.of("code", 404, "message", "店铺不存在");
|
||||
@ -79,9 +72,6 @@ public class StoreController {
|
||||
result.put("message", "更新成功");
|
||||
result.put("data", updated);
|
||||
return result;
|
||||
} catch (IllegalArgumentException e) {
|
||||
return Map.of("code", 400, "message", e.getMessage() != null ? e.getMessage() : "参数错误");
|
||||
}
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
|
||||
Loading…
Reference in New Issue
Block a user