| | |
| | | import com.ruoyi.common.core.domain.entity.SysUser; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.common.annotation.AddOrgId; |
| | | import com.ruoyi.common.exception.base.BaseException; |
| | | import com.ruoyi.common.utils.PageUtils; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.smartor.domain.HeLibrary; |
| | | import com.smartor.domain.HeLibraryVO; |
| | | import com.smartor.domain.SvyLibTemplateReq; |
| | | import com.smartor.domain.SvyLibTemplateVO; |
| | | import com.smartor.service.IHeLibraryService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.commons.collections4.CollectionUtils; |
| | | import org.apache.commons.lang3.ObjectUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | |
| | | */ |
| | | @ApiOperation("查询宣教资料库列表") |
| | | //@PreAuthorize("@ss.hasPermi('system:library:list')") |
| | | @PostMapping("/list") |
| | | @AddOrgId(field = "orgid", paramIndex = 0, campusField = "campusid") |
| | | @PostMapping("list") |
| | | public TableDataInfo list(@RequestBody HeLibrary heLibrary) { |
| | | PageUtils.startPageByPost(heLibrary.getPageNum(), heLibrary.getPageSize()); |
| | | List<HeLibrary> list = heLibraryService.selectHeLibraryList(heLibrary); |
| | |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('system:library:add')") |
| | | @Log(title = "宣教资料库", businessType = BusinessType.INSERT) |
| | | @PostMapping("/add") |
| | | @AddOrgId(field = "orgid", paramIndex = 0, campusField = "campusid") |
| | | @PostMapping("/add") |
| | | public AjaxResult add(@RequestBody HeLibrary heLibrary) { |
| | | SysUser user = getLoginUser().getUser(); |
| | | heLibrary.setOrgid(user.getOrgid()); |
| | |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('system:library:edit')") |
| | | @Log(title = "宣教资料库", businessType = BusinessType.UPDATE) |
| | | @AddOrgId(field = "orgid", paramIndex = 0, campusField = "campusid") |
| | | @PostMapping("/edit") |
| | | public AjaxResult edit(@RequestBody HeLibrary heLibrary) { |
| | | return toAjax(heLibraryService.updateHeLibrary(heLibrary)); |
| | |
| | | */ |
| | | @ApiOperation("查询模板详情根据条件") |
| | | @PostMapping("/selectInfoByCondition") |
| | | @AddOrgId(field = "orgid", paramIndex = 0, campusField = "campusid") |
| | | public AjaxResult selectInfoByCondition(@RequestBody HeLibrary heLibrary) { |
| | | if (ObjectUtils.isEmpty(heLibrary)) { |
| | | throw new BaseException("查询模板详情入参为空,请检查入参"); |
| | |
| | | */ |
| | | @ApiOperation("查询模板详情根据条件(小程序专用)") |
| | | @PostMapping("/selectInfoByConditionXCH") |
| | | @AddOrgId(field = "orgid", paramIndex = 0, campusField = "campusid") |
| | | public AjaxResult selectInfoByConditionXCH(@RequestBody HeLibrary heLibrary) { |
| | | if (ObjectUtils.isEmpty(heLibrary)) { |
| | | throw new BaseException("查询模板详情入参为空,请检查入参"); |