Commit 7597afb2 authored by shiyu's avatar shiyu

钱币设置

parent 8d828fab
...@@ -41,6 +41,8 @@ public class ShiroConfig { ...@@ -41,6 +41,8 @@ public class ShiroConfig {
filterChainDefinitionMap.put("/admin/auth/403", "anon"); filterChainDefinitionMap.put("/admin/auth/403", "anon");
filterChainDefinitionMap.put("/actuator/health", "anon"); filterChainDefinitionMap.put("/actuator/health", "anon");
// filterChainDefinitionMap.put("/admin/**", "anon");
filterChainDefinitionMap.put("/admin/**", "authc"); filterChainDefinitionMap.put("/admin/**", "authc");
shiroFilterFactoryBean.setLoginUrl("/admin/auth/401"); shiroFilterFactoryBean.setLoginUrl("/admin/auth/401");
shiroFilterFactoryBean.setSuccessUrl("/admin/auth/index"); shiroFilterFactoryBean.setSuccessUrl("/admin/auth/index");
......
package com.wwdz.ch.admin.controller; package com.wwdz.ch.admin.controller;
import com.wwdz.ch.admin.entity.vo.BidRecordVo; import com.wwdz.ch.admin.entity.vo.BidRecordRequestDto;
import com.wwdz.ch.admin.service.BidRecordService;
import com.wwdz.ch.admin.util.AuthSupport; import com.wwdz.ch.admin.util.AuthSupport;
import com.wwdz.ch.core.type.ListResult; import com.wwdz.ch.core.type.ListResult;
import com.wwdz.ch.core.type.Result;
import com.wwdz.ch.core.type.SimpleResult; import com.wwdz.ch.core.type.SimpleResult;
import com.wwdz.ch.db.domain.BidRecord; import com.wwdz.ch.db.domain.BidRecord;
import com.wwdz.ch.db.service.BidRecordService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiParam;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.validation.constraints.NotNull; import javax.validation.constraints.NotNull;
import java.util.List; import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@RestController @RestController
@RequestMapping("/admin/bidrecord") @RequestMapping("/admin/bidrecord")
@Validated
@Api
public class BidRecordController { public class BidRecordController {
private static final Logger logger = LoggerFactory.getLogger(BidRecordController.class); private static final Logger logger = LoggerFactory.getLogger(BidRecordController.class);
...@@ -31,24 +27,36 @@ public class BidRecordController { ...@@ -31,24 +27,36 @@ public class BidRecordController {
@Autowired @Autowired
private BidRecordService bidRecordService; private BidRecordService bidRecordService;
// @RequiresPermissions("admin:category:list")
// @RequiresPermissionsDesc(menu = { "商场管理", "成交记录管理" }, button = "查询")
@GetMapping("/list") @GetMapping("/list")
@ApiOperation(value = "成交记录列表") @ApiOperation(value = "成交记录列表")
public ListResult<BidRecordVo> list(@ApiParam("分类id") Integer cid) { public ListResult<BidRecordRequestDto> list(@ApiParam("分类id") Integer cid) {
logger.info("【请求开始】操作人:[" + AuthSupport.userName()+ "] 商场管理->成交记录->查询,请求参数:cid:{}", cid); logger.info("【请求开始】操作人:[" + AuthSupport.userName()+ "] 商场管理->成交记录->查询,请求参数:cid:{}", cid);
List<BidRecord> collectList = bidRecordService.queryByCid(cid); List<BidRecord> collectList = bidRecordService.queryByCid(cid);
List<BidRecordVo> data = collectList.parallelStream().map(a -> new BidRecordVo(a)).collect(Collectors.toList()); List<BidRecordRequestDto> data = collectList.parallelStream().map(a -> new BidRecordRequestDto(a)).collect(Collectors.toList());
return new ListResult<BidRecordVo>(data, data.size()); return new ListResult<BidRecordRequestDto>(data, data.size());
} }
@PostMapping("/add") @PostMapping("/add")
@ApiOperation(value = "添加成交记录") @ApiOperation(value = "添加成交记录")
public SimpleResult<Boolean> add(@ApiParam("成交记录数据") @RequestBody BidRecordVo record) { public SimpleResult<Boolean> add(@ApiParam("成交记录数据") @RequestBody BidRecordRequestDto record) {
bidRecordService.add(record.toDo()); bidRecordService.add(record.toDo());
return new SimpleResult<>(true); return new SimpleResult<>(true);
} }
@PostMapping("/findDetail")
public Result findDetail(@RequestBody BidRecordRequestDto record) {
BidRecord bidRecord = bidRecordService.queryById(record.getId());
return Result.success(bidRecord);
}
@PostMapping("/update")
@ApiOperation(value = "修改成交记录")
public Result update(@ApiParam("修改成交记录") @RequestBody BidRecordRequestDto record) {
bidRecordService.updateById(record.toDo());
return Result.success();
}
@GetMapping("/delete") @GetMapping("/delete")
@ApiOperation(value = "删除成交记录") @ApiOperation(value = "删除成交记录")
public SimpleResult<Boolean> delete(@ApiParam("成交记录ID") @NotNull Long id) { public SimpleResult<Boolean> delete(@ApiParam("成交记录ID") @NotNull Long id) {
......
...@@ -17,7 +17,7 @@ import org.springframework.web.bind.annotation.*; ...@@ -17,7 +17,7 @@ import org.springframework.web.bind.annotation.*;
* 钱币设置 * 钱币设置
*/ */
@RestController @RestController
@RequestMapping("/admin/setCoin") @RequestMapping("/admin/item")
public class ItemController { public class ItemController {
private static final Logger logger = LoggerFactory.getLogger(ItemController.class); private static final Logger logger = LoggerFactory.getLogger(ItemController.class);
...@@ -25,7 +25,7 @@ public class ItemController { ...@@ -25,7 +25,7 @@ public class ItemController {
@Autowired @Autowired
private ItemService itemService; private ItemService itemService;
@RequiresPermissions("admin:setCoin:findDetail") @RequiresPermissions("admin:item:findDetail")
@RequiresPermissionsDesc(menu = { "钱币列表", "钱币明细" }, button = "查询") @RequiresPermissionsDesc(menu = { "钱币列表", "钱币明细" }, button = "查询")
@PostMapping("/findDetail") @PostMapping("/findDetail")
public Result findDetail(@RequestBody CoinRequestDto coinRequestDto) { public Result findDetail(@RequestBody CoinRequestDto coinRequestDto) {
...@@ -36,7 +36,7 @@ public class ItemController { ...@@ -36,7 +36,7 @@ public class ItemController {
} }
@RequiresPermissions("admin:setCoin:setCoin") @RequiresPermissions("admin:item:setCoin")
@RequiresPermissionsDesc(menu = { "钱币列表", "钱币设置" }, button = "更新") @RequiresPermissionsDesc(menu = { "钱币列表", "钱币设置" }, button = "更新")
@PostMapping("/setCoin") @PostMapping("/setCoin")
public Result setCoin(@RequestBody CoinRequestDto coinRequestDto) { public Result setCoin(@RequestBody CoinRequestDto coinRequestDto) {
......
...@@ -2,15 +2,17 @@ package com.wwdz.ch.admin.entity.vo; ...@@ -2,15 +2,17 @@ package com.wwdz.ch.admin.entity.vo;
import com.qiniu.util.StringUtils; import com.qiniu.util.StringUtils;
import com.wwdz.ch.db.domain.BidRecord; import com.wwdz.ch.db.domain.BidRecord;
import com.xxdxxs.entity.Entity;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
@ApiModel(value = "BidRecordVo", description = "成交记录前端交互VO") @ApiModel(value = "BidRecordRequestDto", description = "成交记录前端交互VO")
public class BidRecordVo implements Serializable { @Data
public class BidRecordRequestDto implements Entity {
private static final long serialVersionUID = 4014894220574552837L; private static final long serialVersionUID = 4014894220574552837L;
...@@ -35,27 +37,37 @@ public class BidRecordVo implements Serializable { ...@@ -35,27 +37,37 @@ public class BidRecordVo implements Serializable {
@ApiModelProperty(value = "成交价格", name = "price") @ApiModelProperty(value = "成交价格", name = "price")
private Long price; private Long price;
/**
* 额外的成交信息
*/
private String extra;
/**
* 成交链接
*/
private String link;
public BidRecord toDo() { public BidRecord toDo() {
BidRecord record = new BidRecord(); BidRecord record = new BidRecord();
record.setBidtime(bidtime); record.setBidTime(bidtime);
record.setBuyer(buyer); record.setBuyer(buyer);
record.setIsDeleted(false); record.setIsDeleted(0);
record.setCid(cid); record.setCid(cid);
record.setImages(StringUtils.join(images, ";")); record.setImages(StringUtils.join(images, ";"));
record.setPlatform(platform); record.setPlatform(platform);
record.setPrice(price); record.setPrice(price);
record.setExtra(""); record.setExtra(extra);
record.setLink(""); record.setLink(link);
return record; return record;
} }
public BidRecordVo() {} public BidRecordRequestDto() {}
public BidRecordVo(BidRecord record) { public BidRecordRequestDto(BidRecord record) {
this.id = record.getId(); this.id = record.getId();
this.cid = record.getCid(); this.cid = record.getCid();
this.images = Arrays.asList(record.getImages().split(";")); this.images = Arrays.asList(record.getImages().split(";"));
this.bidtime = record.getBidtime(); this.bidtime = record.getBidTime();
this.price = record.getPrice(); this.price = record.getPrice();
this.buyer = record.getBuyer(); this.buyer = record.getBuyer();
this.platform = record.getPlatform(); this.platform = record.getPlatform();
......
package com.wwdz.ch.admin.impl;
import com.wwdz.ch.admin.service.BidRecordService;
import com.wwdz.ch.db.domain.BidRecord;
import com.wwdz.ch.db.manager.BidRecordManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
public class BidRecordServiceImpl implements BidRecordService {
@Autowired
BidRecordManager bidRecordManager;
@Override
public void add(BidRecord record) {
bidRecordManager.add(record);
}
@Override
public int updateById(BidRecord record) {
return bidRecordManager.updateById(record);
}
@Override
public BidRecord queryById(Long id) {
return bidRecordManager.queryById(id);
}
@Override
public List<BidRecord> queryByCid(Integer cid) {
return bidRecordManager.queryByCid(cid);
}
@Override
public void deleteById(Long id) {
bidRecordManager.deleteById(id);
}
}
...@@ -50,6 +50,7 @@ public class ItemServiceImpl implements ItemService { ...@@ -50,6 +50,7 @@ public class ItemServiceImpl implements ItemService {
if (ObjectUtils.isEmpty(coinRequestDto.getIsRefresh()) || coinRequestDto.getIsRefresh() != 1) { if (ObjectUtils.isEmpty(coinRequestDto.getIsRefresh()) || coinRequestDto.getIsRefresh() != 1) {
CoinVo coinVo = new CoinVo(); CoinVo coinVo = new CoinVo();
Item item = itemManager.findDetails(coinRequestDto.getId()); Item item = itemManager.findDetails(coinRequestDto.getId());
coinVo = convertEntity(item);
EntityMapper.copyAttribute(item, coinVo); EntityMapper.copyAttribute(item, coinVo);
map.put("isRefresh", 0); map.put("isRefresh", 0);
map.put("data", coinVo); map.put("data", coinVo);
......
...@@ -9,7 +9,6 @@ import org.springframework.stereotype.Service; ...@@ -9,7 +9,6 @@ import org.springframework.stereotype.Service;
@Service @Service
public class OperateLogServiceImpl implements OperateLogService { public class OperateLogServiceImpl implements OperateLogService {
@Autowired @Autowired
OperateLogManager operateLogManager; OperateLogManager operateLogManager;
......
package com.wwdz.ch.admin.service;
import com.wwdz.ch.db.domain.BidRecord;
import java.util.List;
public interface BidRecordService {
void add(BidRecord record);
int updateById(BidRecord record);
BidRecord queryById(Long id);
List<BidRecord> queryByCid (Integer cid);
void deleteById (Long id);
}
...@@ -6,46 +6,17 @@ import java.util.List; ...@@ -6,46 +6,17 @@ import java.util.List;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
@Mapper @Mapper
public interface BidRecordMapper { public interface BidRecordMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table bid_record
*
* @mbg.generated
*/
long countByExample(BidRecordExample example); long countByExample(BidRecordExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table bid_record
*
* @mbg.generated
*/
int deleteByExample(BidRecordExample example); int deleteByExample(BidRecordExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table bid_record
*
* @mbg.generated
*/
int deleteByPrimaryKey(Long id); int deleteByPrimaryKey(Long id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table bid_record
*
* @mbg.generated
*/
int insert(BidRecord record); int insert(BidRecord record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table bid_record
*
* @mbg.generated
*/
int insertSelective(BidRecord record); int insertSelective(BidRecord record);
/** /**
...@@ -75,12 +46,6 @@ public interface BidRecordMapper { ...@@ -75,12 +46,6 @@ public interface BidRecordMapper {
*/ */
List<BidRecord> selectByExampleSelective(@Param("example") BidRecordExample example, @Param("selective") BidRecord.Column ... selective); List<BidRecord> selectByExampleSelective(@Param("example") BidRecordExample example, @Param("selective") BidRecord.Column ... selective);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table bid_record
*
* @mbg.generated
*/
List<BidRecord> selectByExample(BidRecordExample example); List<BidRecord> selectByExample(BidRecordExample example);
/** /**
...@@ -92,52 +57,13 @@ public interface BidRecordMapper { ...@@ -92,52 +57,13 @@ public interface BidRecordMapper {
*/ */
BidRecord selectByPrimaryKeySelective(@Param("id") Long id, @Param("selective") BidRecord.Column ... selective); BidRecord selectByPrimaryKeySelective(@Param("id") Long id, @Param("selective") BidRecord.Column ... selective);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table bid_record
*
* @mbg.generated
*/
BidRecord selectByPrimaryKey(Long id); BidRecord selectByPrimaryKey(Long id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table bid_record
*
* @mbg.generated
*/
int updateByExampleSelective(@Param("record") BidRecord record, @Param("example") BidRecordExample example); int updateByExampleSelective(@Param("record") BidRecord record, @Param("example") BidRecordExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table bid_record
*
* @mbg.generated
*/
int updateByExample(@Param("record") BidRecord record, @Param("example") BidRecordExample example); int updateByExample(@Param("record") BidRecord record, @Param("example") BidRecordExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table bid_record
*
* @mbg.generated
*/
int updateByPrimaryKeySelective(BidRecord record); int updateByPrimaryKeySelective(BidRecord record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table bid_record
*
* @mbg.generated
*/
int updateByPrimaryKey(BidRecord record); int updateByPrimaryKey(BidRecord record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dts_category
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
int logicalDeleteByPrimaryKey(Long id);
} }
\ No newline at end of file
...@@ -3,9 +3,9 @@ package com.wwdz.ch.db.dao; ...@@ -3,9 +3,9 @@ package com.wwdz.ch.db.dao;
import com.wwdz.ch.db.domain.OperateLog; import com.wwdz.ch.db.domain.OperateLog;
import com.wwdz.ch.db.domain.OperateLogExample; import com.wwdz.ch.db.domain.OperateLogExample;
import java.util.List; import java.util.List;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
@Mapper @Mapper
public interface OperateLogMapper { public interface OperateLogMapper {
long countByExample(OperateLogExample example); long countByExample(OperateLogExample example);
......
package com.wwdz.ch.db.domain; package com.wwdz.ch.db.domain;
import java.time.LocalDateTime; import java.io.Serializable;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.Date;
public class BidRecord { import com.xxdxxs.entity.Entity;
/** import lombok.Data;
*
* This field was generated by MyBatis Generator. /**
* This field corresponds to the database column bid_record.id * @author shiyu
* * @date 2023/07/20
* @mbg.generated */
*/ @Data
public class BidRecord implements Entity {
private Long id; private Long id;
/** /**
* * 类目关键字,以JSON数组格式
* This field was generated by MyBatis Generator.
* This field corresponds to the database column bid_record.extra
*
* @mbg.generated
*/ */
private String extra; private String extra;
/** /**
* * 购买人
* This field was generated by MyBatis Generator.
* This field corresponds to the database column bid_record.buyer
*
* @mbg.generated
*/ */
private String buyer; private String buyer;
/** /**
* * 成交平台
* This field was generated by MyBatis Generator.
* This field corresponds to the database column bid_record.platform
*
* @mbg.generated
*/ */
private String platform; private String platform;
/** /**
* * 源链接
* This field was generated by MyBatis Generator.
* This field corresponds to the database column bid_record.link
*
* @mbg.generated
*/ */
private String link; private String link;
/** /**
* * 分类ID
* This field was generated by MyBatis Generator.
* This field corresponds to the database column bid_record.cid
*
* @mbg.generated
*/ */
private Integer cid; private Integer cid;
/** /**
* * 至少一张图片
* This field was generated by MyBatis Generator.
* This field corresponds to the database column bid_record.images
*
* @mbg.generated
*/ */
private String images; private String images;
/** /**
* * 时间戳
* This field was generated by MyBatis Generator.
* This field corresponds to the database column bid_record.bidTime
*
* @mbg.generated
*/ */
private Integer bidtime; private Integer bidTime;
/** /**
* * 成交价格
* This field was generated by MyBatis Generator.
* This field corresponds to the database column bid_record.price
*
* @mbg.generated
*/ */
private Long price; private Long price;
/** /**
* * 创建时间
* This field was generated by MyBatis Generator.
* This field corresponds to the database column bid_record.created
*
* @mbg.generated
*/
private LocalDateTime created;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column bid_record.updated
*
* @mbg.generated
*/
private LocalDateTime updated;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column bid_record.is_deleted
*
* @mbg.generated
*/
private Boolean isDeleted;
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column bid_record.id
*
* @return the value of bid_record.id
*
* @mbg.generated
*/
public Long getId() {
return id;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column bid_record.id
*
* @param id the value for bid_record.id
*
* @mbg.generated
*/
public void setId(Long id) {
this.id = id;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column bid_record.extra
*
* @return the value of bid_record.extra
*
* @mbg.generated
*/
public String getExtra() {
return extra;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column bid_record.extra
*
* @param extra the value for bid_record.extra
*
* @mbg.generated
*/
public void setExtra(String extra) {
this.extra = extra;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column bid_record.buyer
*
* @return the value of bid_record.buyer
*
* @mbg.generated
*/
public String getBuyer() {
return buyer;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column bid_record.buyer
*
* @param buyer the value for bid_record.buyer
*
* @mbg.generated
*/
public void setBuyer(String buyer) {
this.buyer = buyer;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column bid_record.platform
*
* @return the value of bid_record.platform
*
* @mbg.generated
*/
public String getPlatform() {
return platform;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column bid_record.platform
*
* @param platform the value for bid_record.platform
*
* @mbg.generated
*/
public void setPlatform(String platform) {
this.platform = platform;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column bid_record.link
*
* @return the value of bid_record.link
*
* @mbg.generated
*/
public String getLink() {
return link;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column bid_record.link
*
* @param link the value for bid_record.link
*
* @mbg.generated
*/
public void setLink(String link) {
this.link = link;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column bid_record.cid
*
* @return the value of bid_record.cid
*
* @mbg.generated
*/
public Integer getCid() {
return cid;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column bid_record.cid
*
* @param cid the value for bid_record.cid
*
* @mbg.generated
*/ */
public void setCid(Integer cid) { private Date createTime;
this.cid = cid;
}
/** /**
* This method was generated by MyBatis Generator. * 更新时间
* This method returns the value of the database column bid_record.images
*
* @return the value of bid_record.images
*
* @mbg.generated
*/ */
public String getImages() { private Date updateTime;
return images;
}
/** /**
* This method was generated by MyBatis Generator. * 逻辑删除
* This method sets the value of the database column bid_record.images
*
* @param images the value for bid_record.images
*
* @mbg.generated
*/ */
public void setImages(String images) { private Integer isDeleted;
this.images = images;
}
/** private static final long serialVersionUID = 1L;
* This method was generated by MyBatis Generator.
* This method returns the value of the database column bid_record.bidTime
*
* @return the value of bid_record.bidTime
*
* @mbg.generated
*/
public Integer getBidtime() {
return bidtime;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column bid_record.bidTime
*
* @param bidtime the value for bid_record.bidTime
*
* @mbg.generated
*/
public void setBidtime(Integer bidtime) {
this.bidtime = bidtime;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column bid_record.price
*
* @return the value of bid_record.price
*
* @mbg.generated
*/
public Long getPrice() {
return price;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column bid_record.price
*
* @param price the value for bid_record.price
*
* @mbg.generated
*/
public void setPrice(Long price) {
this.price = price;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column bid_record.created
*
* @return the value of bid_record.created
*
* @mbg.generated
*/
public LocalDateTime getCreated() {
return created;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column bid_record.created
*
* @param created the value for bid_record.created
*
* @mbg.generated
*/
public void setCreated(LocalDateTime created) {
this.created = created;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column bid_record.updated
*
* @return the value of bid_record.updated
*
* @mbg.generated
*/
public LocalDateTime getUpdated() {
return updated;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column bid_record.updated
*
* @param updated the value for bid_record.updated
*
* @mbg.generated
*/
public void setUpdated(LocalDateTime updated) {
this.updated = updated;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column bid_record.is_deleted
*
* @return the value of bid_record.is_deleted
*
* @mbg.generated
*/
public Boolean getIsDeleted() {
return isDeleted;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column bid_record.is_deleted
*
* @param isDeleted the value for bid_record.is_deleted
*
* @mbg.generated
*/
public void setIsDeleted(Boolean isDeleted) {
this.isDeleted = isDeleted;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table bid_record
*
* @mbg.generated
*/
@Override @Override
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
...@@ -420,21 +86,16 @@ public class BidRecord { ...@@ -420,21 +86,16 @@ public class BidRecord {
sb.append(", link=").append(link); sb.append(", link=").append(link);
sb.append(", cid=").append(cid); sb.append(", cid=").append(cid);
sb.append(", images=").append(images); sb.append(", images=").append(images);
sb.append(", bidtime=").append(bidtime); sb.append(", bidTime=").append(bidTime);
sb.append(", price=").append(price); sb.append(", price=").append(price);
sb.append(", created=").append(created); sb.append(", createTime=").append(createTime);
sb.append(", updated=").append(updated); sb.append(", updateTime=").append(updateTime);
sb.append(", isDeleted=").append(isDeleted); sb.append(", isDeleted=").append(isDeleted);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]"); sb.append("]");
return sb.toString(); return sb.toString();
} }
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table bid_record
*
* @mbg.generated
*/
@Override @Override
public boolean equals(Object that) { public boolean equals(Object that) {
if (this == that) { if (this == that) {
...@@ -454,19 +115,13 @@ public class BidRecord { ...@@ -454,19 +115,13 @@ public class BidRecord {
&& (this.getLink() == null ? other.getLink() == null : this.getLink().equals(other.getLink())) && (this.getLink() == null ? other.getLink() == null : this.getLink().equals(other.getLink()))
&& (this.getCid() == null ? other.getCid() == null : this.getCid().equals(other.getCid())) && (this.getCid() == null ? other.getCid() == null : this.getCid().equals(other.getCid()))
&& (this.getImages() == null ? other.getImages() == null : this.getImages().equals(other.getImages())) && (this.getImages() == null ? other.getImages() == null : this.getImages().equals(other.getImages()))
&& (this.getBidtime() == null ? other.getBidtime() == null : this.getBidtime().equals(other.getBidtime())) && (this.getBidTime() == null ? other.getBidTime() == null : this.getBidTime().equals(other.getBidTime()))
&& (this.getPrice() == null ? other.getPrice() == null : this.getPrice().equals(other.getPrice())) && (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.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.getIsDeleted() == null ? other.getIsDeleted() == null : this.getIsDeleted().equals(other.getIsDeleted()));
} }
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table bid_record
*
* @mbg.generated
*/
@Override @Override
public int hashCode() { public int hashCode() {
final int prime = 31; final int prime = 31;
...@@ -478,10 +133,10 @@ public class BidRecord { ...@@ -478,10 +133,10 @@ public class BidRecord {
result = prime * result + ((getLink() == null) ? 0 : getLink().hashCode()); result = prime * result + ((getLink() == null) ? 0 : getLink().hashCode());
result = prime * result + ((getCid() == null) ? 0 : getCid().hashCode()); result = prime * result + ((getCid() == null) ? 0 : getCid().hashCode());
result = prime * result + ((getImages() == null) ? 0 : getImages().hashCode()); result = prime * result + ((getImages() == null) ? 0 : getImages().hashCode());
result = prime * result + ((getBidtime() == null) ? 0 : getBidtime().hashCode()); result = prime * result + ((getBidTime() == null) ? 0 : getBidTime().hashCode());
result = prime * result + ((getPrice() == null) ? 0 : getPrice().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 + ((getUpdated() == null) ? 0 : getUpdated().hashCode()); result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
result = prime * result + ((getIsDeleted() == null) ? 0 : getIsDeleted().hashCode()); result = prime * result + ((getIsDeleted() == null) ? 0 : getIsDeleted().hashCode());
return result; return result;
} }
...@@ -501,11 +156,11 @@ public class BidRecord { ...@@ -501,11 +156,11 @@ public class BidRecord {
link("link", "link", "VARCHAR", false), link("link", "link", "VARCHAR", false),
cid("cid", "cid", "INTEGER", false), cid("cid", "cid", "INTEGER", false),
images("images", "images", "VARCHAR", false), images("images", "images", "VARCHAR", false),
bidtime("bidTime", "bidtime", "INTEGER", false), bidTime("bid_time", "bidTime", "INTEGER", false),
price("price", "price", "BIGINT", false), price("price", "price", "BIGINT", false),
created("created", "created", "TIMESTAMP", false), createTime("create_time", "createTime", "TIMESTAMP", false),
updated("updated", "updated", "TIMESTAMP", false), updateTime("update_time", "updateTime", "TIMESTAMP", false),
isDeleted("is_deleted", "isDeleted", "BIT", false); isDeleted("is_deleted", "isDeleted", "INTEGER", false);
/** /**
* This field was generated by MyBatis Generator. * This field was generated by MyBatis Generator.
......
package com.wwdz.ch.db.domain; package com.wwdz.ch.db.domain;
import java.time.LocalDateTime;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date;
import java.util.List; import java.util.List;
public class BidRecordExample { public class BidRecordExample {
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table bid_record
*
* @mbg.generated
*/
protected String orderByClause; protected String orderByClause;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table bid_record
*
* @mbg.generated
*/
protected boolean distinct; protected boolean distinct;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table bid_record
*
* @mbg.generated
*/
protected List<Criteria> oredCriteria; protected List<Criteria> oredCriteria;
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table bid_record
*
* @mbg.generated
*/
public BidRecordExample() { public BidRecordExample() {
oredCriteria = new ArrayList<Criteria>(); oredCriteria = new ArrayList<Criteria>();
} }
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table bid_record
*
* @mbg.generated
*/
public void setOrderByClause(String orderByClause) { public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause; this.orderByClause = orderByClause;
} }
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table bid_record
*
* @mbg.generated
*/
public String getOrderByClause() { public String getOrderByClause() {
return orderByClause; return orderByClause;
} }
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table bid_record
*
* @mbg.generated
*/
public void setDistinct(boolean distinct) { public void setDistinct(boolean distinct) {
this.distinct = distinct; this.distinct = distinct;
} }
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table bid_record
*
* @mbg.generated
*/
public boolean isDistinct() { public boolean isDistinct() {
return distinct; return distinct;
} }
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table bid_record
*
* @mbg.generated
*/
public List<Criteria> getOredCriteria() { public List<Criteria> getOredCriteria() {
return oredCriteria; return oredCriteria;
} }
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table bid_record
*
* @mbg.generated
*/
public void or(Criteria criteria) { public void or(Criteria criteria) {
oredCriteria.add(criteria); oredCriteria.add(criteria);
} }
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table bid_record
*
* @mbg.generated
*/
public Criteria or() { public Criteria or() {
Criteria criteria = createCriteriaInternal(); Criteria criteria = createCriteriaInternal();
oredCriteria.add(criteria); oredCriteria.add(criteria);
...@@ -142,12 +76,6 @@ public class BidRecordExample { ...@@ -142,12 +76,6 @@ public class BidRecordExample {
return this; return this;
} }
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table bid_record
*
* @mbg.generated
*/
public Criteria createCriteria() { public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal(); Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) { if (oredCriteria.size() == 0) {
...@@ -156,23 +84,11 @@ public class BidRecordExample { ...@@ -156,23 +84,11 @@ public class BidRecordExample {
return criteria; return criteria;
} }
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table bid_record
*
* @mbg.generated
*/
protected Criteria createCriteriaInternal() { protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria(this); Criteria criteria = new Criteria(this);
return criteria; return criteria;
} }
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table bid_record
*
* @mbg.generated
*/
public void clear() { public void clear() {
oredCriteria.clear(); oredCriteria.clear();
orderByClause = null; orderByClause = null;
...@@ -191,12 +107,6 @@ public class BidRecordExample { ...@@ -191,12 +107,6 @@ public class BidRecordExample {
return example.createCriteria(); return example.createCriteria();
} }
/**
* This class was generated by MyBatis Generator.
* This class corresponds to the database table bid_record
*
* @mbg.generated
*/
protected abstract static class GeneratedCriteria { protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria; protected List<Criterion> criteria;
...@@ -1212,18 +1122,18 @@ public class BidRecordExample { ...@@ -1212,18 +1122,18 @@ public class BidRecordExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andBidtimeIsNull() { public Criteria andBidTimeIsNull() {
addCriterion("bidTime is null"); addCriterion("bid_time is null");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andBidtimeIsNotNull() { public Criteria andBidTimeIsNotNull() {
addCriterion("bidTime is not null"); addCriterion("bid_time is not null");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andBidtimeEqualTo(Integer value) { public Criteria andBidTimeEqualTo(Integer value) {
addCriterion("bidTime =", value, "bidtime"); addCriterion("bid_time =", value, "bidTime");
return (Criteria) this; return (Criteria) this;
} }
...@@ -1234,13 +1144,13 @@ public class BidRecordExample { ...@@ -1234,13 +1144,13 @@ public class BidRecordExample {
* @mbg.generated * @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin * @project https://github.com/itfsw/mybatis-generator-plugin
*/ */
public Criteria andBidtimeEqualToColumn(BidRecord.Column column) { public Criteria andBidTimeEqualToColumn(BidRecord.Column column) {
addCriterion(new StringBuilder("bidTime = ").append(column.getEscapedColumnName()).toString()); addCriterion(new StringBuilder("bid_time = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this; return (Criteria) this;
} }
public Criteria andBidtimeNotEqualTo(Integer value) { public Criteria andBidTimeNotEqualTo(Integer value) {
addCriterion("bidTime <>", value, "bidtime"); addCriterion("bid_time <>", value, "bidTime");
return (Criteria) this; return (Criteria) this;
} }
...@@ -1251,13 +1161,13 @@ public class BidRecordExample { ...@@ -1251,13 +1161,13 @@ public class BidRecordExample {
* @mbg.generated * @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin * @project https://github.com/itfsw/mybatis-generator-plugin
*/ */
public Criteria andBidtimeNotEqualToColumn(BidRecord.Column column) { public Criteria andBidTimeNotEqualToColumn(BidRecord.Column column) {
addCriterion(new StringBuilder("bidTime <> ").append(column.getEscapedColumnName()).toString()); addCriterion(new StringBuilder("bid_time <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this; return (Criteria) this;
} }
public Criteria andBidtimeGreaterThan(Integer value) { public Criteria andBidTimeGreaterThan(Integer value) {
addCriterion("bidTime >", value, "bidtime"); addCriterion("bid_time >", value, "bidTime");
return (Criteria) this; return (Criteria) this;
} }
...@@ -1268,13 +1178,13 @@ public class BidRecordExample { ...@@ -1268,13 +1178,13 @@ public class BidRecordExample {
* @mbg.generated * @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin * @project https://github.com/itfsw/mybatis-generator-plugin
*/ */
public Criteria andBidtimeGreaterThanColumn(BidRecord.Column column) { public Criteria andBidTimeGreaterThanColumn(BidRecord.Column column) {
addCriterion(new StringBuilder("bidTime > ").append(column.getEscapedColumnName()).toString()); addCriterion(new StringBuilder("bid_time > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this; return (Criteria) this;
} }
public Criteria andBidtimeGreaterThanOrEqualTo(Integer value) { public Criteria andBidTimeGreaterThanOrEqualTo(Integer value) {
addCriterion("bidTime >=", value, "bidtime"); addCriterion("bid_time >=", value, "bidTime");
return (Criteria) this; return (Criteria) this;
} }
...@@ -1285,13 +1195,13 @@ public class BidRecordExample { ...@@ -1285,13 +1195,13 @@ public class BidRecordExample {
* @mbg.generated * @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin * @project https://github.com/itfsw/mybatis-generator-plugin
*/ */
public Criteria andBidtimeGreaterThanOrEqualToColumn(BidRecord.Column column) { public Criteria andBidTimeGreaterThanOrEqualToColumn(BidRecord.Column column) {
addCriterion(new StringBuilder("bidTime >= ").append(column.getEscapedColumnName()).toString()); addCriterion(new StringBuilder("bid_time >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this; return (Criteria) this;
} }
public Criteria andBidtimeLessThan(Integer value) { public Criteria andBidTimeLessThan(Integer value) {
addCriterion("bidTime <", value, "bidtime"); addCriterion("bid_time <", value, "bidTime");
return (Criteria) this; return (Criteria) this;
} }
...@@ -1302,13 +1212,13 @@ public class BidRecordExample { ...@@ -1302,13 +1212,13 @@ public class BidRecordExample {
* @mbg.generated * @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin * @project https://github.com/itfsw/mybatis-generator-plugin
*/ */
public Criteria andBidtimeLessThanColumn(BidRecord.Column column) { public Criteria andBidTimeLessThanColumn(BidRecord.Column column) {
addCriterion(new StringBuilder("bidTime < ").append(column.getEscapedColumnName()).toString()); addCriterion(new StringBuilder("bid_time < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this; return (Criteria) this;
} }
public Criteria andBidtimeLessThanOrEqualTo(Integer value) { public Criteria andBidTimeLessThanOrEqualTo(Integer value) {
addCriterion("bidTime <=", value, "bidtime"); addCriterion("bid_time <=", value, "bidTime");
return (Criteria) this; return (Criteria) this;
} }
...@@ -1319,28 +1229,28 @@ public class BidRecordExample { ...@@ -1319,28 +1229,28 @@ public class BidRecordExample {
* @mbg.generated * @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin * @project https://github.com/itfsw/mybatis-generator-plugin
*/ */
public Criteria andBidtimeLessThanOrEqualToColumn(BidRecord.Column column) { public Criteria andBidTimeLessThanOrEqualToColumn(BidRecord.Column column) {
addCriterion(new StringBuilder("bidTime <= ").append(column.getEscapedColumnName()).toString()); addCriterion(new StringBuilder("bid_time <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this; return (Criteria) this;
} }
public Criteria andBidtimeIn(List<Integer> values) { public Criteria andBidTimeIn(List<Integer> values) {
addCriterion("bidTime in", values, "bidtime"); addCriterion("bid_time in", values, "bidTime");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andBidtimeNotIn(List<Integer> values) { public Criteria andBidTimeNotIn(List<Integer> values) {
addCriterion("bidTime not in", values, "bidtime"); addCriterion("bid_time not in", values, "bidTime");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andBidtimeBetween(Integer value1, Integer value2) { public Criteria andBidTimeBetween(Integer value1, Integer value2) {
addCriterion("bidTime between", value1, value2, "bidtime"); addCriterion("bid_time between", value1, value2, "bidTime");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andBidtimeNotBetween(Integer value1, Integer value2) { public Criteria andBidTimeNotBetween(Integer value1, Integer value2) {
addCriterion("bidTime not between", value1, value2, "bidtime"); addCriterion("bid_time not between", value1, value2, "bidTime");
return (Criteria) this; return (Criteria) this;
} }
...@@ -1476,18 +1386,18 @@ public class BidRecordExample { ...@@ -1476,18 +1386,18 @@ public class BidRecordExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andCreatedIsNull() { public Criteria andCreateTimeIsNull() {
addCriterion("created is null"); addCriterion("create_time is null");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andCreatedIsNotNull() { public Criteria andCreateTimeIsNotNull() {
addCriterion("created is not null"); addCriterion("create_time is not null");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andCreatedEqualTo(LocalDateTime value) { public Criteria andCreateTimeEqualTo(Date value) {
addCriterion("created =", value, "created"); addCriterion("create_time =", value, "createTime");
return (Criteria) this; return (Criteria) this;
} }
...@@ -1498,13 +1408,13 @@ public class BidRecordExample { ...@@ -1498,13 +1408,13 @@ public class BidRecordExample {
* @mbg.generated * @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin * @project https://github.com/itfsw/mybatis-generator-plugin
*/ */
public Criteria andCreatedEqualToColumn(BidRecord.Column column) { public Criteria andCreateTimeEqualToColumn(BidRecord.Column column) {
addCriterion(new StringBuilder("created = ").append(column.getEscapedColumnName()).toString()); addCriterion(new StringBuilder("create_time = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this; return (Criteria) this;
} }
public Criteria andCreatedNotEqualTo(LocalDateTime value) { public Criteria andCreateTimeNotEqualTo(Date value) {
addCriterion("created <>", value, "created"); addCriterion("create_time <>", value, "createTime");
return (Criteria) this; return (Criteria) this;
} }
...@@ -1515,13 +1425,13 @@ public class BidRecordExample { ...@@ -1515,13 +1425,13 @@ public class BidRecordExample {
* @mbg.generated * @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin * @project https://github.com/itfsw/mybatis-generator-plugin
*/ */
public Criteria andCreatedNotEqualToColumn(BidRecord.Column column) { public Criteria andCreateTimeNotEqualToColumn(BidRecord.Column column) {
addCriterion(new StringBuilder("created <> ").append(column.getEscapedColumnName()).toString()); addCriterion(new StringBuilder("create_time <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this; return (Criteria) this;
} }
public Criteria andCreatedGreaterThan(LocalDateTime value) { public Criteria andCreateTimeGreaterThan(Date value) {
addCriterion("created >", value, "created"); addCriterion("create_time >", value, "createTime");
return (Criteria) this; return (Criteria) this;
} }
...@@ -1532,13 +1442,13 @@ public class BidRecordExample { ...@@ -1532,13 +1442,13 @@ public class BidRecordExample {
* @mbg.generated * @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin * @project https://github.com/itfsw/mybatis-generator-plugin
*/ */
public Criteria andCreatedGreaterThanColumn(BidRecord.Column column) { public Criteria andCreateTimeGreaterThanColumn(BidRecord.Column column) {
addCriterion(new StringBuilder("created > ").append(column.getEscapedColumnName()).toString()); addCriterion(new StringBuilder("create_time > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this; return (Criteria) this;
} }
public Criteria andCreatedGreaterThanOrEqualTo(LocalDateTime value) { public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
addCriterion("created >=", value, "created"); addCriterion("create_time >=", value, "createTime");
return (Criteria) this; return (Criteria) this;
} }
...@@ -1549,13 +1459,13 @@ public class BidRecordExample { ...@@ -1549,13 +1459,13 @@ public class BidRecordExample {
* @mbg.generated * @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin * @project https://github.com/itfsw/mybatis-generator-plugin
*/ */
public Criteria andCreatedGreaterThanOrEqualToColumn(BidRecord.Column column) { public Criteria andCreateTimeGreaterThanOrEqualToColumn(BidRecord.Column column) {
addCriterion(new StringBuilder("created >= ").append(column.getEscapedColumnName()).toString()); addCriterion(new StringBuilder("create_time >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this; return (Criteria) this;
} }
public Criteria andCreatedLessThan(LocalDateTime value) { public Criteria andCreateTimeLessThan(Date value) {
addCriterion("created <", value, "created"); addCriterion("create_time <", value, "createTime");
return (Criteria) this; return (Criteria) this;
} }
...@@ -1566,13 +1476,13 @@ public class BidRecordExample { ...@@ -1566,13 +1476,13 @@ public class BidRecordExample {
* @mbg.generated * @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin * @project https://github.com/itfsw/mybatis-generator-plugin
*/ */
public Criteria andCreatedLessThanColumn(BidRecord.Column column) { public Criteria andCreateTimeLessThanColumn(BidRecord.Column column) {
addCriterion(new StringBuilder("created < ").append(column.getEscapedColumnName()).toString()); addCriterion(new StringBuilder("create_time < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this; return (Criteria) this;
} }
public Criteria andCreatedLessThanOrEqualTo(LocalDateTime value) { public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
addCriterion("created <=", value, "created"); addCriterion("create_time <=", value, "createTime");
return (Criteria) this; return (Criteria) this;
} }
...@@ -1583,43 +1493,43 @@ public class BidRecordExample { ...@@ -1583,43 +1493,43 @@ public class BidRecordExample {
* @mbg.generated * @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin * @project https://github.com/itfsw/mybatis-generator-plugin
*/ */
public Criteria andCreatedLessThanOrEqualToColumn(BidRecord.Column column) { public Criteria andCreateTimeLessThanOrEqualToColumn(BidRecord.Column column) {
addCriterion(new StringBuilder("created <= ").append(column.getEscapedColumnName()).toString()); addCriterion(new StringBuilder("create_time <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this; return (Criteria) this;
} }
public Criteria andCreatedIn(List<LocalDateTime> values) { public Criteria andCreateTimeIn(List<Date> values) {
addCriterion("created in", values, "created"); addCriterion("create_time in", values, "createTime");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andCreatedNotIn(List<LocalDateTime> values) { public Criteria andCreateTimeNotIn(List<Date> values) {
addCriterion("created not in", values, "created"); addCriterion("create_time not in", values, "createTime");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andCreatedBetween(LocalDateTime value1, LocalDateTime value2) { public Criteria andCreateTimeBetween(Date value1, Date value2) {
addCriterion("created between", value1, value2, "created"); addCriterion("create_time between", value1, value2, "createTime");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andCreatedNotBetween(LocalDateTime value1, LocalDateTime value2) { public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
addCriterion("created not between", value1, value2, "created"); addCriterion("create_time not between", value1, value2, "createTime");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andUpdatedIsNull() { public Criteria andUpdateTimeIsNull() {
addCriterion("updated is null"); addCriterion("update_time is null");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andUpdatedIsNotNull() { public Criteria andUpdateTimeIsNotNull() {
addCriterion("updated is not null"); addCriterion("update_time is not null");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andUpdatedEqualTo(LocalDateTime value) { public Criteria andUpdateTimeEqualTo(Date value) {
addCriterion("updated =", value, "updated"); addCriterion("update_time =", value, "updateTime");
return (Criteria) this; return (Criteria) this;
} }
...@@ -1630,13 +1540,13 @@ public class BidRecordExample { ...@@ -1630,13 +1540,13 @@ public class BidRecordExample {
* @mbg.generated * @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin * @project https://github.com/itfsw/mybatis-generator-plugin
*/ */
public Criteria andUpdatedEqualToColumn(BidRecord.Column column) { public Criteria andUpdateTimeEqualToColumn(BidRecord.Column column) {
addCriterion(new StringBuilder("updated = ").append(column.getEscapedColumnName()).toString()); addCriterion(new StringBuilder("update_time = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this; return (Criteria) this;
} }
public Criteria andUpdatedNotEqualTo(LocalDateTime value) { public Criteria andUpdateTimeNotEqualTo(Date value) {
addCriterion("updated <>", value, "updated"); addCriterion("update_time <>", value, "updateTime");
return (Criteria) this; return (Criteria) this;
} }
...@@ -1647,13 +1557,13 @@ public class BidRecordExample { ...@@ -1647,13 +1557,13 @@ public class BidRecordExample {
* @mbg.generated * @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin * @project https://github.com/itfsw/mybatis-generator-plugin
*/ */
public Criteria andUpdatedNotEqualToColumn(BidRecord.Column column) { public Criteria andUpdateTimeNotEqualToColumn(BidRecord.Column column) {
addCriterion(new StringBuilder("updated <> ").append(column.getEscapedColumnName()).toString()); addCriterion(new StringBuilder("update_time <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this; return (Criteria) this;
} }
public Criteria andUpdatedGreaterThan(LocalDateTime value) { public Criteria andUpdateTimeGreaterThan(Date value) {
addCriterion("updated >", value, "updated"); addCriterion("update_time >", value, "updateTime");
return (Criteria) this; return (Criteria) this;
} }
...@@ -1664,13 +1574,13 @@ public class BidRecordExample { ...@@ -1664,13 +1574,13 @@ public class BidRecordExample {
* @mbg.generated * @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin * @project https://github.com/itfsw/mybatis-generator-plugin
*/ */
public Criteria andUpdatedGreaterThanColumn(BidRecord.Column column) { public Criteria andUpdateTimeGreaterThanColumn(BidRecord.Column column) {
addCriterion(new StringBuilder("updated > ").append(column.getEscapedColumnName()).toString()); addCriterion(new StringBuilder("update_time > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this; return (Criteria) this;
} }
public Criteria andUpdatedGreaterThanOrEqualTo(LocalDateTime value) { public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) {
addCriterion("updated >=", value, "updated"); addCriterion("update_time >=", value, "updateTime");
return (Criteria) this; return (Criteria) this;
} }
...@@ -1681,13 +1591,13 @@ public class BidRecordExample { ...@@ -1681,13 +1591,13 @@ public class BidRecordExample {
* @mbg.generated * @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin * @project https://github.com/itfsw/mybatis-generator-plugin
*/ */
public Criteria andUpdatedGreaterThanOrEqualToColumn(BidRecord.Column column) { public Criteria andUpdateTimeGreaterThanOrEqualToColumn(BidRecord.Column column) {
addCriterion(new StringBuilder("updated >= ").append(column.getEscapedColumnName()).toString()); addCriterion(new StringBuilder("update_time >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this; return (Criteria) this;
} }
public Criteria andUpdatedLessThan(LocalDateTime value) { public Criteria andUpdateTimeLessThan(Date value) {
addCriterion("updated <", value, "updated"); addCriterion("update_time <", value, "updateTime");
return (Criteria) this; return (Criteria) this;
} }
...@@ -1698,13 +1608,13 @@ public class BidRecordExample { ...@@ -1698,13 +1608,13 @@ public class BidRecordExample {
* @mbg.generated * @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin * @project https://github.com/itfsw/mybatis-generator-plugin
*/ */
public Criteria andUpdatedLessThanColumn(BidRecord.Column column) { public Criteria andUpdateTimeLessThanColumn(BidRecord.Column column) {
addCriterion(new StringBuilder("updated < ").append(column.getEscapedColumnName()).toString()); addCriterion(new StringBuilder("update_time < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this; return (Criteria) this;
} }
public Criteria andUpdatedLessThanOrEqualTo(LocalDateTime value) { public Criteria andUpdateTimeLessThanOrEqualTo(Date value) {
addCriterion("updated <=", value, "updated"); addCriterion("update_time <=", value, "updateTime");
return (Criteria) this; return (Criteria) this;
} }
...@@ -1715,28 +1625,28 @@ public class BidRecordExample { ...@@ -1715,28 +1625,28 @@ public class BidRecordExample {
* @mbg.generated * @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin * @project https://github.com/itfsw/mybatis-generator-plugin
*/ */
public Criteria andUpdatedLessThanOrEqualToColumn(BidRecord.Column column) { public Criteria andUpdateTimeLessThanOrEqualToColumn(BidRecord.Column column) {
addCriterion(new StringBuilder("updated <= ").append(column.getEscapedColumnName()).toString()); addCriterion(new StringBuilder("update_time <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this; return (Criteria) this;
} }
public Criteria andUpdatedIn(List<LocalDateTime> values) { public Criteria andUpdateTimeIn(List<Date> values) {
addCriterion("updated in", values, "updated"); addCriterion("update_time in", values, "updateTime");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andUpdatedNotIn(List<LocalDateTime> values) { public Criteria andUpdateTimeNotIn(List<Date> values) {
addCriterion("updated not in", values, "updated"); addCriterion("update_time not in", values, "updateTime");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andUpdatedBetween(LocalDateTime value1, LocalDateTime value2) { public Criteria andUpdateTimeBetween(Date value1, Date value2) {
addCriterion("updated between", value1, value2, "updated"); addCriterion("update_time between", value1, value2, "updateTime");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andUpdatedNotBetween(LocalDateTime value1, LocalDateTime value2) { public Criteria andUpdateTimeNotBetween(Date value1, Date value2) {
addCriterion("updated not between", value1, value2, "updated"); addCriterion("update_time not between", value1, value2, "updateTime");
return (Criteria) this; return (Criteria) this;
} }
...@@ -1750,7 +1660,7 @@ public class BidRecordExample { ...@@ -1750,7 +1660,7 @@ public class BidRecordExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andIsDeletedEqualTo(Boolean value) { public Criteria andIsDeletedEqualTo(Integer value) {
addCriterion("is_deleted =", value, "isDeleted"); addCriterion("is_deleted =", value, "isDeleted");
return (Criteria) this; return (Criteria) this;
} }
...@@ -1767,7 +1677,7 @@ public class BidRecordExample { ...@@ -1767,7 +1677,7 @@ public class BidRecordExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andIsDeletedNotEqualTo(Boolean value) { public Criteria andIsDeletedNotEqualTo(Integer value) {
addCriterion("is_deleted <>", value, "isDeleted"); addCriterion("is_deleted <>", value, "isDeleted");
return (Criteria) this; return (Criteria) this;
} }
...@@ -1784,7 +1694,7 @@ public class BidRecordExample { ...@@ -1784,7 +1694,7 @@ public class BidRecordExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andIsDeletedGreaterThan(Boolean value) { public Criteria andIsDeletedGreaterThan(Integer value) {
addCriterion("is_deleted >", value, "isDeleted"); addCriterion("is_deleted >", value, "isDeleted");
return (Criteria) this; return (Criteria) this;
} }
...@@ -1801,7 +1711,7 @@ public class BidRecordExample { ...@@ -1801,7 +1711,7 @@ public class BidRecordExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andIsDeletedGreaterThanOrEqualTo(Boolean value) { public Criteria andIsDeletedGreaterThanOrEqualTo(Integer value) {
addCriterion("is_deleted >=", value, "isDeleted"); addCriterion("is_deleted >=", value, "isDeleted");
return (Criteria) this; return (Criteria) this;
} }
...@@ -1818,7 +1728,7 @@ public class BidRecordExample { ...@@ -1818,7 +1728,7 @@ public class BidRecordExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andIsDeletedLessThan(Boolean value) { public Criteria andIsDeletedLessThan(Integer value) {
addCriterion("is_deleted <", value, "isDeleted"); addCriterion("is_deleted <", value, "isDeleted");
return (Criteria) this; return (Criteria) this;
} }
...@@ -1835,7 +1745,7 @@ public class BidRecordExample { ...@@ -1835,7 +1745,7 @@ public class BidRecordExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andIsDeletedLessThanOrEqualTo(Boolean value) { public Criteria andIsDeletedLessThanOrEqualTo(Integer value) {
addCriterion("is_deleted <=", value, "isDeleted"); addCriterion("is_deleted <=", value, "isDeleted");
return (Criteria) this; return (Criteria) this;
} }
...@@ -1852,33 +1762,27 @@ public class BidRecordExample { ...@@ -1852,33 +1762,27 @@ public class BidRecordExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andIsDeletedIn(List<Boolean> values) { public Criteria andIsDeletedIn(List<Integer> values) {
addCriterion("is_deleted in", values, "isDeleted"); addCriterion("is_deleted in", values, "isDeleted");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andIsDeletedNotIn(List<Boolean> values) { public Criteria andIsDeletedNotIn(List<Integer> values) {
addCriterion("is_deleted not in", values, "isDeleted"); addCriterion("is_deleted not in", values, "isDeleted");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andIsDeletedBetween(Boolean value1, Boolean value2) { public Criteria andIsDeletedBetween(Integer value1, Integer value2) {
addCriterion("is_deleted between", value1, value2, "isDeleted"); addCriterion("is_deleted between", value1, value2, "isDeleted");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andIsDeletedNotBetween(Boolean value1, Boolean value2) { public Criteria andIsDeletedNotBetween(Integer value1, Integer value2) {
addCriterion("is_deleted not between", value1, value2, "isDeleted"); addCriterion("is_deleted not between", value1, value2, "isDeleted");
return (Criteria) this; return (Criteria) this;
} }
} }
/**
* This class was generated by MyBatis Generator.
* This class corresponds to the database table bid_record
*
* @mbg.generated do_not_delete_during_merge
*/
public static class Criteria extends GeneratedCriteria { public static class Criteria extends GeneratedCriteria {
/** /**
* This field was generated by MyBatis Generator. * This field was generated by MyBatis Generator.
...@@ -1945,12 +1849,6 @@ public class BidRecordExample { ...@@ -1945,12 +1849,6 @@ public class BidRecordExample {
} }
} }
/**
* This class was generated by MyBatis Generator.
* This class corresponds to the database table bid_record
*
* @mbg.generated
*/
public static class Criterion { public static class Criterion {
private String condition; private String condition;
......
package com.wwdz.ch.db.manager;
import com.wwdz.ch.db.domain.BidRecord;
import java.util.List;
public interface BidRecordManager {
void add(BidRecord record);
int updateById(BidRecord record);
BidRecord queryById(Long id);
List<BidRecord> queryByCid (Integer cid);
void deleteById (Long id);
}
\ No newline at end of file
package com.wwdz.ch.db.service; package com.wwdz.ch.db.manager.impl;
import com.wwdz.ch.db.dao.BidRecordMapper; import com.wwdz.ch.db.dao.BidRecordMapper;
import com.wwdz.ch.db.domain.BidRecord; import com.wwdz.ch.db.domain.BidRecord;
import com.wwdz.ch.db.domain.BidRecordExample; import com.wwdz.ch.db.domain.BidRecordExample;
import com.wwdz.ch.db.domain.Category; import com.wwdz.ch.db.domain.FavoritesExample;
import com.wwdz.ch.db.manager.BidRecordManager;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.Date;
import java.util.List; import java.util.List;
@Service @Service
public class BidRecordService { public class BidRecordManagerImpl implements BidRecordManager {
@Resource @Resource
private BidRecordMapper bidRecordMapper; private BidRecordMapper bidRecordMapper;
public void add(BidRecord record) { public void add(BidRecord record) {
record.setCreated(LocalDateTime.now()); Date now = new Date();
record.setUpdated(LocalDateTime.now()); record.setCreateTime(now);
record.setUpdateTime(now);
bidRecordMapper.insertSelective(record); bidRecordMapper.insertSelective(record);
} }
public int updateById(BidRecord record) { public int updateById(BidRecord record) {
record.setUpdated(LocalDateTime.now()); record.setUpdateTime(new Date());
return bidRecordMapper.updateByPrimaryKeySelective(record); return bidRecordMapper.updateByPrimaryKeySelective(record);
} }
public List<BidRecord> queryByCid(Integer cid) { public List<BidRecord> queryByCid(Integer cid) {
BidRecordExample example = new BidRecordExample(); BidRecordExample example = new BidRecordExample();
example.createCriteria().andCidEqualTo(cid).andIsDeletedEqualTo(false); example.createCriteria().andCidEqualTo(cid).andIsDeletedEqualTo(0);
example.setOrderByClause("created desc"); example.setOrderByClause("update_time desc");
return bidRecordMapper.selectByExample(example); return bidRecordMapper.selectByExample(example);
} }
public BidRecord queryById(Long id) {
BidRecordExample example = new BidRecordExample();
BidRecordExample.Criteria criteria = example.createCriteria();
criteria.andIdEqualTo(id);
return bidRecordMapper.selectOneByExample(example);
}
public void deleteById(Long id) { public void deleteById(Long id) {
bidRecordMapper.logicalDeleteByPrimaryKey(id); BidRecordExample example = new BidRecordExample();
example.createCriteria().andIdEqualTo(id);
BidRecord record = new BidRecord();
record.setId(id);
record.setIsDeleted(1);
bidRecordMapper.updateByExampleSelective(record, example);
} }
} }
...@@ -8,6 +8,8 @@ import com.wwdz.ch.db.manager.ItemManager; ...@@ -8,6 +8,8 @@ import com.wwdz.ch.db.manager.ItemManager;
import com.xxdxxs.db.component.JdbcHelper; import com.xxdxxs.db.component.JdbcHelper;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import org.springframework.util.CollectionUtils;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
...@@ -32,7 +34,11 @@ public class ItemManagerImpl implements ItemManager { ...@@ -32,7 +34,11 @@ public class ItemManagerImpl implements ItemManager {
ItemExample example = new ItemExample(); ItemExample example = new ItemExample();
ItemExample.Criteria criteria = example.createCriteria(); ItemExample.Criteria criteria = example.createCriteria();
criteria.andIdEqualTo(id); criteria.andIdEqualTo(id);
return itemMapper.selectOneByExample(example); List<Item> items = itemMapper.selectByExampleWithBLOBs(example);
if (!CollectionUtils.isEmpty(items)) {
return items.get(0);
}
return new Item();
} }
@Override @Override
......
...@@ -4,12 +4,13 @@ import com.wwdz.ch.db.dao.OperateLogMapper; ...@@ -4,12 +4,13 @@ import com.wwdz.ch.db.dao.OperateLogMapper;
import com.wwdz.ch.db.domain.OperateLog; import com.wwdz.ch.db.domain.OperateLog;
import com.wwdz.ch.db.manager.OperateLogManager; import com.wwdz.ch.db.manager.OperateLogManager;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
@Repository @Repository
public class OperateLogManagerImpl implements OperateLogManager { public class OperateLogManagerImpl implements OperateLogManager {
@Mapper @Autowired
OperateLogMapper operateLogMapper; OperateLogMapper operateLogMapper;
@Override @Override
......
...@@ -2,10 +2,6 @@ ...@@ -2,10 +2,6 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!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.BidRecordMapper"> <mapper namespace="com.wwdz.ch.db.dao.BidRecordMapper">
<resultMap id="BaseResultMap" type="com.wwdz.ch.db.domain.BidRecord"> <resultMap id="BaseResultMap" type="com.wwdz.ch.db.domain.BidRecord">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id column="id" jdbcType="BIGINT" property="id" /> <id column="id" jdbcType="BIGINT" property="id" />
<result column="extra" jdbcType="VARCHAR" property="extra" /> <result column="extra" jdbcType="VARCHAR" property="extra" />
<result column="buyer" jdbcType="VARCHAR" property="buyer" /> <result column="buyer" jdbcType="VARCHAR" property="buyer" />
...@@ -13,17 +9,13 @@ ...@@ -13,17 +9,13 @@
<result column="link" jdbcType="VARCHAR" property="link" /> <result column="link" jdbcType="VARCHAR" property="link" />
<result column="cid" jdbcType="INTEGER" property="cid" /> <result column="cid" jdbcType="INTEGER" property="cid" />
<result column="images" jdbcType="VARCHAR" property="images" /> <result column="images" jdbcType="VARCHAR" property="images" />
<result column="bidTime" jdbcType="INTEGER" property="bidtime" /> <result column="bid_time" jdbcType="INTEGER" property="bidTime" />
<result column="price" jdbcType="BIGINT" property="price" /> <result column="price" jdbcType="BIGINT" property="price" />
<result column="created" jdbcType="TIMESTAMP" property="created" /> <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="updated" jdbcType="TIMESTAMP" property="updated" /> <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="is_deleted" jdbcType="BIT" property="isDeleted" /> <result column="is_deleted" jdbcType="INTEGER" property="isDeleted" />
</resultMap> </resultMap>
<sql id="Example_Where_Clause"> <sql id="Example_Where_Clause">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where> <where>
<foreach collection="oredCriteria" item="criteria" separator="or"> <foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid"> <if test="criteria.valid">
...@@ -53,10 +45,6 @@ ...@@ -53,10 +45,6 @@
</where> </where>
</sql> </sql>
<sql id="Update_By_Example_Where_Clause"> <sql id="Update_By_Example_Where_Clause">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where> <where>
<foreach collection="example.oredCriteria" item="criteria" separator="or"> <foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid"> <if test="criteria.valid">
...@@ -86,22 +74,15 @@ ...@@ -86,22 +74,15 @@
</where> </where>
</sql> </sql>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
<!-- id, extra, buyer, platform, link, cid, images, bid_time, price, create_time, update_time,
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
id, extra, buyer, platform, link, cid, images, bidTime, price, created, updated,
is_deleted is_deleted
</sql> </sql>
<select id="selectByExample" parameterType="com.wwdz.ch.db.domain.BidRecordExample" resultMap="BaseResultMap"> <select id="selectByExample" parameterType="com.wwdz.ch.db.domain.BidRecordExample" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select select
<if test="distinct"> <if test="distinct">
distinct distinct
</if> </if>
'true' as QUERYID,
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />
from bid_record from bid_record
<if test="_parameter != null"> <if test="_parameter != null">
...@@ -118,17 +99,18 @@ ...@@ -118,17 +99,18 @@
@project https://github.com/itfsw/mybatis-generator-plugin @project https://github.com/itfsw/mybatis-generator-plugin
--> -->
select select
'true' as QUERYID,
<if test="example.distinct"> <if test="example.distinct">
distinct distinct
</if> </if>
<choose> <choose>
<when test="selective != null and selective.length > 0"> <when test="selective != null and selective.length &gt; 0">
<foreach collection="selective" item="column" separator=","> <foreach collection="selective" item="column" separator=",">
${column.escapedColumnName} ${column.escapedColumnName}
</foreach> </foreach>
</when> </when>
<otherwise> <otherwise>
id, extra, buyer, platform, link, cid, images, bidTime, price, created, updated, id, extra, buyer, platform, link, cid, images, bid_time, price, create_time, update_time,
is_deleted is_deleted
</otherwise> </otherwise>
</choose> </choose>
...@@ -141,10 +123,6 @@ ...@@ -141,10 +123,6 @@
</if> </if>
</select> </select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select select
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />
from bid_record from bid_record
...@@ -158,13 +136,13 @@ ...@@ -158,13 +136,13 @@
--> -->
select select
<choose> <choose>
<when test="selective != null and selective.length > 0"> <when test="selective != null and selective.length &gt; 0">
<foreach collection="selective" item="column" separator=","> <foreach collection="selective" item="column" separator=",">
${column.escapedColumnName} ${column.escapedColumnName}
</foreach> </foreach>
</when> </when>
<otherwise> <otherwise>
id, extra, buyer, platform, link, cid, images, bidTime, price, created, updated, id, extra, buyer, platform, link, cid, images, bid_time, price, create_time, update_time,
is_deleted is_deleted
</otherwise> </otherwise>
</choose> </choose>
...@@ -172,45 +150,29 @@ ...@@ -172,45 +150,29 @@
where id = #{id,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT}
</select> </select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from bid_record delete from bid_record
where id = #{id,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT}
</delete> </delete>
<delete id="deleteByExample" parameterType="com.wwdz.ch.db.domain.BidRecordExample"> <delete id="deleteByExample" parameterType="com.wwdz.ch.db.domain.BidRecordExample">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from bid_record delete from bid_record
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Example_Where_Clause" /> <include refid="Example_Where_Clause" />
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.wwdz.ch.db.domain.BidRecord"> <insert id="insert" parameterType="com.wwdz.ch.db.domain.BidRecord">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into bid_record (extra, buyer, platform, insert into bid_record (extra, buyer, platform,
link, cid, images, link, cid, images,
bidTime, price, created, bid_time, price, create_time,
updated, is_deleted) update_time, is_deleted)
values (#{extra,jdbcType=VARCHAR}, #{buyer,jdbcType=VARCHAR}, #{platform,jdbcType=VARCHAR}, values (#{extra,jdbcType=VARCHAR}, #{buyer,jdbcType=VARCHAR}, #{platform,jdbcType=VARCHAR},
#{link,jdbcType=VARCHAR}, #{cid,jdbcType=INTEGER}, #{images,jdbcType=VARCHAR}, #{link,jdbcType=VARCHAR}, #{cid,jdbcType=INTEGER}, #{images,jdbcType=VARCHAR},
#{bidtime,jdbcType=INTEGER}, #{price,jdbcType=BIGINT}, #{created,jdbcType=TIMESTAMP}, #{bidTime,jdbcType=INTEGER}, #{price,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP},
#{updated,jdbcType=TIMESTAMP}, #{isDeleted,jdbcType=BIT}) #{updateTime,jdbcType=TIMESTAMP}, #{isDeleted,jdbcType=INTEGER})
</insert> </insert>
<insert id="insertSelective" parameterType="com.wwdz.ch.db.domain.BidRecord"> <insert id="insertSelective" parameterType="com.wwdz.ch.db.domain.BidRecord">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
...@@ -234,17 +196,17 @@ ...@@ -234,17 +196,17 @@
<if test="images != null"> <if test="images != null">
images, images,
</if> </if>
<if test="bidtime != null"> <if test="bidTime != null">
bidTime, bid_time,
</if> </if>
<if test="price != null"> <if test="price != null">
price, price,
</if> </if>
<if test="created != null"> <if test="createTime != null">
created, create_time,
</if> </if>
<if test="updated != null"> <if test="updateTime != null">
updated, update_time,
</if> </if>
<if test="isDeleted != null"> <if test="isDeleted != null">
is_deleted, is_deleted,
...@@ -269,38 +231,30 @@ ...@@ -269,38 +231,30 @@
<if test="images != null"> <if test="images != null">
#{images,jdbcType=VARCHAR}, #{images,jdbcType=VARCHAR},
</if> </if>
<if test="bidtime != null"> <if test="bidTime != null">
#{bidtime,jdbcType=INTEGER}, #{bidTime,jdbcType=INTEGER},
</if> </if>
<if test="price != null"> <if test="price != null">
#{price,jdbcType=BIGINT}, #{price,jdbcType=BIGINT},
</if> </if>
<if test="created != null"> <if test="createTime != null">
#{created,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="updated != null"> <if test="updateTime != null">
#{updated,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="isDeleted != null"> <if test="isDeleted != null">
#{isDeleted,jdbcType=BIT}, #{isDeleted,jdbcType=INTEGER},
</if> </if>
</trim> </trim>
</insert> </insert>
<select id="countByExample" parameterType="com.wwdz.ch.db.domain.BidRecordExample" resultType="java.lang.Long"> <select id="countByExample" parameterType="com.wwdz.ch.db.domain.BidRecordExample" resultType="java.lang.Long">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select count(*) from bid_record select count(*) from bid_record
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Example_Where_Clause" /> <include refid="Example_Where_Clause" />
</if> </if>
</select> </select>
<update id="updateByExampleSelective" parameterType="map"> <update id="updateByExampleSelective" parameterType="map">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update bid_record update bid_record
<set> <set>
<if test="record.id != null"> <if test="record.id != null">
...@@ -324,20 +278,20 @@ ...@@ -324,20 +278,20 @@
<if test="record.images != null"> <if test="record.images != null">
images = #{record.images,jdbcType=VARCHAR}, images = #{record.images,jdbcType=VARCHAR},
</if> </if>
<if test="record.bidtime != null"> <if test="record.bidTime != null">
bidTime = #{record.bidtime,jdbcType=INTEGER}, bid_time = #{record.bidTime,jdbcType=INTEGER},
</if> </if>
<if test="record.price != null"> <if test="record.price != null">
price = #{record.price,jdbcType=BIGINT}, price = #{record.price,jdbcType=BIGINT},
</if> </if>
<if test="record.created != null"> <if test="record.createTime != null">
created = #{record.created,jdbcType=TIMESTAMP}, create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="record.updated != null"> <if test="record.updateTime != null">
updated = #{record.updated,jdbcType=TIMESTAMP}, update_time = #{record.updateTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="record.isDeleted != null"> <if test="record.isDeleted != null">
is_deleted = #{record.isDeleted,jdbcType=BIT}, is_deleted = #{record.isDeleted,jdbcType=INTEGER},
</if> </if>
</set> </set>
<if test="_parameter != null"> <if test="_parameter != null">
...@@ -345,10 +299,6 @@ ...@@ -345,10 +299,6 @@
</if> </if>
</update> </update>
<update id="updateByExample" parameterType="map"> <update id="updateByExample" parameterType="map">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update bid_record update bid_record
set id = #{record.id,jdbcType=BIGINT}, set id = #{record.id,jdbcType=BIGINT},
extra = #{record.extra,jdbcType=VARCHAR}, extra = #{record.extra,jdbcType=VARCHAR},
...@@ -357,20 +307,16 @@ ...@@ -357,20 +307,16 @@
link = #{record.link,jdbcType=VARCHAR}, link = #{record.link,jdbcType=VARCHAR},
cid = #{record.cid,jdbcType=INTEGER}, cid = #{record.cid,jdbcType=INTEGER},
images = #{record.images,jdbcType=VARCHAR}, images = #{record.images,jdbcType=VARCHAR},
bidTime = #{record.bidtime,jdbcType=INTEGER}, bid_time = #{record.bidTime,jdbcType=INTEGER},
price = #{record.price,jdbcType=BIGINT}, price = #{record.price,jdbcType=BIGINT},
created = #{record.created,jdbcType=TIMESTAMP}, create_time = #{record.createTime,jdbcType=TIMESTAMP},
updated = #{record.updated,jdbcType=TIMESTAMP}, update_time = #{record.updateTime,jdbcType=TIMESTAMP},
is_deleted = #{record.isDeleted,jdbcType=BIT} is_deleted = #{record.isDeleted,jdbcType=INTEGER}
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" /> <include refid="Update_By_Example_Where_Clause" />
</if> </if>
</update> </update>
<update id="updateByPrimaryKeySelective" parameterType="com.wwdz.ch.db.domain.BidRecord"> <update id="updateByPrimaryKeySelective" parameterType="com.wwdz.ch.db.domain.BidRecord">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update bid_record update bid_record
<set> <set>
<if test="extra != null"> <if test="extra != null">
...@@ -391,29 +337,25 @@ ...@@ -391,29 +337,25 @@
<if test="images != null"> <if test="images != null">
images = #{images,jdbcType=VARCHAR}, images = #{images,jdbcType=VARCHAR},
</if> </if>
<if test="bidtime != null"> <if test="bidTime != null">
bidTime = #{bidtime,jdbcType=INTEGER}, bid_time = #{bidTime,jdbcType=INTEGER},
</if> </if>
<if test="price != null"> <if test="price != null">
price = #{price,jdbcType=BIGINT}, price = #{price,jdbcType=BIGINT},
</if> </if>
<if test="created != null"> <if test="createTime != null">
created = #{created,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="updated != null"> <if test="updateTime != null">
updated = #{updated,jdbcType=TIMESTAMP}, update_time = #{updateTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="isDeleted != null"> <if test="isDeleted != null">
is_deleted = #{isDeleted,jdbcType=BIT}, is_deleted = #{isDeleted,jdbcType=INTEGER},
</if> </if>
</set> </set>
where id = #{id,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT}
</update> </update>
<update id="updateByPrimaryKey" parameterType="com.wwdz.ch.db.domain.BidRecord"> <update id="updateByPrimaryKey" parameterType="com.wwdz.ch.db.domain.BidRecord">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update bid_record update bid_record
set extra = #{extra,jdbcType=VARCHAR}, set extra = #{extra,jdbcType=VARCHAR},
buyer = #{buyer,jdbcType=VARCHAR}, buyer = #{buyer,jdbcType=VARCHAR},
...@@ -421,11 +363,11 @@ ...@@ -421,11 +363,11 @@
link = #{link,jdbcType=VARCHAR}, link = #{link,jdbcType=VARCHAR},
cid = #{cid,jdbcType=INTEGER}, cid = #{cid,jdbcType=INTEGER},
images = #{images,jdbcType=VARCHAR}, images = #{images,jdbcType=VARCHAR},
bidTime = #{bidtime,jdbcType=INTEGER}, bid_time = #{bidTime,jdbcType=INTEGER},
price = #{price,jdbcType=BIGINT}, price = #{price,jdbcType=BIGINT},
created = #{created,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
updated = #{updated,jdbcType=TIMESTAMP}, update_time = #{updateTime,jdbcType=TIMESTAMP},
is_deleted = #{isDeleted,jdbcType=BIT} is_deleted = #{isDeleted,jdbcType=INTEGER}
where id = #{id,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT}
</update> </update>
<select id="selectOneByExample" parameterType="com.wwdz.ch.db.domain.BidRecordExample" resultMap="BaseResultMap"> <select id="selectOneByExample" parameterType="com.wwdz.ch.db.domain.BidRecordExample" resultMap="BaseResultMap">
...@@ -435,6 +377,7 @@ ...@@ -435,6 +377,7 @@
@project https://github.com/itfsw/mybatis-generator-plugin @project https://github.com/itfsw/mybatis-generator-plugin
--> -->
select select
'true' as QUERYID,
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />
from bid_record from bid_record
<if test="_parameter != null"> <if test="_parameter != null">
...@@ -445,15 +388,6 @@ ...@@ -445,15 +388,6 @@
</if> </if>
limit 1 limit 1
</select> </select>
<update id="logicalDeleteByPrimaryKey" parameterType="java.lang.Long">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
update bid_record set is_deleted = 1
where id = #{id,jdbcType=INTEGER}
</update>
<select id="selectOneByExampleSelective" parameterType="map" resultMap="BaseResultMap"> <select id="selectOneByExampleSelective" parameterType="map" resultMap="BaseResultMap">
<!-- <!--
WARNING - @mbg.generated WARNING - @mbg.generated
...@@ -461,14 +395,15 @@ ...@@ -461,14 +395,15 @@
@project https://github.com/itfsw/mybatis-generator-plugin @project https://github.com/itfsw/mybatis-generator-plugin
--> -->
select select
'true' as QUERYID,
<choose> <choose>
<when test="selective != null and selective.length > 0"> <when test="selective != null and selective.length &gt; 0">
<foreach collection="selective" item="column" separator=","> <foreach collection="selective" item="column" separator=",">
${column.escapedColumnName} ${column.escapedColumnName}
</foreach> </foreach>
</when> </when>
<otherwise> <otherwise>
id, extra, buyer, platform, link, cid, images, bidTime, price, created, updated, id, extra, buyer, platform, link, cid, images, bid_time, price, create_time, update_time,
is_deleted is_deleted
</otherwise> </otherwise>
</choose> </choose>
......
package com.wwdz.ch.wx.web; package com.wwdz.ch.wx.web;
import com.alibaba.druid.support.json.JSONUtils;
import com.mysql.jdbc.StringUtils;
import com.wwdz.ch.core.type.ListResult; import com.wwdz.ch.core.type.ListResult;
import com.wwdz.ch.core.type.SimpleResult; import com.wwdz.ch.core.type.SimpleResult;
import com.wwdz.ch.core.util.PriceUtil;
import com.wwdz.ch.core.util.ResponseUtil;
import com.wwdz.ch.db.domain.*; import com.wwdz.ch.db.domain.*;
import com.wwdz.ch.db.service.BidRecordService;
import com.wwdz.ch.db.service.UgcCoinService; import com.wwdz.ch.db.service.UgcCoinService;
import com.wwdz.ch.wx.annotation.LoginUser; import com.wwdz.ch.wx.annotation.LoginUser;
import com.wwdz.ch.wx.dao.UgcCoinVo; import com.wwdz.ch.wx.dao.UgcCoinVo;
...@@ -21,11 +16,7 @@ import org.springframework.validation.annotation.Validated; ...@@ -21,11 +16,7 @@ import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.validation.constraints.NotNull; import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@RestController @RestController
......
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