| | |
| | | private final StoreService storeService; |
| | | |
| | | @GetMapping(value = "/page") |
| | | public R<?> getStoresByPage(@RequestBody StoreQueryCriteria criteria) { |
| | | public R<?> getStoresByPage(StoreQueryCriteria criteria) { |
| | | return R.success(storeService.queryByPage(criteria)); |
| | | } |
| | | |
| | | @GetMapping(value = "/list") |
| | | public R<?> getStores(@RequestBody StoreQueryCriteria criteria) { |
| | | public R<?> getStores(StoreQueryCriteria criteria) { |
| | | return R.success(storeService.queryAll(criteria)); |
| | | } |
| | | |
| | |
| | | Store store = new Store(); |
| | | store.setStoreId(StoreIdGenerator.getId()); |
| | | store.setMerchantId(SecurityUtils.getCurrentUserId()); |
| | | store.setCreateBy(SecurityUtils.getCurrentUserId()); |
| | | store.setCreateTime(ZonedDateTime.now()); |
| | | storeService.save(store); |
| | | return R.success(); |
| | | } |