|
@@ -8,6 +8,10 @@ import com.sooka.common.core.domain.AjaxResult;
|
|
|
import com.sooka.common.core.page.TableDataInfo;
|
|
|
import com.sooka.common.enums.BusinessType;
|
|
|
import com.sooka.common.utils.poi.ExcelUtil;
|
|
|
+import com.sooka.system.domain.TUParamsbusiness;
|
|
|
+import com.sooka.system.domain.TUParamspublic;
|
|
|
+import com.sooka.system.service.ITUParamsbusinessService;
|
|
|
+import com.sooka.system.service.ITUParamspublicService;
|
|
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Controller;
|
|
@@ -20,6 +24,8 @@ import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
import com.sooka.system.domain.TUInterfaceinfo;
|
|
|
import com.sooka.system.service.ITUInterfaceinfoService;
|
|
|
|
|
|
+import javax.annotation.Resource;
|
|
|
+
|
|
|
|
|
|
/**
|
|
|
* 【请填写功能名称】Controller
|
|
@@ -29,17 +35,19 @@ import com.sooka.system.service.ITUInterfaceinfoService;
|
|
|
*/
|
|
|
@Controller
|
|
|
@RequestMapping("/system/interfaceinfo")
|
|
|
-public class TUInterfaceinfoController extends BaseController
|
|
|
-{
|
|
|
+public class TUInterfaceinfoController extends BaseController {
|
|
|
private String prefix = "system/interfaceinfo";
|
|
|
|
|
|
@Autowired
|
|
|
private ITUInterfaceinfoService tUInterfaceinfoService;
|
|
|
+ @Resource
|
|
|
+ private ITUParamsbusinessService ituParamsbusinessService;
|
|
|
+ @Resource
|
|
|
+ private ITUParamspublicService ituParamspublicService;
|
|
|
|
|
|
@RequiresPermissions("system:interfaceinfo:view")
|
|
|
@GetMapping()
|
|
|
- public String interfaceinfo()
|
|
|
- {
|
|
|
+ public String interfaceinfo() {
|
|
|
return prefix + "/interfaceinfo";
|
|
|
}
|
|
|
|
|
@@ -49,8 +57,7 @@ public class TUInterfaceinfoController extends BaseController
|
|
|
@RequiresPermissions("system:interfaceinfo:list")
|
|
|
@PostMapping("/list")
|
|
|
@ResponseBody
|
|
|
- public TableDataInfo list(TUInterfaceinfo tUInterfaceinfo)
|
|
|
- {
|
|
|
+ public TableDataInfo list(TUInterfaceinfo tUInterfaceinfo) {
|
|
|
startPage();
|
|
|
List<TUInterfaceinfo> list = tUInterfaceinfoService.selectTUInterfaceinfoList(tUInterfaceinfo);
|
|
|
return getDataTable(list);
|
|
@@ -63,8 +70,7 @@ public class TUInterfaceinfoController extends BaseController
|
|
|
@Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT)
|
|
|
@PostMapping("/export")
|
|
|
@ResponseBody
|
|
|
- public AjaxResult export(TUInterfaceinfo tUInterfaceinfo)
|
|
|
- {
|
|
|
+ public AjaxResult export(TUInterfaceinfo tUInterfaceinfo) {
|
|
|
List<TUInterfaceinfo> list = tUInterfaceinfoService.selectTUInterfaceinfoList(tUInterfaceinfo);
|
|
|
ExcelUtil<TUInterfaceinfo> util = new ExcelUtil<TUInterfaceinfo>(TUInterfaceinfo.class);
|
|
|
return util.exportExcel(list, "interfaceinfo");
|
|
@@ -74,8 +80,7 @@ public class TUInterfaceinfoController extends BaseController
|
|
|
* 新增【请填写功能名称】
|
|
|
*/
|
|
|
@GetMapping("/add")
|
|
|
- public String add()
|
|
|
- {
|
|
|
+ public String add() {
|
|
|
return prefix + "/add";
|
|
|
}
|
|
|
|
|
@@ -86,8 +91,7 @@ public class TUInterfaceinfoController extends BaseController
|
|
|
@Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT)
|
|
|
@PostMapping("/add")
|
|
|
@ResponseBody
|
|
|
- public AjaxResult addSave(TUInterfaceinfo tUInterfaceinfo)
|
|
|
- {
|
|
|
+ public AjaxResult addSave(TUInterfaceinfo tUInterfaceinfo) {
|
|
|
return toAjax(tUInterfaceinfoService.insertTUInterfaceinfo(tUInterfaceinfo));
|
|
|
}
|
|
|
|
|
@@ -95,8 +99,7 @@ public class TUInterfaceinfoController extends BaseController
|
|
|
* 修改【请填写功能名称】
|
|
|
*/
|
|
|
@GetMapping("/edit/{id}")
|
|
|
- public String edit(@PathVariable("id") String id, ModelMap mmap)
|
|
|
- {
|
|
|
+ public String edit(@PathVariable("id") String id, ModelMap mmap) {
|
|
|
TUInterfaceinfo tUInterfaceinfo = tUInterfaceinfoService.selectTUInterfaceinfoById(id);
|
|
|
mmap.put("tUInterfaceinfo", tUInterfaceinfo);
|
|
|
return prefix + "/edit";
|
|
@@ -109,8 +112,7 @@ public class TUInterfaceinfoController extends BaseController
|
|
|
@Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE)
|
|
|
@PostMapping("/edit")
|
|
|
@ResponseBody
|
|
|
- public AjaxResult editSave(TUInterfaceinfo tUInterfaceinfo)
|
|
|
- {
|
|
|
+ public AjaxResult editSave(TUInterfaceinfo tUInterfaceinfo) {
|
|
|
return toAjax(tUInterfaceinfoService.updateTUInterfaceinfo(tUInterfaceinfo));
|
|
|
}
|
|
|
|
|
@@ -119,18 +121,34 @@ public class TUInterfaceinfoController extends BaseController
|
|
|
*/
|
|
|
@RequiresPermissions("system:interfaceinfo:remove")
|
|
|
@Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE)
|
|
|
- @PostMapping( "/remove")
|
|
|
+ @PostMapping("/remove")
|
|
|
@ResponseBody
|
|
|
- public AjaxResult remove(String ids)
|
|
|
- {
|
|
|
+ public AjaxResult remove(String ids) {
|
|
|
return toAjax(tUInterfaceinfoService.deleteTUInterfaceinfoByIds(ids));
|
|
|
}
|
|
|
|
|
|
@GetMapping("/settingParams/{id}")
|
|
|
- public String repair(@PathVariable("id") String id, ModelMap mmap)
|
|
|
- {
|
|
|
+ public String settingParams(@PathVariable("id") String id, ModelMap mmap) {
|
|
|
mmap.put("interfaceinfo_id", id);
|
|
|
- return prefix + "/index";
|
|
|
+ return "system/paramsbusiness/paramsbusiness";
|
|
|
+ }
|
|
|
+
|
|
|
+ @GetMapping("/execInterface/{id}")
|
|
|
+ public String execInterface(@PathVariable("id") String id, ModelMap mmap) {
|
|
|
+ mmap.put("interfaceinfo_id", id);
|
|
|
+ //按接口id查询接口基本信息
|
|
|
+ TUInterfaceinfo tuInterfaceinfo = tUInterfaceinfoService.selectTUInterfaceinfoById(id);
|
|
|
+ //按接口id查询公共参数
|
|
|
+ List params_public = ituParamspublicService.selectTUParamspublicList(new TUParamspublic());
|
|
|
+ //按接口id查询业务参数
|
|
|
+ TUParamsbusiness tuParamsbusiness = new TUParamsbusiness();
|
|
|
+ tuParamsbusiness.setInterfaceinfoId(id);
|
|
|
+ List params_business = ituParamsbusinessService.selectTUParamsbusinessList(tuParamsbusiness);
|
|
|
+
|
|
|
+ mmap.put("tuInterfaceinfo",tuInterfaceinfo);
|
|
|
+ mmap.put("params_public_list",params_public);
|
|
|
+ mmap.put("params_business_list",params_business);
|
|
|
+ return "system/interfaceinfo/execInterface";
|
|
|
}
|
|
|
|
|
|
}
|