@ -31,8 +31,7 @@ import org.springframework.web.multipart.MultipartFile;
* /
* /
@RestController
@RestController
@RequestMapping ( " /om/application " )
@RequestMapping ( " /om/application " )
public class OmTeamApplicationController extends BaseController
public class OmTeamApplicationController extends BaseController {
{
@Autowired
@Autowired
private IOmTeamApplicationService omTeamApplicationService ;
private IOmTeamApplicationService omTeamApplicationService ;
@ -41,13 +40,12 @@ public class OmTeamApplicationController extends BaseController
* /
* /
/ / @PreAuthorize ( " @ss.hasPermi('om:application:list') " )
/ / @PreAuthorize ( " @ss.hasPermi('om:application:list') " )
@GetMapping ( " /listByOm " )
@GetMapping ( " /listByOm " )
public TableDataInfo listByOm ( OmTeamApplication omTeamApplication )
public TableDataInfo listByOm ( OmTeamApplication omTeamApplication ) {
{
startPage ( ) ;
startPage ( ) ;
if ( StringUtils . isEmpty ( omTeamApplication . getContacts ( ) ) ) {
if ( StringUtils . isEmpty ( omTeamApplication . getContacts ( ) ) ) {
omTeamApplication . setContacts ( IdUtils . fastSimpleUUID ( ) ) ;
omTeamApplication . setContacts ( IdUtils . fastSimpleUUID ( ) ) ;
}
}
if ( StringUtils . isEmpty ( omTeamApplication . getTelephone ( ) ) ) {
if ( StringUtils . isEmpty ( omTeamApplication . getTelephone ( ) ) ) {
omTeamApplication . setTelephone ( IdUtils . fastSimpleUUID ( ) ) ;
omTeamApplication . setTelephone ( IdUtils . fastSimpleUUID ( ) ) ;
}
}
List < OmTeamApplication > list = omTeamApplicationService . selectOmTeamApplicationList ( omTeamApplication ) ;
List < OmTeamApplication > list = omTeamApplicationService . selectOmTeamApplicationList ( omTeamApplication ) ;
@ -58,18 +56,17 @@ public class OmTeamApplicationController extends BaseController
* 校验团队名称唯一
* 校验团队名称唯一
* /
* /
@GetMapping ( " /uniqueCheck " )
@GetMapping ( " /uniqueCheck " )
public AjaxResult uniqueCheck ( OmTeamApplication omTeamApplication )
public AjaxResult uniqueCheck ( OmTeamApplication omTeamApplication ) {
{
int num = omTeamApplicationService . uniqueCheck ( omTeamApplication ) ;
int num = omTeamApplicationService . uniqueCheck ( omTeamApplication ) ;
return AjaxResult . success ( num > 0 ) ;
return AjaxResult . success ( num > 0 ) ;
}
}
/ * *
/ * *
* 查询团队注册申请列表
* 查询团队注册申请列表
* /
* /
@PreAuthorize ( " @ss.hasPermi('om:application:list') " )
@PreAuthorize ( " @ss.hasPermi('om:application:list') " )
@GetMapping ( " /list " )
@GetMapping ( " /list " )
public TableDataInfo list ( OmTeamApplication omTeamApplication )
public TableDataInfo list ( OmTeamApplication omTeamApplication ) {
{
startPage ( ) ;
startPage ( ) ;
List < OmTeamApplication > list = omTeamApplicationService . selectOmTeamApplicationList ( omTeamApplication ) ;
List < OmTeamApplication > list = omTeamApplicationService . selectOmTeamApplicationList ( omTeamApplication ) ;
return getDataTable ( list ) ;
return getDataTable ( list ) ;
@ -81,8 +78,7 @@ public class OmTeamApplicationController extends BaseController
@PreAuthorize ( " @ss.hasPermi('om:application:export') " )
@PreAuthorize ( " @ss.hasPermi('om:application:export') " )
@Log ( title = " 团队注册申请 " , businessType = BusinessType . EXPORT )
@Log ( title = " 团队注册申请 " , businessType = BusinessType . EXPORT )
@PostMapping ( " /export " )
@PostMapping ( " /export " )
public void export ( HttpServletResponse response , OmTeamApplication omTeamApplication )
public void export ( HttpServletResponse response , OmTeamApplication omTeamApplication ) {
{
List < OmTeamApplication > list = omTeamApplicationService . selectOmTeamApplicationList ( omTeamApplication ) ;
List < OmTeamApplication > list = omTeamApplicationService . selectOmTeamApplicationList ( omTeamApplication ) ;
ExcelUtil < OmTeamApplication > util = new ExcelUtil < OmTeamApplication > ( OmTeamApplication . class ) ;
ExcelUtil < OmTeamApplication > util = new ExcelUtil < OmTeamApplication > ( OmTeamApplication . class ) ;
util . exportExcel ( response , list , " 团队注册申请数据 " ) ;
util . exportExcel ( response , list , " 团队注册申请数据 " ) ;
@ -93,8 +89,7 @@ public class OmTeamApplicationController extends BaseController
* /
* /
/ / @PreAuthorize ( " @ss.hasPermi('om:application:query') " )
/ / @PreAuthorize ( " @ss.hasPermi('om:application:query') " )
@GetMapping ( value = " /detail/{id} " )
@GetMapping ( value = " /detail/{id} " )
public AjaxResult getInfo ( @PathVariable ( " id " ) String id )
public AjaxResult getInfo ( @PathVariable ( " id " ) String id ) {
{
return success ( omTeamApplicationService . selectOmTeamApplicationById ( id ) ) ;
return success ( omTeamApplicationService . selectOmTeamApplicationById ( id ) ) ;
}
}
@ -104,8 +99,7 @@ public class OmTeamApplicationController extends BaseController
/ / @PreAuthorize ( " @ss.hasPermi('om:application:add') " )
/ / @PreAuthorize ( " @ss.hasPermi('om:application:add') " )
/ / @Log ( title = " 团队注册申请 " , businessType = BusinessType . INSERT )
/ / @Log ( title = " 团队注册申请 " , businessType = BusinessType . INSERT )
@PostMapping ( " /add " )
@PostMapping ( " /add " )
public AjaxResult add ( @RequestBody OmTeamApplication omTeamApplication )
public AjaxResult add ( @RequestBody OmTeamApplication omTeamApplication ) {
{
return toAjax ( omTeamApplicationService . insertOmTeamApplication ( omTeamApplication ) ) ;
return toAjax ( omTeamApplicationService . insertOmTeamApplication ( omTeamApplication ) ) ;
}
}
@ -115,8 +109,7 @@ public class OmTeamApplicationController extends BaseController
/ / @PreAuthorize ( " @ss.hasPermi('om:application:edit') " )
/ / @PreAuthorize ( " @ss.hasPermi('om:application:edit') " )
/ / @Log ( title = " 团队注册申请 " , businessType = BusinessType . UPDATE )
/ / @Log ( title = " 团队注册申请 " , businessType = BusinessType . UPDATE )
@PutMapping ( " /update " )
@PutMapping ( " /update " )
public AjaxResult edit ( @RequestBody OmTeamApplication omTeamApplication )
public AjaxResult edit ( @RequestBody OmTeamApplication omTeamApplication ) {
{
return toAjax ( omTeamApplicationService . updateOmTeamApplication ( omTeamApplication ) ) ;
return toAjax ( omTeamApplicationService . updateOmTeamApplication ( omTeamApplication ) ) ;
}
}
@ -125,9 +118,8 @@ public class OmTeamApplicationController extends BaseController
* /
* /
@PreAuthorize ( " @ss.hasPermi('om:application:remove') " )
@PreAuthorize ( " @ss.hasPermi('om:application:remove') " )
@Log ( title = " 团队注册申请 " , businessType = BusinessType . DELETE )
@Log ( title = " 团队注册申请 " , businessType = BusinessType . DELETE )
@DeleteMapping ( " /{ids} " )
@DeleteMapping ( " /{ids} " )
public AjaxResult remove ( @PathVariable String [ ] ids )
public AjaxResult remove ( @PathVariable String [ ] ids ) {
{
return toAjax ( omTeamApplicationService . deleteOmTeamApplicationByIds ( ids ) ) ;
return toAjax ( omTeamApplicationService . deleteOmTeamApplicationByIds ( ids ) ) ;
}
}
@ -152,8 +144,7 @@ public class OmTeamApplicationController extends BaseController
/ / filename为文件下载后保存的文件名 , 可自行设置 , 但是注意文件名后缀 , 要和原来的保持一致
/ / filename为文件下载后保存的文件名 , 可自行设置 , 但是注意文件名后缀 , 要和原来的保持一致
response . setHeader ( " Content-Disposition " , " attachment; filename= " + name ) ;
response . setHeader ( " Content-Disposition " , " attachment; filename= " + name ) ;
response . setHeader ( " filename " , name ) ;
response . setHeader ( " filename " , name ) ;
OutputStream out = null ;
OutputStream out = response . getOutputStream ( ) ;
out = response . getOutputStream ( ) ;
byte [ ] bytes = omTeamApplicationService . downLoadFile ( path , saveName ) ;
byte [ ] bytes = omTeamApplicationService . downLoadFile ( path , saveName ) ;
/ / 输出到客户端
/ / 输出到客户端
if ( bytes ! = null ) {
if ( bytes ! = null ) {