Commit a0514228 authored by shiyu's avatar shiyu

钱币设置

parent 289005df
......@@ -64,8 +64,8 @@ public class AdminGoodsController {
@GetMapping("/list")
public Object list(String name, @RequestParam(defaultValue = "1") Integer page,
@RequestParam(defaultValue = "10") Integer limit,
@Sort @RequestParam(defaultValue = "created") String sort,
@Order @RequestParam(defaultValue = "desc") String order) {
@Sort @RequestParam(defaultValue = "update_time") String sort,
@Order @RequestParam(defaultValue = "asc") String order) {
logger.info("【请求开始】操作人:[" + AuthSupport.userName()+ "] 商品管理->商品管理->查询,请求参数:name:{},page:{}", name, page);
return adminGoodsService.list(name, page, limit, sort, order);
......@@ -126,7 +126,6 @@ public class AdminGoodsController {
@GetMapping("/detail")
public Object detail(@NotNull Long id) {
logger.info("【请求开始】操作人:[" + AuthSupport.userName()+ "] 商品管理->商品管理->详情,请求参数,id:{}", id);
return adminGoodsService.detail(id);
}
......
package com.wwdz.ch.admin.controller;
import com.alibaba.fastjson.JSONObject;
import com.wwdz.ch.admin.annotation.RequiresPermissionsDesc;
import com.wwdz.ch.admin.entity.vo.CategoryVo;
import com.wwdz.ch.admin.entity.vo.CoinVo;
import com.wwdz.ch.admin.service.CoinService;
import com.wwdz.ch.admin.service.ItemService;
import com.wwdz.ch.admin.util.AuthSupport;
import com.wwdz.ch.core.type.ListResult;
import com.wwdz.ch.core.type.SimpleResult;
import com.wwdz.ch.db.domain.Category;
import com.wwdz.ch.core.type.Result;
import com.wwdz.ch.db.dto.request.CoinRequestDto;
import com.xxdxxs.utils.JsonUtils;
import org.apache.shiro.authz.annotation.RequiresPermissions;
......@@ -23,31 +18,31 @@ import org.springframework.web.bind.annotation.*;
*/
@RestController
@RequestMapping("/admin/setCoin")
public class SetCoinController {
public class ItemController {
private static final Logger logger = LoggerFactory.getLogger(SetCoinController.class);
private static final Logger logger = LoggerFactory.getLogger(ItemController.class);
@Autowired
private CoinService coinService;
private ItemService itemService;
@RequiresPermissions("admin:setCoin:findDetail")
@RequiresPermissionsDesc(menu = { "钱币列表", "钱币明细" }, button = "查询")
@PostMapping("/findDetail")
public SimpleResult<CoinVo> findDetail(@RequestBody CoinRequestDto coinRequestDto) {
public Result findDetail(@RequestBody CoinRequestDto coinRequestDto) {
logger.info("【请求开始】操作人:[" + AuthSupport.userName()+ "] 钱币列表->钱币明细->查询,请求参数:parma:{}", coinRequestDto);
CoinVo coinVo = coinService.findDetails(coinRequestDto);
logger.info("【请求结束】钱币列表->钱币明细->查询:total:{}", JsonUtils.from(coinVo));
return new SimpleResult<>(coinVo);
Result result = itemService.findDetails(coinRequestDto);
logger.info("【请求结束】钱币列表->钱币明细->查询:total:{}", JsonUtils.from(result));
return result;
}
@RequiresPermissions("admin:setCoin:update")
@RequiresPermissions("admin:setCoin:setCoin")
@RequiresPermissionsDesc(menu = { "钱币列表", "钱币设置" }, button = "更新")
@PostMapping("/update")
public Object update(@RequestBody CoinRequestDto coinRequestDto) {
@PostMapping("/setCoin")
public Result setCoin(@RequestBody CoinRequestDto coinRequestDto) {
logger.info("【请求开始】操作人:[" + AuthSupport.userName()+ "] 钱币列表->钱币设置->更新,请求参数:parma:{}", coinRequestDto);
coinService.setCoin(coinRequestDto);
Result result = itemService.setCoin(coinRequestDto);
logger.info("【请求结束】钱币列表->钱币明细->更新");
return new SimpleResult<>(true);
return result;
}
}
......@@ -89,4 +89,19 @@ public class CoinVo implements Entity {
* 商品详细介绍,是富文本格式
*/
private String detail;
/**
* 直径
*/
private String diameter;
/**
* 厚度
*/
private String thickness;
/**
* 质量(重量)
*/
private String weight;
}
package com.wwdz.ch.admin.impl;
import com.wwdz.ch.admin.entity.vo.CoinVo;
import com.wwdz.ch.admin.service.CoinService;
import com.wwdz.ch.core.type.Result;
import com.wwdz.ch.db.dto.request.CoinRequestDto;
import com.wwdz.ch.db.service.ItemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
public class CoinServiceImpl implements CoinService {
@Autowired
ItemService itemService;
@Override
public List<CoinVo> findList(CoinRequestDto coinRequestDto) {
return null;
}
@Override
public CoinVo findDetails(CoinRequestDto coinRequestDto) {
return null;
}
@Override
public Result setCoin(CoinRequestDto coinRequestDto) {
return null;
}
}
package com.wwdz.ch.admin.impl;
import com.wwdz.ch.admin.entity.vo.CoinVo;
import com.wwdz.ch.admin.service.ItemService;
import com.wwdz.ch.admin.service.OperateLogService;
import com.wwdz.ch.admin.util.AuthSupport;
import com.wwdz.ch.core.storage.QiniuStorage;
import com.wwdz.ch.core.type.Result;
import com.wwdz.ch.db.domain.Item;
import com.wwdz.ch.db.domain.OperateLog;
import com.wwdz.ch.db.dto.request.CoinRequestDto;
import com.wwdz.ch.db.manager.ItemManager;
import com.xxdxxs.utils.EntityMapper;
import com.xxdxxs.utils.JsonUtils;
import com.xxdxxs.utils.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.ObjectUtils;
import java.util.*;
@Service
public class ItemServiceImpl implements ItemService {
private static final Logger logger = LoggerFactory.getLogger(ItemServiceImpl.class);
private final static String IMG_TYPE = "image/png";
private final static String IMG_SUFFIX = ".png";
@Autowired
ItemManager itemManager;
@Autowired
QiniuStorage qiniuStorage;
@Autowired
OperateLogService operateLogService;
@Override
public List<CoinVo> findList(CoinRequestDto coinRequestDto) {
return null;
}
@Override
public Result findDetails(CoinRequestDto coinRequestDto) {
Map<String, Object> map = new HashMap<>();
try {
//不需要查询新一页数据,则根据id查询明细
if (ObjectUtils.isEmpty(coinRequestDto.getIsRefresh()) || coinRequestDto.getIsRefresh() != 1) {
CoinVo coinVo = new CoinVo();
Item item = itemManager.findDetails(coinRequestDto.getId());
EntityMapper.copyAttribute(item, coinVo);
map.put("isRefresh", 0);
map.put("data", coinVo);
} else {
List<CoinVo> coinVoList = new ArrayList<>();
List<Item> itemList = itemManager.findList(coinRequestDto);
itemList.forEach(coin -> {
CoinVo coinVo = convertEntity(coin);
if (coinVo != null) {
coinVoList.add(coinVo);
}
});
map.put("isRefresh", 1);
map.put("data", coinVoList);
}
} catch (Exception e) {
logger.error("钱币设置查询明细 error : {}", e);
}
return Result.success(map);
}
@Override
public Result setCoin(CoinRequestDto coinRequestDto) {
try {
Item item = new Item();
EntityMapper.copyAttribute(coinRequestDto, item);
//查询原有的数据
Item oldItem = itemManager.findDetails(coinRequestDto.getId());
String extra = oldItem.getExtra();
if (StringUtils.hasLength(extra)) {
Map<String, Object> map = JsonUtils.toMap(extra);
//直径
map.put("diameter", coinRequestDto.getDiameter());
//厚度
map.put("thickness", coinRequestDto.getThickness());
//重量
map.put("weight", coinRequestDto.getWeight());
String extraInfo = JsonUtils.fromMap(map);
item.setExtra(extraInfo);
}
String imgBaseStr = coinRequestDto.getImgBaseStr();
String keyName = String.valueOf(coinRequestDto.getId()) + System.currentTimeMillis() + IMG_SUFFIX ;
qiniuStorage.storeBase64Str(imgBaseStr, IMG_TYPE, keyName);
String url = qiniuStorage.generateUrl(keyName);
item.setTopImage(url);
itemManager.setCoin(item);
//记录钱币设置的操作日志
Map<String, Object> paramMap = JsonUtils.toMap(item.getExtra());
paramMap.remove("s_url");
paramMap.put("topImage", url);
OperateLog operateLog = OperateLog.of("钱币设置", 1, AuthSupport.adminId(), AuthSupport.userName(), JsonUtils.fromMap(paramMap));
operateLogService.insert(operateLog);
} catch (Exception e) {
logger.error("钱币设置 error :{}", e);
return Result.failed();
}
return Result.success();
}
public CoinVo convertEntity(Item item) {
try {
CoinVo coinVo = new CoinVo();
EntityMapper.copyAttribute(item, coinVo);
String extra = item.getExtra();
if (StringUtils.hasLength(extra)) {
Map<String, Object> map = JsonUtils.toMap(extra);
coinVo.setDiameter(map.get("diameter") == null? "": map.get("diameter").toString());
coinVo.setThickness(map.get("thickness")== null? "": map.get("thickness").toString());
coinVo.setWeight(map.get("weight")== null? "": map.get("weight").toString());
}
return coinVo;
} catch (Exception e) {
logger.error("钱币设置 error :{}", e);
}
return null;
}
}
package com.wwdz.ch.admin.impl;
import com.wwdz.ch.admin.service.OperateLogService;
import com.wwdz.ch.db.domain.OperateLog;
import com.wwdz.ch.db.manager.OperateLogManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
public class OperateLogServiceImpl implements OperateLogService {
@Autowired
OperateLogManager operateLogManager;
@Override
public void insert(OperateLog operateLog) {
operateLogManager.insert(operateLog);
}
}
package com.wwdz.ch.admin.service;
import java.time.LocalDateTime;
import java.util.*;
import java.util.stream.Collectors;
import com.wwdz.ch.admin.entity.vo.ItemVo;
import com.wwdz.ch.db.domain.*;
import com.wwdz.ch.db.service.*;
import com.wwdz.ch.db.service.ItemService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -81,7 +81,7 @@ public class AdminGoodsService {
Long id = item.getId();
// 将生成的分享图片地址写入数据库
String url = qCodeService.createGoodShareImage(null,item.getId().toString(), item.getImages().split(";")[0], item.getName(),item.getPrice());
String url = qCodeService.createGoodShareImage(null, item.getId().toString(), item.getImages().split(";")[0], item.getName(), item.getPrice());
item.setShareImage(url);
// 商品基本信息表Dts_goods
......@@ -119,13 +119,13 @@ public class AdminGoodsService {
}
Date now = new Date();
// 商品基本信息表Dts_goods
item.setCreated(now);
item.setUpdated(now);
item.setCreateTime(now);
item.setUpdateTime(now);
item.setIsDeleted(false);
itemService.add(item);
// 将生成的分享图片地址写入数据库
String url = qCodeService.createGoodShareImage(null,item.getId().toString(), item.getImages().split(";")[0], item.getName(), item.getPrice());
String url = qCodeService.createGoodShareImage(null, item.getId().toString(), item.getImages().split(";")[0], item.getName(), item.getPrice());
if (!StringUtils.isEmpty(url)) {
item.setShareImage(url);
if (itemService.updateById(item) == 0) {
......
......@@ -6,11 +6,11 @@ import com.wwdz.ch.db.dto.request.CoinRequestDto;
import java.util.List;
public interface CoinService {
public interface ItemService {
List<CoinVo> findList(CoinRequestDto coinRequestDto);
CoinVo findDetails(CoinRequestDto coinRequestDto);
Result findDetails(CoinRequestDto coinRequestDto);
Result setCoin(CoinRequestDto coinRequestDto);
}
package com.wwdz.ch.admin.service;
import com.wwdz.ch.db.domain.OperateLog;
public interface OperateLogService {
void insert(OperateLog operateLog);
}
package com.wwdz.ch.core.storage;
import java.io.ByteArrayInputStream;
import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URL;
import java.nio.file.Path;
import java.util.Base64;
import java.util.stream.Stream;
import org.apache.commons.logging.Log;
......@@ -83,6 +85,21 @@ public class QiniuStorage implements Storage {
}
}
public void storeBase64Str(String baseStr, String contentType, String keyName) throws Exception {
if (uploadManager == null) {
if (auth == null) {
auth = Auth.create(accessKey, secretKey);
}
uploadManager = new UploadManager(new Configuration());
}
Base64.Decoder decoder = Base64.getDecoder();
byte[] imageByte = decoder.decode(baseStr.split(",")[1]);
InputStream inputStream = new ByteArrayInputStream(imageByte);
store(inputStream, 1, contentType, keyName);
}
@Override
public Stream<Path> loadAll() {
return null;
......
......@@ -2,13 +2,12 @@ package com.wwdz.ch.core.util;
import co.elastic.clients.elasticsearch.ElasticsearchClient;
import co.elastic.clients.elasticsearch._types.SortOrder;
import co.elastic.clients.elasticsearch.core.GetRequest;
import co.elastic.clients.elasticsearch.core.GetResponse;
import co.elastic.clients.elasticsearch.core.SearchRequest;
import co.elastic.clients.elasticsearch.core.SearchResponse;
import co.elastic.clients.util.ObjectBuilder;
import com.wwdz.ch.core.entity.EsSearchParam;
import com.wwdz.ch.db.bean.CoinOfEs;
import com.wwdz.ch.db.bean.ItemOfEs;
import com.xxdxxs.entity.Entity;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
......@@ -42,14 +41,14 @@ public class ElasticsearchUtil {
.order(SortOrder.Desc)));
SearchRequest searchRequest = SearchRequest.of((Function<SearchRequest.Builder, ObjectBuilder<SearchRequest>>) builder);
SearchResponse<CoinOfEs> searchResponse = elasticsearchClient.search(searchRequest, CoinOfEs.class);
GetResponse<CoinOfEs> response = elasticsearchClient.get(s -> s.index("quanku")
.id("e051445c-ae8c-47ef-ab18-97b34025d49a"), CoinOfEs.class);
SearchResponse<ItemOfEs> searchResponse = elasticsearchClient.search(searchRequest, ItemOfEs.class);
GetResponse<ItemOfEs> response = elasticsearchClient.get(s -> s.index("quanku")
.id("e051445c-ae8c-47ef-ab18-97b34025d49a"), ItemOfEs.class);
logger.info("getResponse:{}", response.source());
if (response.found()) {
CoinOfEs coinOfEs = response.source();
assert coinOfEs != null;
logger.info("coin name= {} ", coinOfEs.getName());
ItemOfEs itemOfEs = response.source();
assert itemOfEs != null;
logger.info("coin name= {} ", itemOfEs.getName());
}
} catch (Exception e) {
e.printStackTrace();
......
package com.wwdz.ch.core.util;
import com.google.common.reflect.TypeToken;
import com.google.gson.Gson;
import com.wwdz.ch.db.domain.Item;
import com.xxdxxs.utils.JsonUtils;
......@@ -10,7 +9,6 @@ import org.slf4j.LoggerFactory;
import org.springframework.util.StringUtils;
import java.io.Serializable;
import java.lang.reflect.Type;
import java.nio.charset.StandardCharsets;
import java.util.*;
......
......@@ -4,15 +4,15 @@ import com.xxdxxs.entity.Entity;
import lombok.Data;
@Data
public class CoinOfEs implements Entity {
public class ItemOfEs implements Entity {
/**
* 钱币id
* 商品id
*/
private String coin_id;
/**
* 钱币名称
* 商品名称
*/
private String name;
......
......@@ -6,7 +6,7 @@ import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface AdminMapper {
/**
* This method was generated by MyBatis Generator.
......
......@@ -3,8 +3,10 @@ package com.wwdz.ch.db.dao;
import com.wwdz.ch.db.domain.Item;
import com.wwdz.ch.db.domain.ItemExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface ItemMapper {
long countByExample(ItemExample example);
......
package com.wwdz.ch.db.dao;
import com.wwdz.ch.db.domain.OperateLog;
import com.wwdz.ch.db.domain.OperateLogExample;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface OperateLogMapper {
long countByExample(OperateLogExample example);
int deleteByExample(OperateLogExample example);
int deleteByPrimaryKey(Integer id);
int insert(OperateLog record);
int insertSelective(OperateLog record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table operate_log
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
OperateLog selectOneByExample(OperateLogExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table operate_log
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
OperateLog selectOneByExampleSelective(@Param("example") OperateLogExample example, @Param("selective") OperateLog.Column ... selective);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table operate_log
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
OperateLog selectOneByExampleWithBLOBs(OperateLogExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table operate_log
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
List<OperateLog> selectByExampleSelective(@Param("example") OperateLogExample example, @Param("selective") OperateLog.Column ... selective);
List<OperateLog> selectByExampleWithBLOBs(OperateLogExample example);
List<OperateLog> selectByExample(OperateLogExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table operate_log
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
OperateLog selectByPrimaryKeySelective(@Param("id") Integer id, @Param("selective") OperateLog.Column ... selective);
OperateLog selectByPrimaryKey(Integer id);
int updateByExampleSelective(@Param("record") OperateLog record, @Param("example") OperateLogExample example);
int updateByExampleWithBLOBs(@Param("record") OperateLog record, @Param("example") OperateLogExample example);
int updateByExample(@Param("record") OperateLog record, @Param("example") OperateLogExample example);
int updateByPrimaryKeySelective(OperateLog record);
int updateByPrimaryKeyWithBLOBs(OperateLog record);
int updateByPrimaryKey(OperateLog record);
}
\ No newline at end of file
......@@ -4,14 +4,16 @@ 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 2023/07/19
* @date 2023/07/20
*/
@Data
public class Item implements Serializable {
public class Item implements Entity {
private Long id;
/**
......@@ -44,6 +46,11 @@ public class Item implements Serializable {
*/
private String shareImage;
/**
* 置顶图片
*/
private String topImage;
/**
* 价格, 要除以100
*/
......@@ -52,17 +59,17 @@ public class Item implements Serializable {
/**
* 创建时间
*/
private Date created;
private Date createTime;
/**
* 来源类型(1系统2用户上传)
*/
private Boolean sourceType;
private Integer sourceType;
/**
* 更新时间
*/
private Date updated;
private Date updateTime;
/**
* 逻辑删除
......@@ -109,10 +116,11 @@ public class Item implements Serializable {
sb.append(", isStd=").append(isStd);
sb.append(", sort=").append(sort);
sb.append(", shareImage=").append(shareImage);
sb.append(", topImage=").append(topImage);
sb.append(", price=").append(price);
sb.append(", created=").append(created);
sb.append(", createTime=").append(createTime);
sb.append(", sourceType=").append(sourceType);
sb.append(", updated=").append(updated);
sb.append(", updateTime=").append(updateTime);
sb.append(", isDeleted=").append(isDeleted);
sb.append(", bidTime=").append(bidTime);
sb.append(", remark=").append(remark);
......@@ -143,10 +151,11 @@ public class Item implements Serializable {
&& (this.getIsStd() == null ? other.getIsStd() == null : this.getIsStd().equals(other.getIsStd()))
&& (this.getSort() == null ? other.getSort() == null : this.getSort().equals(other.getSort()))
&& (this.getShareImage() == null ? other.getShareImage() == null : this.getShareImage().equals(other.getShareImage()))
&& (this.getTopImage() == null ? other.getTopImage() == null : this.getTopImage().equals(other.getTopImage()))
&& (this.getPrice() == null ? other.getPrice() == null : this.getPrice().equals(other.getPrice()))
&& (this.getCreated() == null ? other.getCreated() == null : this.getCreated().equals(other.getCreated()))
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
&& (this.getSourceType() == null ? other.getSourceType() == null : this.getSourceType().equals(other.getSourceType()))
&& (this.getUpdated() == null ? other.getUpdated() == null : this.getUpdated().equals(other.getUpdated()))
&& (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
&& (this.getIsDeleted() == null ? other.getIsDeleted() == null : this.getIsDeleted().equals(other.getIsDeleted()))
&& (this.getBidTime() == null ? other.getBidTime() == null : this.getBidTime().equals(other.getBidTime()))
&& (this.getRemark() == null ? other.getRemark() == null : this.getRemark().equals(other.getRemark()))
......@@ -166,10 +175,11 @@ public class Item implements Serializable {
result = prime * result + ((getIsStd() == null) ? 0 : getIsStd().hashCode());
result = prime * result + ((getSort() == null) ? 0 : getSort().hashCode());
result = prime * result + ((getShareImage() == null) ? 0 : getShareImage().hashCode());
result = prime * result + ((getTopImage() == null) ? 0 : getTopImage().hashCode());
result = prime * result + ((getPrice() == null) ? 0 : getPrice().hashCode());
result = prime * result + ((getCreated() == null) ? 0 : getCreated().hashCode());
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
result = prime * result + ((getSourceType() == null) ? 0 : getSourceType().hashCode());
result = prime * result + ((getUpdated() == null) ? 0 : getUpdated().hashCode());
result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
result = prime * result + ((getIsDeleted() == null) ? 0 : getIsDeleted().hashCode());
result = prime * result + ((getBidTime() == null) ? 0 : getBidTime().hashCode());
result = prime * result + ((getRemark() == null) ? 0 : getRemark().hashCode());
......@@ -194,10 +204,11 @@ public class Item implements Serializable {
isStd("is_std", "isStd", "BIT", false),
sort("sort", "sort", "INTEGER", false),
shareImage("share_image", "shareImage", "VARCHAR", false),
topImage("top_image", "topImage", "VARCHAR", false),
price("price", "price", "BIGINT", false),
created("created", "created", "TIMESTAMP", false),
sourceType("source_type", "sourceType", "BIT", false),
updated("updated", "updated", "TIMESTAMP", false),
createTime("create_time", "createTime", "TIMESTAMP", false),
sourceType("source_type", "sourceType", "INTEGER", false),
updateTime("update_time", "updateTime", "TIMESTAMP", false),
isDeleted("is_deleted", "isDeleted", "BIT", false),
bidTime("bid_time", "bidTime", "VARCHAR", false),
remark("remark", "remark", "VARCHAR", false),
......
......@@ -1092,6 +1092,148 @@ public class ItemExample {
return (Criteria) this;
}
public Criteria andTopImageIsNull() {
addCriterion("top_image is null");
return (Criteria) this;
}
public Criteria andTopImageIsNotNull() {
addCriterion("top_image is not null");
return (Criteria) this;
}
public Criteria andTopImageEqualTo(String value) {
addCriterion("top_image =", value, "topImage");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table item
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andTopImageEqualToColumn(Item.Column column) {
addCriterion(new StringBuilder("top_image = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andTopImageNotEqualTo(String value) {
addCriterion("top_image <>", value, "topImage");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table item
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andTopImageNotEqualToColumn(Item.Column column) {
addCriterion(new StringBuilder("top_image <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andTopImageGreaterThan(String value) {
addCriterion("top_image >", value, "topImage");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table item
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andTopImageGreaterThanColumn(Item.Column column) {
addCriterion(new StringBuilder("top_image > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andTopImageGreaterThanOrEqualTo(String value) {
addCriterion("top_image >=", value, "topImage");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table item
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andTopImageGreaterThanOrEqualToColumn(Item.Column column) {
addCriterion(new StringBuilder("top_image >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andTopImageLessThan(String value) {
addCriterion("top_image <", value, "topImage");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table item
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andTopImageLessThanColumn(Item.Column column) {
addCriterion(new StringBuilder("top_image < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andTopImageLessThanOrEqualTo(String value) {
addCriterion("top_image <=", value, "topImage");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table item
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andTopImageLessThanOrEqualToColumn(Item.Column column) {
addCriterion(new StringBuilder("top_image <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andTopImageLike(String value) {
addCriterion("top_image like", value, "topImage");
return (Criteria) this;
}
public Criteria andTopImageNotLike(String value) {
addCriterion("top_image not like", value, "topImage");
return (Criteria) this;
}
public Criteria andTopImageIn(List<String> values) {
addCriterion("top_image in", values, "topImage");
return (Criteria) this;
}
public Criteria andTopImageNotIn(List<String> values) {
addCriterion("top_image not in", values, "topImage");
return (Criteria) this;
}
public Criteria andTopImageBetween(String value1, String value2) {
addCriterion("top_image between", value1, value2, "topImage");
return (Criteria) this;
}
public Criteria andTopImageNotBetween(String value1, String value2) {
addCriterion("top_image not between", value1, value2, "topImage");
return (Criteria) this;
}
public Criteria andPriceIsNull() {
addCriterion("price is null");
return (Criteria) this;
......@@ -1224,18 +1366,18 @@ public class ItemExample {
return (Criteria) this;
}
public Criteria andCreatedIsNull() {
addCriterion("created is null");
public Criteria andCreateTimeIsNull() {
addCriterion("create_time is null");
return (Criteria) this;
}
public Criteria andCreatedIsNotNull() {
addCriterion("created is not null");
public Criteria andCreateTimeIsNotNull() {
addCriterion("create_time is not null");
return (Criteria) this;
}
public Criteria andCreatedEqualTo(Date value) {
addCriterion("created =", value, "created");
public Criteria andCreateTimeEqualTo(Date value) {
addCriterion("create_time =", value, "createTime");
return (Criteria) this;
}
......@@ -1246,13 +1388,13 @@ public class ItemExample {
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCreatedEqualToColumn(Item.Column column) {
addCriterion(new StringBuilder("created = ").append(column.getEscapedColumnName()).toString());
public Criteria andCreateTimeEqualToColumn(Item.Column column) {
addCriterion(new StringBuilder("create_time = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andCreatedNotEqualTo(Date value) {
addCriterion("created <>", value, "created");
public Criteria andCreateTimeNotEqualTo(Date value) {
addCriterion("create_time <>", value, "createTime");
return (Criteria) this;
}
......@@ -1263,13 +1405,13 @@ public class ItemExample {
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCreatedNotEqualToColumn(Item.Column column) {
addCriterion(new StringBuilder("created <> ").append(column.getEscapedColumnName()).toString());
public Criteria andCreateTimeNotEqualToColumn(Item.Column column) {
addCriterion(new StringBuilder("create_time <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andCreatedGreaterThan(Date value) {
addCriterion("created >", value, "created");
public Criteria andCreateTimeGreaterThan(Date value) {
addCriterion("create_time >", value, "createTime");
return (Criteria) this;
}
......@@ -1280,13 +1422,13 @@ public class ItemExample {
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCreatedGreaterThanColumn(Item.Column column) {
addCriterion(new StringBuilder("created > ").append(column.getEscapedColumnName()).toString());
public Criteria andCreateTimeGreaterThanColumn(Item.Column column) {
addCriterion(new StringBuilder("create_time > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andCreatedGreaterThanOrEqualTo(Date value) {
addCriterion("created >=", value, "created");
public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
addCriterion("create_time >=", value, "createTime");
return (Criteria) this;
}
......@@ -1297,13 +1439,13 @@ public class ItemExample {
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCreatedGreaterThanOrEqualToColumn(Item.Column column) {
addCriterion(new StringBuilder("created >= ").append(column.getEscapedColumnName()).toString());
public Criteria andCreateTimeGreaterThanOrEqualToColumn(Item.Column column) {
addCriterion(new StringBuilder("create_time >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andCreatedLessThan(Date value) {
addCriterion("created <", value, "created");
public Criteria andCreateTimeLessThan(Date value) {
addCriterion("create_time <", value, "createTime");
return (Criteria) this;
}
......@@ -1314,13 +1456,13 @@ public class ItemExample {
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCreatedLessThanColumn(Item.Column column) {
addCriterion(new StringBuilder("created < ").append(column.getEscapedColumnName()).toString());
public Criteria andCreateTimeLessThanColumn(Item.Column column) {
addCriterion(new StringBuilder("create_time < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andCreatedLessThanOrEqualTo(Date value) {
addCriterion("created <=", value, "created");
public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
addCriterion("create_time <=", value, "createTime");
return (Criteria) this;
}
......@@ -1331,28 +1473,28 @@ public class ItemExample {
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCreatedLessThanOrEqualToColumn(Item.Column column) {
addCriterion(new StringBuilder("created <= ").append(column.getEscapedColumnName()).toString());
public Criteria andCreateTimeLessThanOrEqualToColumn(Item.Column column) {
addCriterion(new StringBuilder("create_time <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andCreatedIn(List<Date> values) {
addCriterion("created in", values, "created");
public Criteria andCreateTimeIn(List<Date> values) {
addCriterion("create_time in", values, "createTime");
return (Criteria) this;
}
public Criteria andCreatedNotIn(List<Date> values) {
addCriterion("created not in", values, "created");
public Criteria andCreateTimeNotIn(List<Date> values) {
addCriterion("create_time not in", values, "createTime");
return (Criteria) this;
}
public Criteria andCreatedBetween(Date value1, Date value2) {
addCriterion("created between", value1, value2, "created");
public Criteria andCreateTimeBetween(Date value1, Date value2) {
addCriterion("create_time between", value1, value2, "createTime");
return (Criteria) this;
}
public Criteria andCreatedNotBetween(Date value1, Date value2) {
addCriterion("created not between", value1, value2, "created");
public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
addCriterion("create_time not between", value1, value2, "createTime");
return (Criteria) this;
}
......@@ -1366,7 +1508,7 @@ public class ItemExample {
return (Criteria) this;
}
public Criteria andSourceTypeEqualTo(Boolean value) {
public Criteria andSourceTypeEqualTo(Integer value) {
addCriterion("source_type =", value, "sourceType");
return (Criteria) this;
}
......@@ -1383,7 +1525,7 @@ public class ItemExample {
return (Criteria) this;
}
public Criteria andSourceTypeNotEqualTo(Boolean value) {
public Criteria andSourceTypeNotEqualTo(Integer value) {
addCriterion("source_type <>", value, "sourceType");
return (Criteria) this;
}
......@@ -1400,7 +1542,7 @@ public class ItemExample {
return (Criteria) this;
}
public Criteria andSourceTypeGreaterThan(Boolean value) {
public Criteria andSourceTypeGreaterThan(Integer value) {
addCriterion("source_type >", value, "sourceType");
return (Criteria) this;
}
......@@ -1417,7 +1559,7 @@ public class ItemExample {
return (Criteria) this;
}
public Criteria andSourceTypeGreaterThanOrEqualTo(Boolean value) {
public Criteria andSourceTypeGreaterThanOrEqualTo(Integer value) {
addCriterion("source_type >=", value, "sourceType");
return (Criteria) this;
}
......@@ -1434,7 +1576,7 @@ public class ItemExample {
return (Criteria) this;
}
public Criteria andSourceTypeLessThan(Boolean value) {
public Criteria andSourceTypeLessThan(Integer value) {
addCriterion("source_type <", value, "sourceType");
return (Criteria) this;
}
......@@ -1451,7 +1593,7 @@ public class ItemExample {
return (Criteria) this;
}
public Criteria andSourceTypeLessThanOrEqualTo(Boolean value) {
public Criteria andSourceTypeLessThanOrEqualTo(Integer value) {
addCriterion("source_type <=", value, "sourceType");
return (Criteria) this;
}
......@@ -1468,38 +1610,38 @@ public class ItemExample {
return (Criteria) this;
}
public Criteria andSourceTypeIn(List<Boolean> values) {
public Criteria andSourceTypeIn(List<Integer> values) {
addCriterion("source_type in", values, "sourceType");
return (Criteria) this;
}
public Criteria andSourceTypeNotIn(List<Boolean> values) {
public Criteria andSourceTypeNotIn(List<Integer> values) {
addCriterion("source_type not in", values, "sourceType");
return (Criteria) this;
}
public Criteria andSourceTypeBetween(Boolean value1, Boolean value2) {
public Criteria andSourceTypeBetween(Integer value1, Integer value2) {
addCriterion("source_type between", value1, value2, "sourceType");
return (Criteria) this;
}
public Criteria andSourceTypeNotBetween(Boolean value1, Boolean value2) {
public Criteria andSourceTypeNotBetween(Integer value1, Integer value2) {
addCriterion("source_type not between", value1, value2, "sourceType");
return (Criteria) this;
}
public Criteria andUpdatedIsNull() {
addCriterion("updated is null");
public Criteria andUpdateTimeIsNull() {
addCriterion("update_time is null");
return (Criteria) this;
}
public Criteria andUpdatedIsNotNull() {
addCriterion("updated is not null");
public Criteria andUpdateTimeIsNotNull() {
addCriterion("update_time is not null");
return (Criteria) this;
}
public Criteria andUpdatedEqualTo(Date value) {
addCriterion("updated =", value, "updated");
public Criteria andUpdateTimeEqualTo(Date value) {
addCriterion("update_time =", value, "updateTime");
return (Criteria) this;
}
......@@ -1510,13 +1652,13 @@ public class ItemExample {
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andUpdatedEqualToColumn(Item.Column column) {
addCriterion(new StringBuilder("updated = ").append(column.getEscapedColumnName()).toString());
public Criteria andUpdateTimeEqualToColumn(Item.Column column) {
addCriterion(new StringBuilder("update_time = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andUpdatedNotEqualTo(Date value) {
addCriterion("updated <>", value, "updated");
public Criteria andUpdateTimeNotEqualTo(Date value) {
addCriterion("update_time <>", value, "updateTime");
return (Criteria) this;
}
......@@ -1527,13 +1669,13 @@ public class ItemExample {
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andUpdatedNotEqualToColumn(Item.Column column) {
addCriterion(new StringBuilder("updated <> ").append(column.getEscapedColumnName()).toString());
public Criteria andUpdateTimeNotEqualToColumn(Item.Column column) {
addCriterion(new StringBuilder("update_time <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andUpdatedGreaterThan(Date value) {
addCriterion("updated >", value, "updated");
public Criteria andUpdateTimeGreaterThan(Date value) {
addCriterion("update_time >", value, "updateTime");
return (Criteria) this;
}
......@@ -1544,13 +1686,13 @@ public class ItemExample {
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andUpdatedGreaterThanColumn(Item.Column column) {
addCriterion(new StringBuilder("updated > ").append(column.getEscapedColumnName()).toString());
public Criteria andUpdateTimeGreaterThanColumn(Item.Column column) {
addCriterion(new StringBuilder("update_time > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andUpdatedGreaterThanOrEqualTo(Date value) {
addCriterion("updated >=", value, "updated");
public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) {
addCriterion("update_time >=", value, "updateTime");
return (Criteria) this;
}
......@@ -1561,13 +1703,13 @@ public class ItemExample {
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andUpdatedGreaterThanOrEqualToColumn(Item.Column column) {
addCriterion(new StringBuilder("updated >= ").append(column.getEscapedColumnName()).toString());
public Criteria andUpdateTimeGreaterThanOrEqualToColumn(Item.Column column) {
addCriterion(new StringBuilder("update_time >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andUpdatedLessThan(Date value) {
addCriterion("updated <", value, "updated");
public Criteria andUpdateTimeLessThan(Date value) {
addCriterion("update_time <", value, "updateTime");
return (Criteria) this;
}
......@@ -1578,13 +1720,13 @@ public class ItemExample {
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andUpdatedLessThanColumn(Item.Column column) {
addCriterion(new StringBuilder("updated < ").append(column.getEscapedColumnName()).toString());
public Criteria andUpdateTimeLessThanColumn(Item.Column column) {
addCriterion(new StringBuilder("update_time < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andUpdatedLessThanOrEqualTo(Date value) {
addCriterion("updated <=", value, "updated");
public Criteria andUpdateTimeLessThanOrEqualTo(Date value) {
addCriterion("update_time <=", value, "updateTime");
return (Criteria) this;
}
......@@ -1595,28 +1737,28 @@ public class ItemExample {
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andUpdatedLessThanOrEqualToColumn(Item.Column column) {
addCriterion(new StringBuilder("updated <= ").append(column.getEscapedColumnName()).toString());
public Criteria andUpdateTimeLessThanOrEqualToColumn(Item.Column column) {
addCriterion(new StringBuilder("update_time <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andUpdatedIn(List<Date> values) {
addCriterion("updated in", values, "updated");
public Criteria andUpdateTimeIn(List<Date> values) {
addCriterion("update_time in", values, "updateTime");
return (Criteria) this;
}
public Criteria andUpdatedNotIn(List<Date> values) {
addCriterion("updated not in", values, "updated");
public Criteria andUpdateTimeNotIn(List<Date> values) {
addCriterion("update_time not in", values, "updateTime");
return (Criteria) this;
}
public Criteria andUpdatedBetween(Date value1, Date value2) {
addCriterion("updated between", value1, value2, "updated");
public Criteria andUpdateTimeBetween(Date value1, Date value2) {
addCriterion("update_time between", value1, value2, "updateTime");
return (Criteria) this;
}
public Criteria andUpdatedNotBetween(Date value1, Date value2) {
addCriterion("updated not between", value1, value2, "updated");
public Criteria andUpdateTimeNotBetween(Date value1, Date value2) {
addCriterion("update_time not between", value1, value2, "updateTime");
return (Criteria) this;
}
......
package com.wwdz.ch.db.domain;
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 2023/07/20
*/
@Data
public class OperateLog implements Entity {
private Integer id;
/**
* 操作描述
*/
private String description;
/**
* 业务类型
*/
private Integer type;
/**
* 操作时间
*/
private Date createTime;
/**
* 操作人编码
*/
private Integer operaterCode;
/**
* 操作人名称
*/
private String operaterName;
/**
* 请求参数
*/
private String param;
private static final long serialVersionUID = 1L;
public OperateLog(String description, Integer type, Integer operaterCode, String operaterName, String param) {
this.description = description;
this.type = type;
this.operaterCode = operaterCode;
this.operaterName = operaterName;
this.param = param;
}
public static OperateLog of(String description, Integer type, Integer operaterCode, String operaterName, String param) {
return new OperateLog(description, type, operaterCode, operaterName, param);
}
@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(", description=").append(description);
sb.append(", type=").append(type);
sb.append(", createTime=").append(createTime);
sb.append(", operaterCode=").append(operaterCode);
sb.append(", operaterName=").append(operaterName);
sb.append(", param=").append(param);
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;
}
OperateLog other = (OperateLog) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getDescription() == null ? other.getDescription() == null : this.getDescription().equals(other.getDescription()))
&& (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType()))
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
&& (this.getOperaterCode() == null ? other.getOperaterCode() == null : this.getOperaterCode().equals(other.getOperaterCode()))
&& (this.getOperaterName() == null ? other.getOperaterName() == null : this.getOperaterName().equals(other.getOperaterName()))
&& (this.getParam() == null ? other.getParam() == null : this.getParam().equals(other.getParam()));
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
result = prime * result + ((getDescription() == null) ? 0 : getDescription().hashCode());
result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
result = prime * result + ((getOperaterCode() == null) ? 0 : getOperaterCode().hashCode());
result = prime * result + ((getOperaterName() == null) ? 0 : getOperaterName().hashCode());
result = prime * result + ((getParam() == null) ? 0 : getParam().hashCode());
return result;
}
/**
* This enum was generated by MyBatis Generator.
* This enum corresponds to the database table operate_log
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public enum Column {
id("id", "id", "INTEGER", false),
description("description", "description", "VARCHAR", false),
type("type", "type", "INTEGER", true),
createTime("create_time", "createTime", "TIMESTAMP", false),
operaterCode("operater_code", "operaterCode", "INTEGER", false),
operaterName("operater_name", "operaterName", "VARCHAR", false),
param("param", "param", "LONGVARCHAR", false);
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table operate_log
*
* @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 operate_log
*
* @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 operate_log
*
* @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 operate_log
*
* @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 operate_log
*
* @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 operate_log
*
* @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 operate_log
*
* @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 operate_log
*
* @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 operate_log
*
* @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 operate_log
*
* @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 operate_log
*
* @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 operate_log
*
* @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 operate_log
*
* @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 operate_log
*
* @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 operate_log
*
* @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;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class OperateLogExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public OperateLogExample() {
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 operate_log
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public OperateLogExample orderBy(String orderByClause) {
this.setOrderByClause(orderByClause);
return this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table operate_log
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public OperateLogExample 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 operate_log
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public static Criteria newAndCreateCriteria() {
OperateLogExample example = new OperateLogExample();
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 operate_log
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIdEqualToColumn(OperateLog.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 operate_log
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIdNotEqualToColumn(OperateLog.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 operate_log
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIdGreaterThanColumn(OperateLog.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 operate_log
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIdGreaterThanOrEqualToColumn(OperateLog.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 operate_log
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIdLessThanColumn(OperateLog.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 operate_log
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIdLessThanOrEqualToColumn(OperateLog.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 andDescriptionIsNull() {
addCriterion("description is null");
return (Criteria) this;
}
public Criteria andDescriptionIsNotNull() {
addCriterion("description is not null");
return (Criteria) this;
}
public Criteria andDescriptionEqualTo(String value) {
addCriterion("description =", value, "description");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table operate_log
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andDescriptionEqualToColumn(OperateLog.Column column) {
addCriterion(new StringBuilder("description = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andDescriptionNotEqualTo(String value) {
addCriterion("description <>", value, "description");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table operate_log
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andDescriptionNotEqualToColumn(OperateLog.Column column) {
addCriterion(new StringBuilder("description <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andDescriptionGreaterThan(String value) {
addCriterion("description >", value, "description");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table operate_log
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andDescriptionGreaterThanColumn(OperateLog.Column column) {
addCriterion(new StringBuilder("description > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andDescriptionGreaterThanOrEqualTo(String value) {
addCriterion("description >=", value, "description");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table operate_log
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andDescriptionGreaterThanOrEqualToColumn(OperateLog.Column column) {
addCriterion(new StringBuilder("description >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andDescriptionLessThan(String value) {
addCriterion("description <", value, "description");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table operate_log
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andDescriptionLessThanColumn(OperateLog.Column column) {
addCriterion(new StringBuilder("description < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andDescriptionLessThanOrEqualTo(String value) {
addCriterion("description <=", value, "description");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table operate_log
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andDescriptionLessThanOrEqualToColumn(OperateLog.Column column) {
addCriterion(new StringBuilder("description <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andDescriptionLike(String value) {
addCriterion("description like", value, "description");
return (Criteria) this;
}
public Criteria andDescriptionNotLike(String value) {
addCriterion("description not like", value, "description");
return (Criteria) this;
}
public Criteria andDescriptionIn(List<String> values) {
addCriterion("description in", values, "description");
return (Criteria) this;
}
public Criteria andDescriptionNotIn(List<String> values) {
addCriterion("description not in", values, "description");
return (Criteria) this;
}
public Criteria andDescriptionBetween(String value1, String value2) {
addCriterion("description between", value1, value2, "description");
return (Criteria) this;
}
public Criteria andDescriptionNotBetween(String value1, String value2) {
addCriterion("description not between", value1, value2, "description");
return (Criteria) this;
}
public Criteria andTypeIsNull() {
addCriterion("`type` is null");
return (Criteria) this;
}
public Criteria andTypeIsNotNull() {
addCriterion("`type` is not null");
return (Criteria) this;
}
public Criteria andTypeEqualTo(Integer value) {
addCriterion("`type` =", value, "type");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table operate_log
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andTypeEqualToColumn(OperateLog.Column column) {
addCriterion(new StringBuilder("`type` = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andTypeNotEqualTo(Integer value) {
addCriterion("`type` <>", value, "type");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table operate_log
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andTypeNotEqualToColumn(OperateLog.Column column) {
addCriterion(new StringBuilder("`type` <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andTypeGreaterThan(Integer value) {
addCriterion("`type` >", value, "type");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table operate_log
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andTypeGreaterThanColumn(OperateLog.Column column) {
addCriterion(new StringBuilder("`type` > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andTypeGreaterThanOrEqualTo(Integer value) {
addCriterion("`type` >=", value, "type");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table operate_log
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andTypeGreaterThanOrEqualToColumn(OperateLog.Column column) {
addCriterion(new StringBuilder("`type` >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andTypeLessThan(Integer value) {
addCriterion("`type` <", value, "type");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table operate_log
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andTypeLessThanColumn(OperateLog.Column column) {
addCriterion(new StringBuilder("`type` < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andTypeLessThanOrEqualTo(Integer value) {
addCriterion("`type` <=", value, "type");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table operate_log
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andTypeLessThanOrEqualToColumn(OperateLog.Column column) {
addCriterion(new StringBuilder("`type` <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andTypeIn(List<Integer> values) {
addCriterion("`type` in", values, "type");
return (Criteria) this;
}
public Criteria andTypeNotIn(List<Integer> values) {
addCriterion("`type` not in", values, "type");
return (Criteria) this;
}
public Criteria andTypeBetween(Integer value1, Integer value2) {
addCriterion("`type` between", value1, value2, "type");
return (Criteria) this;
}
public Criteria andTypeNotBetween(Integer value1, Integer value2) {
addCriterion("`type` not between", value1, value2, "type");
return (Criteria) this;
}
public Criteria andCreateTimeIsNull() {
addCriterion("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 operate_log
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCreateTimeEqualToColumn(OperateLog.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 operate_log
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCreateTimeNotEqualToColumn(OperateLog.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 operate_log
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCreateTimeGreaterThanColumn(OperateLog.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 operate_log
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCreateTimeGreaterThanOrEqualToColumn(OperateLog.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 operate_log
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCreateTimeLessThanColumn(OperateLog.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 operate_log
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCreateTimeLessThanOrEqualToColumn(OperateLog.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 andOperaterCodeIsNull() {
addCriterion("operater_code is null");
return (Criteria) this;
}
public Criteria andOperaterCodeIsNotNull() {
addCriterion("operater_code is not null");
return (Criteria) this;
}
public Criteria andOperaterCodeEqualTo(Integer value) {
addCriterion("operater_code =", value, "operaterCode");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table operate_log
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andOperaterCodeEqualToColumn(OperateLog.Column column) {
addCriterion(new StringBuilder("operater_code = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andOperaterCodeNotEqualTo(Integer value) {
addCriterion("operater_code <>", value, "operaterCode");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table operate_log
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andOperaterCodeNotEqualToColumn(OperateLog.Column column) {
addCriterion(new StringBuilder("operater_code <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andOperaterCodeGreaterThan(Integer value) {
addCriterion("operater_code >", value, "operaterCode");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table operate_log
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andOperaterCodeGreaterThanColumn(OperateLog.Column column) {
addCriterion(new StringBuilder("operater_code > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andOperaterCodeGreaterThanOrEqualTo(Integer value) {
addCriterion("operater_code >=", value, "operaterCode");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table operate_log
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andOperaterCodeGreaterThanOrEqualToColumn(OperateLog.Column column) {
addCriterion(new StringBuilder("operater_code >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andOperaterCodeLessThan(Integer value) {
addCriterion("operater_code <", value, "operaterCode");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table operate_log
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andOperaterCodeLessThanColumn(OperateLog.Column column) {
addCriterion(new StringBuilder("operater_code < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andOperaterCodeLessThanOrEqualTo(Integer value) {
addCriterion("operater_code <=", value, "operaterCode");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table operate_log
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andOperaterCodeLessThanOrEqualToColumn(OperateLog.Column column) {
addCriterion(new StringBuilder("operater_code <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andOperaterCodeIn(List<Integer> values) {
addCriterion("operater_code in", values, "operaterCode");
return (Criteria) this;
}
public Criteria andOperaterCodeNotIn(List<Integer> values) {
addCriterion("operater_code not in", values, "operaterCode");
return (Criteria) this;
}
public Criteria andOperaterCodeBetween(Integer value1, Integer value2) {
addCriterion("operater_code between", value1, value2, "operaterCode");
return (Criteria) this;
}
public Criteria andOperaterCodeNotBetween(Integer value1, Integer value2) {
addCriterion("operater_code not between", value1, value2, "operaterCode");
return (Criteria) this;
}
public Criteria andOperaterNameIsNull() {
addCriterion("operater_name is null");
return (Criteria) this;
}
public Criteria andOperaterNameIsNotNull() {
addCriterion("operater_name is not null");
return (Criteria) this;
}
public Criteria andOperaterNameEqualTo(String value) {
addCriterion("operater_name =", value, "operaterName");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table operate_log
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andOperaterNameEqualToColumn(OperateLog.Column column) {
addCriterion(new StringBuilder("operater_name = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andOperaterNameNotEqualTo(String value) {
addCriterion("operater_name <>", value, "operaterName");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table operate_log
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andOperaterNameNotEqualToColumn(OperateLog.Column column) {
addCriterion(new StringBuilder("operater_name <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andOperaterNameGreaterThan(String value) {
addCriterion("operater_name >", value, "operaterName");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table operate_log
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andOperaterNameGreaterThanColumn(OperateLog.Column column) {
addCriterion(new StringBuilder("operater_name > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andOperaterNameGreaterThanOrEqualTo(String value) {
addCriterion("operater_name >=", value, "operaterName");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table operate_log
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andOperaterNameGreaterThanOrEqualToColumn(OperateLog.Column column) {
addCriterion(new StringBuilder("operater_name >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andOperaterNameLessThan(String value) {
addCriterion("operater_name <", value, "operaterName");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table operate_log
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andOperaterNameLessThanColumn(OperateLog.Column column) {
addCriterion(new StringBuilder("operater_name < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andOperaterNameLessThanOrEqualTo(String value) {
addCriterion("operater_name <=", value, "operaterName");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table operate_log
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andOperaterNameLessThanOrEqualToColumn(OperateLog.Column column) {
addCriterion(new StringBuilder("operater_name <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andOperaterNameLike(String value) {
addCriterion("operater_name like", value, "operaterName");
return (Criteria) this;
}
public Criteria andOperaterNameNotLike(String value) {
addCriterion("operater_name not like", value, "operaterName");
return (Criteria) this;
}
public Criteria andOperaterNameIn(List<String> values) {
addCriterion("operater_name in", values, "operaterName");
return (Criteria) this;
}
public Criteria andOperaterNameNotIn(List<String> values) {
addCriterion("operater_name not in", values, "operaterName");
return (Criteria) this;
}
public Criteria andOperaterNameBetween(String value1, String value2) {
addCriterion("operater_name between", value1, value2, "operaterName");
return (Criteria) this;
}
public Criteria andOperaterNameNotBetween(String value1, String value2) {
addCriterion("operater_name not between", value1, value2, "operaterName");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table operate_log
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private OperateLogExample example;
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table operate_log
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
protected Criteria(OperateLogExample example) {
super();
this.example = example;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table operate_log
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public OperateLogExample example() {
return this.example;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table operate_log
*
* @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 operate_log
*
* @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 operate_log
*
* @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
......@@ -6,12 +6,14 @@ import lombok.Data;
@Data
public class CoinRequestDto extends BaseRequestDto implements Entity {
private Long id;
private String name;
/**
* 钱币所属分类
*/
private String cid;
private Integer cid;
/**
* 直径
......@@ -40,4 +42,10 @@ public class CoinRequestDto extends BaseRequestDto implements Entity {
private String imgBaseStr;
private String remark;
/**
* 是否请求新一页的数据
* 0否,1是
*/
private Integer isRefresh;
}
package com.wwdz.ch.db.manager;
import com.wwdz.ch.db.domain.Item;
import com.wwdz.ch.db.dto.request.CoinRequestDto;
import java.util.List;
public interface ItemManager {
List<Item> findList(CoinRequestDto coinRequestDto);
Item findDetails(Long id);
boolean setCoin(Item item);
}
package com.wwdz.ch.db.manager;
import com.wwdz.ch.db.domain.OperateLog;
public interface OperateLogManager {
void insert(OperateLog operateLog);
}
package com.wwdz.ch.db.manager.impl;
import com.wwdz.ch.db.dao.ItemMapper;
import com.wwdz.ch.db.domain.Item;
import com.wwdz.ch.db.domain.ItemExample;
import com.wwdz.ch.db.dto.request.CoinRequestDto;
import com.wwdz.ch.db.manager.ItemManager;
import com.xxdxxs.db.component.JdbcHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import java.util.Date;
import java.util.List;
@Repository
public class ItemManagerImpl implements ItemManager {
@Autowired
ItemMapper itemMapper;
@Override
public List<Item> findList(CoinRequestDto coinRequestDto) {
ItemExample example = new ItemExample();
ItemExample.Criteria criteria = example.createCriteria();
JdbcHelper.ifPresent(coinRequestDto.getId(), criteria :: andIdEqualTo);
JdbcHelper.ifPresent(coinRequestDto.getName(), criteria :: andNameLike);
JdbcHelper.ifPresent(coinRequestDto.getCid(), criteria :: andCidEqualTo);
return itemMapper.selectByExample(example);
}
@Override
public Item findDetails(Long id) {
ItemExample example = new ItemExample();
ItemExample.Criteria criteria = example.createCriteria();
criteria.andIdEqualTo(id);
return itemMapper.selectOneByExample(example);
}
@Override
public boolean setCoin(Item item) {
ItemExample example = new ItemExample();
ItemExample.Criteria criteria = example.createCriteria();
criteria.andIdEqualTo(item.getId());
item.setUpdateTime(new Date());
int num = itemMapper.updateByExampleSelective(item, example);
return num > 0;
}
}
package com.wwdz.ch.db.manager.impl;
import com.wwdz.ch.db.dao.OperateLogMapper;
import com.wwdz.ch.db.domain.OperateLog;
import com.wwdz.ch.db.manager.OperateLogManager;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;
@Repository
public class OperateLogManagerImpl implements OperateLogManager {
@Mapper
OperateLogMapper operateLogMapper;
@Override
public void insert(OperateLog operateLog) {
operateLogMapper.insert(operateLog);
}
}
......@@ -8,7 +8,6 @@ import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;
import javax.annotation.Resource;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;
......@@ -118,7 +117,7 @@ public class ItemService {
}
public int updateById(Item item) {
item.setUpdated(new Date());
item.setUpdateTime(new Date());
return itemMapper.updateByPrimaryKeySelective(item);
}
......@@ -128,8 +127,8 @@ public class ItemService {
public void add(Item item) {
Date now = new Date();
item.setCreated(now);
item.setUpdated(now);
item.setCreateTime(now);
item.setUpdateTime(now);
itemMapper.insertSelective(item);
}
......
......@@ -9,10 +9,11 @@
<result column="is_std" jdbcType="BIT" property="isStd" />
<result column="sort" jdbcType="INTEGER" property="sort" />
<result column="share_image" jdbcType="VARCHAR" property="shareImage" />
<result column="top_image" jdbcType="VARCHAR" property="topImage" />
<result column="price" jdbcType="BIGINT" property="price" />
<result column="created" jdbcType="TIMESTAMP" property="created" />
<result column="source_type" jdbcType="BIT" property="sourceType" />
<result column="updated" jdbcType="TIMESTAMP" property="updated" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="source_type" jdbcType="INTEGER" property="sourceType" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="is_deleted" jdbcType="BIT" property="isDeleted" />
<result column="bid_time" jdbcType="VARCHAR" property="bidTime" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
......@@ -81,8 +82,8 @@
</where>
</sql>
<sql id="Base_Column_List">
id, `name`, cid, is_on_sale, is_std, sort, share_image, price, created, source_type,
updated, is_deleted, bid_time, remark
id, `name`, cid, is_on_sale, is_std, sort, share_image, top_image, price, create_time,
source_type, update_time, is_deleted, bid_time, remark
</sql>
<sql id="Blob_Column_List">
extra, images, detail
......@@ -137,8 +138,8 @@
</foreach>
</when>
<otherwise>
id, `name`, cid, is_on_sale, is_std, sort, share_image, price, created, source_type,
updated, is_deleted, bid_time, remark, extra, images, detail
id, `name`, cid, is_on_sale, is_std, sort, share_image, top_image, price, create_time,
source_type, update_time, is_deleted, bid_time, remark, extra, images, detail
</otherwise>
</choose>
from item
......@@ -171,8 +172,8 @@
</foreach>
</when>
<otherwise>
id, `name`, cid, is_on_sale, is_std, sort, share_image, price, created, source_type,
updated, is_deleted, bid_time, remark, extra, images, detail
id, `name`, cid, is_on_sale, is_std, sort, share_image, top_image, price, create_time,
source_type, update_time, is_deleted, bid_time, remark, extra, images, detail
</otherwise>
</choose>
from item
......@@ -194,16 +195,16 @@
</selectKey>
insert into item (`name`, cid, is_on_sale,
is_std, sort, share_image,
price, created, source_type,
updated, is_deleted, bid_time,
remark, extra, images,
detail)
top_image, price, create_time,
source_type, update_time, is_deleted,
bid_time, remark, extra,
images, detail)
values (#{name,jdbcType=VARCHAR}, #{cid,jdbcType=INTEGER}, #{isOnSale,jdbcType=BIT},
#{isStd,jdbcType=BIT}, #{sort,jdbcType=INTEGER}, #{shareImage,jdbcType=VARCHAR},
#{price,jdbcType=BIGINT}, #{created,jdbcType=TIMESTAMP}, #{sourceType,jdbcType=BIT},
#{updated,jdbcType=TIMESTAMP}, #{isDeleted,jdbcType=BIT}, #{bidTime,jdbcType=VARCHAR},
#{remark,jdbcType=VARCHAR}, #{extra,jdbcType=LONGVARCHAR}, #{images,jdbcType=LONGVARCHAR},
#{detail,jdbcType=LONGVARCHAR})
#{topImage,jdbcType=VARCHAR}, #{price,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP},
#{sourceType,jdbcType=INTEGER}, #{updateTime,jdbcType=TIMESTAMP}, #{isDeleted,jdbcType=BIT},
#{bidTime,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{extra,jdbcType=LONGVARCHAR},
#{images,jdbcType=LONGVARCHAR}, #{detail,jdbcType=LONGVARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.wwdz.ch.db.domain.Item">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
......@@ -229,17 +230,20 @@
<if test="shareImage != null">
share_image,
</if>
<if test="topImage != null">
top_image,
</if>
<if test="price != null">
price,
</if>
<if test="created != null">
created,
<if test="createTime != null">
create_time,
</if>
<if test="sourceType != null">
source_type,
</if>
<if test="updated != null">
updated,
<if test="updateTime != null">
update_time,
</if>
<if test="isDeleted != null">
is_deleted,
......@@ -279,17 +283,20 @@
<if test="shareImage != null">
#{shareImage,jdbcType=VARCHAR},
</if>
<if test="topImage != null">
#{topImage,jdbcType=VARCHAR},
</if>
<if test="price != null">
#{price,jdbcType=BIGINT},
</if>
<if test="created != null">
#{created,jdbcType=TIMESTAMP},
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="sourceType != null">
#{sourceType,jdbcType=BIT},
#{sourceType,jdbcType=INTEGER},
</if>
<if test="updated != null">
#{updated,jdbcType=TIMESTAMP},
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="isDeleted != null">
#{isDeleted,jdbcType=BIT},
......@@ -341,17 +348,20 @@
<if test="record.shareImage != null">
share_image = #{record.shareImage,jdbcType=VARCHAR},
</if>
<if test="record.topImage != null">
top_image = #{record.topImage,jdbcType=VARCHAR},
</if>
<if test="record.price != null">
price = #{record.price,jdbcType=BIGINT},
</if>
<if test="record.created != null">
created = #{record.created,jdbcType=TIMESTAMP},
<if test="record.createTime != null">
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
<if test="record.sourceType != null">
source_type = #{record.sourceType,jdbcType=BIT},
source_type = #{record.sourceType,jdbcType=INTEGER},
</if>
<if test="record.updated != null">
updated = #{record.updated,jdbcType=TIMESTAMP},
<if test="record.updateTime != null">
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
</if>
<if test="record.isDeleted != null">
is_deleted = #{record.isDeleted,jdbcType=BIT},
......@@ -385,10 +395,11 @@
is_std = #{record.isStd,jdbcType=BIT},
sort = #{record.sort,jdbcType=INTEGER},
share_image = #{record.shareImage,jdbcType=VARCHAR},
top_image = #{record.topImage,jdbcType=VARCHAR},
price = #{record.price,jdbcType=BIGINT},
created = #{record.created,jdbcType=TIMESTAMP},
source_type = #{record.sourceType,jdbcType=BIT},
updated = #{record.updated,jdbcType=TIMESTAMP},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
source_type = #{record.sourceType,jdbcType=INTEGER},
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
is_deleted = #{record.isDeleted,jdbcType=BIT},
bid_time = #{record.bidTime,jdbcType=VARCHAR},
remark = #{record.remark,jdbcType=VARCHAR},
......@@ -408,10 +419,11 @@
is_std = #{record.isStd,jdbcType=BIT},
sort = #{record.sort,jdbcType=INTEGER},
share_image = #{record.shareImage,jdbcType=VARCHAR},
top_image = #{record.topImage,jdbcType=VARCHAR},
price = #{record.price,jdbcType=BIGINT},
created = #{record.created,jdbcType=TIMESTAMP},
source_type = #{record.sourceType,jdbcType=BIT},
updated = #{record.updated,jdbcType=TIMESTAMP},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
source_type = #{record.sourceType,jdbcType=INTEGER},
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
is_deleted = #{record.isDeleted,jdbcType=BIT},
bid_time = #{record.bidTime,jdbcType=VARCHAR},
remark = #{record.remark,jdbcType=VARCHAR}
......@@ -440,17 +452,20 @@
<if test="shareImage != null">
share_image = #{shareImage,jdbcType=VARCHAR},
</if>
<if test="topImage != null">
top_image = #{topImage,jdbcType=VARCHAR},
</if>
<if test="price != null">
price = #{price,jdbcType=BIGINT},
</if>
<if test="created != null">
created = #{created,jdbcType=TIMESTAMP},
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="sourceType != null">
source_type = #{sourceType,jdbcType=BIT},
source_type = #{sourceType,jdbcType=INTEGER},
</if>
<if test="updated != null">
updated = #{updated,jdbcType=TIMESTAMP},
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="isDeleted != null">
is_deleted = #{isDeleted,jdbcType=BIT},
......@@ -481,10 +496,11 @@
is_std = #{isStd,jdbcType=BIT},
sort = #{sort,jdbcType=INTEGER},
share_image = #{shareImage,jdbcType=VARCHAR},
top_image = #{topImage,jdbcType=VARCHAR},
price = #{price,jdbcType=BIGINT},
created = #{created,jdbcType=TIMESTAMP},
source_type = #{sourceType,jdbcType=BIT},
updated = #{updated,jdbcType=TIMESTAMP},
create_time = #{createTime,jdbcType=TIMESTAMP},
source_type = #{sourceType,jdbcType=INTEGER},
update_time = #{updateTime,jdbcType=TIMESTAMP},
is_deleted = #{isDeleted,jdbcType=BIT},
bid_time = #{bidTime,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR},
......@@ -501,10 +517,11 @@
is_std = #{isStd,jdbcType=BIT},
sort = #{sort,jdbcType=INTEGER},
share_image = #{shareImage,jdbcType=VARCHAR},
top_image = #{topImage,jdbcType=VARCHAR},
price = #{price,jdbcType=BIGINT},
created = #{created,jdbcType=TIMESTAMP},
source_type = #{sourceType,jdbcType=BIT},
updated = #{updated,jdbcType=TIMESTAMP},
create_time = #{createTime,jdbcType=TIMESTAMP},
source_type = #{sourceType,jdbcType=INTEGER},
update_time = #{updateTime,jdbcType=TIMESTAMP},
is_deleted = #{isDeleted,jdbcType=BIT},
bid_time = #{bidTime,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR}
......@@ -563,8 +580,8 @@
</foreach>
</when>
<otherwise>
id, `name`, cid, is_on_sale, is_std, sort, share_image, price, created, source_type,
updated, is_deleted, bid_time, remark, extra, images, detail
id, `name`, cid, is_on_sale, is_std, sort, share_image, top_image, price, create_time,
source_type, update_time, is_deleted, bid_time, remark, extra, images, detail
</otherwise>
</choose>
from item
......
<?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.dao.OperateLogMapper">
<resultMap id="BaseResultMap" type="com.wwdz.ch.db.domain.OperateLog">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="description" jdbcType="VARCHAR" property="description" />
<result column="type" jdbcType="INTEGER" property="type" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="operater_code" jdbcType="INTEGER" property="operaterCode" />
<result column="operater_name" jdbcType="VARCHAR" property="operaterName" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.wwdz.ch.db.domain.OperateLog">
<result column="param" jdbcType="LONGVARCHAR" property="param" />
</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, description, `type`, create_time, operater_code, operater_name
</sql>
<sql id="Blob_Column_List">
param
</sql>
<select id="selectByExampleWithBLOBs" parameterType="com.wwdz.ch.db.domain.OperateLogExample" resultMap="ResultMapWithBLOBs">
select
<if test="distinct">
distinct
</if>
'true' as QUERYID,
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from operate_log
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByExample" parameterType="com.wwdz.ch.db.domain.OperateLogExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
'true' as QUERYID,
<include refid="Base_Column_List" />
from operate_log
<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="ResultMapWithBLOBs">
<!--
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, description, `type`, create_time, operater_code, operater_name, param
</otherwise>
</choose>
from operate_log
<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="ResultMapWithBLOBs">
select
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from operate_log
where id = #{id,jdbcType=INTEGER}
</select>
<select id="selectByPrimaryKeySelective" parameterType="map" resultMap="ResultMapWithBLOBs">
<!--
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, description, `type`, create_time, operater_code, operater_name, param
</otherwise>
</choose>
from operate_log
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from operate_log
where id = #{id,jdbcType=INTEGER}
</delete>
<delete id="deleteByExample" parameterType="com.wwdz.ch.db.domain.OperateLogExample">
delete from operate_log
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.wwdz.ch.db.domain.OperateLog">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
SELECT LAST_INSERT_ID()
</selectKey>
insert into operate_log (description, `type`, create_time,
operater_code, operater_name, param
)
values (#{description,jdbcType=VARCHAR}, #{type,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
#{operaterCode,jdbcType=INTEGER}, #{operaterName,jdbcType=VARCHAR}, #{param,jdbcType=LONGVARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.wwdz.ch.db.domain.OperateLog">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
SELECT LAST_INSERT_ID()
</selectKey>
insert into operate_log
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="description != null">
description,
</if>
<if test="type != null">
`type`,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="operaterCode != null">
operater_code,
</if>
<if test="operaterName != null">
operater_name,
</if>
<if test="param != null">
param,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="description != null">
#{description,jdbcType=VARCHAR},
</if>
<if test="type != null">
#{type,jdbcType=INTEGER},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="operaterCode != null">
#{operaterCode,jdbcType=INTEGER},
</if>
<if test="operaterName != null">
#{operaterName,jdbcType=VARCHAR},
</if>
<if test="param != null">
#{param,jdbcType=LONGVARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.wwdz.ch.db.domain.OperateLogExample" resultType="java.lang.Long">
select count(*) from operate_log
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update operate_log
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=INTEGER},
</if>
<if test="record.description != null">
description = #{record.description,jdbcType=VARCHAR},
</if>
<if test="record.type != null">
`type` = #{record.type,jdbcType=INTEGER},
</if>
<if test="record.createTime != null">
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
<if test="record.operaterCode != null">
operater_code = #{record.operaterCode,jdbcType=INTEGER},
</if>
<if test="record.operaterName != null">
operater_name = #{record.operaterName,jdbcType=VARCHAR},
</if>
<if test="record.param != null">
param = #{record.param,jdbcType=LONGVARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExampleWithBLOBs" parameterType="map">
update operate_log
set id = #{record.id,jdbcType=INTEGER},
description = #{record.description,jdbcType=VARCHAR},
`type` = #{record.type,jdbcType=INTEGER},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
operater_code = #{record.operaterCode,jdbcType=INTEGER},
operater_name = #{record.operaterName,jdbcType=VARCHAR},
param = #{record.param,jdbcType=LONGVARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update operate_log
set id = #{record.id,jdbcType=INTEGER},
description = #{record.description,jdbcType=VARCHAR},
`type` = #{record.type,jdbcType=INTEGER},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
operater_code = #{record.operaterCode,jdbcType=INTEGER},
operater_name = #{record.operaterName,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.wwdz.ch.db.domain.OperateLog">
update operate_log
<set>
<if test="description != null">
description = #{description,jdbcType=VARCHAR},
</if>
<if test="type != null">
`type` = #{type,jdbcType=INTEGER},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="operaterCode != null">
operater_code = #{operaterCode,jdbcType=INTEGER},
</if>
<if test="operaterName != null">
operater_name = #{operaterName,jdbcType=VARCHAR},
</if>
<if test="param != null">
param = #{param,jdbcType=LONGVARCHAR},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.wwdz.ch.db.domain.OperateLog">
update operate_log
set description = #{description,jdbcType=VARCHAR},
`type` = #{type,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
operater_code = #{operaterCode,jdbcType=INTEGER},
operater_name = #{operaterName,jdbcType=VARCHAR},
param = #{param,jdbcType=LONGVARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.wwdz.ch.db.domain.OperateLog">
update operate_log
set description = #{description,jdbcType=VARCHAR},
`type` = #{type,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
operater_code = #{operaterCode,jdbcType=INTEGER},
operater_name = #{operaterName,jdbcType=VARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
<select id="selectOneByExample" parameterType="com.wwdz.ch.db.domain.OperateLogExample" 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 operate_log
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
limit 1
</select>
<select id="selectOneByExampleWithBLOBs" parameterType="com.wwdz.ch.db.domain.OperateLogExample" resultMap="ResultMapWithBLOBs">
<!--
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" />
,
<include refid="Blob_Column_List" />
from operate_log
<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="ResultMapWithBLOBs">
<!--
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, description, `type`, create_time, operater_code, operater_name, param
</otherwise>
</choose>
from operate_log
<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
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