Commit 199f3dbc authored by linruibiao's avatar linruibiao

接口编写

parent 20337d30
...@@ -9,6 +9,7 @@ import com.syc.slm.slmbi.entity.BaseEntity; ...@@ -9,6 +9,7 @@ import com.syc.slm.slmbi.entity.BaseEntity;
import com.syc.slm.slmbi.entity.CurrentUser; import com.syc.slm.slmbi.entity.CurrentUser;
import com.syc.slm.slmbi.entity.InstrumentPanelGroup; import com.syc.slm.slmbi.entity.InstrumentPanelGroup;
import com.syc.slm.slmbi.service.InstrumentPanelGroupService; import com.syc.slm.slmbi.service.InstrumentPanelGroupService;
import com.syc.slm.slmbi.service.InstrumentPanelInitService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
...@@ -32,18 +33,23 @@ public class TenantController extends BaseRestController{ ...@@ -32,18 +33,23 @@ public class TenantController extends BaseRestController{
@Autowired @Autowired
private InstrumentPanelGroupService groupService; private InstrumentPanelGroupService groupService;
@Autowired
private InstrumentPanelInitService panelInitService;
@PostMapping @PostMapping
@ApiOperation("新增租户初始化分组") @ApiOperation("新增租户初始化分组")
@ApiImplicitParam(name = "appId", value = "租户id", required = true, dataTypeClass = String.class) @ApiImplicitParam(name = "appId", value = "租户id", required = true, dataTypeClass = String.class)
public R<String> initGroup(@PathVariable String appId) { public R<Object> initGroup(@PathVariable String appId ,HttpServletRequest request) {
return call(() -> { return call(() -> {
log.info("盛云平台创建租户初始化分组"); log.info("盛云平台创建租户初始化分组");
log.info("appId:"+appId); log.info("appId:"+appId);
log.info("盛云平台创建租户初始化分组"); log.info("盛云平台创建租户初始化分组");
CurrentUser currentUser = getCurrentUser(request);
InstrumentPanelGroupDTO groupDTO = new InstrumentPanelGroupDTO(); InstrumentPanelGroupDTO groupDTO = new InstrumentPanelGroupDTO();
groupDTO.setParentId(null); groupDTO.setParentId(null);
groupDTO.setName("全部分组"); groupDTO.setName("全部分组");
return groupService.saveGroup(groupDTO,appId); groupService.saveGroup(groupDTO, appId);
panelInitService.initOnePanel(appId,currentUser.getToken(),request);
}); });
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment