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