31 changed files with 313 additions and 101 deletions
@ -0,0 +1,33 @@ |
|||
package com.lx.implatform.util; |
|||
|
|||
public class FileUtil { |
|||
|
|||
/** |
|||
* 获取文件后缀 |
|||
* |
|||
* @param fileName 文件名 |
|||
* @return boolean |
|||
*/ |
|||
public static String getFileExtension(String fileName) { |
|||
String extension = fileName.substring(fileName.lastIndexOf(".") + 1); |
|||
return extension; |
|||
} |
|||
|
|||
/** |
|||
* 判断文件是否图片类型 |
|||
* |
|||
* @param fileName 文件名 |
|||
* @return boolean |
|||
*/ |
|||
public static boolean isImage(String fileName) { |
|||
String extension = getFileExtension(fileName); |
|||
String[] imageExtension = new String[]{"jpeg", "jpg", "bmp", "png"}; |
|||
for (String e : imageExtension){ |
|||
if (extension.toLowerCase().equals(e)) { |
|||
return true; |
|||
} |
|||
} |
|||
|
|||
return false; |
|||
} |
|||
} |
|||
@ -1,27 +0,0 @@ |
|||
package com.lx.implatform.vo; |
|||
|
|||
|
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
@Data |
|||
@ApiModel("非好友用户信息VO") |
|||
public class UnfriendsUserVO { |
|||
|
|||
@ApiModelProperty(value = "id") |
|||
private Long id; |
|||
|
|||
@ApiModelProperty(value = "用户名") |
|||
private String userName; |
|||
|
|||
@ApiModelProperty(value = "用户昵称") |
|||
private String nickName; |
|||
|
|||
@ApiModelProperty(value = "头像") |
|||
private String headImage; |
|||
|
|||
@ApiModelProperty(value = "是否已是好友") |
|||
private Boolean isFriend; |
|||
|
|||
} |
|||
Loading…
Reference in new issue