| | |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.core.controller.BaseController; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.common.core.domain.BaseEntity; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.common.exception.base.BaseException; |
| | | import com.ruoyi.common.utils.PageUtils; |
| | | import com.smartor.domain.SvyLibScriptTag; |
| | | import com.smartor.domain.SvyLibTemplate; |
| | | import com.smartor.domain.SvyLibTemplateReq; |
| | | import com.smartor.domain.SvyLibTemplateVO; |
| | | import com.smartor.service.ISvyLibTemplateService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | @Autowired |
| | | private ISvyLibTemplateService svyLibTemplateService; |
| | | |
| | | @ApiOperation("查询问卷列表") |
| | | @GetMapping("/list") |
| | | public TableDataInfo selectSvyLibTemplatelist(SvyLibTemplate svyLibTemplate) { |
| | | startPage(); |
| | | List<SvyLibTemplate> sviLibTemplate = svyLibTemplateService.getSviLibTemplate(svyLibTemplate); |
| | | return getDataTable(sviLibTemplate); |
| | | } |
| | | |
| | | /** |
| | | * 查询问卷列表 |
| | | */ |
| | | @ApiOperation("查询问卷列表详情") |
| | | @ApiOperation("查询问卷详情") |
| | | @PostMapping("/selectSvyLibTemplatelist") |
| | | public TableDataInfo selectSvyLibTemplatelist(@RequestBody SvyLibTemplateReq svyLibTemplateReq) { |
| | | PageUtils.startPageByPost(svyLibTemplateReq.getPageNum(), svyLibTemplateReq.getPageSize()); |
| | | List<SvyLibTemplate> list = svyLibTemplateService.selectSvyLibTemplateList(svyLibTemplateReq); |
| | | List<SvyLibTemplateVO> list = svyLibTemplateService.selectSvyLibTemplateList(svyLibTemplateReq); |
| | | |
| | | if (CollectionUtils.isNotEmpty(list)) { |
| | | //获取total |
| | |
| | | @ApiOperation("新增或修改问卷模板信息") |
| | | @PreAuthorize("@ss.hasPermi('system:script:list')") |
| | | @PostMapping("/saveOrUpdateTemplate") |
| | | public AjaxResult saveOrUpdateTemplate(@RequestBody SvyLibTemplate svyLibTemplate) { |
| | | if (ObjectUtils.isEmpty(svyLibTemplate)) { |
| | | public AjaxResult saveOrUpdateTemplate(@RequestBody SvyLibTemplateVO svyLibTemplateVO) { |
| | | if (ObjectUtils.isEmpty(svyLibTemplateVO)) { |
| | | throw new BaseException("入参为空,请检查入参"); |
| | | } |
| | | return success(svyLibTemplateService.saveOrUpdateTemplate(svyLibTemplate)); |
| | | return success(svyLibTemplateService.saveOrUpdateTemplate(svyLibTemplateVO)); |
| | | } |
| | | |
| | | /** |