| | |
| | | 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.entity.SysUser; |
| | | import com.ruoyi.common.core.text.Convert; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.ServletUtils; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.domain.ZIdea; |
| | |
| | | import com.ruoyi.service.ZIdeaService; |
| | | import com.ruoyi.service.ZIdeaShareService; |
| | | import com.ruoyi.service.ZPropertyDownloadService; |
| | | import com.ruoyi.system.service.ISysRoleService; |
| | | import com.ruoyi.system.service.ISysUserService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | |
| | | @Autowired |
| | | private ZIdeaShareService zIdeaShareService; |
| | | |
| | | @Autowired |
| | | private ISysUserService sysUserService; |
| | | |
| | | |
| | | /** |
| | |
| | | @PostMapping("/importData") |
| | | public AjaxResult importData(@RequestParam("excelImport") MultipartFile file) throws Exception |
| | | { |
| | | return zIdeaService.importExcel(file); |
| | | SysUser user = SecurityUtils.getLoginUser().getUser(); |
| | | Boolean userStatus = sysUserService.findUserStatus(user.getUserId()); |
| | | |
| | | return userStatus?AjaxResult.error("您的试用期已经结束,请付费继续使用"):zIdeaService.importExcel(file); |
| | | } |
| | | |
| | | /** |
| | |
| | | @PostMapping |
| | | public AjaxResult add(@RequestBody ZIdea zIdea) |
| | | { |
| | | return zIdeaService.mySave(zIdea); |
| | | |
| | | SysUser user = SecurityUtils.getLoginUser().getUser(); |
| | | Boolean userStatus = sysUserService.findUserStatus(user.getUserId()); |
| | | return userStatus?AjaxResult.error("您的试用期已经结束,请付费继续使用"):zIdeaService.mySave(zIdea); |
| | | } |
| | | |
| | | /** |
| | |
| | | @PutMapping |
| | | public AjaxResult edit(@RequestBody ZIdea zIdea) |
| | | { |
| | | return toAjax(zIdeaService.updateById(zIdea)); |
| | | SysUser user = SecurityUtils.getLoginUser().getUser(); |
| | | Boolean userStatus = sysUserService.findUserStatus(user.getUserId()); |
| | | return userStatus?AjaxResult.error("您的试用期已经结束,请付费继续使用"):toAjax(zIdeaService.updateById(zIdea)); |
| | | } |
| | | // |
| | | /** |
| | |
| | | if (! (zIdeaDownloadService.deleteData(ids) && zIdeaShareService.deleteByContentId(ids) ) ){ |
| | | return AjaxResult.error(); |
| | | } |
| | | return toAjax(zIdeaService.removeByIds(Arrays.asList(ids))); |
| | | SysUser user = SecurityUtils.getLoginUser().getUser(); |
| | | Boolean userStatus = sysUserService.findUserStatus(user.getUserId()); |
| | | return userStatus?AjaxResult.error("您的试用期已经结束,请付费继续使用"): toAjax(zIdeaService.removeByIds(Arrays.asList(ids))); |
| | | } |
| | | |
| | | } |