From 67869ee32eae8c5f071e938debaf4f14e4308cce Mon Sep 17 00:00:00 2001 From: Yutousama <583819556@qq.com> Date: Fri, 29 Oct 2021 09:17:33 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=9D=E7=89=88=E6=95=B0=E6=8D=AE=E5=BA=93?= =?UTF-8?q?=E7=A1=AE=E5=AE=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 16 +- .../Controllers/BackupController.java | 8 + .../Controllers/UserController.java | 76 ++ .../com/yutou/mobilecloud/Enums/UserEnum.java | 32 + .../yutou/mobilecloud/Services/IBackup.java | 19 + .../com/yutou/mobilecloud/Services/IUser.java | 14 + .../Services/impls/IBackupImpl.java | 116 ++ .../mobilecloud/Services/impls/IUserImpl.java | 93 ++ .../mybatis/dao/TBackupAppDao.java | 30 + .../mybatis/dao/TBackupImageDao.java | 30 + .../mybatis/dao/TBackupInfoDao.java | 30 + .../mobilecloud/mybatis/model/TBackupApp.java | 28 + .../mybatis/model/TBackupAppExample.java | 652 ++++++++++ .../mybatis/model/TBackupFile.java | 7 +- .../mybatis/model/TBackupFileExample.java | 219 +--- .../mybatis/model/TBackupImage.java | 45 + .../mybatis/model/TBackupImageExample.java | 1092 +++++++++++++++++ .../mybatis/model/TBackupInfo.java | 27 + .../mybatis/model/TBackupInfoExample.java | 512 ++++++++ .../mybatis/model/TUserConfig.java | 4 +- .../mybatis/model/TUserConfigExample.java | 78 +- .../com/yutou/mobilecloud/utils/AESTools.java | 52 + .../com/yutou/mobilecloud/utils/Tools.java | 289 +++++ .../yutou/mobilecloud/utils/UserTools.java | 35 + src/main/resources/mappers/TBackupAppDao.xml | 237 ++++ src/main/resources/mappers/TBackupFileDao.xml | 92 +- .../resources/mappers/TBackupImageDao.xml | 347 ++++++ src/main/resources/mappers/TBackupInfoDao.xml | 205 ++++ src/main/resources/mappers/TUserConfigDao.xml | 40 +- 29 files changed, 4124 insertions(+), 301 deletions(-) create mode 100644 src/main/java/com/yutou/mobilecloud/Controllers/BackupController.java create mode 100644 src/main/java/com/yutou/mobilecloud/Controllers/UserController.java create mode 100644 src/main/java/com/yutou/mobilecloud/Enums/UserEnum.java create mode 100644 src/main/java/com/yutou/mobilecloud/Services/IBackup.java create mode 100644 src/main/java/com/yutou/mobilecloud/Services/IUser.java create mode 100644 src/main/java/com/yutou/mobilecloud/Services/impls/IBackupImpl.java create mode 100644 src/main/java/com/yutou/mobilecloud/Services/impls/IUserImpl.java create mode 100644 src/main/java/com/yutou/mobilecloud/mybatis/dao/TBackupAppDao.java create mode 100644 src/main/java/com/yutou/mobilecloud/mybatis/dao/TBackupImageDao.java create mode 100644 src/main/java/com/yutou/mobilecloud/mybatis/dao/TBackupInfoDao.java create mode 100644 src/main/java/com/yutou/mobilecloud/mybatis/model/TBackupApp.java create mode 100644 src/main/java/com/yutou/mobilecloud/mybatis/model/TBackupAppExample.java create mode 100644 src/main/java/com/yutou/mobilecloud/mybatis/model/TBackupImage.java create mode 100644 src/main/java/com/yutou/mobilecloud/mybatis/model/TBackupImageExample.java create mode 100644 src/main/java/com/yutou/mobilecloud/mybatis/model/TBackupInfo.java create mode 100644 src/main/java/com/yutou/mobilecloud/mybatis/model/TBackupInfoExample.java create mode 100644 src/main/java/com/yutou/mobilecloud/utils/AESTools.java create mode 100644 src/main/java/com/yutou/mobilecloud/utils/Tools.java create mode 100644 src/main/java/com/yutou/mobilecloud/utils/UserTools.java create mode 100644 src/main/resources/mappers/TBackupAppDao.xml create mode 100644 src/main/resources/mappers/TBackupImageDao.xml create mode 100644 src/main/resources/mappers/TBackupInfoDao.xml diff --git a/pom.xml b/pom.xml index d64f1e8..8f9278f 100644 --- a/pom.xml +++ b/pom.xml @@ -41,12 +41,16 @@ org.mybatis.spring.boot mybatis-spring-boot-starter - 2.1.1 + 2.2.0 com.alibaba fastjson - 1.2.67 + 1.2.78 + + + org.springframework.boot + spring-boot-starter-web @@ -64,6 +68,14 @@ + + org.apache.maven.plugins + maven-compiler-plugin + + 16 + 16 + + diff --git a/src/main/java/com/yutou/mobilecloud/Controllers/BackupController.java b/src/main/java/com/yutou/mobilecloud/Controllers/BackupController.java new file mode 100644 index 0000000..58b2b2e --- /dev/null +++ b/src/main/java/com/yutou/mobilecloud/Controllers/BackupController.java @@ -0,0 +1,8 @@ +package com.yutou.mobilecloud.Controllers; + +import org.springframework.stereotype.Controller; + +@Controller +public class BackupController { + +} diff --git a/src/main/java/com/yutou/mobilecloud/Controllers/UserController.java b/src/main/java/com/yutou/mobilecloud/Controllers/UserController.java new file mode 100644 index 0000000..84934dd --- /dev/null +++ b/src/main/java/com/yutou/mobilecloud/Controllers/UserController.java @@ -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; + } + +} diff --git a/src/main/java/com/yutou/mobilecloud/Enums/UserEnum.java b/src/main/java/com/yutou/mobilecloud/Enums/UserEnum.java new file mode 100644 index 0000000..917a18c --- /dev/null +++ b/src/main/java/com/yutou/mobilecloud/Enums/UserEnum.java @@ -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; + } +} diff --git a/src/main/java/com/yutou/mobilecloud/Services/IBackup.java b/src/main/java/com/yutou/mobilecloud/Services/IBackup.java new file mode 100644 index 0000000..ec9a836 --- /dev/null +++ b/src/main/java/com/yutou/mobilecloud/Services/IBackup.java @@ -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 getImageList(int uid); + List getAppList(int uid); + List getInfoList(int uid); + +} diff --git a/src/main/java/com/yutou/mobilecloud/Services/IUser.java b/src/main/java/com/yutou/mobilecloud/Services/IUser.java new file mode 100644 index 0000000..0905e70 --- /dev/null +++ b/src/main/java/com/yutou/mobilecloud/Services/IUser.java @@ -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); +} diff --git a/src/main/java/com/yutou/mobilecloud/Services/impls/IBackupImpl.java b/src/main/java/com/yutou/mobilecloud/Services/impls/IBackupImpl.java new file mode 100644 index 0000000..828dbbf --- /dev/null +++ b/src/main/java/com/yutou/mobilecloud/Services/impls/IBackupImpl.java @@ -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 getImageList(int uid) { + return null; + } + + @Override + public List getAppList(int uid) { + return null; + } + + @Override + public List 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; + } +} diff --git a/src/main/java/com/yutou/mobilecloud/Services/impls/IUserImpl.java b/src/main/java/com/yutou/mobilecloud/Services/impls/IUserImpl.java new file mode 100644 index 0000000..b281f60 --- /dev/null +++ b/src/main/java/com/yutou/mobilecloud/Services/impls/IUserImpl.java @@ -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 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); + } +} diff --git a/src/main/java/com/yutou/mobilecloud/mybatis/dao/TBackupAppDao.java b/src/main/java/com/yutou/mobilecloud/mybatis/dao/TBackupAppDao.java new file mode 100644 index 0000000..33d7556 --- /dev/null +++ b/src/main/java/com/yutou/mobilecloud/mybatis/dao/TBackupAppDao.java @@ -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 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); +} \ No newline at end of file diff --git a/src/main/java/com/yutou/mobilecloud/mybatis/dao/TBackupImageDao.java b/src/main/java/com/yutou/mobilecloud/mybatis/dao/TBackupImageDao.java new file mode 100644 index 0000000..a845a3c --- /dev/null +++ b/src/main/java/com/yutou/mobilecloud/mybatis/dao/TBackupImageDao.java @@ -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 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); +} \ No newline at end of file diff --git a/src/main/java/com/yutou/mobilecloud/mybatis/dao/TBackupInfoDao.java b/src/main/java/com/yutou/mobilecloud/mybatis/dao/TBackupInfoDao.java new file mode 100644 index 0000000..e6b0fac --- /dev/null +++ b/src/main/java/com/yutou/mobilecloud/mybatis/dao/TBackupInfoDao.java @@ -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 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); +} \ No newline at end of file diff --git a/src/main/java/com/yutou/mobilecloud/mybatis/model/TBackupApp.java b/src/main/java/com/yutou/mobilecloud/mybatis/model/TBackupApp.java new file mode 100644 index 0000000..bafe484 --- /dev/null +++ b/src/main/java/com/yutou/mobilecloud/mybatis/model/TBackupApp.java @@ -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; +} \ No newline at end of file diff --git a/src/main/java/com/yutou/mobilecloud/mybatis/model/TBackupAppExample.java b/src/main/java/com/yutou/mobilecloud/mybatis/model/TBackupAppExample.java new file mode 100644 index 0000000..2433ac5 --- /dev/null +++ b/src/main/java/com/yutou/mobilecloud/mybatis/model/TBackupAppExample.java @@ -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 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 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 criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList<>(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List 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 values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List 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 values) { + addCriterion("`uid` in", values, "uid"); + return (Criteria) this; + } + + public Criteria andUidNotIn(List 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 values) { + addCriterion("fid in", values, "fid"); + return (Criteria) this; + } + + public Criteria andFidNotIn(List 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 values) { + addCriterion("appName in", values, "appname"); + return (Criteria) this; + } + + public Criteria andAppnameNotIn(List 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 values) { + addCriterion("appPackageName in", values, "apppackagename"); + return (Criteria) this; + } + + public Criteria andApppackagenameNotIn(List 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 values) { + addCriterion("appVersion in", values, "appversion"); + return (Criteria) this; + } + + public Criteria andAppversionNotIn(List 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 values) { + addCriterion("createTime in", values, "createtime"); + return (Criteria) this; + } + + public Criteria andCreatetimeNotIn(List 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); + } + } +} \ No newline at end of file diff --git a/src/main/java/com/yutou/mobilecloud/mybatis/model/TBackupFile.java b/src/main/java/com/yutou/mobilecloud/mybatis/model/TBackupFile.java index 56598b9..a93e13b 100644 --- a/src/main/java/com/yutou/mobilecloud/mybatis/model/TBackupFile.java +++ b/src/main/java/com/yutou/mobilecloud/mybatis/model/TBackupFile.java @@ -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; } \ No newline at end of file diff --git a/src/main/java/com/yutou/mobilecloud/mybatis/model/TBackupFileExample.java b/src/main/java/com/yutou/mobilecloud/mybatis/model/TBackupFileExample.java index bee8c99..0c95d88 100644 --- a/src/main/java/com/yutou/mobilecloud/mybatis/model/TBackupFileExample.java +++ b/src/main/java/com/yutou/mobilecloud/mybatis/model/TBackupFileExample.java @@ -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 values) { - addCriterion("`uid` in", values, "uid"); + public Criteria andFilenameLike(String value) { + addCriterion("fileName like", value, "filename"); return (Criteria) this; } - public Criteria andUidNotIn(List 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 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 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 values) { - addCriterion("bid in", values, "bid"); - return (Criteria) this; - } - - public Criteria andBidNotIn(List 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 values) { - addCriterion("filepath in", values, "filepath"); + addCriterion("filePath in", values, "filepath"); return (Criteria) this; } public Criteria andFilepathNotIn(List 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 values) { - addCriterion("filesize in", values, "filesize"); + addCriterion("fileSize in", values, "filesize"); return (Criteria) this; } public Criteria andFilesizeNotIn(List 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 values) { - addCriterion("createTime in", values, "createtime"); - return (Criteria) this; - } - - public Criteria andCreatetimeNotIn(List 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; - } } /** diff --git a/src/main/java/com/yutou/mobilecloud/mybatis/model/TBackupImage.java b/src/main/java/com/yutou/mobilecloud/mybatis/model/TBackupImage.java new file mode 100644 index 0000000..c3018b3 --- /dev/null +++ b/src/main/java/com/yutou/mobilecloud/mybatis/model/TBackupImage.java @@ -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; +} \ No newline at end of file diff --git a/src/main/java/com/yutou/mobilecloud/mybatis/model/TBackupImageExample.java b/src/main/java/com/yutou/mobilecloud/mybatis/model/TBackupImageExample.java new file mode 100644 index 0000000..c2035d4 --- /dev/null +++ b/src/main/java/com/yutou/mobilecloud/mybatis/model/TBackupImageExample.java @@ -0,0 +1,1092 @@ +package com.yutou.mobilecloud.mybatis.model; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class TBackupImageExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public TBackupImageExample() { + 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 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 criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList<>(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List 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 values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List 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 values) { + addCriterion("`uid` in", values, "uid"); + return (Criteria) this; + } + + public Criteria andUidNotIn(List 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 values) { + addCriterion("fid in", values, "fid"); + return (Criteria) this; + } + + public Criteria andFidNotIn(List 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 andPathIsNull() { + addCriterion("`path` is null"); + return (Criteria) this; + } + + public Criteria andPathIsNotNull() { + addCriterion("`path` is not null"); + return (Criteria) this; + } + + public Criteria andPathEqualTo(String value) { + addCriterion("`path` =", value, "path"); + return (Criteria) this; + } + + public Criteria andPathNotEqualTo(String value) { + addCriterion("`path` <>", value, "path"); + return (Criteria) this; + } + + public Criteria andPathGreaterThan(String value) { + addCriterion("`path` >", value, "path"); + return (Criteria) this; + } + + public Criteria andPathGreaterThanOrEqualTo(String value) { + addCriterion("`path` >=", value, "path"); + return (Criteria) this; + } + + public Criteria andPathLessThan(String value) { + addCriterion("`path` <", value, "path"); + return (Criteria) this; + } + + public Criteria andPathLessThanOrEqualTo(String value) { + addCriterion("`path` <=", value, "path"); + return (Criteria) this; + } + + public Criteria andPathLike(String value) { + addCriterion("`path` like", value, "path"); + return (Criteria) this; + } + + public Criteria andPathNotLike(String value) { + addCriterion("`path` not like", value, "path"); + return (Criteria) this; + } + + public Criteria andPathIn(List values) { + addCriterion("`path` in", values, "path"); + return (Criteria) this; + } + + public Criteria andPathNotIn(List values) { + addCriterion("`path` not in", values, "path"); + return (Criteria) this; + } + + public Criteria andPathBetween(String value1, String value2) { + addCriterion("`path` between", value1, value2, "path"); + return (Criteria) this; + } + + public Criteria andPathNotBetween(String value1, String value2) { + addCriterion("`path` not between", value1, value2, "path"); + return (Criteria) this; + } + + public Criteria andDeviceIsNull() { + addCriterion("device is null"); + return (Criteria) this; + } + + public Criteria andDeviceIsNotNull() { + addCriterion("device is not null"); + return (Criteria) this; + } + + public Criteria andDeviceEqualTo(String value) { + addCriterion("device =", value, "device"); + return (Criteria) this; + } + + public Criteria andDeviceNotEqualTo(String value) { + addCriterion("device <>", value, "device"); + return (Criteria) this; + } + + public Criteria andDeviceGreaterThan(String value) { + addCriterion("device >", value, "device"); + return (Criteria) this; + } + + public Criteria andDeviceGreaterThanOrEqualTo(String value) { + addCriterion("device >=", value, "device"); + return (Criteria) this; + } + + public Criteria andDeviceLessThan(String value) { + addCriterion("device <", value, "device"); + return (Criteria) this; + } + + public Criteria andDeviceLessThanOrEqualTo(String value) { + addCriterion("device <=", value, "device"); + return (Criteria) this; + } + + public Criteria andDeviceLike(String value) { + addCriterion("device like", value, "device"); + return (Criteria) this; + } + + public Criteria andDeviceNotLike(String value) { + addCriterion("device not like", value, "device"); + return (Criteria) this; + } + + public Criteria andDeviceIn(List values) { + addCriterion("device in", values, "device"); + return (Criteria) this; + } + + public Criteria andDeviceNotIn(List values) { + addCriterion("device not in", values, "device"); + return (Criteria) this; + } + + public Criteria andDeviceBetween(String value1, String value2) { + addCriterion("device between", value1, value2, "device"); + return (Criteria) this; + } + + public Criteria andDeviceNotBetween(String value1, String value2) { + addCriterion("device not between", value1, value2, "device"); + return (Criteria) this; + } + + public Criteria andGpsIsNull() { + addCriterion("gps is null"); + return (Criteria) this; + } + + public Criteria andGpsIsNotNull() { + addCriterion("gps is not null"); + return (Criteria) this; + } + + public Criteria andGpsEqualTo(String value) { + addCriterion("gps =", value, "gps"); + return (Criteria) this; + } + + public Criteria andGpsNotEqualTo(String value) { + addCriterion("gps <>", value, "gps"); + return (Criteria) this; + } + + public Criteria andGpsGreaterThan(String value) { + addCriterion("gps >", value, "gps"); + return (Criteria) this; + } + + public Criteria andGpsGreaterThanOrEqualTo(String value) { + addCriterion("gps >=", value, "gps"); + return (Criteria) this; + } + + public Criteria andGpsLessThan(String value) { + addCriterion("gps <", value, "gps"); + return (Criteria) this; + } + + public Criteria andGpsLessThanOrEqualTo(String value) { + addCriterion("gps <=", value, "gps"); + return (Criteria) this; + } + + public Criteria andGpsLike(String value) { + addCriterion("gps like", value, "gps"); + return (Criteria) this; + } + + public Criteria andGpsNotLike(String value) { + addCriterion("gps not like", value, "gps"); + return (Criteria) this; + } + + public Criteria andGpsIn(List values) { + addCriterion("gps in", values, "gps"); + return (Criteria) this; + } + + public Criteria andGpsNotIn(List values) { + addCriterion("gps not in", values, "gps"); + return (Criteria) this; + } + + public Criteria andGpsBetween(String value1, String value2) { + addCriterion("gps between", value1, value2, "gps"); + return (Criteria) this; + } + + public Criteria andGpsNotBetween(String value1, String value2) { + addCriterion("gps not between", value1, value2, "gps"); + return (Criteria) this; + } + + public Criteria andIsoIsNull() { + addCriterion("iso is null"); + return (Criteria) this; + } + + public Criteria andIsoIsNotNull() { + addCriterion("iso is not null"); + return (Criteria) this; + } + + public Criteria andIsoEqualTo(Integer value) { + addCriterion("iso =", value, "iso"); + return (Criteria) this; + } + + public Criteria andIsoNotEqualTo(Integer value) { + addCriterion("iso <>", value, "iso"); + return (Criteria) this; + } + + public Criteria andIsoGreaterThan(Integer value) { + addCriterion("iso >", value, "iso"); + return (Criteria) this; + } + + public Criteria andIsoGreaterThanOrEqualTo(Integer value) { + addCriterion("iso >=", value, "iso"); + return (Criteria) this; + } + + public Criteria andIsoLessThan(Integer value) { + addCriterion("iso <", value, "iso"); + return (Criteria) this; + } + + public Criteria andIsoLessThanOrEqualTo(Integer value) { + addCriterion("iso <=", value, "iso"); + return (Criteria) this; + } + + public Criteria andIsoIn(List values) { + addCriterion("iso in", values, "iso"); + return (Criteria) this; + } + + public Criteria andIsoNotIn(List values) { + addCriterion("iso not in", values, "iso"); + return (Criteria) this; + } + + public Criteria andIsoBetween(Integer value1, Integer value2) { + addCriterion("iso between", value1, value2, "iso"); + return (Criteria) this; + } + + public Criteria andIsoNotBetween(Integer value1, Integer value2) { + addCriterion("iso not between", value1, value2, "iso"); + return (Criteria) this; + } + + public Criteria andShutterIsNull() { + addCriterion("shutter is null"); + return (Criteria) this; + } + + public Criteria andShutterIsNotNull() { + addCriterion("shutter is not null"); + return (Criteria) this; + } + + public Criteria andShutterEqualTo(String value) { + addCriterion("shutter =", value, "shutter"); + return (Criteria) this; + } + + public Criteria andShutterNotEqualTo(String value) { + addCriterion("shutter <>", value, "shutter"); + return (Criteria) this; + } + + public Criteria andShutterGreaterThan(String value) { + addCriterion("shutter >", value, "shutter"); + return (Criteria) this; + } + + public Criteria andShutterGreaterThanOrEqualTo(String value) { + addCriterion("shutter >=", value, "shutter"); + return (Criteria) this; + } + + public Criteria andShutterLessThan(String value) { + addCriterion("shutter <", value, "shutter"); + return (Criteria) this; + } + + public Criteria andShutterLessThanOrEqualTo(String value) { + addCriterion("shutter <=", value, "shutter"); + return (Criteria) this; + } + + public Criteria andShutterLike(String value) { + addCriterion("shutter like", value, "shutter"); + return (Criteria) this; + } + + public Criteria andShutterNotLike(String value) { + addCriterion("shutter not like", value, "shutter"); + return (Criteria) this; + } + + public Criteria andShutterIn(List values) { + addCriterion("shutter in", values, "shutter"); + return (Criteria) this; + } + + public Criteria andShutterNotIn(List values) { + addCriterion("shutter not in", values, "shutter"); + return (Criteria) this; + } + + public Criteria andShutterBetween(String value1, String value2) { + addCriterion("shutter between", value1, value2, "shutter"); + return (Criteria) this; + } + + public Criteria andShutterNotBetween(String value1, String value2) { + addCriterion("shutter not between", value1, value2, "shutter"); + return (Criteria) this; + } + + public Criteria andApertureIsNull() { + addCriterion("aperture is null"); + return (Criteria) this; + } + + public Criteria andApertureIsNotNull() { + addCriterion("aperture is not null"); + return (Criteria) this; + } + + public Criteria andApertureEqualTo(Double value) { + addCriterion("aperture =", value, "aperture"); + return (Criteria) this; + } + + public Criteria andApertureNotEqualTo(Double value) { + addCriterion("aperture <>", value, "aperture"); + return (Criteria) this; + } + + public Criteria andApertureGreaterThan(Double value) { + addCriterion("aperture >", value, "aperture"); + return (Criteria) this; + } + + public Criteria andApertureGreaterThanOrEqualTo(Double value) { + addCriterion("aperture >=", value, "aperture"); + return (Criteria) this; + } + + public Criteria andApertureLessThan(Double value) { + addCriterion("aperture <", value, "aperture"); + return (Criteria) this; + } + + public Criteria andApertureLessThanOrEqualTo(Double value) { + addCriterion("aperture <=", value, "aperture"); + return (Criteria) this; + } + + public Criteria andApertureIn(List values) { + addCriterion("aperture in", values, "aperture"); + return (Criteria) this; + } + + public Criteria andApertureNotIn(List values) { + addCriterion("aperture not in", values, "aperture"); + return (Criteria) this; + } + + public Criteria andApertureBetween(Double value1, Double value2) { + addCriterion("aperture between", value1, value2, "aperture"); + return (Criteria) this; + } + + public Criteria andApertureNotBetween(Double value1, Double value2) { + addCriterion("aperture not between", value1, value2, "aperture"); + return (Criteria) this; + } + + public Criteria andHighIsNull() { + addCriterion("high is null"); + return (Criteria) this; + } + + public Criteria andHighIsNotNull() { + addCriterion("high is not null"); + return (Criteria) this; + } + + public Criteria andHighEqualTo(Integer value) { + addCriterion("high =", value, "high"); + return (Criteria) this; + } + + public Criteria andHighNotEqualTo(Integer value) { + addCriterion("high <>", value, "high"); + return (Criteria) this; + } + + public Criteria andHighGreaterThan(Integer value) { + addCriterion("high >", value, "high"); + return (Criteria) this; + } + + public Criteria andHighGreaterThanOrEqualTo(Integer value) { + addCriterion("high >=", value, "high"); + return (Criteria) this; + } + + public Criteria andHighLessThan(Integer value) { + addCriterion("high <", value, "high"); + return (Criteria) this; + } + + public Criteria andHighLessThanOrEqualTo(Integer value) { + addCriterion("high <=", value, "high"); + return (Criteria) this; + } + + public Criteria andHighIn(List values) { + addCriterion("high in", values, "high"); + return (Criteria) this; + } + + public Criteria andHighNotIn(List values) { + addCriterion("high not in", values, "high"); + return (Criteria) this; + } + + public Criteria andHighBetween(Integer value1, Integer value2) { + addCriterion("high between", value1, value2, "high"); + return (Criteria) this; + } + + public Criteria andHighNotBetween(Integer value1, Integer value2) { + addCriterion("high not between", value1, value2, "high"); + return (Criteria) this; + } + + public Criteria andWidthIsNull() { + addCriterion("width is null"); + return (Criteria) this; + } + + public Criteria andWidthIsNotNull() { + addCriterion("width is not null"); + return (Criteria) this; + } + + public Criteria andWidthEqualTo(Integer value) { + addCriterion("width =", value, "width"); + return (Criteria) this; + } + + public Criteria andWidthNotEqualTo(Integer value) { + addCriterion("width <>", value, "width"); + return (Criteria) this; + } + + public Criteria andWidthGreaterThan(Integer value) { + addCriterion("width >", value, "width"); + return (Criteria) this; + } + + public Criteria andWidthGreaterThanOrEqualTo(Integer value) { + addCriterion("width >=", value, "width"); + return (Criteria) this; + } + + public Criteria andWidthLessThan(Integer value) { + addCriterion("width <", value, "width"); + return (Criteria) this; + } + + public Criteria andWidthLessThanOrEqualTo(Integer value) { + addCriterion("width <=", value, "width"); + return (Criteria) this; + } + + public Criteria andWidthIn(List values) { + addCriterion("width in", values, "width"); + return (Criteria) this; + } + + public Criteria andWidthNotIn(List values) { + addCriterion("width not in", values, "width"); + return (Criteria) this; + } + + public Criteria andWidthBetween(Integer value1, Integer value2) { + addCriterion("width between", value1, value2, "width"); + return (Criteria) this; + } + + public Criteria andWidthNotBetween(Integer value1, Integer value2) { + addCriterion("width not between", value1, value2, "width"); + return (Criteria) this; + } + + public Criteria andFilelengthIsNull() { + addCriterion("fileLength is null"); + return (Criteria) this; + } + + public Criteria andFilelengthIsNotNull() { + addCriterion("fileLength is not null"); + return (Criteria) this; + } + + public Criteria andFilelengthEqualTo(Integer value) { + addCriterion("fileLength =", value, "filelength"); + return (Criteria) this; + } + + public Criteria andFilelengthNotEqualTo(Integer value) { + addCriterion("fileLength <>", value, "filelength"); + return (Criteria) this; + } + + public Criteria andFilelengthGreaterThan(Integer value) { + addCriterion("fileLength >", value, "filelength"); + return (Criteria) this; + } + + public Criteria andFilelengthGreaterThanOrEqualTo(Integer value) { + addCriterion("fileLength >=", value, "filelength"); + return (Criteria) this; + } + + public Criteria andFilelengthLessThan(Integer value) { + addCriterion("fileLength <", value, "filelength"); + return (Criteria) this; + } + + public Criteria andFilelengthLessThanOrEqualTo(Integer value) { + addCriterion("fileLength <=", value, "filelength"); + return (Criteria) this; + } + + public Criteria andFilelengthIn(List values) { + addCriterion("fileLength in", values, "filelength"); + return (Criteria) this; + } + + public Criteria andFilelengthNotIn(List values) { + addCriterion("fileLength not in", values, "filelength"); + return (Criteria) this; + } + + public Criteria andFilelengthBetween(Integer value1, Integer value2) { + addCriterion("fileLength between", value1, value2, "filelength"); + return (Criteria) this; + } + + public Criteria andFilelengthNotBetween(Integer value1, Integer value2) { + addCriterion("fileLength not between", value1, value2, "filelength"); + return (Criteria) this; + } + + public Criteria andRemarkIsNull() { + addCriterion("remark is null"); + return (Criteria) this; + } + + public Criteria andRemarkIsNotNull() { + addCriterion("remark is not null"); + return (Criteria) this; + } + + public Criteria andRemarkEqualTo(String value) { + addCriterion("remark =", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkNotEqualTo(String value) { + addCriterion("remark <>", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkGreaterThan(String value) { + addCriterion("remark >", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkGreaterThanOrEqualTo(String value) { + addCriterion("remark >=", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkLessThan(String value) { + addCriterion("remark <", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkLessThanOrEqualTo(String value) { + addCriterion("remark <=", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkLike(String value) { + addCriterion("remark like", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkNotLike(String value) { + addCriterion("remark not like", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkIn(List values) { + addCriterion("remark in", values, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkNotIn(List values) { + addCriterion("remark not in", values, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkBetween(String value1, String value2) { + addCriterion("remark between", value1, value2, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkNotBetween(String value1, String value2) { + addCriterion("remark not between", value1, value2, "remark"); + 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 values) { + addCriterion("createTime in", values, "createtime"); + return (Criteria) this; + } + + public Criteria andCreatetimeNotIn(List 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); + } + } +} \ No newline at end of file diff --git a/src/main/java/com/yutou/mobilecloud/mybatis/model/TBackupInfo.java b/src/main/java/com/yutou/mobilecloud/mybatis/model/TBackupInfo.java new file mode 100644 index 0000000..4363f0d --- /dev/null +++ b/src/main/java/com/yutou/mobilecloud/mybatis/model/TBackupInfo.java @@ -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; +} \ No newline at end of file diff --git a/src/main/java/com/yutou/mobilecloud/mybatis/model/TBackupInfoExample.java b/src/main/java/com/yutou/mobilecloud/mybatis/model/TBackupInfoExample.java new file mode 100644 index 0000000..5b04eed --- /dev/null +++ b/src/main/java/com/yutou/mobilecloud/mybatis/model/TBackupInfoExample.java @@ -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 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 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 criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList<>(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List 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 values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List 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 values) { + addCriterion("`uid` in", values, "uid"); + return (Criteria) this; + } + + public Criteria andUidNotIn(List 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 values) { + addCriterion("fid in", values, "fid"); + return (Criteria) this; + } + + public Criteria andFidNotIn(List 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 values) { + addCriterion("`type` in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotIn(List 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 values) { + addCriterion("createTime in", values, "createtime"); + return (Criteria) this; + } + + public Criteria andCreatetimeNotIn(List 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); + } + } +} \ No newline at end of file diff --git a/src/main/java/com/yutou/mobilecloud/mybatis/model/TUserConfig.java b/src/main/java/com/yutou/mobilecloud/mybatis/model/TUserConfig.java index 41faa34..543095c 100644 --- a/src/main/java/com/yutou/mobilecloud/mybatis/model/TUserConfig.java +++ b/src/main/java/com/yutou/mobilecloud/mybatis/model/TUserConfig.java @@ -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; } \ No newline at end of file diff --git a/src/main/java/com/yutou/mobilecloud/mybatis/model/TUserConfigExample.java b/src/main/java/com/yutou/mobilecloud/mybatis/model/TUserConfigExample.java index 5b6af6e..ae082dd 100644 --- a/src/main/java/com/yutou/mobilecloud/mybatis/model/TUserConfigExample.java +++ b/src/main/java/com/yutou/mobilecloud/mybatis/model/TUserConfigExample.java @@ -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 values) { + public Criteria andUidIn(List values) { addCriterion("`uid` in", values, "uid"); return (Criteria) this; } - public Criteria andUidNotIn(List values) { + public Criteria andUidNotIn(List 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 values) { - addCriterion("cloudmodel in", values, "cloudmodel"); + public Criteria andInfoversionbackupIn(List values) { + addCriterion("infoVersionBackup in", values, "infoversionbackup"); return (Criteria) this; } - public Criteria andCloudmodelNotIn(List values) { - addCriterion("cloudmodel not in", values, "cloudmodel"); + public Criteria andInfoversionbackupNotIn(List 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; } } diff --git a/src/main/java/com/yutou/mobilecloud/utils/AESTools.java b/src/main/java/com/yutou/mobilecloud/utils/AESTools.java new file mode 100644 index 0000000..c17d97d --- /dev/null +++ b/src/main/java/com/yutou/mobilecloud/utils/AESTools.java @@ -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; + } + +} diff --git a/src/main/java/com/yutou/mobilecloud/utils/Tools.java b/src/main/java/com/yutou/mobilecloud/utils/Tools.java new file mode 100644 index 0000000..6559daf --- /dev/null +++ b/src/main/java/com/yutou/mobilecloud/utils/Tools.java @@ -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 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()); + } + + +} diff --git a/src/main/java/com/yutou/mobilecloud/utils/UserTools.java b/src/main/java/com/yutou/mobilecloud/utils/UserTools.java new file mode 100644 index 0000000..5acb103 --- /dev/null +++ b/src/main/java/com/yutou/mobilecloud/utils/UserTools.java @@ -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; + } +} diff --git a/src/main/resources/mappers/TBackupAppDao.xml b/src/main/resources/mappers/TBackupAppDao.xml new file mode 100644 index 0000000..f5a18db --- /dev/null +++ b/src/main/resources/mappers/TBackupAppDao.xml @@ -0,0 +1,237 @@ + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, `uid`, fid, appName, appPackageName, appVersion, createTime + + + + + delete from t_backup_app + where id = #{id,jdbcType=INTEGER} + + + delete from t_backup_app + + + + + + 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 into t_backup_app + + + `uid`, + + + fid, + + + appName, + + + appPackageName, + + + appVersion, + + + createTime, + + + + + #{uid,jdbcType=INTEGER}, + + + #{fid,jdbcType=INTEGER}, + + + #{appname,jdbcType=VARCHAR}, + + + #{apppackagename,jdbcType=VARCHAR}, + + + #{appversion,jdbcType=VARCHAR}, + + + #{createtime,jdbcType=TIMESTAMP}, + + + + + + update t_backup_app + + + 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}, + + + + + + + + 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} + + + + + + update t_backup_app + + + `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 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} + + \ No newline at end of file diff --git a/src/main/resources/mappers/TBackupFileDao.xml b/src/main/resources/mappers/TBackupFileDao.xml index d761bbb..33a1521 100644 --- a/src/main/resources/mappers/TBackupFileDao.xml +++ b/src/main/resources/mappers/TBackupFileDao.xml @@ -3,12 +3,10 @@ - - - - + + + - @@ -69,7 +67,7 @@ - id, `uid`, bid, filepath, filesize, md5, createTime + id, fileName, filePath, fileSize, md5 @@ -164,24 +148,18 @@ id = #{record.id,jdbcType=INTEGER}, - - `uid` = #{record.uid,jdbcType=INTEGER}, - - - bid = #{record.bid,jdbcType=INTEGER}, + + fileName = #{record.filename,jdbcType=VARCHAR}, - filepath = #{record.filepath,jdbcType=VARCHAR}, + filePath = #{record.filepath,jdbcType=VARCHAR}, - filesize = #{record.filesize,jdbcType=INTEGER}, + fileSize = #{record.filesize,jdbcType=INTEGER}, md5 = #{record.md5,jdbcType=VARCHAR}, - - createTime = #{record.createtime,jdbcType=TIMESTAMP}, - @@ -190,12 +168,10 @@ 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} @@ -203,35 +179,27 @@ update t_backup_file - - `uid` = #{uid,jdbcType=INTEGER}, - - - bid = #{bid,jdbcType=INTEGER}, + + fileName = #{filename,jdbcType=VARCHAR}, - filepath = #{filepath,jdbcType=VARCHAR}, + filePath = #{filepath,jdbcType=VARCHAR}, - filesize = #{filesize,jdbcType=INTEGER}, + fileSize = #{filesize,jdbcType=INTEGER}, md5 = #{md5,jdbcType=VARCHAR}, - - createTime = #{createtime,jdbcType=TIMESTAMP}, - where id = #{id,jdbcType=INTEGER} 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} \ No newline at end of file diff --git a/src/main/resources/mappers/TBackupImageDao.xml b/src/main/resources/mappers/TBackupImageDao.xml new file mode 100644 index 0000000..1edb4d3 --- /dev/null +++ b/src/main/resources/mappers/TBackupImageDao.xml @@ -0,0 +1,347 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, `uid`, fid, `path`, device, gps, iso, shutter, aperture, high, width, fileLength, + remark, createTime + + + + + delete from t_backup_image + where id = #{id,jdbcType=INTEGER} + + + delete from t_backup_image + + + + + + 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 into t_backup_image + + + `uid`, + + + fid, + + + `path`, + + + device, + + + gps, + + + iso, + + + shutter, + + + aperture, + + + high, + + + width, + + + fileLength, + + + remark, + + + createTime, + + + + + #{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}, + + + + + + update t_backup_image + + + 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}, + + + + + + + + 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} + + + + + + update t_backup_image + + + `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 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} + + \ No newline at end of file diff --git a/src/main/resources/mappers/TBackupInfoDao.xml b/src/main/resources/mappers/TBackupInfoDao.xml new file mode 100644 index 0000000..f08dbc5 --- /dev/null +++ b/src/main/resources/mappers/TBackupInfoDao.xml @@ -0,0 +1,205 @@ + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, `uid`, fid, `type`, createTime + + + + + delete from t_backup_info + where id = #{id,jdbcType=INTEGER} + + + delete from t_backup_info + + + + + + insert into t_backup_info (`uid`, fid, `type`, + createTime) + values (#{uid,jdbcType=VARCHAR}, #{fid,jdbcType=INTEGER}, #{type,jdbcType=INTEGER}, + #{createtime,jdbcType=TIMESTAMP}) + + + insert into t_backup_info + + + `uid`, + + + fid, + + + `type`, + + + createTime, + + + + + #{uid,jdbcType=VARCHAR}, + + + #{fid,jdbcType=INTEGER}, + + + #{type,jdbcType=INTEGER}, + + + #{createtime,jdbcType=TIMESTAMP}, + + + + + + update t_backup_info + + + 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}, + + + + + + + + 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} + + + + + + update t_backup_info + + + `uid` = #{uid,jdbcType=VARCHAR}, + + + fid = #{fid,jdbcType=INTEGER}, + + + `type` = #{type,jdbcType=INTEGER}, + + + createTime = #{createtime,jdbcType=TIMESTAMP}, + + + where id = #{id,jdbcType=INTEGER} + + + 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} + + \ No newline at end of file diff --git a/src/main/resources/mappers/TUserConfigDao.xml b/src/main/resources/mappers/TUserConfigDao.xml index ef28694..d23b3f3 100644 --- a/src/main/resources/mappers/TUserConfigDao.xml +++ b/src/main/resources/mappers/TUserConfigDao.xml @@ -3,8 +3,8 @@ - - + + @@ -65,7 +65,7 @@ - id, `uid`, cloudmodel + id, `uid`, infoVersionBackup