forked from kidgrow-microservices-platform

zhaoxiaohao
2020-04-07 e70bbf83e3231d1608dcd9c84a6129e86f64ef17
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
28
29
30
package com.kidgrow.order.controller;
 
import com.kidgrow.common.model.ResultBody;
import com.kidgrow.order.utils.JsonUtils;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
 
import java.io.IOException;
import java.util.Map;
 
/**
 * 石家庄喜高科技有限责任公司 版权所有 © Copyright 2020<br>
 *
 * @Description: <br>
 * @Project: <br>
 * @CreateDate: Created in 2020/4/4 12:50 <br>
 * @Author: <a href="4345453@kidgrow.com">liuke</a>
 */
@RestController
@RequestMapping("/importdata")
public class WeiXinImportData {
 
    @RequestMapping("/{fileName}")
    public ResultBody importPersonData(@PathVariable String fileName) throws IOException {
        Map<String,Object> wxFriendList = JsonUtils.getMap("personal/"+fileName+".json");
        System.out.println(wxFriendList.toString());
        return ResultBody.ok().data(wxFriendList);
    }
}