Commit c3fde926 authored by shiyu's avatar shiyu

图录

parent a46fb2ba
package com.wwdz.ch.admin.controller;
import com.alibaba.fastjson.JSON;
import com.wwdz.ch.admin.service.ImageCatelogService;
import com.wwdz.ch.core.type.Result;
import com.wwdz.ch.db.dto.request.distribution.ImageCatelogRequestDto;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("/admin/imageCatelog")
public class ImageCatelogController {
private static final Logger logger = LoggerFactory.getLogger(ImageCatelogController.class);
@Autowired
ImageCatelogService imageCatelogService;
@ApiOperation(value = "查询图录列表")
@PostMapping("/find")
public Result update(@RequestBody ImageCatelogRequestDto dto) {
logger.info("查询图录列表,请求参数:{}", JSON.toJSONString(dto));
return imageCatelogService.findList(dto);
}
}
package com.wwdz.ch.admin.impl;
import com.github.pagehelper.PageInfo;
import com.wwdz.ch.admin.service.ImageCatelogService;
import com.wwdz.ch.core.type.PageSearchResult;
import com.wwdz.ch.core.type.Result;
import com.wwdz.ch.db.dao.distribution.ImageCatelogDao;
import com.wwdz.ch.db.domain.distribution.ImageCatelog;
import com.wwdz.ch.db.dto.request.distribution.ImageCatelogRequestDto;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
public class ImageCatelogServiceImpl implements ImageCatelogService {
private static final Logger logger = LoggerFactory.getLogger(ImageCatelogServiceImpl.class);
@Autowired
ImageCatelogDao imageCatelogDao;
@Override
public Result findList(ImageCatelogRequestDto dto) {
try {
List<ImageCatelog> list = imageCatelogDao.findList(dto);
PageInfo pageInfo = new PageInfo(list);
return Result.success(PageSearchResult.of(pageInfo));
} catch (Exception e) {
logger.error("查询图录列表 error:{}", e);
}
return Result.failed();
}
}
package com.wwdz.ch.admin.service;
import com.wwdz.ch.core.type.Result;
import com.wwdz.ch.db.dto.request.distribution.ImageCatelogRequestDto;
public interface ImageCatelogService {
Result findList(ImageCatelogRequestDto dto);
}
package com.wwdz.ch.admin.impl;
import com.wwdz.ch.core.util.UploadImageCatelogUtil;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.web.WebAppConfiguration;
@WebAppConfiguration
@RunWith(SpringJUnit4ClassRunner.class)
@SpringBootTest
public class UploadImageCatelogUtilTest {
@Autowired
UploadImageCatelogUtil uploadImageCatelogUtil;
@Test
public void upload() {
uploadImageCatelogUtil.upload();
}
}
\ No newline at end of file
package com.wwdz.ch.core.api;
import com.alibaba.fastjson.JSONArray;
import com.wwdz.ch.core.entity.WxCheckMediaRequestDto;
import com.wwdz.ch.core.type.Result;
import com.wwdz.ch.core.util.OkHttpUtil;
import com.xxdxxs.utils.JsonUtils;
import org.slf4j.Logger;
......@@ -10,6 +12,7 @@ import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Component
......@@ -36,6 +39,9 @@ public class WxAppletApi {
private static final String URL_LINK = "https://api.weixin.qq.com/wxa/generate_urllink?access_token=%s";
//获取用户访问小程序数据日趋势
private static final String GET_ACCESS_DATA_URL = "https://api.weixin.qq.com/datacube/getweanalysisappiddailyvisittrend?access_token=%s";
public String checkMedia(WxCheckMediaRequestDto dto) {
String accessToken = wxLoginManager.getAccessToken();
String url = String.format(MEDIA_CHECK_URL, accessToken);
......@@ -83,8 +89,42 @@ public class WxAppletApi {
return urlLink + " ";
}
/**
* 获取小程序访问数据
* @param startTime
* @param endTime
* @param type
* @return
*/
public Result getAccessData(String startTime, String endTime, int type) {
try {
String accessToken = wxLoginManager.getAccessToken();
String url = String.format(GET_ACCESS_DATA_URL, accessToken);
OkHttpUtil okHttpUtil = OkHttpUtil.builder().url(url);
Map<String, Object> map = new HashMap<>();
map.put("begin_date", startTime);
map.put("end_date", endTime);
logger.info("获取加密URLLink 参数:{}", JsonUtils.from(map));
okHttpUtil.addParams(map);
okHttpUtil.post(true);
String responseStr = okHttpUtil.async();
logger.info("获取用户访问小程序数据 response :{}", responseStr);
String listInfo = JsonUtils.getValueByPath(responseStr, "list");
List<Map<String, Object>> dataList = JsonUtils.toMapList(listInfo);
//session_cnt
int sessionCnt = (int) dataList.get(0).get("session_cnt");
//访问次数
int visitPv = (int) dataList.get(0).get("visit_pv");
//访问人数
int visitUv = (int) dataList.get(0).get("visit_uv");
//新用户数
int visitUvNew = (int) dataList.get(0).get("visit_uv_new");
} catch (Exception e) {
logger.error("获取用户访问小程序数据失败:{}", e);
}
return Result.failed();
}
}
package com.wwdz.ch.core.util;
import com.wwdz.ch.core.consts.CommConsts;
import com.wwdz.ch.core.consts.MediaTypeEnum;
import com.wwdz.ch.core.storage.QiniuStorage;
import com.wwdz.ch.core.type.Result;
import com.wwdz.ch.db.dao.distribution.ImageCatelogDao;
import com.wwdz.ch.db.dao.distribution.ImageCatelogDetailDao;
import com.wwdz.ch.db.domain.distribution.ImageCatelog;
import com.wwdz.ch.db.domain.distribution.ImageCatelogDetail;
import com.xxdxxs.utils.CommonUtils;
import jodd.io.findfile.FindFile;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import javax.imageio.ImageIO;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.InputStream;
import java.util.Date;
import static com.wwdz.ch.core.util.MediaUtil.bufferedImageToInputStream;
@Component
public class UploadImageCatelogUtil {
private static final Logger logger = LoggerFactory.getLogger(UploadImageCatelogUtil.class);
private final static String IMAGE_PATH = "/Users/xxdxxs/Documents/image_catelog/img/";
private final static Integer CATELOG_ID = 1;
@Autowired
ImageCatelogDetailDao imageCatelogDetailDao;
@Autowired
ImageCatelogDao imageCatelogDao;
@Autowired
QiniuStorage qiniuStorage;
public Result upload() {
try {
ImageCatelog imageCatelog = imageCatelogDao.findById(CATELOG_ID);
logger.info("当前上传的图录名称为 : {}" , imageCatelog.getName());
File folder = new File(IMAGE_PATH);
File[] listOfFiles = folder.listFiles();
java.util.Arrays.sort(listOfFiles, new FindFile.FileNameComparator(true));
logger.info("============ 当前目录下共有文件 : {} 个 =============", listOfFiles.length);
int sort = 1;
for (File file : listOfFiles) {
logger.info(">>>>>>>>>> 当前处理的文件名称:{} <<<<<<<<<<", file.getName());
if (isImageFile(file)) {
BufferedImage bufferedImage = ImageIO.read(file);
String keyName = CommConsts.UPLOAD_PRE_DIRECTORY + CommonUtils.getUUID() + "_" + bufferedImage.getWidth() + "x" + bufferedImage.getHeight() + "." + MediaTypeEnum.IMAGE_JPG.getExt();
InputStream imageStream = bufferedImageToInputStream(bufferedImage, MediaTypeEnum.IMAGE_JPG.getExt());
qiniuStorage.store(imageStream, 1, MediaTypeEnum.IMAGE_JPG.getMime(), keyName);
String imageUrl = qiniuStorage.generateUrl(keyName);
ImageCatelogDetail imageCatelogDetail = new ImageCatelogDetail();
imageCatelogDetail.setImgUrl(imageUrl);
imageCatelogDetail.setCatalogId(CATELOG_ID);
imageCatelogDetail.setSort(sort);
imageCatelogDetail.setCreateTime(new Date());
imageCatelogDetailDao.insert(imageCatelogDetail);
sort = sort + 1;
logger.info(">>>>>>>>>> 文件名称:{}, 上传成功 <<<<<<<<<<<<", file.getName());
}
}
logger.info("******************* 文件上传成功 *******************");
} catch (Exception e) {
e.printStackTrace();
logger.error("上传文件出错 :{}", e);
}
return Result.success();
}
public static boolean isImageFile(File file) {
String fileName = file.getName().toLowerCase();
return fileName.endsWith(".png") || fileName.endsWith(".jpg") || fileName.endsWith(".jpeg") || fileName.endsWith(".gif");
}
}
package com.wwdz.ch.db.dao.distribution;
import com.wwdz.ch.db.domain.distribution.ImageCatelog;
import com.wwdz.ch.db.dto.request.distribution.ImageCatelogRequestDto;
import java.util.List;
public interface ImageCatelogDao {
ImageCatelog findById(int id);
List<ImageCatelog> findList(ImageCatelogRequestDto dto);
}
package com.wwdz.ch.db.dao.distribution;
import com.wwdz.ch.db.domain.distribution.ImageCatelogDetail;
public interface ImageCatelogDetailDao {
void insert(ImageCatelogDetail imageCatelogDetail);
}
package com.wwdz.ch.db.domain.distribution;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import com.xxdxxs.entity.Entity;
import lombok.Data;
/**
* @author shiyu
* @date 2024/05/06
*/
@Data
public class ImageCatelog implements Entity {
/**
* id
*/
private Integer id;
/**
* 标题
*/
private String title;
/**
* 名称
*/
private String name;
/**
* 创建时间
*/
private Date createTime;
/**
* 预览图
*/
private String preview;
/**
* 是否有效
*/
private Boolean isValid;
private static final long serialVersionUID = 1L;
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", title=").append(title);
sb.append(", name=").append(name);
sb.append(", createTime=").append(createTime);
sb.append(", preview=").append(preview);
sb.append(", isValid=").append(isValid);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
}
@Override
public boolean equals(Object that) {
if (this == that) {
return true;
}
if (that == null) {
return false;
}
if (getClass() != that.getClass()) {
return false;
}
ImageCatelog other = (ImageCatelog) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getTitle() == null ? other.getTitle() == null : this.getTitle().equals(other.getTitle()))
&& (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
&& (this.getPreview() == null ? other.getPreview() == null : this.getPreview().equals(other.getPreview()))
&& (this.getIsValid() == null ? other.getIsValid() == null : this.getIsValid().equals(other.getIsValid()));
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
result = prime * result + ((getTitle() == null) ? 0 : getTitle().hashCode());
result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
result = prime * result + ((getPreview() == null) ? 0 : getPreview().hashCode());
result = prime * result + ((getIsValid() == null) ? 0 : getIsValid().hashCode());
return result;
}
/**
* This enum was generated by MyBatis Generator.
* This enum corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public enum Column {
id("id", "id", "INTEGER", false),
title("title", "title", "VARCHAR", false),
name("name", "name", "VARCHAR", true),
createTime("create_time", "createTime", "TIMESTAMP", false),
preview("preview", "preview", "VARCHAR", false),
isValid("is_valid", "isValid", "BIT", false);
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private static final String BEGINNING_DELIMITER = "`";
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private static final String ENDING_DELIMITER = "`";
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private final String column;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private final boolean isColumnNameDelimited;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private final String javaProperty;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private final String jdbcType;
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String value() {
return this.column;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String getValue() {
return this.column;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String getJavaProperty() {
return this.javaProperty;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String getJdbcType() {
return this.jdbcType;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {
this.column = column;
this.javaProperty = javaProperty;
this.jdbcType = jdbcType;
this.isColumnNameDelimited = isColumnNameDelimited;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String desc() {
return this.getEscapedColumnName() + " DESC";
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String asc() {
return this.getEscapedColumnName() + " ASC";
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public static Column[] excludes(Column ... excludes) {
ArrayList<Column> columns = new ArrayList<>(Arrays.asList(Column.values()));
if (excludes != null && excludes.length > 0) {
columns.removeAll(new ArrayList<>(Arrays.asList(excludes)));
}
return columns.toArray(new Column[]{});
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String getEscapedColumnName() {
if (this.isColumnNameDelimited) {
return new StringBuilder().append(BEGINNING_DELIMITER).append(this.column).append(ENDING_DELIMITER).toString();
} else {
return this.column;
}
}
}
}
\ No newline at end of file
package com.wwdz.ch.db.domain.distribution;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import com.xxdxxs.entity.Entity;
import lombok.Data;
/**
* @author shiyu
* @date 2024/05/06
*/
@Data
public class ImageCatelogDetail implements Entity {
private Integer id;
/**
* 图片地址
*/
private String imgUrl;
/**
* 顺序
*/
private Integer sort;
/**
* 创建时间
*/
private Date createTime;
/**
* 图录id
*/
private Integer catalogId;
private static final long serialVersionUID = 1L;
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", imgUrl=").append(imgUrl);
sb.append(", sort=").append(sort);
sb.append(", createTime=").append(createTime);
sb.append(", catalogId=").append(catalogId);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
}
@Override
public boolean equals(Object that) {
if (this == that) {
return true;
}
if (that == null) {
return false;
}
if (getClass() != that.getClass()) {
return false;
}
ImageCatelogDetail other = (ImageCatelogDetail) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getImgUrl() == null ? other.getImgUrl() == null : this.getImgUrl().equals(other.getImgUrl()))
&& (this.getSort() == null ? other.getSort() == null : this.getSort().equals(other.getSort()))
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
&& (this.getCatalogId() == null ? other.getCatalogId() == null : this.getCatalogId().equals(other.getCatalogId()));
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
result = prime * result + ((getImgUrl() == null) ? 0 : getImgUrl().hashCode());
result = prime * result + ((getSort() == null) ? 0 : getSort().hashCode());
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
result = prime * result + ((getCatalogId() == null) ? 0 : getCatalogId().hashCode());
return result;
}
/**
* This enum was generated by MyBatis Generator.
* This enum corresponds to the database table image_catelog_detail
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public enum Column {
id("id", "id", "INTEGER", false),
imgUrl("img_url", "imgUrl", "VARCHAR", false),
sort("sort", "sort", "INTEGER", false),
createTime("create_time", "createTime", "TIMESTAMP", false),
catalogId("catalog_id", "catalogId", "INTEGER", false);
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table image_catelog_detail
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private static final String BEGINNING_DELIMITER = "`";
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table image_catelog_detail
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private static final String ENDING_DELIMITER = "`";
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table image_catelog_detail
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private final String column;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table image_catelog_detail
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private final boolean isColumnNameDelimited;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table image_catelog_detail
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private final String javaProperty;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table image_catelog_detail
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private final String jdbcType;
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog_detail
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String value() {
return this.column;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog_detail
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String getValue() {
return this.column;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog_detail
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String getJavaProperty() {
return this.javaProperty;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog_detail
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String getJdbcType() {
return this.jdbcType;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog_detail
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {
this.column = column;
this.javaProperty = javaProperty;
this.jdbcType = jdbcType;
this.isColumnNameDelimited = isColumnNameDelimited;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog_detail
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String desc() {
return this.getEscapedColumnName() + " DESC";
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog_detail
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String asc() {
return this.getEscapedColumnName() + " ASC";
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog_detail
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public static Column[] excludes(Column ... excludes) {
ArrayList<Column> columns = new ArrayList<>(Arrays.asList(Column.values()));
if (excludes != null && excludes.length > 0) {
columns.removeAll(new ArrayList<>(Arrays.asList(excludes)));
}
return columns.toArray(new Column[]{});
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog_detail
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String getEscapedColumnName() {
if (this.isColumnNameDelimited) {
return new StringBuilder().append(BEGINNING_DELIMITER).append(this.column).append(ENDING_DELIMITER).toString();
} else {
return this.column;
}
}
}
}
\ No newline at end of file
package com.wwdz.ch.db.domain.distribution;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class ImageCatelogDetailExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public ImageCatelogDetailExample() {
oredCriteria = new ArrayList<Criteria>();
}
public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause;
}
public String getOrderByClause() {
return orderByClause;
}
public void setDistinct(boolean distinct) {
this.distinct = distinct;
}
public boolean isDistinct() {
return distinct;
}
public List<Criteria> getOredCriteria() {
return oredCriteria;
}
public void or(Criteria criteria) {
oredCriteria.add(criteria);
}
public Criteria or() {
Criteria criteria = createCriteriaInternal();
oredCriteria.add(criteria);
return criteria;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog_detail
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public ImageCatelogDetailExample orderBy(String orderByClause) {
this.setOrderByClause(orderByClause);
return this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog_detail
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public ImageCatelogDetailExample orderBy(String ... orderByClauses) {
StringBuffer sb = new StringBuffer();
for (int i = 0; i < orderByClauses.length; i++) {
sb.append(orderByClauses[i]);
if (i < orderByClauses.length - 1) {
sb.append(" , ");
}
}
this.setOrderByClause(sb.toString());
return this;
}
public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) {
oredCriteria.add(criteria);
}
return criteria;
}
protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria(this);
return criteria;
}
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog_detail
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public static Criteria newAndCreateCriteria() {
ImageCatelogDetailExample example = new ImageCatelogDetailExample();
return example.createCriteria();
}
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> getCriteria() {
return criteria;
}
protected void addCriterion(String condition) {
if (condition == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion(condition));
}
protected void addCriterion(String condition, Object value, String property) {
if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value));
}
protected void addCriterion(String condition, Object value1, Object value2, String property) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value1, value2));
}
public Criteria andIdIsNull() {
addCriterion("id is null");
return (Criteria) this;
}
public Criteria andIdIsNotNull() {
addCriterion("id is not null");
return (Criteria) this;
}
public Criteria andIdEqualTo(Integer value) {
addCriterion("id =", value, "id");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog_detail
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIdEqualToColumn(ImageCatelogDetail.Column column) {
addCriterion(new StringBuilder("id = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andIdNotEqualTo(Integer value) {
addCriterion("id <>", value, "id");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog_detail
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIdNotEqualToColumn(ImageCatelogDetail.Column column) {
addCriterion(new StringBuilder("id <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andIdGreaterThan(Integer value) {
addCriterion("id >", value, "id");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog_detail
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIdGreaterThanColumn(ImageCatelogDetail.Column column) {
addCriterion(new StringBuilder("id > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andIdGreaterThanOrEqualTo(Integer value) {
addCriterion("id >=", value, "id");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog_detail
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIdGreaterThanOrEqualToColumn(ImageCatelogDetail.Column column) {
addCriterion(new StringBuilder("id >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andIdLessThan(Integer value) {
addCriterion("id <", value, "id");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog_detail
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIdLessThanColumn(ImageCatelogDetail.Column column) {
addCriterion(new StringBuilder("id < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andIdLessThanOrEqualTo(Integer value) {
addCriterion("id <=", value, "id");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog_detail
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIdLessThanOrEqualToColumn(ImageCatelogDetail.Column column) {
addCriterion(new StringBuilder("id <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andIdIn(List<Integer> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<Integer> values) {
addCriterion("id not in", values, "id");
return (Criteria) this;
}
public Criteria andIdBetween(Integer value1, Integer value2) {
addCriterion("id between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andIdNotBetween(Integer value1, Integer value2) {
addCriterion("id not between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andImgUrlIsNull() {
addCriterion("img_url is null");
return (Criteria) this;
}
public Criteria andImgUrlIsNotNull() {
addCriterion("img_url is not null");
return (Criteria) this;
}
public Criteria andImgUrlEqualTo(String value) {
addCriterion("img_url =", value, "imgUrl");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog_detail
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andImgUrlEqualToColumn(ImageCatelogDetail.Column column) {
addCriterion(new StringBuilder("img_url = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andImgUrlNotEqualTo(String value) {
addCriterion("img_url <>", value, "imgUrl");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog_detail
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andImgUrlNotEqualToColumn(ImageCatelogDetail.Column column) {
addCriterion(new StringBuilder("img_url <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andImgUrlGreaterThan(String value) {
addCriterion("img_url >", value, "imgUrl");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog_detail
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andImgUrlGreaterThanColumn(ImageCatelogDetail.Column column) {
addCriterion(new StringBuilder("img_url > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andImgUrlGreaterThanOrEqualTo(String value) {
addCriterion("img_url >=", value, "imgUrl");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog_detail
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andImgUrlGreaterThanOrEqualToColumn(ImageCatelogDetail.Column column) {
addCriterion(new StringBuilder("img_url >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andImgUrlLessThan(String value) {
addCriterion("img_url <", value, "imgUrl");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog_detail
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andImgUrlLessThanColumn(ImageCatelogDetail.Column column) {
addCriterion(new StringBuilder("img_url < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andImgUrlLessThanOrEqualTo(String value) {
addCriterion("img_url <=", value, "imgUrl");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog_detail
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andImgUrlLessThanOrEqualToColumn(ImageCatelogDetail.Column column) {
addCriterion(new StringBuilder("img_url <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andImgUrlLike(String value) {
addCriterion("img_url like", value, "imgUrl");
return (Criteria) this;
}
public Criteria andImgUrlNotLike(String value) {
addCriterion("img_url not like", value, "imgUrl");
return (Criteria) this;
}
public Criteria andImgUrlIn(List<String> values) {
addCriterion("img_url in", values, "imgUrl");
return (Criteria) this;
}
public Criteria andImgUrlNotIn(List<String> values) {
addCriterion("img_url not in", values, "imgUrl");
return (Criteria) this;
}
public Criteria andImgUrlBetween(String value1, String value2) {
addCriterion("img_url between", value1, value2, "imgUrl");
return (Criteria) this;
}
public Criteria andImgUrlNotBetween(String value1, String value2) {
addCriterion("img_url not between", value1, value2, "imgUrl");
return (Criteria) this;
}
public Criteria andSortIsNull() {
addCriterion("sort is null");
return (Criteria) this;
}
public Criteria andSortIsNotNull() {
addCriterion("sort is not null");
return (Criteria) this;
}
public Criteria andSortEqualTo(Integer value) {
addCriterion("sort =", value, "sort");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog_detail
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andSortEqualToColumn(ImageCatelogDetail.Column column) {
addCriterion(new StringBuilder("sort = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andSortNotEqualTo(Integer value) {
addCriterion("sort <>", value, "sort");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog_detail
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andSortNotEqualToColumn(ImageCatelogDetail.Column column) {
addCriterion(new StringBuilder("sort <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andSortGreaterThan(Integer value) {
addCriterion("sort >", value, "sort");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog_detail
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andSortGreaterThanColumn(ImageCatelogDetail.Column column) {
addCriterion(new StringBuilder("sort > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andSortGreaterThanOrEqualTo(Integer value) {
addCriterion("sort >=", value, "sort");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog_detail
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andSortGreaterThanOrEqualToColumn(ImageCatelogDetail.Column column) {
addCriterion(new StringBuilder("sort >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andSortLessThan(Integer value) {
addCriterion("sort <", value, "sort");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog_detail
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andSortLessThanColumn(ImageCatelogDetail.Column column) {
addCriterion(new StringBuilder("sort < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andSortLessThanOrEqualTo(Integer value) {
addCriterion("sort <=", value, "sort");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog_detail
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andSortLessThanOrEqualToColumn(ImageCatelogDetail.Column column) {
addCriterion(new StringBuilder("sort <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andSortIn(List<Integer> values) {
addCriterion("sort in", values, "sort");
return (Criteria) this;
}
public Criteria andSortNotIn(List<Integer> values) {
addCriterion("sort not in", values, "sort");
return (Criteria) this;
}
public Criteria andSortBetween(Integer value1, Integer value2) {
addCriterion("sort between", value1, value2, "sort");
return (Criteria) this;
}
public Criteria andSortNotBetween(Integer value1, Integer value2) {
addCriterion("sort not between", value1, value2, "sort");
return (Criteria) this;
}
public Criteria andCreateTimeIsNull() {
addCriterion("create_time is null");
return (Criteria) this;
}
public Criteria andCreateTimeIsNotNull() {
addCriterion("create_time is not null");
return (Criteria) this;
}
public Criteria andCreateTimeEqualTo(Date value) {
addCriterion("create_time =", value, "createTime");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog_detail
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCreateTimeEqualToColumn(ImageCatelogDetail.Column column) {
addCriterion(new StringBuilder("create_time = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andCreateTimeNotEqualTo(Date value) {
addCriterion("create_time <>", value, "createTime");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog_detail
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCreateTimeNotEqualToColumn(ImageCatelogDetail.Column column) {
addCriterion(new StringBuilder("create_time <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andCreateTimeGreaterThan(Date value) {
addCriterion("create_time >", value, "createTime");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog_detail
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCreateTimeGreaterThanColumn(ImageCatelogDetail.Column column) {
addCriterion(new StringBuilder("create_time > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
addCriterion("create_time >=", value, "createTime");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog_detail
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCreateTimeGreaterThanOrEqualToColumn(ImageCatelogDetail.Column column) {
addCriterion(new StringBuilder("create_time >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andCreateTimeLessThan(Date value) {
addCriterion("create_time <", value, "createTime");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog_detail
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCreateTimeLessThanColumn(ImageCatelogDetail.Column column) {
addCriterion(new StringBuilder("create_time < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
addCriterion("create_time <=", value, "createTime");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog_detail
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCreateTimeLessThanOrEqualToColumn(ImageCatelogDetail.Column column) {
addCriterion(new StringBuilder("create_time <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andCreateTimeIn(List<Date> values) {
addCriterion("create_time in", values, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotIn(List<Date> values) {
addCriterion("create_time not in", values, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeBetween(Date value1, Date value2) {
addCriterion("create_time between", value1, value2, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
addCriterion("create_time not between", value1, value2, "createTime");
return (Criteria) this;
}
public Criteria andCatalogIdIsNull() {
addCriterion("catalog_id is null");
return (Criteria) this;
}
public Criteria andCatalogIdIsNotNull() {
addCriterion("catalog_id is not null");
return (Criteria) this;
}
public Criteria andCatalogIdEqualTo(Integer value) {
addCriterion("catalog_id =", value, "catalogId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog_detail
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCatalogIdEqualToColumn(ImageCatelogDetail.Column column) {
addCriterion(new StringBuilder("catalog_id = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andCatalogIdNotEqualTo(Integer value) {
addCriterion("catalog_id <>", value, "catalogId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog_detail
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCatalogIdNotEqualToColumn(ImageCatelogDetail.Column column) {
addCriterion(new StringBuilder("catalog_id <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andCatalogIdGreaterThan(Integer value) {
addCriterion("catalog_id >", value, "catalogId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog_detail
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCatalogIdGreaterThanColumn(ImageCatelogDetail.Column column) {
addCriterion(new StringBuilder("catalog_id > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andCatalogIdGreaterThanOrEqualTo(Integer value) {
addCriterion("catalog_id >=", value, "catalogId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog_detail
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCatalogIdGreaterThanOrEqualToColumn(ImageCatelogDetail.Column column) {
addCriterion(new StringBuilder("catalog_id >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andCatalogIdLessThan(Integer value) {
addCriterion("catalog_id <", value, "catalogId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog_detail
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCatalogIdLessThanColumn(ImageCatelogDetail.Column column) {
addCriterion(new StringBuilder("catalog_id < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andCatalogIdLessThanOrEqualTo(Integer value) {
addCriterion("catalog_id <=", value, "catalogId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog_detail
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCatalogIdLessThanOrEqualToColumn(ImageCatelogDetail.Column column) {
addCriterion(new StringBuilder("catalog_id <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andCatalogIdIn(List<Integer> values) {
addCriterion("catalog_id in", values, "catalogId");
return (Criteria) this;
}
public Criteria andCatalogIdNotIn(List<Integer> values) {
addCriterion("catalog_id not in", values, "catalogId");
return (Criteria) this;
}
public Criteria andCatalogIdBetween(Integer value1, Integer value2) {
addCriterion("catalog_id between", value1, value2, "catalogId");
return (Criteria) this;
}
public Criteria andCatalogIdNotBetween(Integer value1, Integer value2) {
addCriterion("catalog_id not between", value1, value2, "catalogId");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table image_catelog_detail
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private ImageCatelogDetailExample example;
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog_detail
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
protected Criteria(ImageCatelogDetailExample example) {
super();
this.example = example;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog_detail
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public ImageCatelogDetailExample example() {
return this.example;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog_detail
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIf(boolean ifAdd, ICriteriaAdd add) {
if (ifAdd) {
add.add(this);
}
return this;
}
/**
* This interface was generated by MyBatis Generator.
* This interface corresponds to the database table image_catelog_detail
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public interface ICriteriaAdd {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog_detail
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
Criteria add(Criteria add);
}
}
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
package com.wwdz.ch.db.domain.distribution;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class ImageCatelogExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public ImageCatelogExample() {
oredCriteria = new ArrayList<Criteria>();
}
public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause;
}
public String getOrderByClause() {
return orderByClause;
}
public void setDistinct(boolean distinct) {
this.distinct = distinct;
}
public boolean isDistinct() {
return distinct;
}
public List<Criteria> getOredCriteria() {
return oredCriteria;
}
public void or(Criteria criteria) {
oredCriteria.add(criteria);
}
public Criteria or() {
Criteria criteria = createCriteriaInternal();
oredCriteria.add(criteria);
return criteria;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public ImageCatelogExample orderBy(String orderByClause) {
this.setOrderByClause(orderByClause);
return this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public ImageCatelogExample orderBy(String ... orderByClauses) {
StringBuffer sb = new StringBuffer();
for (int i = 0; i < orderByClauses.length; i++) {
sb.append(orderByClauses[i]);
if (i < orderByClauses.length - 1) {
sb.append(" , ");
}
}
this.setOrderByClause(sb.toString());
return this;
}
public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) {
oredCriteria.add(criteria);
}
return criteria;
}
protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria(this);
return criteria;
}
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public static Criteria newAndCreateCriteria() {
ImageCatelogExample example = new ImageCatelogExample();
return example.createCriteria();
}
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> getCriteria() {
return criteria;
}
protected void addCriterion(String condition) {
if (condition == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion(condition));
}
protected void addCriterion(String condition, Object value, String property) {
if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value));
}
protected void addCriterion(String condition, Object value1, Object value2, String property) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value1, value2));
}
public Criteria andIdIsNull() {
addCriterion("id is null");
return (Criteria) this;
}
public Criteria andIdIsNotNull() {
addCriterion("id is not null");
return (Criteria) this;
}
public Criteria andIdEqualTo(Integer value) {
addCriterion("id =", value, "id");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIdEqualToColumn(ImageCatelog.Column column) {
addCriterion(new StringBuilder("id = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andIdNotEqualTo(Integer value) {
addCriterion("id <>", value, "id");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIdNotEqualToColumn(ImageCatelog.Column column) {
addCriterion(new StringBuilder("id <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andIdGreaterThan(Integer value) {
addCriterion("id >", value, "id");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIdGreaterThanColumn(ImageCatelog.Column column) {
addCriterion(new StringBuilder("id > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andIdGreaterThanOrEqualTo(Integer value) {
addCriterion("id >=", value, "id");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIdGreaterThanOrEqualToColumn(ImageCatelog.Column column) {
addCriterion(new StringBuilder("id >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andIdLessThan(Integer value) {
addCriterion("id <", value, "id");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIdLessThanColumn(ImageCatelog.Column column) {
addCriterion(new StringBuilder("id < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andIdLessThanOrEqualTo(Integer value) {
addCriterion("id <=", value, "id");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIdLessThanOrEqualToColumn(ImageCatelog.Column column) {
addCriterion(new StringBuilder("id <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andIdIn(List<Integer> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<Integer> values) {
addCriterion("id not in", values, "id");
return (Criteria) this;
}
public Criteria andIdBetween(Integer value1, Integer value2) {
addCriterion("id between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andIdNotBetween(Integer value1, Integer value2) {
addCriterion("id not between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andTitleIsNull() {
addCriterion("title is null");
return (Criteria) this;
}
public Criteria andTitleIsNotNull() {
addCriterion("title is not null");
return (Criteria) this;
}
public Criteria andTitleEqualTo(String value) {
addCriterion("title =", value, "title");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andTitleEqualToColumn(ImageCatelog.Column column) {
addCriterion(new StringBuilder("title = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andTitleNotEqualTo(String value) {
addCriterion("title <>", value, "title");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andTitleNotEqualToColumn(ImageCatelog.Column column) {
addCriterion(new StringBuilder("title <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andTitleGreaterThan(String value) {
addCriterion("title >", value, "title");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andTitleGreaterThanColumn(ImageCatelog.Column column) {
addCriterion(new StringBuilder("title > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andTitleGreaterThanOrEqualTo(String value) {
addCriterion("title >=", value, "title");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andTitleGreaterThanOrEqualToColumn(ImageCatelog.Column column) {
addCriterion(new StringBuilder("title >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andTitleLessThan(String value) {
addCriterion("title <", value, "title");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andTitleLessThanColumn(ImageCatelog.Column column) {
addCriterion(new StringBuilder("title < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andTitleLessThanOrEqualTo(String value) {
addCriterion("title <=", value, "title");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andTitleLessThanOrEqualToColumn(ImageCatelog.Column column) {
addCriterion(new StringBuilder("title <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andTitleLike(String value) {
addCriterion("title like", value, "title");
return (Criteria) this;
}
public Criteria andTitleNotLike(String value) {
addCriterion("title not like", value, "title");
return (Criteria) this;
}
public Criteria andTitleIn(List<String> values) {
addCriterion("title in", values, "title");
return (Criteria) this;
}
public Criteria andTitleNotIn(List<String> values) {
addCriterion("title not in", values, "title");
return (Criteria) this;
}
public Criteria andTitleBetween(String value1, String value2) {
addCriterion("title between", value1, value2, "title");
return (Criteria) this;
}
public Criteria andTitleNotBetween(String value1, String value2) {
addCriterion("title not between", value1, value2, "title");
return (Criteria) this;
}
public Criteria andNameIsNull() {
addCriterion("`name` is null");
return (Criteria) this;
}
public Criteria andNameIsNotNull() {
addCriterion("`name` is not null");
return (Criteria) this;
}
public Criteria andNameEqualTo(String value) {
addCriterion("`name` =", value, "name");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andNameEqualToColumn(ImageCatelog.Column column) {
addCriterion(new StringBuilder("`name` = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andNameNotEqualTo(String value) {
addCriterion("`name` <>", value, "name");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andNameNotEqualToColumn(ImageCatelog.Column column) {
addCriterion(new StringBuilder("`name` <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andNameGreaterThan(String value) {
addCriterion("`name` >", value, "name");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andNameGreaterThanColumn(ImageCatelog.Column column) {
addCriterion(new StringBuilder("`name` > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andNameGreaterThanOrEqualTo(String value) {
addCriterion("`name` >=", value, "name");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andNameGreaterThanOrEqualToColumn(ImageCatelog.Column column) {
addCriterion(new StringBuilder("`name` >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andNameLessThan(String value) {
addCriterion("`name` <", value, "name");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andNameLessThanColumn(ImageCatelog.Column column) {
addCriterion(new StringBuilder("`name` < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andNameLessThanOrEqualTo(String value) {
addCriterion("`name` <=", value, "name");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andNameLessThanOrEqualToColumn(ImageCatelog.Column column) {
addCriterion(new StringBuilder("`name` <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andNameLike(String value) {
addCriterion("`name` like", value, "name");
return (Criteria) this;
}
public Criteria andNameNotLike(String value) {
addCriterion("`name` not like", value, "name");
return (Criteria) this;
}
public Criteria andNameIn(List<String> values) {
addCriterion("`name` in", values, "name");
return (Criteria) this;
}
public Criteria andNameNotIn(List<String> values) {
addCriterion("`name` not in", values, "name");
return (Criteria) this;
}
public Criteria andNameBetween(String value1, String value2) {
addCriterion("`name` between", value1, value2, "name");
return (Criteria) this;
}
public Criteria andNameNotBetween(String value1, String value2) {
addCriterion("`name` not between", value1, value2, "name");
return (Criteria) this;
}
public Criteria andCreateTimeIsNull() {
addCriterion("create_time is null");
return (Criteria) this;
}
public Criteria andCreateTimeIsNotNull() {
addCriterion("create_time is not null");
return (Criteria) this;
}
public Criteria andCreateTimeEqualTo(Date value) {
addCriterion("create_time =", value, "createTime");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCreateTimeEqualToColumn(ImageCatelog.Column column) {
addCriterion(new StringBuilder("create_time = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andCreateTimeNotEqualTo(Date value) {
addCriterion("create_time <>", value, "createTime");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCreateTimeNotEqualToColumn(ImageCatelog.Column column) {
addCriterion(new StringBuilder("create_time <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andCreateTimeGreaterThan(Date value) {
addCriterion("create_time >", value, "createTime");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCreateTimeGreaterThanColumn(ImageCatelog.Column column) {
addCriterion(new StringBuilder("create_time > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
addCriterion("create_time >=", value, "createTime");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCreateTimeGreaterThanOrEqualToColumn(ImageCatelog.Column column) {
addCriterion(new StringBuilder("create_time >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andCreateTimeLessThan(Date value) {
addCriterion("create_time <", value, "createTime");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCreateTimeLessThanColumn(ImageCatelog.Column column) {
addCriterion(new StringBuilder("create_time < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
addCriterion("create_time <=", value, "createTime");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCreateTimeLessThanOrEqualToColumn(ImageCatelog.Column column) {
addCriterion(new StringBuilder("create_time <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andCreateTimeIn(List<Date> values) {
addCriterion("create_time in", values, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotIn(List<Date> values) {
addCriterion("create_time not in", values, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeBetween(Date value1, Date value2) {
addCriterion("create_time between", value1, value2, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
addCriterion("create_time not between", value1, value2, "createTime");
return (Criteria) this;
}
public Criteria andPreviewIsNull() {
addCriterion("preview is null");
return (Criteria) this;
}
public Criteria andPreviewIsNotNull() {
addCriterion("preview is not null");
return (Criteria) this;
}
public Criteria andPreviewEqualTo(String value) {
addCriterion("preview =", value, "preview");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andPreviewEqualToColumn(ImageCatelog.Column column) {
addCriterion(new StringBuilder("preview = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andPreviewNotEqualTo(String value) {
addCriterion("preview <>", value, "preview");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andPreviewNotEqualToColumn(ImageCatelog.Column column) {
addCriterion(new StringBuilder("preview <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andPreviewGreaterThan(String value) {
addCriterion("preview >", value, "preview");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andPreviewGreaterThanColumn(ImageCatelog.Column column) {
addCriterion(new StringBuilder("preview > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andPreviewGreaterThanOrEqualTo(String value) {
addCriterion("preview >=", value, "preview");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andPreviewGreaterThanOrEqualToColumn(ImageCatelog.Column column) {
addCriterion(new StringBuilder("preview >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andPreviewLessThan(String value) {
addCriterion("preview <", value, "preview");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andPreviewLessThanColumn(ImageCatelog.Column column) {
addCriterion(new StringBuilder("preview < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andPreviewLessThanOrEqualTo(String value) {
addCriterion("preview <=", value, "preview");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andPreviewLessThanOrEqualToColumn(ImageCatelog.Column column) {
addCriterion(new StringBuilder("preview <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andPreviewLike(String value) {
addCriterion("preview like", value, "preview");
return (Criteria) this;
}
public Criteria andPreviewNotLike(String value) {
addCriterion("preview not like", value, "preview");
return (Criteria) this;
}
public Criteria andPreviewIn(List<String> values) {
addCriterion("preview in", values, "preview");
return (Criteria) this;
}
public Criteria andPreviewNotIn(List<String> values) {
addCriterion("preview not in", values, "preview");
return (Criteria) this;
}
public Criteria andPreviewBetween(String value1, String value2) {
addCriterion("preview between", value1, value2, "preview");
return (Criteria) this;
}
public Criteria andPreviewNotBetween(String value1, String value2) {
addCriterion("preview not between", value1, value2, "preview");
return (Criteria) this;
}
public Criteria andIsValidIsNull() {
addCriterion("is_valid is null");
return (Criteria) this;
}
public Criteria andIsValidIsNotNull() {
addCriterion("is_valid is not null");
return (Criteria) this;
}
public Criteria andIsValidEqualTo(Boolean value) {
addCriterion("is_valid =", value, "isValid");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIsValidEqualToColumn(ImageCatelog.Column column) {
addCriterion(new StringBuilder("is_valid = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andIsValidNotEqualTo(Boolean value) {
addCriterion("is_valid <>", value, "isValid");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIsValidNotEqualToColumn(ImageCatelog.Column column) {
addCriterion(new StringBuilder("is_valid <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andIsValidGreaterThan(Boolean value) {
addCriterion("is_valid >", value, "isValid");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIsValidGreaterThanColumn(ImageCatelog.Column column) {
addCriterion(new StringBuilder("is_valid > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andIsValidGreaterThanOrEqualTo(Boolean value) {
addCriterion("is_valid >=", value, "isValid");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIsValidGreaterThanOrEqualToColumn(ImageCatelog.Column column) {
addCriterion(new StringBuilder("is_valid >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andIsValidLessThan(Boolean value) {
addCriterion("is_valid <", value, "isValid");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIsValidLessThanColumn(ImageCatelog.Column column) {
addCriterion(new StringBuilder("is_valid < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andIsValidLessThanOrEqualTo(Boolean value) {
addCriterion("is_valid <=", value, "isValid");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIsValidLessThanOrEqualToColumn(ImageCatelog.Column column) {
addCriterion(new StringBuilder("is_valid <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andIsValidIn(List<Boolean> values) {
addCriterion("is_valid in", values, "isValid");
return (Criteria) this;
}
public Criteria andIsValidNotIn(List<Boolean> values) {
addCriterion("is_valid not in", values, "isValid");
return (Criteria) this;
}
public Criteria andIsValidBetween(Boolean value1, Boolean value2) {
addCriterion("is_valid between", value1, value2, "isValid");
return (Criteria) this;
}
public Criteria andIsValidNotBetween(Boolean value1, Boolean value2) {
addCriterion("is_valid not between", value1, value2, "isValid");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private ImageCatelogExample example;
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
protected Criteria(ImageCatelogExample example) {
super();
this.example = example;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public ImageCatelogExample example() {
return this.example;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIf(boolean ifAdd, ICriteriaAdd add) {
if (ifAdd) {
add.add(this);
}
return this;
}
/**
* This interface was generated by MyBatis Generator.
* This interface corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public interface ICriteriaAdd {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
Criteria add(Criteria add);
}
}
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
package com.wwdz.ch.db.dto.request.distribution;
import com.wwdz.ch.db.dto.request.BaseRequestDto;
import com.xxdxxs.entity.Entity;
import lombok.Data;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
/**
* @author shiyu
* @date 2024/05/06
*/
@Data
public class ImageCatelogRequestDto extends BaseRequestDto implements Entity {
/**
* id
*/
private Integer id;
/**
* 标题
*/
private String title;
/**
* 名称
*/
private String name;
/**
* 创建时间
*/
private Date createTime;
/**
* 预览图
*/
private String preview;
/**
* 是否有效
*/
private Boolean isValid;
private static final long serialVersionUID = 1L;
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", title=").append(title);
sb.append(", name=").append(name);
sb.append(", createTime=").append(createTime);
sb.append(", preview=").append(preview);
sb.append(", isValid=").append(isValid);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
}
@Override
public boolean equals(Object that) {
if (this == that) {
return true;
}
if (that == null) {
return false;
}
if (getClass() != that.getClass()) {
return false;
}
ImageCatelogRequestDto other = (ImageCatelogRequestDto) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getTitle() == null ? other.getTitle() == null : this.getTitle().equals(other.getTitle()))
&& (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
&& (this.getPreview() == null ? other.getPreview() == null : this.getPreview().equals(other.getPreview()))
&& (this.getIsValid() == null ? other.getIsValid() == null : this.getIsValid().equals(other.getIsValid()));
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
result = prime * result + ((getTitle() == null) ? 0 : getTitle().hashCode());
result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
result = prime * result + ((getPreview() == null) ? 0 : getPreview().hashCode());
result = prime * result + ((getIsValid() == null) ? 0 : getIsValid().hashCode());
return result;
}
/**
* This enum was generated by MyBatis Generator.
* This enum corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public enum Column {
id("id", "id", "INTEGER", false),
title("title", "title", "VARCHAR", false),
name("name", "name", "VARCHAR", true),
createTime("create_time", "createTime", "TIMESTAMP", false),
preview("preview", "preview", "VARCHAR", false),
isValid("is_valid", "isValid", "BIT", false);
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private static final String BEGINNING_DELIMITER = "`";
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private static final String ENDING_DELIMITER = "`";
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private final String column;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private final boolean isColumnNameDelimited;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private final String javaProperty;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private final String jdbcType;
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String value() {
return this.column;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String getValue() {
return this.column;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String getJavaProperty() {
return this.javaProperty;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String getJdbcType() {
return this.jdbcType;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {
this.column = column;
this.javaProperty = javaProperty;
this.jdbcType = jdbcType;
this.isColumnNameDelimited = isColumnNameDelimited;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String desc() {
return this.getEscapedColumnName() + " DESC";
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String asc() {
return this.getEscapedColumnName() + " ASC";
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public static Column[] excludes(Column ... excludes) {
ArrayList<Column> columns = new ArrayList<>(Arrays.asList(Column.values()));
if (excludes != null && excludes.length > 0) {
columns.removeAll(new ArrayList<>(Arrays.asList(excludes)));
}
return columns.toArray(new Column[]{});
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String getEscapedColumnName() {
if (this.isColumnNameDelimited) {
return new StringBuilder().append(BEGINNING_DELIMITER).append(this.column).append(ENDING_DELIMITER).toString();
} else {
return this.column;
}
}
}
}
\ No newline at end of file
package com.wwdz.ch.db.impl.distribution;
import com.github.pagehelper.PageHelper;
import com.wwdz.ch.db.dao.distribution.ImageCatelogDao;
import com.wwdz.ch.db.domain.distribution.ImageCatelog;
import com.wwdz.ch.db.domain.distribution.ImageCatelogExample;
import com.wwdz.ch.db.dto.request.distribution.ImageCatelogRequestDto;
import com.wwdz.ch.db.mapper.distribution.ImageCatelogMapper;
import com.xxdxxs.db.component.JdbcHelper;
import com.xxdxxs.utils.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import java.util.List;
@Repository
public class ImageCatelogDaoImpl implements ImageCatelogDao {
@Autowired
ImageCatelogMapper imageCatelogMapper;
@Override
public ImageCatelog findById(int id) {
ImageCatelogExample example = new ImageCatelogExample();
ImageCatelogExample.Criteria criteria = example.createCriteria();
criteria.andIdEqualTo(id);
criteria.andIsValidEqualTo(true);
return imageCatelogMapper.selectByPrimaryKey(id);
}
@Override
public List<ImageCatelog> findList(ImageCatelogRequestDto dto) {
ImageCatelogExample example = new ImageCatelogExample();
ImageCatelogExample.Criteria criteria = example.createCriteria();
if (StringUtils.hasLength(dto.getName())) {
criteria.andNameLike("%" + dto.getName() + "%");
}
if (StringUtils.hasLength(dto.getTitle())) {
criteria.andTitleLike("%" + dto.getTitle() + "%");
}
JdbcHelper.ifPresent(dto.getId(), criteria::andIdEqualTo);
criteria.andIsValidEqualTo(true);
example.setOrderByClause("create_time desc");
PageHelper.startPage(dto.getPage(), dto.getLimit());
return imageCatelogMapper.selectByExample(example);
}
}
package com.wwdz.ch.db.impl.distribution;
import com.wwdz.ch.db.dao.distribution.ImageCatelogDetailDao;
import com.wwdz.ch.db.domain.distribution.ImageCatelogDetail;
import com.wwdz.ch.db.mapper.distribution.ImageCatelogDetailMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
@Repository
public class ImageCatelogDetailDaoImpl implements ImageCatelogDetailDao {
@Autowired
ImageCatelogDetailMapper imageCatelogDetailMapper;
@Override
public void insert(ImageCatelogDetail imageCatelogDetail) {
imageCatelogDetailMapper.insert(imageCatelogDetail);
}
}
package com.wwdz.ch.db.mapper.distribution;
import com.wwdz.ch.db.domain.distribution.ImageCatelogDetail;
import com.wwdz.ch.db.domain.distribution.ImageCatelogDetailExample;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface ImageCatelogDetailMapper {
long countByExample(ImageCatelogDetailExample example);
int deleteByExample(ImageCatelogDetailExample example);
int deleteByPrimaryKey(Integer id);
int insert(ImageCatelogDetail record);
int insertSelective(ImageCatelogDetail record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog_detail
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
ImageCatelogDetail selectOneByExample(ImageCatelogDetailExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog_detail
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
ImageCatelogDetail selectOneByExampleSelective(@Param("example") ImageCatelogDetailExample example, @Param("selective") ImageCatelogDetail.Column ... selective);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog_detail
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
List<ImageCatelogDetail> selectByExampleSelective(@Param("example") ImageCatelogDetailExample example, @Param("selective") ImageCatelogDetail.Column ... selective);
List<ImageCatelogDetail> selectByExample(ImageCatelogDetailExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog_detail
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
ImageCatelogDetail selectByPrimaryKeySelective(@Param("id") Integer id, @Param("selective") ImageCatelogDetail.Column ... selective);
ImageCatelogDetail selectByPrimaryKey(Integer id);
int updateByExampleSelective(@Param("record") ImageCatelogDetail record, @Param("example") ImageCatelogDetailExample example);
int updateByExample(@Param("record") ImageCatelogDetail record, @Param("example") ImageCatelogDetailExample example);
int updateByPrimaryKeySelective(ImageCatelogDetail record);
int updateByPrimaryKey(ImageCatelogDetail record);
}
\ No newline at end of file
package com.wwdz.ch.db.mapper.distribution;
import com.wwdz.ch.db.domain.distribution.ImageCatelog;
import com.wwdz.ch.db.domain.distribution.ImageCatelogExample;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface ImageCatelogMapper {
long countByExample(ImageCatelogExample example);
int deleteByExample(ImageCatelogExample example);
int deleteByPrimaryKey(Integer id);
int insert(ImageCatelog record);
int insertSelective(ImageCatelog record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
ImageCatelog selectOneByExample(ImageCatelogExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
ImageCatelog selectOneByExampleSelective(@Param("example") ImageCatelogExample example, @Param("selective") ImageCatelog.Column ... selective);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
List<ImageCatelog> selectByExampleSelective(@Param("example") ImageCatelogExample example, @Param("selective") ImageCatelog.Column ... selective);
List<ImageCatelog> selectByExample(ImageCatelogExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table image_catelog
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
ImageCatelog selectByPrimaryKeySelective(@Param("id") Integer id, @Param("selective") ImageCatelog.Column ... selective);
ImageCatelog selectByPrimaryKey(Integer id);
int updateByExampleSelective(@Param("record") ImageCatelog record, @Param("example") ImageCatelogExample example);
int updateByExample(@Param("record") ImageCatelog record, @Param("example") ImageCatelogExample example);
int updateByPrimaryKeySelective(ImageCatelog record);
int updateByPrimaryKey(ImageCatelog record);
}
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.wwdz.ch.db.mapper.distribution.ImageCatelogDetailMapper">
<resultMap id="BaseResultMap" type="com.wwdz.ch.db.domain.distribution.ImageCatelogDetail">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="img_url" jdbcType="VARCHAR" property="imgUrl" />
<result column="sort" jdbcType="INTEGER" property="sort" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="catalog_id" jdbcType="INTEGER" property="catalogId" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, img_url, sort, create_time, catalog_id
</sql>
<select id="selectByExample" parameterType="com.wwdz.ch.db.domain.distribution.ImageCatelogDetailExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
'true' as QUERYID,
<include refid="Base_Column_List" />
from image_catelog_detail
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByExampleSelective" parameterType="map" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
select
'true' as QUERYID,
<if test="example.distinct">
distinct
</if>
<choose>
<when test="selective != null and selective.length > 0">
<foreach collection="selective" item="column" separator=",">
${column.escapedColumnName}
</foreach>
</when>
<otherwise>
id, img_url, sort, create_time, catalog_id
</otherwise>
</choose>
from image_catelog_detail
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
<if test="example.orderByClause != null">
order by ${example.orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from image_catelog_detail
where id = #{id,jdbcType=INTEGER}
</select>
<select id="selectByPrimaryKeySelective" parameterType="map" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
select
<choose>
<when test="selective != null and selective.length > 0">
<foreach collection="selective" item="column" separator=",">
${column.escapedColumnName}
</foreach>
</when>
<otherwise>
id, img_url, sort, create_time, catalog_id
</otherwise>
</choose>
from image_catelog_detail
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from image_catelog_detail
where id = #{id,jdbcType=INTEGER}
</delete>
<delete id="deleteByExample" parameterType="com.wwdz.ch.db.domain.distribution.ImageCatelogDetailExample">
delete from image_catelog_detail
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.wwdz.ch.db.domain.distribution.ImageCatelogDetail">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
SELECT LAST_INSERT_ID()
</selectKey>
insert into image_catelog_detail (img_url, sort, create_time,
catalog_id)
values (#{imgUrl,jdbcType=VARCHAR}, #{sort,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
#{catalogId,jdbcType=INTEGER})
</insert>
<insert id="insertSelective" parameterType="com.wwdz.ch.db.domain.distribution.ImageCatelogDetail">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
SELECT LAST_INSERT_ID()
</selectKey>
insert into image_catelog_detail
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="imgUrl != null">
img_url,
</if>
<if test="sort != null">
sort,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="catalogId != null">
catalog_id,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="imgUrl != null">
#{imgUrl,jdbcType=VARCHAR},
</if>
<if test="sort != null">
#{sort,jdbcType=INTEGER},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="catalogId != null">
#{catalogId,jdbcType=INTEGER},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.wwdz.ch.db.domain.distribution.ImageCatelogDetailExample" resultType="java.lang.Long">
select count(*) from image_catelog_detail
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update image_catelog_detail
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=INTEGER},
</if>
<if test="record.imgUrl != null">
img_url = #{record.imgUrl,jdbcType=VARCHAR},
</if>
<if test="record.sort != null">
sort = #{record.sort,jdbcType=INTEGER},
</if>
<if test="record.createTime != null">
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
<if test="record.catalogId != null">
catalog_id = #{record.catalogId,jdbcType=INTEGER},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update image_catelog_detail
set id = #{record.id,jdbcType=INTEGER},
img_url = #{record.imgUrl,jdbcType=VARCHAR},
sort = #{record.sort,jdbcType=INTEGER},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
catalog_id = #{record.catalogId,jdbcType=INTEGER}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.wwdz.ch.db.domain.distribution.ImageCatelogDetail">
update image_catelog_detail
<set>
<if test="imgUrl != null">
img_url = #{imgUrl,jdbcType=VARCHAR},
</if>
<if test="sort != null">
sort = #{sort,jdbcType=INTEGER},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="catalogId != null">
catalog_id = #{catalogId,jdbcType=INTEGER},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.wwdz.ch.db.domain.distribution.ImageCatelogDetail">
update image_catelog_detail
set img_url = #{imgUrl,jdbcType=VARCHAR},
sort = #{sort,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
catalog_id = #{catalogId,jdbcType=INTEGER}
where id = #{id,jdbcType=INTEGER}
</update>
<select id="selectOneByExample" parameterType="com.wwdz.ch.db.domain.distribution.ImageCatelogDetailExample" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
select
'true' as QUERYID,
<include refid="Base_Column_List" />
from image_catelog_detail
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
limit 1
</select>
<select id="selectOneByExampleSelective" parameterType="map" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
select
'true' as QUERYID,
<choose>
<when test="selective != null and selective.length > 0">
<foreach collection="selective" item="column" separator=",">
${column.escapedColumnName}
</foreach>
</when>
<otherwise>
id, img_url, sort, create_time, catalog_id
</otherwise>
</choose>
from image_catelog_detail
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
<if test="example.orderByClause != null">
order by ${example.orderByClause}
</if>
limit 1
</select>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.wwdz.ch.db.mapper.distribution.ImageCatelogMapper">
<resultMap id="BaseResultMap" type="com.wwdz.ch.db.domain.distribution.ImageCatelog">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="title" jdbcType="VARCHAR" property="title" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="preview" jdbcType="VARCHAR" property="preview" />
<result column="is_valid" jdbcType="BIT" property="isValid" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, title, `name`, create_time, preview, is_valid
</sql>
<select id="selectByExample" parameterType="com.wwdz.ch.db.domain.distribution.ImageCatelogExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
'true' as QUERYID,
<include refid="Base_Column_List" />
from image_catelog
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByExampleSelective" parameterType="map" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
select
'true' as QUERYID,
<if test="example.distinct">
distinct
</if>
<choose>
<when test="selective != null and selective.length &gt; 0">
<foreach collection="selective" item="column" separator=",">
${column.escapedColumnName}
</foreach>
</when>
<otherwise>
id, title, `name`, create_time, preview, is_valid
</otherwise>
</choose>
from image_catelog
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
<if test="example.orderByClause != null">
order by ${example.orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from image_catelog
where id = #{id,jdbcType=INTEGER}
</select>
<select id="selectByPrimaryKeySelective" parameterType="map" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
select
<choose>
<when test="selective != null and selective.length &gt; 0">
<foreach collection="selective" item="column" separator=",">
${column.escapedColumnName}
</foreach>
</when>
<otherwise>
id, title, `name`, create_time, preview, is_valid
</otherwise>
</choose>
from image_catelog
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from image_catelog
where id = #{id,jdbcType=INTEGER}
</delete>
<delete id="deleteByExample" parameterType="com.wwdz.ch.db.domain.distribution.ImageCatelogExample">
delete from image_catelog
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.wwdz.ch.db.domain.distribution.ImageCatelog">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
SELECT LAST_INSERT_ID()
</selectKey>
insert into image_catelog (title, `name`, create_time,
preview, is_valid)
values (#{title,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{preview,jdbcType=VARCHAR}, #{isValid,jdbcType=BIT})
</insert>
<insert id="insertSelective" parameterType="com.wwdz.ch.db.domain.distribution.ImageCatelog">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
SELECT LAST_INSERT_ID()
</selectKey>
insert into image_catelog
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="title != null">
title,
</if>
<if test="name != null">
`name`,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="preview != null">
preview,
</if>
<if test="isValid != null">
is_valid,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="title != null">
#{title,jdbcType=VARCHAR},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="preview != null">
#{preview,jdbcType=VARCHAR},
</if>
<if test="isValid != null">
#{isValid,jdbcType=BIT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.wwdz.ch.db.domain.distribution.ImageCatelogExample" resultType="java.lang.Long">
select count(*) from image_catelog
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update image_catelog
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=INTEGER},
</if>
<if test="record.title != null">
title = #{record.title,jdbcType=VARCHAR},
</if>
<if test="record.name != null">
`name` = #{record.name,jdbcType=VARCHAR},
</if>
<if test="record.createTime != null">
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
<if test="record.preview != null">
preview = #{record.preview,jdbcType=VARCHAR},
</if>
<if test="record.isValid != null">
is_valid = #{record.isValid,jdbcType=BIT},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update image_catelog
set id = #{record.id,jdbcType=INTEGER},
title = #{record.title,jdbcType=VARCHAR},
`name` = #{record.name,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
preview = #{record.preview,jdbcType=VARCHAR},
is_valid = #{record.isValid,jdbcType=BIT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.wwdz.ch.db.domain.distribution.ImageCatelog">
update image_catelog
<set>
<if test="title != null">
title = #{title,jdbcType=VARCHAR},
</if>
<if test="name != null">
`name` = #{name,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="preview != null">
preview = #{preview,jdbcType=VARCHAR},
</if>
<if test="isValid != null">
is_valid = #{isValid,jdbcType=BIT},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.wwdz.ch.db.domain.distribution.ImageCatelog">
update image_catelog
set title = #{title,jdbcType=VARCHAR},
`name` = #{name,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
preview = #{preview,jdbcType=VARCHAR},
is_valid = #{isValid,jdbcType=BIT}
where id = #{id,jdbcType=INTEGER}
</update>
<select id="selectOneByExample" parameterType="com.wwdz.ch.db.domain.distribution.ImageCatelogExample" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
select
'true' as QUERYID,
<include refid="Base_Column_List" />
from image_catelog
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
limit 1
</select>
<select id="selectOneByExampleSelective" parameterType="map" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
select
'true' as QUERYID,
<choose>
<when test="selective != null and selective.length &gt; 0">
<foreach collection="selective" item="column" separator=",">
${column.escapedColumnName}
</foreach>
</when>
<otherwise>
id, title, `name`, create_time, preview, is_valid
</otherwise>
</choose>
from image_catelog
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
<if test="example.orderByClause != null">
order by ${example.orderByClause}
</if>
limit 1
</select>
</mapper>
\ No newline at end of file
......@@ -72,7 +72,7 @@
<javaClientGenerator type="XMLMAPPER" targetPackage="com.wwdz.ch.db.mapper.distribution"
targetProject="ch-dao/src/main/java"/>
<table tableName="supplier_item" enableCountByExample="true" enableUpdateByExample="true" enableDeleteByExample="true" enableSelectByExample="true" selectByExampleQueryId="true">
<table tableName="image_catelog" enableCountByExample="true" enableUpdateByExample="true" enableDeleteByExample="true" enableSelectByExample="true" selectByExampleQueryId="true">
<generatedKey column="id" sqlStatement="Mysql" identity="true" />
</table>
......
......@@ -4,10 +4,7 @@ import com.github.pagehelper.PageInfo;
import com.wechat.pay.java.service.refund.model.Refund;
import com.wechat.pay.java.service.refund.model.Status;
import com.wwdz.ch.core.api.wxpay.WxPayServiceApi;
import com.wwdz.ch.core.consts.CommConsts;
import com.wwdz.ch.core.consts.DistributionEnum;
import com.wwdz.ch.core.consts.LogisticsEnum;
import com.wwdz.ch.core.consts.ResultCode;
import com.wwdz.ch.core.consts.*;
import com.wwdz.ch.core.entity.wxPay.DistributionOrderRefundRequestDto;
import com.wwdz.ch.core.notify.AliSmsSender;
import com.wwdz.ch.core.type.PageSearchResult;
......@@ -1134,7 +1131,7 @@ public class DistributionOrderServiceImpl implements DistributionOrderService {
refundOrder.setDistributorId(distributionOrder.getSellerId());
refundOrder.setCreateTime(now);
refundOrder.setUpdateTime(now);
refundOrder.setState(DistributionEnum.RefundOrderStateEnum.PROCESSING.getCode());
refundOrder.setState(RefundOrderEnum.StateEnum.PROCESSING.getCode());
refundOrderDao.insert(refundOrder);
//退款受理成功,订单的状态改为退款受理中
distributionOrderDao.updateState(distributionOrderId, DistributionEnum.DistributionOrderStateEnum.REFUNDING.getCode());
......
......@@ -89,7 +89,7 @@ public class WxPayServiceTest {
@Test
public void refund() {
List<String> list = Arrays.asList("DA2404231044297455211");
List<String> list = Arrays.asList("DA2404301433196070258");
list.forEach(orderId ->{
DistributionOrderRequestDto dto = new DistributionOrderRequestDto();
dto.setDistributionOrderId(orderId);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment