zhujie
9 天以前 19428a49b4c07b14097615d48a7a72dbf941c4e7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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);
    }
}