TblRelationController.java
1.16 KB
package com.yoho.search.consumer.restapi;
import com.yoho.search.consumer.service.logicService.tbl.TblSortRelationLogicService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import java.util.HashMap;
import java.util.Map;
/**
* Created by wangnan on 2017/3/7.
*/
@RestController
public class TblRelationController {
@Autowired
private TblSortRelationLogicService tblSortRelationLogicService;
@RequestMapping(value = "/tblSortRelation")
public Map<String, Object> loadSortRelationData() {
Map<String, Object> result = new HashMap<String, Object>();
try {
tblSortRelationLogicService.loadSortRelationData();
result.put("code", 200);
result.put("message", "success");
} catch (Exception e) {
e.printStackTrace();
result.put("code", 400);
result.put("message", e.getMessage());
}
return result;
}
}