package com.mzl.flower.web.customer;
|
|
import com.mzl.flower.domain.CategoryConfig;
|
import com.mzl.flower.domain.CategoryConfigSync;
|
import com.mzl.flower.service.customer.CategoryConfigService;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.web.bind.annotation.*;
|
|
import java.util.List;
|
|
@RestController
|
@RequestMapping("/api/categoryConfig")
|
public class CategoryConfigController {
|
|
@Autowired
|
private CategoryConfigService categoryConfigService;
|
|
@PostMapping("/saveOrUpdate")
|
public void saveOrUpdateCategoryConfig(@RequestBody CategoryConfigSync categoryConfigSync) {
|
categoryConfigService.saveOrUpdateCategoryConfig(categoryConfigSync);
|
}
|
|
@GetMapping("/getByUserId/{userId}")
|
public List<CategoryConfig> getCategoryConfigsByUserId(@PathVariable String userId) {
|
return categoryConfigService.getCategoryConfigsByUserId(userId);
|
}
|
}
|