初版数据库确定
This commit is contained in:
parent
b526b80158
commit
67869ee32e
16
pom.xml
16
pom.xml
@ -41,12 +41,16 @@
|
||||
<dependency>
|
||||
<groupId>org.mybatis.spring.boot</groupId>
|
||||
<artifactId>mybatis-spring-boot-starter</artifactId>
|
||||
<version>2.1.1</version>
|
||||
<version>2.2.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>fastjson</artifactId>
|
||||
<version>1.2.67</version>
|
||||
<version>1.2.78</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
@ -64,6 +68,14 @@
|
||||
</excludes>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<source>16</source>
|
||||
<target>16</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
|
@ -0,0 +1,8 @@
|
||||
package com.yutou.mobilecloud.Controllers;
|
||||
|
||||
import org.springframework.stereotype.Controller;
|
||||
|
||||
@Controller
|
||||
public class BackupController {
|
||||
|
||||
}
|
@ -0,0 +1,76 @@
|
||||
package com.yutou.mobilecloud.Controllers;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.yutou.mobilecloud.Enums.UserEnum;
|
||||
import com.yutou.mobilecloud.Services.IUser;
|
||||
import com.yutou.mobilecloud.mybatis.model.TUser;
|
||||
import com.yutou.mobilecloud.utils.UserTools;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.util.StringUtils;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
@Controller
|
||||
public class UserController {
|
||||
@Resource
|
||||
IUser iUser;
|
||||
|
||||
@RequestMapping("/user/sign.do")
|
||||
@ResponseBody
|
||||
public JSONObject userSign(String username, String password) {
|
||||
JSONObject json = new JSONObject();
|
||||
TUser user = new TUser();
|
||||
user.setUsername(username);
|
||||
user.setPassword(password);
|
||||
UserEnum signEnum = iUser.userSign(user);
|
||||
user = iUser.getUser(user);
|
||||
json.put("code", signEnum.getCode());
|
||||
json.put("msg", signEnum.getMsg());
|
||||
if (signEnum == UserEnum.SIGN_SUCCESS) {
|
||||
JSONObject data = new JSONObject();
|
||||
data.put("token", UserTools.getToken(user));
|
||||
json.put("data", data);
|
||||
}
|
||||
return json;
|
||||
}
|
||||
|
||||
@RequestMapping("/user/login.do")
|
||||
@ResponseBody
|
||||
public JSONObject login(String username, String password,String token) {
|
||||
JSONObject json = new JSONObject();
|
||||
TUser user = new TUser();
|
||||
UserEnum userEnum;
|
||||
if(StringUtils.hasLength(token)) {
|
||||
user.setUsername(username);
|
||||
user.setPassword(password);
|
||||
userEnum = iUser.login(user);
|
||||
}else {
|
||||
int check=UserTools.checkTokenGetUid(token);
|
||||
switch (check) {
|
||||
case -1 -> userEnum = UserEnum.LOGIN_FAIL_TOKEN;
|
||||
case -2 -> userEnum = UserEnum.LOGIN_FAIL_TIMEOUT;
|
||||
default -> {
|
||||
userEnum = UserEnum.LOGIN_SUCCESS;
|
||||
user.setId(check);
|
||||
}
|
||||
}
|
||||
}
|
||||
json.put("code", userEnum.getCode());
|
||||
json.put("msg", userEnum.getMsg());
|
||||
if (userEnum == UserEnum.LOGIN_SUCCESS) {
|
||||
user= iUser.getUser(user);
|
||||
json.put("data", loginJson(user));
|
||||
}
|
||||
return json;
|
||||
}
|
||||
|
||||
public JSONObject loginJson(TUser user) {
|
||||
|
||||
JSONObject json=new JSONObject();
|
||||
json.put("token",UserTools.getToken(user));
|
||||
return json;
|
||||
}
|
||||
|
||||
}
|
32
src/main/java/com/yutou/mobilecloud/Enums/UserEnum.java
Normal file
32
src/main/java/com/yutou/mobilecloud/Enums/UserEnum.java
Normal file
@ -0,0 +1,32 @@
|
||||
package com.yutou.mobilecloud.Enums;
|
||||
|
||||
|
||||
public enum UserEnum {
|
||||
LOGIN_SUCCESS(0,"成功"),LOGIN_FAIL_PASSWORD(-1,"密码错误"),LOGIN_FAIL_NOT_USER(-2,"账号错误"),
|
||||
LOGIN_FAIL_TIMEOUT(-3,"登陆超时"),LOGIN_FAIL_TOKEN(-4,"token错误"),
|
||||
SIGN_SUCCESS(0,"成功"),SIGN_FAIL_USER_EXIST(-1,"用户已存在"), SIGN_FAIL_PARAMETER(-2,"参数错误");
|
||||
|
||||
private int code;
|
||||
private String msg;
|
||||
|
||||
UserEnum(int code,String msg){
|
||||
this.code=code;
|
||||
this.msg=msg;
|
||||
}
|
||||
|
||||
public int getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(int code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getMsg() {
|
||||
return msg;
|
||||
}
|
||||
|
||||
public void setMsg(String msg) {
|
||||
this.msg = msg;
|
||||
}
|
||||
}
|
19
src/main/java/com/yutou/mobilecloud/Services/IBackup.java
Normal file
19
src/main/java/com/yutou/mobilecloud/Services/IBackup.java
Normal file
@ -0,0 +1,19 @@
|
||||
package com.yutou.mobilecloud.Services;
|
||||
|
||||
import com.yutou.mobilecloud.mybatis.model.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface IBackup {
|
||||
boolean addImage(TUser user, TBackupFile backupFile, TBackupImage image);
|
||||
boolean addApp(TUser user, TBackupFile backupFile, TBackupApp app);
|
||||
boolean addNumber(TUser user, TBackupFile backupFile, TBackupInfo info, TUserConfig config);
|
||||
boolean addMessage(TUser user, TBackupFile backupFile, TBackupInfo info, TUserConfig config);
|
||||
boolean removeImage(int bid);
|
||||
boolean removeApp(int bid);
|
||||
boolean removeInfo(int bid);
|
||||
List<TBackupImage> getImageList(int uid);
|
||||
List<TBackupApp> getAppList(int uid);
|
||||
List<TBackupInfo> getInfoList(int uid);
|
||||
|
||||
}
|
14
src/main/java/com/yutou/mobilecloud/Services/IUser.java
Normal file
14
src/main/java/com/yutou/mobilecloud/Services/IUser.java
Normal file
@ -0,0 +1,14 @@
|
||||
package com.yutou.mobilecloud.Services;
|
||||
|
||||
import com.yutou.mobilecloud.Enums.UserEnum;
|
||||
import com.yutou.mobilecloud.mybatis.model.TUser;
|
||||
|
||||
|
||||
public interface IUser {
|
||||
UserEnum userSign(TUser user);
|
||||
UserEnum login(TUser user);
|
||||
boolean isNewUser(TUser user);
|
||||
TUser getUser(String token);
|
||||
TUser getUser(TUser user);
|
||||
TUser getUser(int uid);
|
||||
}
|
@ -0,0 +1,116 @@
|
||||
package com.yutou.mobilecloud.Services.impls;
|
||||
|
||||
import com.yutou.mobilecloud.Services.IBackup;
|
||||
import com.yutou.mobilecloud.mybatis.dao.*;
|
||||
import com.yutou.mobilecloud.mybatis.model.*;
|
||||
import com.yutou.mobilecloud.utils.Tools;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.io.File;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
@Service("Backup")
|
||||
public class IBackupImpl implements IBackup {
|
||||
@Resource
|
||||
TUserDao userDao;
|
||||
@Resource
|
||||
TBackupFileDao fileDao;
|
||||
@Resource
|
||||
TBackupImageDao imageDao;
|
||||
@Resource
|
||||
TBackupAppDao appDao;
|
||||
@Resource
|
||||
TBackupInfoDao infoDao;
|
||||
@Resource
|
||||
TUserConfigDao configDao;
|
||||
|
||||
|
||||
@Override
|
||||
public boolean addImage(TUser user, TBackupFile backupFile, TBackupImage image) {
|
||||
int fid = getFileId(backupFile, user, "images" + File.separator + image.getPath().replace("/", File.separator));
|
||||
image.setFid(fid);
|
||||
image.setUid(user.getId());
|
||||
image.setCreatetime(new Date());
|
||||
return imageDao.insert(image) > 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean addApp(TUser user, TBackupFile backupFile, TBackupApp app) {
|
||||
int fid = getFileId(backupFile, user, "apps");
|
||||
app.setFid(fid);
|
||||
app.setUid(user.getId());
|
||||
app.setCreatetime(new Date());
|
||||
return appDao.insert(app) > 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean addNumber(TUser user, TBackupFile backupFile, TBackupInfo info, TUserConfig config) {
|
||||
int fid = getFileId(backupFile, user, "phone"+File.separator+"number");
|
||||
info.setFid(fid);
|
||||
info.setUid(info.getUid());
|
||||
info.setCreatetime(new Date());
|
||||
return infoDao.insert(info) > 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean addMessage(TUser user, TBackupFile backupFile, TBackupInfo info, TUserConfig config) {
|
||||
int fid = getFileId(backupFile, user, "phone"+File.separator+"message");
|
||||
info.setFid(fid);
|
||||
info.setUid(info.getUid());
|
||||
info.setCreatetime(new Date());
|
||||
return infoDao.insert(info) > 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean removeImage(int bid) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean removeApp(int bid) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean removeInfo(int bid) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<TBackupImage> getImageList(int uid) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<TBackupApp> getAppList(int uid) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<TBackupInfo> getInfoList(int uid) {
|
||||
return null;
|
||||
}
|
||||
|
||||
private int getFileId(TBackupFile file, TUser user, String dir) {
|
||||
File path = new File("backups" + File.separator + user.getId() + File.separator + dir);
|
||||
if (!path.exists()) {
|
||||
path.mkdirs();
|
||||
}
|
||||
File _file = new File(file.getFilepath());
|
||||
File newFile = new File(path.getAbsolutePath() + File.separator + Tools.getToDayNowTimeToFileName() + "_" + file.getFilename());
|
||||
_file.renameTo(newFile);
|
||||
file.setFilepath(newFile.getAbsolutePath());
|
||||
return fileDao.insert(file);
|
||||
}
|
||||
|
||||
private File getBackupPath(TUser user, String dir) {
|
||||
File file = new File("backups" + File.separator + user.getId() + File.separator + dir);
|
||||
if (!file.exists()) {
|
||||
file.mkdirs();
|
||||
}
|
||||
return file;
|
||||
}
|
||||
}
|
@ -0,0 +1,93 @@
|
||||
package com.yutou.mobilecloud.Services.impls;
|
||||
|
||||
import com.yutou.mobilecloud.Enums.UserEnum;
|
||||
import com.yutou.mobilecloud.Services.IUser;
|
||||
import com.yutou.mobilecloud.mybatis.dao.TUserDao;
|
||||
import com.yutou.mobilecloud.mybatis.model.TUser;
|
||||
import com.yutou.mobilecloud.mybatis.model.TUserExample;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import static com.yutou.mobilecloud.utils.UserTools.checkTokenGetUid;
|
||||
|
||||
@Service("User")
|
||||
public class IUserImpl implements IUser {
|
||||
public static final String LOGIN_KEY = "G9PRGhDXDVAbK1He";
|
||||
@Resource
|
||||
TUserDao userDao;
|
||||
|
||||
|
||||
@Override
|
||||
public UserEnum userSign(TUser user) {
|
||||
if (isNewUser(user)) {
|
||||
if (StringUtils.hasLength(user.getUsername()) &&
|
||||
StringUtils.hasLength(user.getPassword())
|
||||
) {
|
||||
user.setCreatetime(new Date());
|
||||
userDao.insert(user);
|
||||
return UserEnum.SIGN_SUCCESS;
|
||||
}
|
||||
return UserEnum.SIGN_FAIL_PARAMETER;
|
||||
}
|
||||
return UserEnum.SIGN_FAIL_USER_EXIST;
|
||||
}
|
||||
|
||||
@Override
|
||||
public UserEnum login(TUser user) {
|
||||
TUserExample example = new TUserExample();
|
||||
example.createCriteria().andUsernameEqualTo(user.getUsername())
|
||||
.andPasswordEqualTo(user.getPassword());
|
||||
if (userDao.selectByExample(example).isEmpty()) {
|
||||
example.clear();
|
||||
example.createCriteria().andUsernameEqualTo(user.getUsername());
|
||||
if (userDao.selectByExample(example).isEmpty()) {
|
||||
return UserEnum.LOGIN_FAIL_NOT_USER;
|
||||
}
|
||||
return UserEnum.LOGIN_FAIL_NOT_USER;
|
||||
}
|
||||
return UserEnum.LOGIN_SUCCESS;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isNewUser(TUser user) {
|
||||
TUserExample example = new TUserExample();
|
||||
example.createCriteria().andUsernameEqualTo(user.getUsername());
|
||||
return !userDao.selectByExample(example).isEmpty();
|
||||
}
|
||||
|
||||
@Override
|
||||
public TUser getUser(String token) {
|
||||
int uid=checkTokenGetUid(token);
|
||||
if(uid>0){
|
||||
return userDao.selectByPrimaryKey(uid);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TUser getUser(TUser user) {
|
||||
TUserExample example=new TUserExample();
|
||||
example.createCriteria().andUsernameEqualTo(user.getUsername()).andPasswordEqualTo(user.getPassword());
|
||||
List<TUser> list=userDao.selectByExample(example);
|
||||
if(list.isEmpty()){
|
||||
return null;
|
||||
}
|
||||
return list.get(0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TUser getUser(int uid) {
|
||||
return userDao.selectByPrimaryKey(uid);
|
||||
}
|
||||
|
||||
|
||||
public static void main(String[] args) {
|
||||
TUser user=new TUser();
|
||||
user.setUsername("123");
|
||||
System.out.println(user);
|
||||
}
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
package com.yutou.mobilecloud.mybatis.dao;
|
||||
|
||||
import com.yutou.mobilecloud.mybatis.model.TBackupApp;
|
||||
import com.yutou.mobilecloud.mybatis.model.TBackupAppExample;
|
||||
import java.util.List;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
public interface TBackupAppDao {
|
||||
long countByExample(TBackupAppExample example);
|
||||
|
||||
int deleteByExample(TBackupAppExample example);
|
||||
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insert(TBackupApp record);
|
||||
|
||||
int insertSelective(TBackupApp record);
|
||||
|
||||
List<TBackupApp> selectByExample(TBackupAppExample example);
|
||||
|
||||
TBackupApp selectByPrimaryKey(Integer id);
|
||||
|
||||
int updateByExampleSelective(@Param("record") TBackupApp record, @Param("example") TBackupAppExample example);
|
||||
|
||||
int updateByExample(@Param("record") TBackupApp record, @Param("example") TBackupAppExample example);
|
||||
|
||||
int updateByPrimaryKeySelective(TBackupApp record);
|
||||
|
||||
int updateByPrimaryKey(TBackupApp record);
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
package com.yutou.mobilecloud.mybatis.dao;
|
||||
|
||||
import com.yutou.mobilecloud.mybatis.model.TBackupImage;
|
||||
import com.yutou.mobilecloud.mybatis.model.TBackupImageExample;
|
||||
import java.util.List;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
public interface TBackupImageDao {
|
||||
long countByExample(TBackupImageExample example);
|
||||
|
||||
int deleteByExample(TBackupImageExample example);
|
||||
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insert(TBackupImage record);
|
||||
|
||||
int insertSelective(TBackupImage record);
|
||||
|
||||
List<TBackupImage> selectByExample(TBackupImageExample example);
|
||||
|
||||
TBackupImage selectByPrimaryKey(Integer id);
|
||||
|
||||
int updateByExampleSelective(@Param("record") TBackupImage record, @Param("example") TBackupImageExample example);
|
||||
|
||||
int updateByExample(@Param("record") TBackupImage record, @Param("example") TBackupImageExample example);
|
||||
|
||||
int updateByPrimaryKeySelective(TBackupImage record);
|
||||
|
||||
int updateByPrimaryKey(TBackupImage record);
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
package com.yutou.mobilecloud.mybatis.dao;
|
||||
|
||||
import com.yutou.mobilecloud.mybatis.model.TBackupInfo;
|
||||
import com.yutou.mobilecloud.mybatis.model.TBackupInfoExample;
|
||||
import java.util.List;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
public interface TBackupInfoDao {
|
||||
long countByExample(TBackupInfoExample example);
|
||||
|
||||
int deleteByExample(TBackupInfoExample example);
|
||||
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insert(TBackupInfo record);
|
||||
|
||||
int insertSelective(TBackupInfo record);
|
||||
|
||||
List<TBackupInfo> selectByExample(TBackupInfoExample example);
|
||||
|
||||
TBackupInfo selectByPrimaryKey(Integer id);
|
||||
|
||||
int updateByExampleSelective(@Param("record") TBackupInfo record, @Param("example") TBackupInfoExample example);
|
||||
|
||||
int updateByExample(@Param("record") TBackupInfo record, @Param("example") TBackupInfoExample example);
|
||||
|
||||
int updateByPrimaryKeySelective(TBackupInfo record);
|
||||
|
||||
int updateByPrimaryKey(TBackupInfo record);
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
package com.yutou.mobilecloud.mybatis.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* t_backup_app
|
||||
* @author
|
||||
*/
|
||||
@Data
|
||||
public class TBackupApp implements Serializable {
|
||||
private Integer id;
|
||||
|
||||
private Integer uid;
|
||||
|
||||
private Integer fid;
|
||||
|
||||
private String appname;
|
||||
|
||||
private String apppackagename;
|
||||
|
||||
private String appversion;
|
||||
|
||||
private Date createtime;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
@ -0,0 +1,652 @@
|
||||
package com.yutou.mobilecloud.mybatis.model;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
public class TBackupAppExample {
|
||||
protected String orderByClause;
|
||||
|
||||
protected boolean distinct;
|
||||
|
||||
protected List<Criteria> oredCriteria;
|
||||
|
||||
public TBackupAppExample() {
|
||||
oredCriteria = new ArrayList<>();
|
||||
}
|
||||
|
||||
public void setOrderByClause(String orderByClause) {
|
||||
this.orderByClause = orderByClause;
|
||||
}
|
||||
|
||||
public String getOrderByClause() {
|
||||
return orderByClause;
|
||||
}
|
||||
|
||||
public void setDistinct(boolean distinct) {
|
||||
this.distinct = distinct;
|
||||
}
|
||||
|
||||
public boolean isDistinct() {
|
||||
return distinct;
|
||||
}
|
||||
|
||||
public List<Criteria> getOredCriteria() {
|
||||
return oredCriteria;
|
||||
}
|
||||
|
||||
public void or(Criteria criteria) {
|
||||
oredCriteria.add(criteria);
|
||||
}
|
||||
|
||||
public Criteria or() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
oredCriteria.add(criteria);
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public Criteria createCriteria() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
if (oredCriteria.size() == 0) {
|
||||
oredCriteria.add(criteria);
|
||||
}
|
||||
return criteria;
|
||||
}
|
||||
|
||||
protected Criteria createCriteriaInternal() {
|
||||
Criteria criteria = new Criteria();
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
oredCriteria.clear();
|
||||
orderByClause = null;
|
||||
distinct = false;
|
||||
}
|
||||
|
||||
protected abstract static class GeneratedCriteria {
|
||||
protected List<Criterion> criteria;
|
||||
|
||||
protected GeneratedCriteria() {
|
||||
super();
|
||||
criteria = new ArrayList<>();
|
||||
}
|
||||
|
||||
public boolean isValid() {
|
||||
return criteria.size() > 0;
|
||||
}
|
||||
|
||||
public List<Criterion> getAllCriteria() {
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public List<Criterion> getCriteria() {
|
||||
return criteria;
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition) {
|
||||
if (condition == null) {
|
||||
throw new RuntimeException("Value for condition cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition));
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition, Object value, String property) {
|
||||
if (value == null) {
|
||||
throw new RuntimeException("Value for " + property + " cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition, value));
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition, Object value1, Object value2, String property) {
|
||||
if (value1 == null || value2 == null) {
|
||||
throw new RuntimeException("Between values for " + property + " cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition, value1, value2));
|
||||
}
|
||||
|
||||
public Criteria andIdIsNull() {
|
||||
addCriterion("id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdIsNotNull() {
|
||||
addCriterion("id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdEqualTo(Integer value) {
|
||||
addCriterion("id =", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotEqualTo(Integer value) {
|
||||
addCriterion("id <>", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdGreaterThan(Integer value) {
|
||||
addCriterion("id >", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdGreaterThanOrEqualTo(Integer value) {
|
||||
addCriterion("id >=", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdLessThan(Integer value) {
|
||||
addCriterion("id <", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdLessThanOrEqualTo(Integer value) {
|
||||
addCriterion("id <=", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdIn(List<Integer> values) {
|
||||
addCriterion("id in", values, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotIn(List<Integer> values) {
|
||||
addCriterion("id not in", values, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdBetween(Integer value1, Integer value2) {
|
||||
addCriterion("id between", value1, value2, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotBetween(Integer value1, Integer value2) {
|
||||
addCriterion("id not between", value1, value2, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUidIsNull() {
|
||||
addCriterion("`uid` is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUidIsNotNull() {
|
||||
addCriterion("`uid` is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUidEqualTo(Integer value) {
|
||||
addCriterion("`uid` =", value, "uid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUidNotEqualTo(Integer value) {
|
||||
addCriterion("`uid` <>", value, "uid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUidGreaterThan(Integer value) {
|
||||
addCriterion("`uid` >", value, "uid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUidGreaterThanOrEqualTo(Integer value) {
|
||||
addCriterion("`uid` >=", value, "uid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUidLessThan(Integer value) {
|
||||
addCriterion("`uid` <", value, "uid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUidLessThanOrEqualTo(Integer value) {
|
||||
addCriterion("`uid` <=", value, "uid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUidIn(List<Integer> values) {
|
||||
addCriterion("`uid` in", values, "uid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUidNotIn(List<Integer> values) {
|
||||
addCriterion("`uid` not in", values, "uid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUidBetween(Integer value1, Integer value2) {
|
||||
addCriterion("`uid` between", value1, value2, "uid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUidNotBetween(Integer value1, Integer value2) {
|
||||
addCriterion("`uid` not between", value1, value2, "uid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFidIsNull() {
|
||||
addCriterion("fid is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFidIsNotNull() {
|
||||
addCriterion("fid is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFidEqualTo(Integer value) {
|
||||
addCriterion("fid =", value, "fid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFidNotEqualTo(Integer value) {
|
||||
addCriterion("fid <>", value, "fid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFidGreaterThan(Integer value) {
|
||||
addCriterion("fid >", value, "fid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFidGreaterThanOrEqualTo(Integer value) {
|
||||
addCriterion("fid >=", value, "fid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFidLessThan(Integer value) {
|
||||
addCriterion("fid <", value, "fid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFidLessThanOrEqualTo(Integer value) {
|
||||
addCriterion("fid <=", value, "fid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFidIn(List<Integer> values) {
|
||||
addCriterion("fid in", values, "fid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFidNotIn(List<Integer> values) {
|
||||
addCriterion("fid not in", values, "fid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFidBetween(Integer value1, Integer value2) {
|
||||
addCriterion("fid between", value1, value2, "fid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFidNotBetween(Integer value1, Integer value2) {
|
||||
addCriterion("fid not between", value1, value2, "fid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAppnameIsNull() {
|
||||
addCriterion("appName is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAppnameIsNotNull() {
|
||||
addCriterion("appName is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAppnameEqualTo(String value) {
|
||||
addCriterion("appName =", value, "appname");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAppnameNotEqualTo(String value) {
|
||||
addCriterion("appName <>", value, "appname");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAppnameGreaterThan(String value) {
|
||||
addCriterion("appName >", value, "appname");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAppnameGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("appName >=", value, "appname");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAppnameLessThan(String value) {
|
||||
addCriterion("appName <", value, "appname");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAppnameLessThanOrEqualTo(String value) {
|
||||
addCriterion("appName <=", value, "appname");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAppnameLike(String value) {
|
||||
addCriterion("appName like", value, "appname");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAppnameNotLike(String value) {
|
||||
addCriterion("appName not like", value, "appname");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAppnameIn(List<String> values) {
|
||||
addCriterion("appName in", values, "appname");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAppnameNotIn(List<String> values) {
|
||||
addCriterion("appName not in", values, "appname");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAppnameBetween(String value1, String value2) {
|
||||
addCriterion("appName between", value1, value2, "appname");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAppnameNotBetween(String value1, String value2) {
|
||||
addCriterion("appName not between", value1, value2, "appname");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andApppackagenameIsNull() {
|
||||
addCriterion("appPackageName is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andApppackagenameIsNotNull() {
|
||||
addCriterion("appPackageName is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andApppackagenameEqualTo(String value) {
|
||||
addCriterion("appPackageName =", value, "apppackagename");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andApppackagenameNotEqualTo(String value) {
|
||||
addCriterion("appPackageName <>", value, "apppackagename");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andApppackagenameGreaterThan(String value) {
|
||||
addCriterion("appPackageName >", value, "apppackagename");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andApppackagenameGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("appPackageName >=", value, "apppackagename");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andApppackagenameLessThan(String value) {
|
||||
addCriterion("appPackageName <", value, "apppackagename");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andApppackagenameLessThanOrEqualTo(String value) {
|
||||
addCriterion("appPackageName <=", value, "apppackagename");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andApppackagenameLike(String value) {
|
||||
addCriterion("appPackageName like", value, "apppackagename");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andApppackagenameNotLike(String value) {
|
||||
addCriterion("appPackageName not like", value, "apppackagename");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andApppackagenameIn(List<String> values) {
|
||||
addCriterion("appPackageName in", values, "apppackagename");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andApppackagenameNotIn(List<String> values) {
|
||||
addCriterion("appPackageName not in", values, "apppackagename");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andApppackagenameBetween(String value1, String value2) {
|
||||
addCriterion("appPackageName between", value1, value2, "apppackagename");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andApppackagenameNotBetween(String value1, String value2) {
|
||||
addCriterion("appPackageName not between", value1, value2, "apppackagename");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAppversionIsNull() {
|
||||
addCriterion("appVersion is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAppversionIsNotNull() {
|
||||
addCriterion("appVersion is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAppversionEqualTo(String value) {
|
||||
addCriterion("appVersion =", value, "appversion");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAppversionNotEqualTo(String value) {
|
||||
addCriterion("appVersion <>", value, "appversion");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAppversionGreaterThan(String value) {
|
||||
addCriterion("appVersion >", value, "appversion");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAppversionGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("appVersion >=", value, "appversion");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAppversionLessThan(String value) {
|
||||
addCriterion("appVersion <", value, "appversion");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAppversionLessThanOrEqualTo(String value) {
|
||||
addCriterion("appVersion <=", value, "appversion");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAppversionLike(String value) {
|
||||
addCriterion("appVersion like", value, "appversion");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAppversionNotLike(String value) {
|
||||
addCriterion("appVersion not like", value, "appversion");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAppversionIn(List<String> values) {
|
||||
addCriterion("appVersion in", values, "appversion");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAppversionNotIn(List<String> values) {
|
||||
addCriterion("appVersion not in", values, "appversion");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAppversionBetween(String value1, String value2) {
|
||||
addCriterion("appVersion between", value1, value2, "appversion");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAppversionNotBetween(String value1, String value2) {
|
||||
addCriterion("appVersion not between", value1, value2, "appversion");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreatetimeIsNull() {
|
||||
addCriterion("createTime is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreatetimeIsNotNull() {
|
||||
addCriterion("createTime is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreatetimeEqualTo(Date value) {
|
||||
addCriterion("createTime =", value, "createtime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreatetimeNotEqualTo(Date value) {
|
||||
addCriterion("createTime <>", value, "createtime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreatetimeGreaterThan(Date value) {
|
||||
addCriterion("createTime >", value, "createtime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreatetimeGreaterThanOrEqualTo(Date value) {
|
||||
addCriterion("createTime >=", value, "createtime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreatetimeLessThan(Date value) {
|
||||
addCriterion("createTime <", value, "createtime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreatetimeLessThanOrEqualTo(Date value) {
|
||||
addCriterion("createTime <=", value, "createtime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreatetimeIn(List<Date> values) {
|
||||
addCriterion("createTime in", values, "createtime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreatetimeNotIn(List<Date> values) {
|
||||
addCriterion("createTime not in", values, "createtime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreatetimeBetween(Date value1, Date value2) {
|
||||
addCriterion("createTime between", value1, value2, "createtime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreatetimeNotBetween(Date value1, Date value2) {
|
||||
addCriterion("createTime not between", value1, value2, "createtime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
public static class Criteria extends GeneratedCriteria {
|
||||
protected Criteria() {
|
||||
super();
|
||||
}
|
||||
}
|
||||
|
||||
public static class Criterion {
|
||||
private String condition;
|
||||
|
||||
private Object value;
|
||||
|
||||
private Object secondValue;
|
||||
|
||||
private boolean noValue;
|
||||
|
||||
private boolean singleValue;
|
||||
|
||||
private boolean betweenValue;
|
||||
|
||||
private boolean listValue;
|
||||
|
||||
private String typeHandler;
|
||||
|
||||
public String getCondition() {
|
||||
return condition;
|
||||
}
|
||||
|
||||
public Object getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public Object getSecondValue() {
|
||||
return secondValue;
|
||||
}
|
||||
|
||||
public boolean isNoValue() {
|
||||
return noValue;
|
||||
}
|
||||
|
||||
public boolean isSingleValue() {
|
||||
return singleValue;
|
||||
}
|
||||
|
||||
public boolean isBetweenValue() {
|
||||
return betweenValue;
|
||||
}
|
||||
|
||||
public boolean isListValue() {
|
||||
return listValue;
|
||||
}
|
||||
|
||||
public String getTypeHandler() {
|
||||
return typeHandler;
|
||||
}
|
||||
|
||||
protected Criterion(String condition) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.typeHandler = null;
|
||||
this.noValue = true;
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, String typeHandler) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.value = value;
|
||||
this.typeHandler = typeHandler;
|
||||
if (value instanceof List<?>) {
|
||||
this.listValue = true;
|
||||
} else {
|
||||
this.singleValue = true;
|
||||
}
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value) {
|
||||
this(condition, value, null);
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.value = value;
|
||||
this.secondValue = secondValue;
|
||||
this.typeHandler = typeHandler;
|
||||
this.betweenValue = true;
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, Object secondValue) {
|
||||
this(condition, value, secondValue, null);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,7 +1,6 @@
|
||||
package com.yutou.mobilecloud.mybatis.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
@ -12,9 +11,7 @@ import lombok.Data;
|
||||
public class TBackupFile implements Serializable {
|
||||
private Integer id;
|
||||
|
||||
private Integer uid;
|
||||
|
||||
private Integer bid;
|
||||
private String filename;
|
||||
|
||||
private String filepath;
|
||||
|
||||
@ -22,7 +19,5 @@ public class TBackupFile implements Serializable {
|
||||
|
||||
private String md5;
|
||||
|
||||
private Date createtime;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
@ -1,7 +1,6 @@
|
||||
package com.yutou.mobilecloud.mybatis.model;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
public class TBackupFileExample {
|
||||
@ -165,253 +164,203 @@ public class TBackupFileExample {
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUidIsNull() {
|
||||
addCriterion("`uid` is null");
|
||||
public Criteria andFilenameIsNull() {
|
||||
addCriterion("fileName is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUidIsNotNull() {
|
||||
addCriterion("`uid` is not null");
|
||||
public Criteria andFilenameIsNotNull() {
|
||||
addCriterion("fileName is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUidEqualTo(Integer value) {
|
||||
addCriterion("`uid` =", value, "uid");
|
||||
public Criteria andFilenameEqualTo(String value) {
|
||||
addCriterion("fileName =", value, "filename");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUidNotEqualTo(Integer value) {
|
||||
addCriterion("`uid` <>", value, "uid");
|
||||
public Criteria andFilenameNotEqualTo(String value) {
|
||||
addCriterion("fileName <>", value, "filename");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUidGreaterThan(Integer value) {
|
||||
addCriterion("`uid` >", value, "uid");
|
||||
public Criteria andFilenameGreaterThan(String value) {
|
||||
addCriterion("fileName >", value, "filename");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUidGreaterThanOrEqualTo(Integer value) {
|
||||
addCriterion("`uid` >=", value, "uid");
|
||||
public Criteria andFilenameGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("fileName >=", value, "filename");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUidLessThan(Integer value) {
|
||||
addCriterion("`uid` <", value, "uid");
|
||||
public Criteria andFilenameLessThan(String value) {
|
||||
addCriterion("fileName <", value, "filename");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUidLessThanOrEqualTo(Integer value) {
|
||||
addCriterion("`uid` <=", value, "uid");
|
||||
public Criteria andFilenameLessThanOrEqualTo(String value) {
|
||||
addCriterion("fileName <=", value, "filename");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUidIn(List<Integer> values) {
|
||||
addCriterion("`uid` in", values, "uid");
|
||||
public Criteria andFilenameLike(String value) {
|
||||
addCriterion("fileName like", value, "filename");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUidNotIn(List<Integer> values) {
|
||||
addCriterion("`uid` not in", values, "uid");
|
||||
public Criteria andFilenameNotLike(String value) {
|
||||
addCriterion("fileName not like", value, "filename");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUidBetween(Integer value1, Integer value2) {
|
||||
addCriterion("`uid` between", value1, value2, "uid");
|
||||
public Criteria andFilenameIn(List<String> values) {
|
||||
addCriterion("fileName in", values, "filename");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUidNotBetween(Integer value1, Integer value2) {
|
||||
addCriterion("`uid` not between", value1, value2, "uid");
|
||||
public Criteria andFilenameNotIn(List<String> values) {
|
||||
addCriterion("fileName not in", values, "filename");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andBidIsNull() {
|
||||
addCriterion("bid is null");
|
||||
public Criteria andFilenameBetween(String value1, String value2) {
|
||||
addCriterion("fileName between", value1, value2, "filename");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andBidIsNotNull() {
|
||||
addCriterion("bid is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andBidEqualTo(Integer value) {
|
||||
addCriterion("bid =", value, "bid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andBidNotEqualTo(Integer value) {
|
||||
addCriterion("bid <>", value, "bid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andBidGreaterThan(Integer value) {
|
||||
addCriterion("bid >", value, "bid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andBidGreaterThanOrEqualTo(Integer value) {
|
||||
addCriterion("bid >=", value, "bid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andBidLessThan(Integer value) {
|
||||
addCriterion("bid <", value, "bid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andBidLessThanOrEqualTo(Integer value) {
|
||||
addCriterion("bid <=", value, "bid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andBidIn(List<Integer> values) {
|
||||
addCriterion("bid in", values, "bid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andBidNotIn(List<Integer> values) {
|
||||
addCriterion("bid not in", values, "bid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andBidBetween(Integer value1, Integer value2) {
|
||||
addCriterion("bid between", value1, value2, "bid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andBidNotBetween(Integer value1, Integer value2) {
|
||||
addCriterion("bid not between", value1, value2, "bid");
|
||||
public Criteria andFilenameNotBetween(String value1, String value2) {
|
||||
addCriterion("fileName not between", value1, value2, "filename");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFilepathIsNull() {
|
||||
addCriterion("filepath is null");
|
||||
addCriterion("filePath is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFilepathIsNotNull() {
|
||||
addCriterion("filepath is not null");
|
||||
addCriterion("filePath is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFilepathEqualTo(String value) {
|
||||
addCriterion("filepath =", value, "filepath");
|
||||
addCriterion("filePath =", value, "filepath");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFilepathNotEqualTo(String value) {
|
||||
addCriterion("filepath <>", value, "filepath");
|
||||
addCriterion("filePath <>", value, "filepath");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFilepathGreaterThan(String value) {
|
||||
addCriterion("filepath >", value, "filepath");
|
||||
addCriterion("filePath >", value, "filepath");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFilepathGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("filepath >=", value, "filepath");
|
||||
addCriterion("filePath >=", value, "filepath");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFilepathLessThan(String value) {
|
||||
addCriterion("filepath <", value, "filepath");
|
||||
addCriterion("filePath <", value, "filepath");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFilepathLessThanOrEqualTo(String value) {
|
||||
addCriterion("filepath <=", value, "filepath");
|
||||
addCriterion("filePath <=", value, "filepath");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFilepathLike(String value) {
|
||||
addCriterion("filepath like", value, "filepath");
|
||||
addCriterion("filePath like", value, "filepath");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFilepathNotLike(String value) {
|
||||
addCriterion("filepath not like", value, "filepath");
|
||||
addCriterion("filePath not like", value, "filepath");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFilepathIn(List<String> values) {
|
||||
addCriterion("filepath in", values, "filepath");
|
||||
addCriterion("filePath in", values, "filepath");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFilepathNotIn(List<String> values) {
|
||||
addCriterion("filepath not in", values, "filepath");
|
||||
addCriterion("filePath not in", values, "filepath");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFilepathBetween(String value1, String value2) {
|
||||
addCriterion("filepath between", value1, value2, "filepath");
|
||||
addCriterion("filePath between", value1, value2, "filepath");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFilepathNotBetween(String value1, String value2) {
|
||||
addCriterion("filepath not between", value1, value2, "filepath");
|
||||
addCriterion("filePath not between", value1, value2, "filepath");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFilesizeIsNull() {
|
||||
addCriterion("filesize is null");
|
||||
addCriterion("fileSize is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFilesizeIsNotNull() {
|
||||
addCriterion("filesize is not null");
|
||||
addCriterion("fileSize is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFilesizeEqualTo(Integer value) {
|
||||
addCriterion("filesize =", value, "filesize");
|
||||
addCriterion("fileSize =", value, "filesize");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFilesizeNotEqualTo(Integer value) {
|
||||
addCriterion("filesize <>", value, "filesize");
|
||||
addCriterion("fileSize <>", value, "filesize");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFilesizeGreaterThan(Integer value) {
|
||||
addCriterion("filesize >", value, "filesize");
|
||||
addCriterion("fileSize >", value, "filesize");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFilesizeGreaterThanOrEqualTo(Integer value) {
|
||||
addCriterion("filesize >=", value, "filesize");
|
||||
addCriterion("fileSize >=", value, "filesize");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFilesizeLessThan(Integer value) {
|
||||
addCriterion("filesize <", value, "filesize");
|
||||
addCriterion("fileSize <", value, "filesize");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFilesizeLessThanOrEqualTo(Integer value) {
|
||||
addCriterion("filesize <=", value, "filesize");
|
||||
addCriterion("fileSize <=", value, "filesize");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFilesizeIn(List<Integer> values) {
|
||||
addCriterion("filesize in", values, "filesize");
|
||||
addCriterion("fileSize in", values, "filesize");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFilesizeNotIn(List<Integer> values) {
|
||||
addCriterion("filesize not in", values, "filesize");
|
||||
addCriterion("fileSize not in", values, "filesize");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFilesizeBetween(Integer value1, Integer value2) {
|
||||
addCriterion("filesize between", value1, value2, "filesize");
|
||||
addCriterion("fileSize between", value1, value2, "filesize");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFilesizeNotBetween(Integer value1, Integer value2) {
|
||||
addCriterion("filesize not between", value1, value2, "filesize");
|
||||
addCriterion("fileSize not between", value1, value2, "filesize");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
@ -484,66 +433,6 @@ public class TBackupFileExample {
|
||||
addCriterion("md5 not between", value1, value2, "md5");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreatetimeIsNull() {
|
||||
addCriterion("createTime is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreatetimeIsNotNull() {
|
||||
addCriterion("createTime is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreatetimeEqualTo(Date value) {
|
||||
addCriterion("createTime =", value, "createtime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreatetimeNotEqualTo(Date value) {
|
||||
addCriterion("createTime <>", value, "createtime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreatetimeGreaterThan(Date value) {
|
||||
addCriterion("createTime >", value, "createtime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreatetimeGreaterThanOrEqualTo(Date value) {
|
||||
addCriterion("createTime >=", value, "createtime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreatetimeLessThan(Date value) {
|
||||
addCriterion("createTime <", value, "createtime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreatetimeLessThanOrEqualTo(Date value) {
|
||||
addCriterion("createTime <=", value, "createtime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreatetimeIn(List<Date> values) {
|
||||
addCriterion("createTime in", values, "createtime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreatetimeNotIn(List<Date> values) {
|
||||
addCriterion("createTime not in", values, "createtime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreatetimeBetween(Date value1, Date value2) {
|
||||
addCriterion("createTime between", value1, value2, "createtime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreatetimeNotBetween(Date value1, Date value2) {
|
||||
addCriterion("createTime not between", value1, value2, "createtime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -0,0 +1,45 @@
|
||||
package com.yutou.mobilecloud.mybatis.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* t_backup_image
|
||||
* @author
|
||||
*/
|
||||
@Data
|
||||
public class TBackupImage implements Serializable {
|
||||
private Integer id;
|
||||
|
||||
private Integer uid;
|
||||
|
||||
private Integer fid;
|
||||
|
||||
/**
|
||||
* 在手机上的路径
|
||||
*/
|
||||
private String path;
|
||||
|
||||
private String device;
|
||||
|
||||
private String gps;
|
||||
|
||||
private Integer iso;
|
||||
|
||||
private String shutter;
|
||||
|
||||
private Double aperture;
|
||||
|
||||
private Integer high;
|
||||
|
||||
private Integer width;
|
||||
|
||||
private Integer filelength;
|
||||
|
||||
private String remark;
|
||||
|
||||
private Date createtime;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,27 @@
|
||||
package com.yutou.mobilecloud.mybatis.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* t_backup_info
|
||||
* @author
|
||||
*/
|
||||
@Data
|
||||
public class TBackupInfo implements Serializable {
|
||||
private Integer id;
|
||||
|
||||
private String uid;
|
||||
|
||||
private Integer fid;
|
||||
|
||||
/**
|
||||
* 1=手机号,2=短信
|
||||
*/
|
||||
private Integer type;
|
||||
|
||||
private Date createtime;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
@ -0,0 +1,512 @@
|
||||
package com.yutou.mobilecloud.mybatis.model;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
public class TBackupInfoExample {
|
||||
protected String orderByClause;
|
||||
|
||||
protected boolean distinct;
|
||||
|
||||
protected List<Criteria> oredCriteria;
|
||||
|
||||
public TBackupInfoExample() {
|
||||
oredCriteria = new ArrayList<>();
|
||||
}
|
||||
|
||||
public void setOrderByClause(String orderByClause) {
|
||||
this.orderByClause = orderByClause;
|
||||
}
|
||||
|
||||
public String getOrderByClause() {
|
||||
return orderByClause;
|
||||
}
|
||||
|
||||
public void setDistinct(boolean distinct) {
|
||||
this.distinct = distinct;
|
||||
}
|
||||
|
||||
public boolean isDistinct() {
|
||||
return distinct;
|
||||
}
|
||||
|
||||
public List<Criteria> getOredCriteria() {
|
||||
return oredCriteria;
|
||||
}
|
||||
|
||||
public void or(Criteria criteria) {
|
||||
oredCriteria.add(criteria);
|
||||
}
|
||||
|
||||
public Criteria or() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
oredCriteria.add(criteria);
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public Criteria createCriteria() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
if (oredCriteria.size() == 0) {
|
||||
oredCriteria.add(criteria);
|
||||
}
|
||||
return criteria;
|
||||
}
|
||||
|
||||
protected Criteria createCriteriaInternal() {
|
||||
Criteria criteria = new Criteria();
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
oredCriteria.clear();
|
||||
orderByClause = null;
|
||||
distinct = false;
|
||||
}
|
||||
|
||||
protected abstract static class GeneratedCriteria {
|
||||
protected List<Criterion> criteria;
|
||||
|
||||
protected GeneratedCriteria() {
|
||||
super();
|
||||
criteria = new ArrayList<>();
|
||||
}
|
||||
|
||||
public boolean isValid() {
|
||||
return criteria.size() > 0;
|
||||
}
|
||||
|
||||
public List<Criterion> getAllCriteria() {
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public List<Criterion> getCriteria() {
|
||||
return criteria;
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition) {
|
||||
if (condition == null) {
|
||||
throw new RuntimeException("Value for condition cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition));
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition, Object value, String property) {
|
||||
if (value == null) {
|
||||
throw new RuntimeException("Value for " + property + " cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition, value));
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition, Object value1, Object value2, String property) {
|
||||
if (value1 == null || value2 == null) {
|
||||
throw new RuntimeException("Between values for " + property + " cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition, value1, value2));
|
||||
}
|
||||
|
||||
public Criteria andIdIsNull() {
|
||||
addCriterion("id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdIsNotNull() {
|
||||
addCriterion("id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdEqualTo(Integer value) {
|
||||
addCriterion("id =", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotEqualTo(Integer value) {
|
||||
addCriterion("id <>", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdGreaterThan(Integer value) {
|
||||
addCriterion("id >", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdGreaterThanOrEqualTo(Integer value) {
|
||||
addCriterion("id >=", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdLessThan(Integer value) {
|
||||
addCriterion("id <", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdLessThanOrEqualTo(Integer value) {
|
||||
addCriterion("id <=", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdIn(List<Integer> values) {
|
||||
addCriterion("id in", values, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotIn(List<Integer> values) {
|
||||
addCriterion("id not in", values, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdBetween(Integer value1, Integer value2) {
|
||||
addCriterion("id between", value1, value2, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotBetween(Integer value1, Integer value2) {
|
||||
addCriterion("id not between", value1, value2, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUidIsNull() {
|
||||
addCriterion("`uid` is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUidIsNotNull() {
|
||||
addCriterion("`uid` is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUidEqualTo(String value) {
|
||||
addCriterion("`uid` =", value, "uid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUidNotEqualTo(String value) {
|
||||
addCriterion("`uid` <>", value, "uid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUidGreaterThan(String value) {
|
||||
addCriterion("`uid` >", value, "uid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUidGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("`uid` >=", value, "uid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUidLessThan(String value) {
|
||||
addCriterion("`uid` <", value, "uid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUidLessThanOrEqualTo(String value) {
|
||||
addCriterion("`uid` <=", value, "uid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUidLike(String value) {
|
||||
addCriterion("`uid` like", value, "uid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUidNotLike(String value) {
|
||||
addCriterion("`uid` not like", value, "uid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUidIn(List<String> values) {
|
||||
addCriterion("`uid` in", values, "uid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUidNotIn(List<String> values) {
|
||||
addCriterion("`uid` not in", values, "uid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUidBetween(String value1, String value2) {
|
||||
addCriterion("`uid` between", value1, value2, "uid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUidNotBetween(String value1, String value2) {
|
||||
addCriterion("`uid` not between", value1, value2, "uid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFidIsNull() {
|
||||
addCriterion("fid is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFidIsNotNull() {
|
||||
addCriterion("fid is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFidEqualTo(Integer value) {
|
||||
addCriterion("fid =", value, "fid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFidNotEqualTo(Integer value) {
|
||||
addCriterion("fid <>", value, "fid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFidGreaterThan(Integer value) {
|
||||
addCriterion("fid >", value, "fid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFidGreaterThanOrEqualTo(Integer value) {
|
||||
addCriterion("fid >=", value, "fid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFidLessThan(Integer value) {
|
||||
addCriterion("fid <", value, "fid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFidLessThanOrEqualTo(Integer value) {
|
||||
addCriterion("fid <=", value, "fid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFidIn(List<Integer> values) {
|
||||
addCriterion("fid in", values, "fid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFidNotIn(List<Integer> values) {
|
||||
addCriterion("fid not in", values, "fid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFidBetween(Integer value1, Integer value2) {
|
||||
addCriterion("fid between", value1, value2, "fid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFidNotBetween(Integer value1, Integer value2) {
|
||||
addCriterion("fid not between", value1, value2, "fid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTypeIsNull() {
|
||||
addCriterion("`type` is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTypeIsNotNull() {
|
||||
addCriterion("`type` is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTypeEqualTo(Integer value) {
|
||||
addCriterion("`type` =", value, "type");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTypeNotEqualTo(Integer value) {
|
||||
addCriterion("`type` <>", value, "type");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTypeGreaterThan(Integer value) {
|
||||
addCriterion("`type` >", value, "type");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTypeGreaterThanOrEqualTo(Integer value) {
|
||||
addCriterion("`type` >=", value, "type");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTypeLessThan(Integer value) {
|
||||
addCriterion("`type` <", value, "type");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTypeLessThanOrEqualTo(Integer value) {
|
||||
addCriterion("`type` <=", value, "type");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTypeIn(List<Integer> values) {
|
||||
addCriterion("`type` in", values, "type");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTypeNotIn(List<Integer> values) {
|
||||
addCriterion("`type` not in", values, "type");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTypeBetween(Integer value1, Integer value2) {
|
||||
addCriterion("`type` between", value1, value2, "type");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTypeNotBetween(Integer value1, Integer value2) {
|
||||
addCriterion("`type` not between", value1, value2, "type");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreatetimeIsNull() {
|
||||
addCriterion("createTime is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreatetimeIsNotNull() {
|
||||
addCriterion("createTime is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreatetimeEqualTo(Date value) {
|
||||
addCriterion("createTime =", value, "createtime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreatetimeNotEqualTo(Date value) {
|
||||
addCriterion("createTime <>", value, "createtime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreatetimeGreaterThan(Date value) {
|
||||
addCriterion("createTime >", value, "createtime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreatetimeGreaterThanOrEqualTo(Date value) {
|
||||
addCriterion("createTime >=", value, "createtime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreatetimeLessThan(Date value) {
|
||||
addCriterion("createTime <", value, "createtime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreatetimeLessThanOrEqualTo(Date value) {
|
||||
addCriterion("createTime <=", value, "createtime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreatetimeIn(List<Date> values) {
|
||||
addCriterion("createTime in", values, "createtime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreatetimeNotIn(List<Date> values) {
|
||||
addCriterion("createTime not in", values, "createtime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreatetimeBetween(Date value1, Date value2) {
|
||||
addCriterion("createTime between", value1, value2, "createtime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreatetimeNotBetween(Date value1, Date value2) {
|
||||
addCriterion("createTime not between", value1, value2, "createtime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
public static class Criteria extends GeneratedCriteria {
|
||||
protected Criteria() {
|
||||
super();
|
||||
}
|
||||
}
|
||||
|
||||
public static class Criterion {
|
||||
private String condition;
|
||||
|
||||
private Object value;
|
||||
|
||||
private Object secondValue;
|
||||
|
||||
private boolean noValue;
|
||||
|
||||
private boolean singleValue;
|
||||
|
||||
private boolean betweenValue;
|
||||
|
||||
private boolean listValue;
|
||||
|
||||
private String typeHandler;
|
||||
|
||||
public String getCondition() {
|
||||
return condition;
|
||||
}
|
||||
|
||||
public Object getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public Object getSecondValue() {
|
||||
return secondValue;
|
||||
}
|
||||
|
||||
public boolean isNoValue() {
|
||||
return noValue;
|
||||
}
|
||||
|
||||
public boolean isSingleValue() {
|
||||
return singleValue;
|
||||
}
|
||||
|
||||
public boolean isBetweenValue() {
|
||||
return betweenValue;
|
||||
}
|
||||
|
||||
public boolean isListValue() {
|
||||
return listValue;
|
||||
}
|
||||
|
||||
public String getTypeHandler() {
|
||||
return typeHandler;
|
||||
}
|
||||
|
||||
protected Criterion(String condition) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.typeHandler = null;
|
||||
this.noValue = true;
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, String typeHandler) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.value = value;
|
||||
this.typeHandler = typeHandler;
|
||||
if (value instanceof List<?>) {
|
||||
this.listValue = true;
|
||||
} else {
|
||||
this.singleValue = true;
|
||||
}
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value) {
|
||||
this(condition, value, null);
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.value = value;
|
||||
this.secondValue = secondValue;
|
||||
this.typeHandler = typeHandler;
|
||||
this.betweenValue = true;
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, Object secondValue) {
|
||||
this(condition, value, secondValue, null);
|
||||
}
|
||||
}
|
||||
}
|
@ -11,9 +11,9 @@ import lombok.Data;
|
||||
public class TUserConfig implements Serializable {
|
||||
private Integer id;
|
||||
|
||||
private String uid;
|
||||
private Integer uid;
|
||||
|
||||
private Integer cloudmodel;
|
||||
private Integer infoversionbackup;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
@ -174,123 +174,113 @@ public class TUserConfigExample {
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUidEqualTo(String value) {
|
||||
public Criteria andUidEqualTo(Integer value) {
|
||||
addCriterion("`uid` =", value, "uid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUidNotEqualTo(String value) {
|
||||
public Criteria andUidNotEqualTo(Integer value) {
|
||||
addCriterion("`uid` <>", value, "uid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUidGreaterThan(String value) {
|
||||
public Criteria andUidGreaterThan(Integer value) {
|
||||
addCriterion("`uid` >", value, "uid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUidGreaterThanOrEqualTo(String value) {
|
||||
public Criteria andUidGreaterThanOrEqualTo(Integer value) {
|
||||
addCriterion("`uid` >=", value, "uid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUidLessThan(String value) {
|
||||
public Criteria andUidLessThan(Integer value) {
|
||||
addCriterion("`uid` <", value, "uid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUidLessThanOrEqualTo(String value) {
|
||||
public Criteria andUidLessThanOrEqualTo(Integer value) {
|
||||
addCriterion("`uid` <=", value, "uid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUidLike(String value) {
|
||||
addCriterion("`uid` like", value, "uid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUidNotLike(String value) {
|
||||
addCriterion("`uid` not like", value, "uid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUidIn(List<String> values) {
|
||||
public Criteria andUidIn(List<Integer> values) {
|
||||
addCriterion("`uid` in", values, "uid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUidNotIn(List<String> values) {
|
||||
public Criteria andUidNotIn(List<Integer> values) {
|
||||
addCriterion("`uid` not in", values, "uid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUidBetween(String value1, String value2) {
|
||||
public Criteria andUidBetween(Integer value1, Integer value2) {
|
||||
addCriterion("`uid` between", value1, value2, "uid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUidNotBetween(String value1, String value2) {
|
||||
public Criteria andUidNotBetween(Integer value1, Integer value2) {
|
||||
addCriterion("`uid` not between", value1, value2, "uid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCloudmodelIsNull() {
|
||||
addCriterion("cloudmodel is null");
|
||||
public Criteria andInfoversionbackupIsNull() {
|
||||
addCriterion("infoVersionBackup is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCloudmodelIsNotNull() {
|
||||
addCriterion("cloudmodel is not null");
|
||||
public Criteria andInfoversionbackupIsNotNull() {
|
||||
addCriterion("infoVersionBackup is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCloudmodelEqualTo(Integer value) {
|
||||
addCriterion("cloudmodel =", value, "cloudmodel");
|
||||
public Criteria andInfoversionbackupEqualTo(Integer value) {
|
||||
addCriterion("infoVersionBackup =", value, "infoversionbackup");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCloudmodelNotEqualTo(Integer value) {
|
||||
addCriterion("cloudmodel <>", value, "cloudmodel");
|
||||
public Criteria andInfoversionbackupNotEqualTo(Integer value) {
|
||||
addCriterion("infoVersionBackup <>", value, "infoversionbackup");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCloudmodelGreaterThan(Integer value) {
|
||||
addCriterion("cloudmodel >", value, "cloudmodel");
|
||||
public Criteria andInfoversionbackupGreaterThan(Integer value) {
|
||||
addCriterion("infoVersionBackup >", value, "infoversionbackup");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCloudmodelGreaterThanOrEqualTo(Integer value) {
|
||||
addCriterion("cloudmodel >=", value, "cloudmodel");
|
||||
public Criteria andInfoversionbackupGreaterThanOrEqualTo(Integer value) {
|
||||
addCriterion("infoVersionBackup >=", value, "infoversionbackup");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCloudmodelLessThan(Integer value) {
|
||||
addCriterion("cloudmodel <", value, "cloudmodel");
|
||||
public Criteria andInfoversionbackupLessThan(Integer value) {
|
||||
addCriterion("infoVersionBackup <", value, "infoversionbackup");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCloudmodelLessThanOrEqualTo(Integer value) {
|
||||
addCriterion("cloudmodel <=", value, "cloudmodel");
|
||||
public Criteria andInfoversionbackupLessThanOrEqualTo(Integer value) {
|
||||
addCriterion("infoVersionBackup <=", value, "infoversionbackup");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCloudmodelIn(List<Integer> values) {
|
||||
addCriterion("cloudmodel in", values, "cloudmodel");
|
||||
public Criteria andInfoversionbackupIn(List<Integer> values) {
|
||||
addCriterion("infoVersionBackup in", values, "infoversionbackup");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCloudmodelNotIn(List<Integer> values) {
|
||||
addCriterion("cloudmodel not in", values, "cloudmodel");
|
||||
public Criteria andInfoversionbackupNotIn(List<Integer> values) {
|
||||
addCriterion("infoVersionBackup not in", values, "infoversionbackup");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCloudmodelBetween(Integer value1, Integer value2) {
|
||||
addCriterion("cloudmodel between", value1, value2, "cloudmodel");
|
||||
public Criteria andInfoversionbackupBetween(Integer value1, Integer value2) {
|
||||
addCriterion("infoVersionBackup between", value1, value2, "infoversionbackup");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCloudmodelNotBetween(Integer value1, Integer value2) {
|
||||
addCriterion("cloudmodel not between", value1, value2, "cloudmodel");
|
||||
public Criteria andInfoversionbackupNotBetween(Integer value1, Integer value2) {
|
||||
addCriterion("infoVersionBackup not between", value1, value2, "infoversionbackup");
|
||||
return (Criteria) this;
|
||||
}
|
||||
}
|
||||
|
52
src/main/java/com/yutou/mobilecloud/utils/AESTools.java
Normal file
52
src/main/java/com/yutou/mobilecloud/utils/AESTools.java
Normal file
@ -0,0 +1,52 @@
|
||||
package com.yutou.mobilecloud.utils;
|
||||
|
||||
import javax.crypto.Cipher;
|
||||
import javax.crypto.KeyGenerator;
|
||||
import javax.crypto.spec.SecretKeySpec;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.Base64;
|
||||
|
||||
public class AESTools {
|
||||
private static final String key="qD5POhp7UMn0iKFH";
|
||||
private static final String model="AES/ECB/PKCS5Padding";
|
||||
|
||||
/**
|
||||
* 加密
|
||||
* @param value 原文
|
||||
* @return 密文
|
||||
*/
|
||||
public static String encrypt(String value,String key){
|
||||
try {
|
||||
KeyGenerator generator=KeyGenerator.getInstance("AES");
|
||||
generator.init(128);
|
||||
Cipher cipher=Cipher.getInstance(model);
|
||||
cipher.init(Cipher.ENCRYPT_MODE,new SecretKeySpec(key.getBytes(),"AES"));
|
||||
byte[] bytes=cipher.doFinal(value.getBytes(StandardCharsets.UTF_8));
|
||||
return new String(Base64.getEncoder().encode(bytes));
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 解密
|
||||
* @param value 密文
|
||||
* @return 原文
|
||||
*/
|
||||
public static String decrypt(String value,String key){
|
||||
try {
|
||||
KeyGenerator generator=KeyGenerator.getInstance("AES");
|
||||
generator.init(128);
|
||||
Cipher cipher=Cipher.getInstance(model);
|
||||
cipher.init(Cipher.DECRYPT_MODE,new SecretKeySpec(key.getBytes(),"AES"));
|
||||
byte[] encodeBytes=Base64.getDecoder().decode(value);
|
||||
byte[] bytes=cipher.doFinal(encodeBytes);
|
||||
return new String(bytes);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
289
src/main/java/com/yutou/mobilecloud/utils/Tools.java
Normal file
289
src/main/java/com/yutou/mobilecloud/utils/Tools.java
Normal file
@ -0,0 +1,289 @@
|
||||
package com.yutou.mobilecloud.utils;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import org.springframework.core.io.FileSystemResource;
|
||||
import org.springframework.http.HttpHeaders;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.servlet.http.Cookie;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.*;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.URL;
|
||||
import java.net.URLDecoder;
|
||||
import java.net.URLEncoder;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.security.MessageDigest;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Base64;
|
||||
import java.util.Date;
|
||||
import java.util.Random;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
public class Tools {
|
||||
private static float UPSPower=-1.0f;
|
||||
/**
|
||||
* 设置Cookie
|
||||
*
|
||||
* @param response
|
||||
* @param key
|
||||
* @param value
|
||||
* @param time
|
||||
*/
|
||||
public static void setCookie(HttpServletResponse response, String key, String value, int time) {
|
||||
Cookie cookie = new Cookie(key, value);
|
||||
if (time != -1) {
|
||||
cookie.setMaxAge(time);
|
||||
}
|
||||
cookie.setPath("/");
|
||||
response.addCookie(cookie);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取Cookie
|
||||
*
|
||||
* @param request
|
||||
* @param key
|
||||
* @return
|
||||
*/
|
||||
public static Cookie getCookie(HttpServletRequest request, String key) {
|
||||
Cookie[] cookies = request.getCookies();
|
||||
try {
|
||||
for (Cookie cookie : cookies) {
|
||||
if (key != null && cookie.getName().equals(key)) {
|
||||
return cookie;
|
||||
}
|
||||
}
|
||||
} catch (Exception ignored) {
|
||||
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除Cookie
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @param key
|
||||
* @return
|
||||
*/
|
||||
public static String deleteCookie(HttpServletRequest request, HttpServletResponse response, String key) {
|
||||
for (Cookie cookie : request.getCookies()) {
|
||||
if (cookie.getName().equals(key)) {
|
||||
cookie.setMaxAge(0);
|
||||
cookie.setPath("/");
|
||||
cookie.setValue(null);
|
||||
response.addCookie(cookie);
|
||||
}
|
||||
}
|
||||
return "ok";
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取项目路径
|
||||
*
|
||||
* @param request
|
||||
* @return
|
||||
*/
|
||||
public static String getPath(HttpServletRequest request) {
|
||||
return request.getServletContext().getRealPath("/") + "/";
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取客户端IP
|
||||
*
|
||||
* @param request
|
||||
* @return
|
||||
*/
|
||||
public static String getRemoteAddress(HttpServletRequest request) {
|
||||
String ip = request.getHeader("x-forwarded-for");
|
||||
if (ip == null || ip.length() == 0 || ip.equalsIgnoreCase("unknown")) {
|
||||
ip = request.getHeader("Proxy-Client-IP");
|
||||
}
|
||||
if (ip == null || ip.length() == 0 || ip.equalsIgnoreCase("unknown")) {
|
||||
ip = request.getHeader("WL-Proxy-Client-IP");
|
||||
}
|
||||
if (ip == null || ip.length() == 0 || ip.equalsIgnoreCase("unknown")) {
|
||||
ip = request.getRemoteAddr();
|
||||
}
|
||||
return ip;
|
||||
}
|
||||
|
||||
/**
|
||||
* N以内的不重复随机数
|
||||
*
|
||||
* @param min 最小值
|
||||
* @param max 最大值
|
||||
* @param n
|
||||
* @return
|
||||
*/
|
||||
public static int[] randomCommon(int min, int max, int n) {
|
||||
int len = max - min + 1;
|
||||
if (max < min || n > len) {
|
||||
return new int[0];
|
||||
}
|
||||
// 初始化给定范围的待选数组
|
||||
int[] source = new int[len];
|
||||
for (int i = min; i < min + len; i++) {
|
||||
source[i - min] = i;
|
||||
}
|
||||
int[] result = new int[n];
|
||||
Random rd = new Random();
|
||||
int index = 0;
|
||||
for (int i = 0; i < result.length; i++) {
|
||||
// 待选数组0到(len-2)随机一个下标
|
||||
index = Math.abs(rd.nextInt() % len--);
|
||||
// 将随机到的数放入结果集
|
||||
result[i] = source[index];
|
||||
// 将待选数组中被随机到的数,用待选数组(len-1)下标对应的数替换
|
||||
source[index] = source[len];
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 保存上传的文件
|
||||
*
|
||||
* @param path 路径
|
||||
* @param file 文件
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public static String createFile(String path, MultipartFile file, String newFileName) throws Exception {
|
||||
String savePath = new File("").getAbsolutePath() + File.separator + "html" + File.separator + path;
|
||||
File servicePath = new File(savePath);
|
||||
if (!servicePath.exists()) {
|
||||
servicePath.mkdirs();
|
||||
}
|
||||
String fileName = file.getOriginalFilename();
|
||||
if (newFileName != null) {
|
||||
fileName = newFileName;
|
||||
}
|
||||
File saveFile = new File(savePath + "/" + fileName);
|
||||
if (saveFile.exists()) {
|
||||
if (!saveFile.delete()) {
|
||||
saveFile = new File(savePath + "/" + fileName.replace(".", "_" + new Date().getTime() + "."));
|
||||
}
|
||||
}
|
||||
file.transferTo(saveFile);
|
||||
fileName = URLEncoder.encode(fileName, "UTF-8");
|
||||
return path + fileName;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 构造给前端的文件
|
||||
*
|
||||
* @param file 文件路径
|
||||
* @return 前端获取的文件
|
||||
*/
|
||||
public static ResponseEntity<FileSystemResource> getFile(File file) {
|
||||
HttpHeaders headers = new HttpHeaders();
|
||||
headers.add("Cache-Control", "no-cache, no-store, must-revalidate");
|
||||
try {
|
||||
headers.add("Content-Disposition", "attachment; filename=" + URLEncoder.encode(file.getName(), "UTF-8"));
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
headers.add("Content-Disposition", "attachment; filename=" + file.getName());
|
||||
}
|
||||
headers.add("Pragma", "no-cache");
|
||||
headers.add("Expires", "0");
|
||||
headers.add("Last-Modified", new Date().toString());
|
||||
headers.add("ETag", String.valueOf(System.currentTimeMillis()));
|
||||
return ResponseEntity.ok().headers(headers).contentLength(file.length()).contentType(MediaType.parseMediaType("application/octet-stream")).body(new FileSystemResource(file));
|
||||
}
|
||||
public static String getMd5(String str){
|
||||
return bytesToHexString(str.getBytes(StandardCharsets.UTF_8));
|
||||
}
|
||||
public static String getFileMD5(File file){
|
||||
return bytesToHexString(getFileMD5Byte(file));
|
||||
}
|
||||
public static byte[] getFileMD5Byte(File file) {
|
||||
if (!file.isFile()) {
|
||||
return null;
|
||||
}
|
||||
MessageDigest digest = null;
|
||||
FileInputStream in = null;
|
||||
byte[] buffer = new byte[1024];
|
||||
int len;
|
||||
try {
|
||||
digest = MessageDigest.getInstance("MD5");
|
||||
in = new FileInputStream(file);
|
||||
while ((len = in.read(buffer, 0, 1024)) != -1) {
|
||||
digest.update(buffer, 0, len);
|
||||
}
|
||||
in.close();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
return digest.digest();
|
||||
}
|
||||
|
||||
private static String bytesToHexString(byte[] src) {
|
||||
StringBuilder stringBuilder = new StringBuilder("");
|
||||
if (src == null || src.length <= 0) {
|
||||
return null;
|
||||
}
|
||||
for (byte aSrc : src) {
|
||||
int v = aSrc & 0xFF;
|
||||
String hv = Integer.toHexString(v);
|
||||
if (hv.length() < 2) {
|
||||
stringBuilder.append(0);
|
||||
}
|
||||
stringBuilder.append(hv);
|
||||
}
|
||||
return stringBuilder.toString();
|
||||
}
|
||||
|
||||
public static String base64ToString(String base) {
|
||||
base = base.replace(" ", "+");
|
||||
try {
|
||||
base = new String(Base64.getDecoder().decode(base.replace("\r\n", "").getBytes()));
|
||||
} catch (Exception e) {
|
||||
try {
|
||||
base = URLDecoder.decode(base, StandardCharsets.UTF_8);
|
||||
base = base.replace(" ", "+");
|
||||
base = new String(Base64.getDecoder().decode(base.replace("\r\n", "").getBytes()));
|
||||
} catch (Exception e1) {
|
||||
e1.printStackTrace();
|
||||
}
|
||||
}
|
||||
return base;
|
||||
}
|
||||
public static String stringToBase64(String string){
|
||||
return Base64.getEncoder().encodeToString(string.getBytes(StandardCharsets.UTF_8)).replace("+"," ");
|
||||
}
|
||||
|
||||
/**
|
||||
* 异常输出
|
||||
*
|
||||
* @param e 异常
|
||||
* @return
|
||||
*/
|
||||
public static String getExceptionString(Exception e) {
|
||||
StringWriter writer = new StringWriter();
|
||||
PrintWriter printWriter = new PrintWriter(writer);
|
||||
e.printStackTrace(printWriter);
|
||||
printWriter.close();
|
||||
return writer.toString();
|
||||
}
|
||||
|
||||
public static String getToDayTime() {
|
||||
return new SimpleDateFormat("yyyy-MM-dd").format(new Date());
|
||||
}
|
||||
|
||||
public static String getToDayNowTimeToFileName() {
|
||||
return new SimpleDateFormat("yyyy-MM-dd__HH_mm_ss").format(new Date());
|
||||
}
|
||||
|
||||
|
||||
}
|
35
src/main/java/com/yutou/mobilecloud/utils/UserTools.java
Normal file
35
src/main/java/com/yutou/mobilecloud/utils/UserTools.java
Normal file
@ -0,0 +1,35 @@
|
||||
package com.yutou.mobilecloud.utils;
|
||||
|
||||
import com.yutou.mobilecloud.mybatis.model.TUser;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
|
||||
import static com.yutou.mobilecloud.Services.impls.IUserImpl.LOGIN_KEY;
|
||||
|
||||
public class UserTools {
|
||||
|
||||
public static String getToken(TUser user) {
|
||||
String str = String.format("%d|%s|%s",
|
||||
user.getId(),
|
||||
user.getUsername(),
|
||||
LocalDateTime.now().plusMonths(1).format(DateTimeFormatter.ISO_LOCAL_DATE_TIME)
|
||||
);
|
||||
return AESTools.encrypt(Tools.stringToBase64(str), LOGIN_KEY);
|
||||
}
|
||||
|
||||
public static int checkTokenGetUid(String token) {
|
||||
String str = Tools.base64ToString(AESTools.decrypt(token, LOGIN_KEY));
|
||||
if (str != null) {
|
||||
String[] sp = str.split("\\|");
|
||||
int uid = Integer.parseInt(sp[0]);
|
||||
String outTime = sp[2];
|
||||
boolean isOut = LocalDateTime.now().isAfter(LocalDateTime.parse(outTime));
|
||||
if (isOut) {
|
||||
return -2;
|
||||
}
|
||||
return uid;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
}
|
237
src/main/resources/mappers/TBackupAppDao.xml
Normal file
237
src/main/resources/mappers/TBackupAppDao.xml
Normal file
@ -0,0 +1,237 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.yutou.mobilecloud.mybatis.dao.TBackupAppDao">
|
||||
<resultMap id="BaseResultMap" type="com.yutou.mobilecloud.mybatis.model.TBackupApp">
|
||||
<id column="id" jdbcType="INTEGER" property="id" />
|
||||
<result column="uid" jdbcType="INTEGER" property="uid" />
|
||||
<result column="fid" jdbcType="INTEGER" property="fid" />
|
||||
<result column="appName" jdbcType="VARCHAR" property="appname" />
|
||||
<result column="appPackageName" jdbcType="VARCHAR" property="apppackagename" />
|
||||
<result column="appVersion" jdbcType="VARCHAR" property="appversion" />
|
||||
<result column="createTime" jdbcType="TIMESTAMP" property="createtime" />
|
||||
</resultMap>
|
||||
<sql id="Example_Where_Clause">
|
||||
<where>
|
||||
<foreach collection="oredCriteria" item="criteria" separator="or">
|
||||
<if test="criteria.valid">
|
||||
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||
<foreach collection="criteria.criteria" item="criterion">
|
||||
<choose>
|
||||
<when test="criterion.noValue">
|
||||
and ${criterion.condition}
|
||||
</when>
|
||||
<when test="criterion.singleValue">
|
||||
and ${criterion.condition} #{criterion.value}
|
||||
</when>
|
||||
<when test="criterion.betweenValue">
|
||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||
</when>
|
||||
<when test="criterion.listValue">
|
||||
and ${criterion.condition}
|
||||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
||||
#{listItem}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
</foreach>
|
||||
</trim>
|
||||
</if>
|
||||
</foreach>
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Update_By_Example_Where_Clause">
|
||||
<where>
|
||||
<foreach collection="example.oredCriteria" item="criteria" separator="or">
|
||||
<if test="criteria.valid">
|
||||
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||
<foreach collection="criteria.criteria" item="criterion">
|
||||
<choose>
|
||||
<when test="criterion.noValue">
|
||||
and ${criterion.condition}
|
||||
</when>
|
||||
<when test="criterion.singleValue">
|
||||
and ${criterion.condition} #{criterion.value}
|
||||
</when>
|
||||
<when test="criterion.betweenValue">
|
||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||
</when>
|
||||
<when test="criterion.listValue">
|
||||
and ${criterion.condition}
|
||||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
||||
#{listItem}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
</foreach>
|
||||
</trim>
|
||||
</if>
|
||||
</foreach>
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List">
|
||||
id, `uid`, fid, appName, appPackageName, appVersion, createTime
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.yutou.mobilecloud.mybatis.model.TBackupAppExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from t_backup_app
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
<if test="orderByClause != null">
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from t_backup_app
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||
delete from t_backup_app
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.yutou.mobilecloud.mybatis.model.TBackupAppExample">
|
||||
delete from t_backup_app
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.yutou.mobilecloud.mybatis.model.TBackupApp" useGeneratedKeys="true">
|
||||
insert into t_backup_app (`uid`, fid, appName,
|
||||
appPackageName, appVersion, createTime
|
||||
)
|
||||
values (#{uid,jdbcType=INTEGER}, #{fid,jdbcType=INTEGER}, #{appname,jdbcType=VARCHAR},
|
||||
#{apppackagename,jdbcType=VARCHAR}, #{appversion,jdbcType=VARCHAR}, #{createtime,jdbcType=TIMESTAMP}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.yutou.mobilecloud.mybatis.model.TBackupApp" useGeneratedKeys="true">
|
||||
insert into t_backup_app
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="uid != null">
|
||||
`uid`,
|
||||
</if>
|
||||
<if test="fid != null">
|
||||
fid,
|
||||
</if>
|
||||
<if test="appname != null">
|
||||
appName,
|
||||
</if>
|
||||
<if test="apppackagename != null">
|
||||
appPackageName,
|
||||
</if>
|
||||
<if test="appversion != null">
|
||||
appVersion,
|
||||
</if>
|
||||
<if test="createtime != null">
|
||||
createTime,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="uid != null">
|
||||
#{uid,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="fid != null">
|
||||
#{fid,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="appname != null">
|
||||
#{appname,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="apppackagename != null">
|
||||
#{apppackagename,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="appversion != null">
|
||||
#{appversion,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createtime != null">
|
||||
#{createtime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.yutou.mobilecloud.mybatis.model.TBackupAppExample" resultType="java.lang.Long">
|
||||
select count(*) from t_backup_app
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update t_backup_app
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.uid != null">
|
||||
`uid` = #{record.uid,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.fid != null">
|
||||
fid = #{record.fid,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.appname != null">
|
||||
appName = #{record.appname,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.apppackagename != null">
|
||||
appPackageName = #{record.apppackagename,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.appversion != null">
|
||||
appVersion = #{record.appversion,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.createtime != null">
|
||||
createTime = #{record.createtime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update t_backup_app
|
||||
set id = #{record.id,jdbcType=INTEGER},
|
||||
`uid` = #{record.uid,jdbcType=INTEGER},
|
||||
fid = #{record.fid,jdbcType=INTEGER},
|
||||
appName = #{record.appname,jdbcType=VARCHAR},
|
||||
appPackageName = #{record.apppackagename,jdbcType=VARCHAR},
|
||||
appVersion = #{record.appversion,jdbcType=VARCHAR},
|
||||
createTime = #{record.createtime,jdbcType=TIMESTAMP}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.yutou.mobilecloud.mybatis.model.TBackupApp">
|
||||
update t_backup_app
|
||||
<set>
|
||||
<if test="uid != null">
|
||||
`uid` = #{uid,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="fid != null">
|
||||
fid = #{fid,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="appname != null">
|
||||
appName = #{appname,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="apppackagename != null">
|
||||
appPackageName = #{apppackagename,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="appversion != null">
|
||||
appVersion = #{appversion,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createtime != null">
|
||||
createTime = #{createtime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.yutou.mobilecloud.mybatis.model.TBackupApp">
|
||||
update t_backup_app
|
||||
set `uid` = #{uid,jdbcType=INTEGER},
|
||||
fid = #{fid,jdbcType=INTEGER},
|
||||
appName = #{appname,jdbcType=VARCHAR},
|
||||
appPackageName = #{apppackagename,jdbcType=VARCHAR},
|
||||
appVersion = #{appversion,jdbcType=VARCHAR},
|
||||
createTime = #{createtime,jdbcType=TIMESTAMP}
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
</mapper>
|
@ -3,12 +3,10 @@
|
||||
<mapper namespace="com.yutou.mobilecloud.mybatis.dao.TBackupFileDao">
|
||||
<resultMap id="BaseResultMap" type="com.yutou.mobilecloud.mybatis.model.TBackupFile">
|
||||
<id column="id" jdbcType="INTEGER" property="id" />
|
||||
<result column="uid" jdbcType="INTEGER" property="uid" />
|
||||
<result column="bid" jdbcType="INTEGER" property="bid" />
|
||||
<result column="filepath" jdbcType="VARCHAR" property="filepath" />
|
||||
<result column="filesize" jdbcType="INTEGER" property="filesize" />
|
||||
<result column="fileName" jdbcType="VARCHAR" property="filename" />
|
||||
<result column="filePath" jdbcType="VARCHAR" property="filepath" />
|
||||
<result column="fileSize" jdbcType="INTEGER" property="filesize" />
|
||||
<result column="md5" jdbcType="VARCHAR" property="md5" />
|
||||
<result column="createTime" jdbcType="TIMESTAMP" property="createtime" />
|
||||
</resultMap>
|
||||
<sql id="Example_Where_Clause">
|
||||
<where>
|
||||
@ -69,7 +67,7 @@
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List">
|
||||
id, `uid`, bid, filepath, filesize, md5, createTime
|
||||
id, fileName, filePath, fileSize, md5
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.yutou.mobilecloud.mybatis.model.TBackupFileExample" resultMap="BaseResultMap">
|
||||
select
|
||||
@ -102,41 +100,30 @@
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.yutou.mobilecloud.mybatis.model.TBackupFile" useGeneratedKeys="true">
|
||||
insert into t_backup_file (`uid`, bid, filepath,
|
||||
filesize, md5, createTime
|
||||
)
|
||||
values (#{uid,jdbcType=INTEGER}, #{bid,jdbcType=INTEGER}, #{filepath,jdbcType=VARCHAR},
|
||||
#{filesize,jdbcType=INTEGER}, #{md5,jdbcType=VARCHAR}, #{createtime,jdbcType=TIMESTAMP}
|
||||
)
|
||||
insert into t_backup_file (fileName, filePath, fileSize,
|
||||
md5)
|
||||
values (#{filename,jdbcType=VARCHAR}, #{filepath,jdbcType=VARCHAR}, #{filesize,jdbcType=INTEGER},
|
||||
#{md5,jdbcType=VARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.yutou.mobilecloud.mybatis.model.TBackupFile" useGeneratedKeys="true">
|
||||
insert into t_backup_file
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="uid != null">
|
||||
`uid`,
|
||||
</if>
|
||||
<if test="bid != null">
|
||||
bid,
|
||||
<if test="filename != null">
|
||||
fileName,
|
||||
</if>
|
||||
<if test="filepath != null">
|
||||
filepath,
|
||||
filePath,
|
||||
</if>
|
||||
<if test="filesize != null">
|
||||
filesize,
|
||||
fileSize,
|
||||
</if>
|
||||
<if test="md5 != null">
|
||||
md5,
|
||||
</if>
|
||||
<if test="createtime != null">
|
||||
createTime,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="uid != null">
|
||||
#{uid,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="bid != null">
|
||||
#{bid,jdbcType=INTEGER},
|
||||
<if test="filename != null">
|
||||
#{filename,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="filepath != null">
|
||||
#{filepath,jdbcType=VARCHAR},
|
||||
@ -147,9 +134,6 @@
|
||||
<if test="md5 != null">
|
||||
#{md5,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createtime != null">
|
||||
#{createtime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.yutou.mobilecloud.mybatis.model.TBackupFileExample" resultType="java.lang.Long">
|
||||
@ -164,24 +148,18 @@
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.uid != null">
|
||||
`uid` = #{record.uid,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.bid != null">
|
||||
bid = #{record.bid,jdbcType=INTEGER},
|
||||
<if test="record.filename != null">
|
||||
fileName = #{record.filename,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.filepath != null">
|
||||
filepath = #{record.filepath,jdbcType=VARCHAR},
|
||||
filePath = #{record.filepath,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.filesize != null">
|
||||
filesize = #{record.filesize,jdbcType=INTEGER},
|
||||
fileSize = #{record.filesize,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.md5 != null">
|
||||
md5 = #{record.md5,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.createtime != null">
|
||||
createTime = #{record.createtime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
@ -190,12 +168,10 @@
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update t_backup_file
|
||||
set id = #{record.id,jdbcType=INTEGER},
|
||||
`uid` = #{record.uid,jdbcType=INTEGER},
|
||||
bid = #{record.bid,jdbcType=INTEGER},
|
||||
filepath = #{record.filepath,jdbcType=VARCHAR},
|
||||
filesize = #{record.filesize,jdbcType=INTEGER},
|
||||
md5 = #{record.md5,jdbcType=VARCHAR},
|
||||
createTime = #{record.createtime,jdbcType=TIMESTAMP}
|
||||
fileName = #{record.filename,jdbcType=VARCHAR},
|
||||
filePath = #{record.filepath,jdbcType=VARCHAR},
|
||||
fileSize = #{record.filesize,jdbcType=INTEGER},
|
||||
md5 = #{record.md5,jdbcType=VARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
@ -203,35 +179,27 @@
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.yutou.mobilecloud.mybatis.model.TBackupFile">
|
||||
update t_backup_file
|
||||
<set>
|
||||
<if test="uid != null">
|
||||
`uid` = #{uid,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="bid != null">
|
||||
bid = #{bid,jdbcType=INTEGER},
|
||||
<if test="filename != null">
|
||||
fileName = #{filename,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="filepath != null">
|
||||
filepath = #{filepath,jdbcType=VARCHAR},
|
||||
filePath = #{filepath,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="filesize != null">
|
||||
filesize = #{filesize,jdbcType=INTEGER},
|
||||
fileSize = #{filesize,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="md5 != null">
|
||||
md5 = #{md5,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createtime != null">
|
||||
createTime = #{createtime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.yutou.mobilecloud.mybatis.model.TBackupFile">
|
||||
update t_backup_file
|
||||
set `uid` = #{uid,jdbcType=INTEGER},
|
||||
bid = #{bid,jdbcType=INTEGER},
|
||||
filepath = #{filepath,jdbcType=VARCHAR},
|
||||
filesize = #{filesize,jdbcType=INTEGER},
|
||||
md5 = #{md5,jdbcType=VARCHAR},
|
||||
createTime = #{createtime,jdbcType=TIMESTAMP}
|
||||
set fileName = #{filename,jdbcType=VARCHAR},
|
||||
filePath = #{filepath,jdbcType=VARCHAR},
|
||||
fileSize = #{filesize,jdbcType=INTEGER},
|
||||
md5 = #{md5,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
</mapper>
|
347
src/main/resources/mappers/TBackupImageDao.xml
Normal file
347
src/main/resources/mappers/TBackupImageDao.xml
Normal file
@ -0,0 +1,347 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.yutou.mobilecloud.mybatis.dao.TBackupImageDao">
|
||||
<resultMap id="BaseResultMap" type="com.yutou.mobilecloud.mybatis.model.TBackupImage">
|
||||
<id column="id" jdbcType="INTEGER" property="id" />
|
||||
<result column="uid" jdbcType="INTEGER" property="uid" />
|
||||
<result column="fid" jdbcType="INTEGER" property="fid" />
|
||||
<result column="path" jdbcType="VARCHAR" property="path" />
|
||||
<result column="device" jdbcType="VARCHAR" property="device" />
|
||||
<result column="gps" jdbcType="VARCHAR" property="gps" />
|
||||
<result column="iso" jdbcType="INTEGER" property="iso" />
|
||||
<result column="shutter" jdbcType="VARCHAR" property="shutter" />
|
||||
<result column="aperture" jdbcType="FLOAT" property="aperture" />
|
||||
<result column="high" jdbcType="INTEGER" property="high" />
|
||||
<result column="width" jdbcType="INTEGER" property="width" />
|
||||
<result column="fileLength" jdbcType="INTEGER" property="filelength" />
|
||||
<result column="remark" jdbcType="VARCHAR" property="remark" />
|
||||
<result column="createTime" jdbcType="TIMESTAMP" property="createtime" />
|
||||
</resultMap>
|
||||
<sql id="Example_Where_Clause">
|
||||
<where>
|
||||
<foreach collection="oredCriteria" item="criteria" separator="or">
|
||||
<if test="criteria.valid">
|
||||
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||
<foreach collection="criteria.criteria" item="criterion">
|
||||
<choose>
|
||||
<when test="criterion.noValue">
|
||||
and ${criterion.condition}
|
||||
</when>
|
||||
<when test="criterion.singleValue">
|
||||
and ${criterion.condition} #{criterion.value}
|
||||
</when>
|
||||
<when test="criterion.betweenValue">
|
||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||
</when>
|
||||
<when test="criterion.listValue">
|
||||
and ${criterion.condition}
|
||||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
||||
#{listItem}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
</foreach>
|
||||
</trim>
|
||||
</if>
|
||||
</foreach>
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Update_By_Example_Where_Clause">
|
||||
<where>
|
||||
<foreach collection="example.oredCriteria" item="criteria" separator="or">
|
||||
<if test="criteria.valid">
|
||||
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||
<foreach collection="criteria.criteria" item="criterion">
|
||||
<choose>
|
||||
<when test="criterion.noValue">
|
||||
and ${criterion.condition}
|
||||
</when>
|
||||
<when test="criterion.singleValue">
|
||||
and ${criterion.condition} #{criterion.value}
|
||||
</when>
|
||||
<when test="criterion.betweenValue">
|
||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||
</when>
|
||||
<when test="criterion.listValue">
|
||||
and ${criterion.condition}
|
||||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
||||
#{listItem}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
</foreach>
|
||||
</trim>
|
||||
</if>
|
||||
</foreach>
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List">
|
||||
id, `uid`, fid, `path`, device, gps, iso, shutter, aperture, high, width, fileLength,
|
||||
remark, createTime
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.yutou.mobilecloud.mybatis.model.TBackupImageExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from t_backup_image
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
<if test="orderByClause != null">
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from t_backup_image
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||
delete from t_backup_image
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.yutou.mobilecloud.mybatis.model.TBackupImageExample">
|
||||
delete from t_backup_image
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.yutou.mobilecloud.mybatis.model.TBackupImage" useGeneratedKeys="true">
|
||||
insert into t_backup_image (`uid`, fid, `path`,
|
||||
device, gps, iso, shutter,
|
||||
aperture, high, width,
|
||||
fileLength, remark, createTime
|
||||
)
|
||||
values (#{uid,jdbcType=INTEGER}, #{fid,jdbcType=INTEGER}, #{path,jdbcType=VARCHAR},
|
||||
#{device,jdbcType=VARCHAR}, #{gps,jdbcType=VARCHAR}, #{iso,jdbcType=INTEGER}, #{shutter,jdbcType=VARCHAR},
|
||||
#{aperture,jdbcType=FLOAT}, #{high,jdbcType=INTEGER}, #{width,jdbcType=INTEGER},
|
||||
#{filelength,jdbcType=INTEGER}, #{remark,jdbcType=VARCHAR}, #{createtime,jdbcType=TIMESTAMP}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.yutou.mobilecloud.mybatis.model.TBackupImage" useGeneratedKeys="true">
|
||||
insert into t_backup_image
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="uid != null">
|
||||
`uid`,
|
||||
</if>
|
||||
<if test="fid != null">
|
||||
fid,
|
||||
</if>
|
||||
<if test="path != null">
|
||||
`path`,
|
||||
</if>
|
||||
<if test="device != null">
|
||||
device,
|
||||
</if>
|
||||
<if test="gps != null">
|
||||
gps,
|
||||
</if>
|
||||
<if test="iso != null">
|
||||
iso,
|
||||
</if>
|
||||
<if test="shutter != null">
|
||||
shutter,
|
||||
</if>
|
||||
<if test="aperture != null">
|
||||
aperture,
|
||||
</if>
|
||||
<if test="high != null">
|
||||
high,
|
||||
</if>
|
||||
<if test="width != null">
|
||||
width,
|
||||
</if>
|
||||
<if test="filelength != null">
|
||||
fileLength,
|
||||
</if>
|
||||
<if test="remark != null">
|
||||
remark,
|
||||
</if>
|
||||
<if test="createtime != null">
|
||||
createTime,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="uid != null">
|
||||
#{uid,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="fid != null">
|
||||
#{fid,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="path != null">
|
||||
#{path,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="device != null">
|
||||
#{device,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="gps != null">
|
||||
#{gps,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="iso != null">
|
||||
#{iso,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="shutter != null">
|
||||
#{shutter,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="aperture != null">
|
||||
#{aperture,jdbcType=FLOAT},
|
||||
</if>
|
||||
<if test="high != null">
|
||||
#{high,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="width != null">
|
||||
#{width,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="filelength != null">
|
||||
#{filelength,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="remark != null">
|
||||
#{remark,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createtime != null">
|
||||
#{createtime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.yutou.mobilecloud.mybatis.model.TBackupImageExample" resultType="java.lang.Long">
|
||||
select count(*) from t_backup_image
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update t_backup_image
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.uid != null">
|
||||
`uid` = #{record.uid,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.fid != null">
|
||||
fid = #{record.fid,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.path != null">
|
||||
`path` = #{record.path,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.device != null">
|
||||
device = #{record.device,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.gps != null">
|
||||
gps = #{record.gps,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.iso != null">
|
||||
iso = #{record.iso,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.shutter != null">
|
||||
shutter = #{record.shutter,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.aperture != null">
|
||||
aperture = #{record.aperture,jdbcType=FLOAT},
|
||||
</if>
|
||||
<if test="record.high != null">
|
||||
high = #{record.high,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.width != null">
|
||||
width = #{record.width,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.filelength != null">
|
||||
fileLength = #{record.filelength,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.remark != null">
|
||||
remark = #{record.remark,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.createtime != null">
|
||||
createTime = #{record.createtime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update t_backup_image
|
||||
set id = #{record.id,jdbcType=INTEGER},
|
||||
`uid` = #{record.uid,jdbcType=INTEGER},
|
||||
fid = #{record.fid,jdbcType=INTEGER},
|
||||
`path` = #{record.path,jdbcType=VARCHAR},
|
||||
device = #{record.device,jdbcType=VARCHAR},
|
||||
gps = #{record.gps,jdbcType=VARCHAR},
|
||||
iso = #{record.iso,jdbcType=INTEGER},
|
||||
shutter = #{record.shutter,jdbcType=VARCHAR},
|
||||
aperture = #{record.aperture,jdbcType=FLOAT},
|
||||
high = #{record.high,jdbcType=INTEGER},
|
||||
width = #{record.width,jdbcType=INTEGER},
|
||||
fileLength = #{record.filelength,jdbcType=INTEGER},
|
||||
remark = #{record.remark,jdbcType=VARCHAR},
|
||||
createTime = #{record.createtime,jdbcType=TIMESTAMP}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.yutou.mobilecloud.mybatis.model.TBackupImage">
|
||||
update t_backup_image
|
||||
<set>
|
||||
<if test="uid != null">
|
||||
`uid` = #{uid,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="fid != null">
|
||||
fid = #{fid,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="path != null">
|
||||
`path` = #{path,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="device != null">
|
||||
device = #{device,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="gps != null">
|
||||
gps = #{gps,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="iso != null">
|
||||
iso = #{iso,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="shutter != null">
|
||||
shutter = #{shutter,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="aperture != null">
|
||||
aperture = #{aperture,jdbcType=FLOAT},
|
||||
</if>
|
||||
<if test="high != null">
|
||||
high = #{high,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="width != null">
|
||||
width = #{width,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="filelength != null">
|
||||
fileLength = #{filelength,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="remark != null">
|
||||
remark = #{remark,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createtime != null">
|
||||
createTime = #{createtime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.yutou.mobilecloud.mybatis.model.TBackupImage">
|
||||
update t_backup_image
|
||||
set `uid` = #{uid,jdbcType=INTEGER},
|
||||
fid = #{fid,jdbcType=INTEGER},
|
||||
`path` = #{path,jdbcType=VARCHAR},
|
||||
device = #{device,jdbcType=VARCHAR},
|
||||
gps = #{gps,jdbcType=VARCHAR},
|
||||
iso = #{iso,jdbcType=INTEGER},
|
||||
shutter = #{shutter,jdbcType=VARCHAR},
|
||||
aperture = #{aperture,jdbcType=FLOAT},
|
||||
high = #{high,jdbcType=INTEGER},
|
||||
width = #{width,jdbcType=INTEGER},
|
||||
fileLength = #{filelength,jdbcType=INTEGER},
|
||||
remark = #{remark,jdbcType=VARCHAR},
|
||||
createTime = #{createtime,jdbcType=TIMESTAMP}
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
</mapper>
|
205
src/main/resources/mappers/TBackupInfoDao.xml
Normal file
205
src/main/resources/mappers/TBackupInfoDao.xml
Normal file
@ -0,0 +1,205 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.yutou.mobilecloud.mybatis.dao.TBackupInfoDao">
|
||||
<resultMap id="BaseResultMap" type="com.yutou.mobilecloud.mybatis.model.TBackupInfo">
|
||||
<id column="id" jdbcType="INTEGER" property="id" />
|
||||
<result column="uid" jdbcType="VARCHAR" property="uid" />
|
||||
<result column="fid" jdbcType="INTEGER" property="fid" />
|
||||
<result column="type" jdbcType="INTEGER" property="type" />
|
||||
<result column="createTime" jdbcType="TIMESTAMP" property="createtime" />
|
||||
</resultMap>
|
||||
<sql id="Example_Where_Clause">
|
||||
<where>
|
||||
<foreach collection="oredCriteria" item="criteria" separator="or">
|
||||
<if test="criteria.valid">
|
||||
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||
<foreach collection="criteria.criteria" item="criterion">
|
||||
<choose>
|
||||
<when test="criterion.noValue">
|
||||
and ${criterion.condition}
|
||||
</when>
|
||||
<when test="criterion.singleValue">
|
||||
and ${criterion.condition} #{criterion.value}
|
||||
</when>
|
||||
<when test="criterion.betweenValue">
|
||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||
</when>
|
||||
<when test="criterion.listValue">
|
||||
and ${criterion.condition}
|
||||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
||||
#{listItem}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
</foreach>
|
||||
</trim>
|
||||
</if>
|
||||
</foreach>
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Update_By_Example_Where_Clause">
|
||||
<where>
|
||||
<foreach collection="example.oredCriteria" item="criteria" separator="or">
|
||||
<if test="criteria.valid">
|
||||
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||
<foreach collection="criteria.criteria" item="criterion">
|
||||
<choose>
|
||||
<when test="criterion.noValue">
|
||||
and ${criterion.condition}
|
||||
</when>
|
||||
<when test="criterion.singleValue">
|
||||
and ${criterion.condition} #{criterion.value}
|
||||
</when>
|
||||
<when test="criterion.betweenValue">
|
||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||
</when>
|
||||
<when test="criterion.listValue">
|
||||
and ${criterion.condition}
|
||||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
||||
#{listItem}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
</foreach>
|
||||
</trim>
|
||||
</if>
|
||||
</foreach>
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List">
|
||||
id, `uid`, fid, `type`, createTime
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.yutou.mobilecloud.mybatis.model.TBackupInfoExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from t_backup_info
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
<if test="orderByClause != null">
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from t_backup_info
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||
delete from t_backup_info
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.yutou.mobilecloud.mybatis.model.TBackupInfoExample">
|
||||
delete from t_backup_info
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.yutou.mobilecloud.mybatis.model.TBackupInfo" useGeneratedKeys="true">
|
||||
insert into t_backup_info (`uid`, fid, `type`,
|
||||
createTime)
|
||||
values (#{uid,jdbcType=VARCHAR}, #{fid,jdbcType=INTEGER}, #{type,jdbcType=INTEGER},
|
||||
#{createtime,jdbcType=TIMESTAMP})
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.yutou.mobilecloud.mybatis.model.TBackupInfo" useGeneratedKeys="true">
|
||||
insert into t_backup_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="uid != null">
|
||||
`uid`,
|
||||
</if>
|
||||
<if test="fid != null">
|
||||
fid,
|
||||
</if>
|
||||
<if test="type != null">
|
||||
`type`,
|
||||
</if>
|
||||
<if test="createtime != null">
|
||||
createTime,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="uid != null">
|
||||
#{uid,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="fid != null">
|
||||
#{fid,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="type != null">
|
||||
#{type,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="createtime != null">
|
||||
#{createtime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.yutou.mobilecloud.mybatis.model.TBackupInfoExample" resultType="java.lang.Long">
|
||||
select count(*) from t_backup_info
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update t_backup_info
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.uid != null">
|
||||
`uid` = #{record.uid,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.fid != null">
|
||||
fid = #{record.fid,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.type != null">
|
||||
`type` = #{record.type,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.createtime != null">
|
||||
createTime = #{record.createtime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update t_backup_info
|
||||
set id = #{record.id,jdbcType=INTEGER},
|
||||
`uid` = #{record.uid,jdbcType=VARCHAR},
|
||||
fid = #{record.fid,jdbcType=INTEGER},
|
||||
`type` = #{record.type,jdbcType=INTEGER},
|
||||
createTime = #{record.createtime,jdbcType=TIMESTAMP}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.yutou.mobilecloud.mybatis.model.TBackupInfo">
|
||||
update t_backup_info
|
||||
<set>
|
||||
<if test="uid != null">
|
||||
`uid` = #{uid,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="fid != null">
|
||||
fid = #{fid,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="type != null">
|
||||
`type` = #{type,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="createtime != null">
|
||||
createTime = #{createtime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.yutou.mobilecloud.mybatis.model.TBackupInfo">
|
||||
update t_backup_info
|
||||
set `uid` = #{uid,jdbcType=VARCHAR},
|
||||
fid = #{fid,jdbcType=INTEGER},
|
||||
`type` = #{type,jdbcType=INTEGER},
|
||||
createTime = #{createtime,jdbcType=TIMESTAMP}
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
</mapper>
|
@ -3,8 +3,8 @@
|
||||
<mapper namespace="com.yutou.mobilecloud.mybatis.dao.TUserConfigDao">
|
||||
<resultMap id="BaseResultMap" type="com.yutou.mobilecloud.mybatis.model.TUserConfig">
|
||||
<id column="id" jdbcType="INTEGER" property="id" />
|
||||
<result column="uid" jdbcType="VARCHAR" property="uid" />
|
||||
<result column="cloudmodel" jdbcType="INTEGER" property="cloudmodel" />
|
||||
<result column="uid" jdbcType="INTEGER" property="uid" />
|
||||
<result column="infoVersionBackup" jdbcType="INTEGER" property="infoversionbackup" />
|
||||
</resultMap>
|
||||
<sql id="Example_Where_Clause">
|
||||
<where>
|
||||
@ -65,7 +65,7 @@
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List">
|
||||
id, `uid`, cloudmodel
|
||||
id, `uid`, infoVersionBackup
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.yutou.mobilecloud.mybatis.model.TUserConfigExample" resultMap="BaseResultMap">
|
||||
select
|
||||
@ -98,8 +98,8 @@
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.yutou.mobilecloud.mybatis.model.TUserConfig" useGeneratedKeys="true">
|
||||
insert into t_user_config (`uid`, cloudmodel)
|
||||
values (#{uid,jdbcType=VARCHAR}, #{cloudmodel,jdbcType=INTEGER})
|
||||
insert into t_user_config (`uid`, infoVersionBackup)
|
||||
values (#{uid,jdbcType=INTEGER}, #{infoversionbackup,jdbcType=INTEGER})
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.yutou.mobilecloud.mybatis.model.TUserConfig" useGeneratedKeys="true">
|
||||
insert into t_user_config
|
||||
@ -107,16 +107,16 @@
|
||||
<if test="uid != null">
|
||||
`uid`,
|
||||
</if>
|
||||
<if test="cloudmodel != null">
|
||||
cloudmodel,
|
||||
<if test="infoversionbackup != null">
|
||||
infoVersionBackup,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="uid != null">
|
||||
#{uid,jdbcType=VARCHAR},
|
||||
#{uid,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="cloudmodel != null">
|
||||
#{cloudmodel,jdbcType=INTEGER},
|
||||
<if test="infoversionbackup != null">
|
||||
#{infoversionbackup,jdbcType=INTEGER},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
@ -133,10 +133,10 @@
|
||||
id = #{record.id,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.uid != null">
|
||||
`uid` = #{record.uid,jdbcType=VARCHAR},
|
||||
`uid` = #{record.uid,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.cloudmodel != null">
|
||||
cloudmodel = #{record.cloudmodel,jdbcType=INTEGER},
|
||||
<if test="record.infoversionbackup != null">
|
||||
infoVersionBackup = #{record.infoversionbackup,jdbcType=INTEGER},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
@ -146,8 +146,8 @@
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update t_user_config
|
||||
set id = #{record.id,jdbcType=INTEGER},
|
||||
`uid` = #{record.uid,jdbcType=VARCHAR},
|
||||
cloudmodel = #{record.cloudmodel,jdbcType=INTEGER}
|
||||
`uid` = #{record.uid,jdbcType=INTEGER},
|
||||
infoVersionBackup = #{record.infoversionbackup,jdbcType=INTEGER}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
@ -156,18 +156,18 @@
|
||||
update t_user_config
|
||||
<set>
|
||||
<if test="uid != null">
|
||||
`uid` = #{uid,jdbcType=VARCHAR},
|
||||
`uid` = #{uid,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="cloudmodel != null">
|
||||
cloudmodel = #{cloudmodel,jdbcType=INTEGER},
|
||||
<if test="infoversionbackup != null">
|
||||
infoVersionBackup = #{infoversionbackup,jdbcType=INTEGER},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.yutou.mobilecloud.mybatis.model.TUserConfig">
|
||||
update t_user_config
|
||||
set `uid` = #{uid,jdbcType=VARCHAR},
|
||||
cloudmodel = #{cloudmodel,jdbcType=INTEGER}
|
||||
set `uid` = #{uid,jdbcType=INTEGER},
|
||||
infoVersionBackup = #{infoversionbackup,jdbcType=INTEGER}
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
</mapper>
|
Loading…
Reference in New Issue
Block a user