Commit 2276b9d2 authored by shiyu's avatar shiyu

新增商品状态字段

parent 776c8d18
...@@ -61,6 +61,16 @@ public class ItemController { ...@@ -61,6 +61,16 @@ public class ItemController {
return result; return result;
} }
@RequiresPermissionsDesc(menu = { "商品列表", "商品设置主图" }, button = "更新")
@PostMapping("/setTopImage")
public Result setTopImage(@RequestBody CoinRequestDto coinRequestDto) {
logger.info("【请求开始】操作人:[" + AuthSupport.userName()+ "] 商品列表->商品设置主图->更新,请求参数:parma:{}", coinRequestDto);
Result result = itemService.setItem(coinRequestDto);
logger.info("【请求结束】钱币列表->商品设置主图->更新");
return result;
}
@GetMapping("/updateUrl") @GetMapping("/updateUrl")
public void syn() { public void syn() {
synCoinJob.updateImageUrlOfsSize(); synCoinJob.updateImageUrlOfsSize();
......
...@@ -63,9 +63,9 @@ public class ItemVo implements Entity { ...@@ -63,9 +63,9 @@ public class ItemVo implements Entity {
private Boolean isOnSale; private Boolean isOnSale;
/** /**
* 是否设置过 * 商品状态
*/ */
private Integer isSetted; private Integer state;
/** /**
* 逻辑删除 * 逻辑删除
...@@ -176,7 +176,7 @@ public class ItemVo implements Entity { ...@@ -176,7 +176,7 @@ public class ItemVo implements Entity {
itemVo.setImages(item.getImages().split(";")); itemVo.setImages(item.getImages().split(";"));
} }
itemVo.setIsDeleted(item.getIsDeleted()); itemVo.setIsDeleted(item.getIsDeleted());
itemVo.setIsSetted(item.getIsSetted()); itemVo.setState(item.getState());
if (!ObjectUtils.isEmpty(item.getPrice())) { if (!ObjectUtils.isEmpty(item.getPrice())) {
itemVo.setPrice(Double.parseDouble(PriceUtil.convertPrice(item.getPrice()))); itemVo.setPrice(Double.parseDouble(PriceUtil.convertPrice(item.getPrice())));
} }
......
...@@ -6,6 +6,7 @@ import com.wwdz.ch.admin.service.OperateLogService; ...@@ -6,6 +6,7 @@ import com.wwdz.ch.admin.service.OperateLogService;
import com.wwdz.ch.admin.util.AuthSupport; import com.wwdz.ch.admin.util.AuthSupport;
import com.wwdz.ch.core.consts.CommConsts; import com.wwdz.ch.core.consts.CommConsts;
import com.wwdz.ch.core.consts.CommonEnum; import com.wwdz.ch.core.consts.CommonEnum;
import com.wwdz.ch.core.consts.ItemStateEnum;
import com.wwdz.ch.core.storage.QiniuStorage; import com.wwdz.ch.core.storage.QiniuStorage;
import com.wwdz.ch.core.type.Result; import com.wwdz.ch.core.type.Result;
import com.wwdz.ch.db.dao.CroppingRecordDao; import com.wwdz.ch.db.dao.CroppingRecordDao;
...@@ -146,10 +147,9 @@ public class ItemServiceImpl implements ItemService { ...@@ -146,10 +147,9 @@ public class ItemServiceImpl implements ItemService {
paramMap.put("topImage", url); paramMap.put("topImage", url);
item.setTopImage(url); item.setTopImage(url);
} }
item.setState(ItemStateEnum.FINISH.getCode());
itemDao.setCoin(item); itemDao.setCoin(item);
//记录钱币设置的操作日志 //记录钱币设置的操作日志
OperateLog operateLog = OperateLog.of(coinRequestDto.getId(), CommonEnum.OperateTypeEnum.ITEM_SET.getDes(), OperateLog operateLog = OperateLog.of(coinRequestDto.getId(), CommonEnum.OperateTypeEnum.ITEM_SET.getDes(),
CommonEnum.OperateTypeEnum.ITEM_SET.getCode(), AuthSupport.adminId(), AuthSupport.userName(), JsonUtils.fromMap(paramMap)); CommonEnum.OperateTypeEnum.ITEM_SET.getCode(), AuthSupport.adminId(), AuthSupport.userName(), JsonUtils.fromMap(paramMap));
...@@ -161,6 +161,23 @@ public class ItemServiceImpl implements ItemService { ...@@ -161,6 +161,23 @@ public class ItemServiceImpl implements ItemService {
return Result.success(); return Result.success();
} }
@Override
public Result setTopImage(CoinRequestDto coinRequestDto) {
try {
Item item = new Item();
item.setId(coinRequestDto.getId());
item.setTopImage(coinRequestDto.getTopImage());
item.setState(ItemStateEnum.FINISH.getCode());
item.setUpdateTime(new Date());
itemDao.update(item);
} catch (Exception e) {
logger.error("设置主图出错:{}", e);
return Result.failed();
}
return Result.success();
}
@Override @Override
public Result saveCroppingRecord(CroppingRecordRequestDto croppingRecordRequestDto) { public Result saveCroppingRecord(CroppingRecordRequestDto croppingRecordRequestDto) {
try { try {
......
...@@ -3,6 +3,7 @@ package com.wwdz.ch.admin.job; ...@@ -3,6 +3,7 @@ package com.wwdz.ch.admin.job;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import com.wwdz.ch.core.consts.CommConsts; import com.wwdz.ch.core.consts.CommConsts;
import com.wwdz.ch.core.consts.CommonEnum; import com.wwdz.ch.core.consts.CommonEnum;
import com.wwdz.ch.core.consts.ItemStateEnum;
import com.wwdz.ch.core.consts.MediaTypeEnum; import com.wwdz.ch.core.consts.MediaTypeEnum;
import com.wwdz.ch.core.storage.QiniuStorage; import com.wwdz.ch.core.storage.QiniuStorage;
import com.wwdz.ch.core.util.RedisUtils; import com.wwdz.ch.core.util.RedisUtils;
...@@ -100,7 +101,7 @@ public class SynCoinJob { ...@@ -100,7 +101,7 @@ public class SynCoinJob {
item.setIsDeleted(false); item.setIsDeleted(false);
item.setBidTime(""); item.setBidTime("");
item.setRemark(null); item.setRemark(null);
item.setIsSetted(0); item.setState(ItemStateEnum.PENDING.getCode());
item.setOriginalExtra(coins.getExtra()); item.setOriginalExtra(coins.getExtra());
item.setOriginalSourceUrl(coins.getSourceUrl()); item.setOriginalSourceUrl(coins.getSourceUrl());
item.setSource(coins.getSource()); item.setSource(coins.getSource());
......
...@@ -16,6 +16,8 @@ public interface ItemService { ...@@ -16,6 +16,8 @@ public interface ItemService {
Result setItem(CoinRequestDto coinRequestDto); Result setItem(CoinRequestDto coinRequestDto);
Result setTopImage(CoinRequestDto coinRequestDto);
/** /**
* 保存图片裁剪记录 * 保存图片裁剪记录
* @param croppingRecordRequestDto * @param croppingRecordRequestDto
......
package com.wwdz.ch.core.consts;
/**
* 商品种类
*/
public enum ItemStateEnum {
PENDING(0, "待处理"),
SHELVE(1, "暂不处理"),
FINISH(10, "已完成"),
;
private int code;
private String des;
ItemStateEnum(int code, String des) {
this.code = code;
this.des = des;
}
public static String getNameByCode(int code) {
for (ItemStateEnum itemStateEnum : ItemStateEnum.values()) {
if (code == itemStateEnum.getCode()) {
return itemStateEnum.getDes();
}
}
return null;
}
public int getCode() {
return code;
}
public String getDes() {
return des;
}
}
...@@ -84,9 +84,9 @@ public class ItemOfEs implements Entity { ...@@ -84,9 +84,9 @@ public class ItemOfEs implements Entity {
private String remark; private String remark;
/** /**
* 是否设置过 * 商品状态
*/ */
private Integer isSetted; private Integer state;
/** /**
* 原始的资源url * 原始的资源url
......
...@@ -10,7 +10,7 @@ import lombok.Data; ...@@ -10,7 +10,7 @@ import lombok.Data;
/** /**
* @author shiyu * @author shiyu
* @date 2023/08/17 * @date 2023/08/28
*/ */
@Data @Data
public class Item implements Entity { public class Item implements Entity {
...@@ -87,9 +87,9 @@ public class Item implements Entity { ...@@ -87,9 +87,9 @@ public class Item implements Entity {
private String remark; private String remark;
/** /**
* 是否设置过 * 商品状态
*/ */
private Integer isSetted; private Integer state;
/** /**
* 原始的资源url * 原始的资源url
...@@ -154,7 +154,7 @@ public class Item implements Entity { ...@@ -154,7 +154,7 @@ public class Item implements Entity {
sb.append(", isDeleted=").append(isDeleted); sb.append(", isDeleted=").append(isDeleted);
sb.append(", bidTime=").append(bidTime); sb.append(", bidTime=").append(bidTime);
sb.append(", remark=").append(remark); sb.append(", remark=").append(remark);
sb.append(", isSetted=").append(isSetted); sb.append(", state=").append(state);
sb.append(", originalSourceUrl=").append(originalSourceUrl); sb.append(", originalSourceUrl=").append(originalSourceUrl);
sb.append(", source=").append(source); sb.append(", source=").append(source);
sb.append(", kind=").append(kind); sb.append(", kind=").append(kind);
...@@ -195,7 +195,7 @@ public class Item implements Entity { ...@@ -195,7 +195,7 @@ public class Item implements Entity {
&& (this.getIsDeleted() == null ? other.getIsDeleted() == null : this.getIsDeleted().equals(other.getIsDeleted())) && (this.getIsDeleted() == null ? other.getIsDeleted() == null : this.getIsDeleted().equals(other.getIsDeleted()))
&& (this.getBidTime() == null ? other.getBidTime() == null : this.getBidTime().equals(other.getBidTime())) && (this.getBidTime() == null ? other.getBidTime() == null : this.getBidTime().equals(other.getBidTime()))
&& (this.getRemark() == null ? other.getRemark() == null : this.getRemark().equals(other.getRemark())) && (this.getRemark() == null ? other.getRemark() == null : this.getRemark().equals(other.getRemark()))
&& (this.getIsSetted() == null ? other.getIsSetted() == null : this.getIsSetted().equals(other.getIsSetted())) && (this.getState() == null ? other.getState() == null : this.getState().equals(other.getState()))
&& (this.getOriginalSourceUrl() == null ? other.getOriginalSourceUrl() == null : this.getOriginalSourceUrl().equals(other.getOriginalSourceUrl())) && (this.getOriginalSourceUrl() == null ? other.getOriginalSourceUrl() == null : this.getOriginalSourceUrl().equals(other.getOriginalSourceUrl()))
&& (this.getSource() == null ? other.getSource() == null : this.getSource().equals(other.getSource())) && (this.getSource() == null ? other.getSource() == null : this.getSource().equals(other.getSource()))
&& (this.getKind() == null ? other.getKind() == null : this.getKind().equals(other.getKind())) && (this.getKind() == null ? other.getKind() == null : this.getKind().equals(other.getKind()))
...@@ -225,7 +225,7 @@ public class Item implements Entity { ...@@ -225,7 +225,7 @@ public class Item implements Entity {
result = prime * result + ((getIsDeleted() == null) ? 0 : getIsDeleted().hashCode()); result = prime * result + ((getIsDeleted() == null) ? 0 : getIsDeleted().hashCode());
result = prime * result + ((getBidTime() == null) ? 0 : getBidTime().hashCode()); result = prime * result + ((getBidTime() == null) ? 0 : getBidTime().hashCode());
result = prime * result + ((getRemark() == null) ? 0 : getRemark().hashCode()); result = prime * result + ((getRemark() == null) ? 0 : getRemark().hashCode());
result = prime * result + ((getIsSetted() == null) ? 0 : getIsSetted().hashCode()); result = prime * result + ((getState() == null) ? 0 : getState().hashCode());
result = prime * result + ((getOriginalSourceUrl() == null) ? 0 : getOriginalSourceUrl().hashCode()); result = prime * result + ((getOriginalSourceUrl() == null) ? 0 : getOriginalSourceUrl().hashCode());
result = prime * result + ((getSource() == null) ? 0 : getSource().hashCode()); result = prime * result + ((getSource() == null) ? 0 : getSource().hashCode());
result = prime * result + ((getKind() == null) ? 0 : getKind().hashCode()); result = prime * result + ((getKind() == null) ? 0 : getKind().hashCode());
...@@ -260,7 +260,7 @@ public class Item implements Entity { ...@@ -260,7 +260,7 @@ public class Item implements Entity {
isDeleted("is_deleted", "isDeleted", "BIT", false), isDeleted("is_deleted", "isDeleted", "BIT", false),
bidTime("bid_time", "bidTime", "VARCHAR", false), bidTime("bid_time", "bidTime", "VARCHAR", false),
remark("remark", "remark", "VARCHAR", false), remark("remark", "remark", "VARCHAR", false),
isSetted("is_setted", "isSetted", "INTEGER", false), state("state", "state", "INTEGER", true),
originalSourceUrl("original_source_url", "originalSourceUrl", "VARCHAR", false), originalSourceUrl("original_source_url", "originalSourceUrl", "VARCHAR", false),
source("source", "source", "INTEGER", true), source("source", "source", "INTEGER", true),
kind("kind", "kind", "INTEGER", false), kind("kind", "kind", "INTEGER", false),
......
...@@ -2178,18 +2178,18 @@ public class ItemExample { ...@@ -2178,18 +2178,18 @@ public class ItemExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andIsSettedIsNull() { public Criteria andStateIsNull() {
addCriterion("is_setted is null"); addCriterion("`state` is null");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andIsSettedIsNotNull() { public Criteria andStateIsNotNull() {
addCriterion("is_setted is not null"); addCriterion("`state` is not null");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andIsSettedEqualTo(Integer value) { public Criteria andStateEqualTo(Integer value) {
addCriterion("is_setted =", value, "isSetted"); addCriterion("`state` =", value, "state");
return (Criteria) this; return (Criteria) this;
} }
...@@ -2200,13 +2200,13 @@ public class ItemExample { ...@@ -2200,13 +2200,13 @@ public class ItemExample {
* @mbg.generated * @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin * @project https://github.com/itfsw/mybatis-generator-plugin
*/ */
public Criteria andIsSettedEqualToColumn(Item.Column column) { public Criteria andStateEqualToColumn(Item.Column column) {
addCriterion(new StringBuilder("is_setted = ").append(column.getEscapedColumnName()).toString()); addCriterion(new StringBuilder("`state` = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this; return (Criteria) this;
} }
public Criteria andIsSettedNotEqualTo(Integer value) { public Criteria andStateNotEqualTo(Integer value) {
addCriterion("is_setted <>", value, "isSetted"); addCriterion("`state` <>", value, "state");
return (Criteria) this; return (Criteria) this;
} }
...@@ -2217,13 +2217,13 @@ public class ItemExample { ...@@ -2217,13 +2217,13 @@ public class ItemExample {
* @mbg.generated * @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin * @project https://github.com/itfsw/mybatis-generator-plugin
*/ */
public Criteria andIsSettedNotEqualToColumn(Item.Column column) { public Criteria andStateNotEqualToColumn(Item.Column column) {
addCriterion(new StringBuilder("is_setted <> ").append(column.getEscapedColumnName()).toString()); addCriterion(new StringBuilder("`state` <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this; return (Criteria) this;
} }
public Criteria andIsSettedGreaterThan(Integer value) { public Criteria andStateGreaterThan(Integer value) {
addCriterion("is_setted >", value, "isSetted"); addCriterion("`state` >", value, "state");
return (Criteria) this; return (Criteria) this;
} }
...@@ -2234,13 +2234,13 @@ public class ItemExample { ...@@ -2234,13 +2234,13 @@ public class ItemExample {
* @mbg.generated * @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin * @project https://github.com/itfsw/mybatis-generator-plugin
*/ */
public Criteria andIsSettedGreaterThanColumn(Item.Column column) { public Criteria andStateGreaterThanColumn(Item.Column column) {
addCriterion(new StringBuilder("is_setted > ").append(column.getEscapedColumnName()).toString()); addCriterion(new StringBuilder("`state` > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this; return (Criteria) this;
} }
public Criteria andIsSettedGreaterThanOrEqualTo(Integer value) { public Criteria andStateGreaterThanOrEqualTo(Integer value) {
addCriterion("is_setted >=", value, "isSetted"); addCriterion("`state` >=", value, "state");
return (Criteria) this; return (Criteria) this;
} }
...@@ -2251,13 +2251,13 @@ public class ItemExample { ...@@ -2251,13 +2251,13 @@ public class ItemExample {
* @mbg.generated * @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin * @project https://github.com/itfsw/mybatis-generator-plugin
*/ */
public Criteria andIsSettedGreaterThanOrEqualToColumn(Item.Column column) { public Criteria andStateGreaterThanOrEqualToColumn(Item.Column column) {
addCriterion(new StringBuilder("is_setted >= ").append(column.getEscapedColumnName()).toString()); addCriterion(new StringBuilder("`state` >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this; return (Criteria) this;
} }
public Criteria andIsSettedLessThan(Integer value) { public Criteria andStateLessThan(Integer value) {
addCriterion("is_setted <", value, "isSetted"); addCriterion("`state` <", value, "state");
return (Criteria) this; return (Criteria) this;
} }
...@@ -2268,13 +2268,13 @@ public class ItemExample { ...@@ -2268,13 +2268,13 @@ public class ItemExample {
* @mbg.generated * @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin * @project https://github.com/itfsw/mybatis-generator-plugin
*/ */
public Criteria andIsSettedLessThanColumn(Item.Column column) { public Criteria andStateLessThanColumn(Item.Column column) {
addCriterion(new StringBuilder("is_setted < ").append(column.getEscapedColumnName()).toString()); addCriterion(new StringBuilder("`state` < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this; return (Criteria) this;
} }
public Criteria andIsSettedLessThanOrEqualTo(Integer value) { public Criteria andStateLessThanOrEqualTo(Integer value) {
addCriterion("is_setted <=", value, "isSetted"); addCriterion("`state` <=", value, "state");
return (Criteria) this; return (Criteria) this;
} }
...@@ -2285,28 +2285,28 @@ public class ItemExample { ...@@ -2285,28 +2285,28 @@ public class ItemExample {
* @mbg.generated * @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin * @project https://github.com/itfsw/mybatis-generator-plugin
*/ */
public Criteria andIsSettedLessThanOrEqualToColumn(Item.Column column) { public Criteria andStateLessThanOrEqualToColumn(Item.Column column) {
addCriterion(new StringBuilder("is_setted <= ").append(column.getEscapedColumnName()).toString()); addCriterion(new StringBuilder("`state` <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this; return (Criteria) this;
} }
public Criteria andIsSettedIn(List<Integer> values) { public Criteria andStateIn(List<Integer> values) {
addCriterion("is_setted in", values, "isSetted"); addCriterion("`state` in", values, "state");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andIsSettedNotIn(List<Integer> values) { public Criteria andStateNotIn(List<Integer> values) {
addCriterion("is_setted not in", values, "isSetted"); addCriterion("`state` not in", values, "state");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andIsSettedBetween(Integer value1, Integer value2) { public Criteria andStateBetween(Integer value1, Integer value2) {
addCriterion("is_setted between", value1, value2, "isSetted"); addCriterion("`state` between", value1, value2, "state");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andIsSettedNotBetween(Integer value1, Integer value2) { public Criteria andStateNotBetween(Integer value1, Integer value2) {
addCriterion("is_setted not between", value1, value2, "isSetted"); addCriterion("`state` not between", value1, value2, "state");
return (Criteria) this; return (Criteria) this;
} }
......
...@@ -36,7 +36,7 @@ public class ItemDaoImpl implements ItemDao { ...@@ -36,7 +36,7 @@ public class ItemDaoImpl implements ItemDao {
criteria.andIdNotIn(coinRequestDto.getIdExcludeList()); criteria.andIdNotIn(coinRequestDto.getIdExcludeList());
} }
criteria.andIsDeletedEqualTo(false); criteria.andIsDeletedEqualTo(false);
criteria.andIsSettedEqualTo(0); criteria.andStateEqualTo(0);
criteria.andSourceIn(CHINESE_SOURCE_LIST); criteria.andSourceIn(CHINESE_SOURCE_LIST);
return itemMapper.selectOneByExampleWithBLOBs(example); return itemMapper.selectOneByExampleWithBLOBs(example);
} }
...@@ -125,7 +125,6 @@ public class ItemDaoImpl implements ItemDao { ...@@ -125,7 +125,6 @@ public class ItemDaoImpl implements ItemDao {
ItemExample example = new ItemExample(); ItemExample example = new ItemExample();
ItemExample.Criteria criteria = example.createCriteria(); ItemExample.Criteria criteria = example.createCriteria();
criteria.andIdEqualTo(item.getId()); criteria.andIdEqualTo(item.getId());
item.setIsSetted(1);
item.setUpdateTime(new Date()); item.setUpdateTime(new Date());
int num = itemMapper.updateByExampleSelective(item, example); int num = itemMapper.updateByExampleSelective(item, example);
return num > 0; return num > 0;
......
...@@ -68,6 +68,7 @@ public interface ItemMapper { ...@@ -68,6 +68,7 @@ public interface ItemMapper {
*/ */
Item selectByPrimaryKeySelective(@Param("id") Long id, @Param("selective") Item.Column ... selective); Item selectByPrimaryKeySelective(@Param("id") Long id, @Param("selective") Item.Column ... selective);
Item selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") Item record, @Param("example") ItemExample example); int updateByExampleSelective(@Param("record") Item record, @Param("example") ItemExample example);
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
<result column="is_deleted" jdbcType="BIT" property="isDeleted" /> <result column="is_deleted" jdbcType="BIT" property="isDeleted" />
<result column="bid_time" jdbcType="VARCHAR" property="bidTime" /> <result column="bid_time" jdbcType="VARCHAR" property="bidTime" />
<result column="remark" jdbcType="VARCHAR" property="remark" /> <result column="remark" jdbcType="VARCHAR" property="remark" />
<result column="is_setted" jdbcType="INTEGER" property="isSetted" /> <result column="state" jdbcType="INTEGER" property="state" />
<result column="original_source_url" jdbcType="VARCHAR" property="originalSourceUrl" /> <result column="original_source_url" jdbcType="VARCHAR" property="originalSourceUrl" />
<result column="source" jdbcType="INTEGER" property="source" /> <result column="source" jdbcType="INTEGER" property="source" />
<result column="kind" jdbcType="INTEGER" property="kind" /> <result column="kind" jdbcType="INTEGER" property="kind" />
...@@ -91,7 +91,7 @@ ...@@ -91,7 +91,7 @@
</sql> </sql>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id, `name`, cid, is_on_sale, is_std, sort, share_image, top_image, price, create_time, 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, is_setted, original_source_url, source_type, update_time, is_deleted, bid_time, remark, `state`, original_source_url,
`source`, kind `source`, kind
</sql> </sql>
<sql id="Blob_Column_List"> <sql id="Blob_Column_List">
...@@ -148,7 +148,7 @@ ...@@ -148,7 +148,7 @@
</when> </when>
<otherwise> <otherwise>
id, `name`, cid, is_on_sale, is_std, sort, share_image, top_image, price, create_time, 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, is_setted, original_source_url, source_type, update_time, is_deleted, bid_time, remark, `state`, original_source_url,
`source`, kind, extra, images, videos, detail, original_extra `source`, kind, extra, images, videos, detail, original_extra
</otherwise> </otherwise>
</choose> </choose>
...@@ -183,7 +183,7 @@ ...@@ -183,7 +183,7 @@
</when> </when>
<otherwise> <otherwise>
id, `name`, cid, is_on_sale, is_std, sort, share_image, top_image, price, create_time, 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, is_setted, original_source_url, source_type, update_time, is_deleted, bid_time, remark, `state`, original_source_url,
`source`, kind, extra, images, videos, detail, original_extra `source`, kind, extra, images, videos, detail, original_extra
</otherwise> </otherwise>
</choose> </choose>
...@@ -208,7 +208,7 @@ ...@@ -208,7 +208,7 @@
is_std, sort, share_image, is_std, sort, share_image,
top_image, price, create_time, top_image, price, create_time,
source_type, update_time, is_deleted, source_type, update_time, is_deleted,
bid_time, remark, is_setted, bid_time, remark, `state`,
original_source_url, `source`, kind, original_source_url, `source`, kind,
extra, images, videos, extra, images, videos,
detail, original_extra) detail, original_extra)
...@@ -216,7 +216,7 @@ ...@@ -216,7 +216,7 @@
#{isStd,jdbcType=BIT}, #{sort,jdbcType=INTEGER}, #{shareImage,jdbcType=VARCHAR}, #{isStd,jdbcType=BIT}, #{sort,jdbcType=INTEGER}, #{shareImage,jdbcType=VARCHAR},
#{topImage,jdbcType=VARCHAR}, #{price,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP}, #{topImage,jdbcType=VARCHAR}, #{price,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP},
#{sourceType,jdbcType=INTEGER}, #{updateTime,jdbcType=TIMESTAMP}, #{isDeleted,jdbcType=BIT}, #{sourceType,jdbcType=INTEGER}, #{updateTime,jdbcType=TIMESTAMP}, #{isDeleted,jdbcType=BIT},
#{bidTime,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{isSetted,jdbcType=INTEGER}, #{bidTime,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{state,jdbcType=INTEGER},
#{originalSourceUrl,jdbcType=VARCHAR}, #{source,jdbcType=INTEGER}, #{kind,jdbcType=INTEGER}, #{originalSourceUrl,jdbcType=VARCHAR}, #{source,jdbcType=INTEGER}, #{kind,jdbcType=INTEGER},
#{extra,jdbcType=LONGVARCHAR}, #{images,jdbcType=LONGVARCHAR}, #{videos,jdbcType=LONGVARCHAR}, #{extra,jdbcType=LONGVARCHAR}, #{images,jdbcType=LONGVARCHAR}, #{videos,jdbcType=LONGVARCHAR},
#{detail,jdbcType=LONGVARCHAR}, #{originalExtra,jdbcType=LONGVARCHAR}) #{detail,jdbcType=LONGVARCHAR}, #{originalExtra,jdbcType=LONGVARCHAR})
...@@ -269,8 +269,8 @@ ...@@ -269,8 +269,8 @@
<if test="remark != null"> <if test="remark != null">
remark, remark,
</if> </if>
<if test="isSetted != null"> <if test="state != null">
is_setted, `state`,
</if> </if>
<if test="originalSourceUrl != null"> <if test="originalSourceUrl != null">
original_source_url, original_source_url,
...@@ -340,8 +340,8 @@ ...@@ -340,8 +340,8 @@
<if test="remark != null"> <if test="remark != null">
#{remark,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR},
</if> </if>
<if test="isSetted != null"> <if test="state != null">
#{isSetted,jdbcType=INTEGER}, #{state,jdbcType=INTEGER},
</if> </if>
<if test="originalSourceUrl != null"> <if test="originalSourceUrl != null">
#{originalSourceUrl,jdbcType=VARCHAR}, #{originalSourceUrl,jdbcType=VARCHAR},
...@@ -423,8 +423,8 @@ ...@@ -423,8 +423,8 @@
<if test="record.remark != null"> <if test="record.remark != null">
remark = #{record.remark,jdbcType=VARCHAR}, remark = #{record.remark,jdbcType=VARCHAR},
</if> </if>
<if test="record.isSetted != null"> <if test="record.state != null">
is_setted = #{record.isSetted,jdbcType=INTEGER}, `state` = #{record.state,jdbcType=INTEGER},
</if> </if>
<if test="record.originalSourceUrl != null"> <if test="record.originalSourceUrl != null">
original_source_url = #{record.originalSourceUrl,jdbcType=VARCHAR}, original_source_url = #{record.originalSourceUrl,jdbcType=VARCHAR},
...@@ -472,7 +472,7 @@ ...@@ -472,7 +472,7 @@
is_deleted = #{record.isDeleted,jdbcType=BIT}, is_deleted = #{record.isDeleted,jdbcType=BIT},
bid_time = #{record.bidTime,jdbcType=VARCHAR}, bid_time = #{record.bidTime,jdbcType=VARCHAR},
remark = #{record.remark,jdbcType=VARCHAR}, remark = #{record.remark,jdbcType=VARCHAR},
is_setted = #{record.isSetted,jdbcType=INTEGER}, `state` = #{record.state,jdbcType=INTEGER},
original_source_url = #{record.originalSourceUrl,jdbcType=VARCHAR}, original_source_url = #{record.originalSourceUrl,jdbcType=VARCHAR},
`source` = #{record.source,jdbcType=INTEGER}, `source` = #{record.source,jdbcType=INTEGER},
kind = #{record.kind,jdbcType=INTEGER}, kind = #{record.kind,jdbcType=INTEGER},
...@@ -502,7 +502,7 @@ ...@@ -502,7 +502,7 @@
is_deleted = #{record.isDeleted,jdbcType=BIT}, is_deleted = #{record.isDeleted,jdbcType=BIT},
bid_time = #{record.bidTime,jdbcType=VARCHAR}, bid_time = #{record.bidTime,jdbcType=VARCHAR},
remark = #{record.remark,jdbcType=VARCHAR}, remark = #{record.remark,jdbcType=VARCHAR},
is_setted = #{record.isSetted,jdbcType=INTEGER}, `state` = #{record.state,jdbcType=INTEGER},
original_source_url = #{record.originalSourceUrl,jdbcType=VARCHAR}, original_source_url = #{record.originalSourceUrl,jdbcType=VARCHAR},
`source` = #{record.source,jdbcType=INTEGER}, `source` = #{record.source,jdbcType=INTEGER},
kind = #{record.kind,jdbcType=INTEGER} kind = #{record.kind,jdbcType=INTEGER}
...@@ -555,8 +555,8 @@ ...@@ -555,8 +555,8 @@
<if test="remark != null"> <if test="remark != null">
remark = #{remark,jdbcType=VARCHAR}, remark = #{remark,jdbcType=VARCHAR},
</if> </if>
<if test="isSetted != null"> <if test="state != null">
is_setted = #{isSetted,jdbcType=INTEGER}, `state` = #{state,jdbcType=INTEGER},
</if> </if>
<if test="originalSourceUrl != null"> <if test="originalSourceUrl != null">
original_source_url = #{originalSourceUrl,jdbcType=VARCHAR}, original_source_url = #{originalSourceUrl,jdbcType=VARCHAR},
...@@ -601,7 +601,7 @@ ...@@ -601,7 +601,7 @@
is_deleted = #{isDeleted,jdbcType=BIT}, is_deleted = #{isDeleted,jdbcType=BIT},
bid_time = #{bidTime,jdbcType=VARCHAR}, bid_time = #{bidTime,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR}, remark = #{remark,jdbcType=VARCHAR},
is_setted = #{isSetted,jdbcType=INTEGER}, `state` = #{state,jdbcType=INTEGER},
original_source_url = #{originalSourceUrl,jdbcType=VARCHAR}, original_source_url = #{originalSourceUrl,jdbcType=VARCHAR},
`source` = #{source,jdbcType=INTEGER}, `source` = #{source,jdbcType=INTEGER},
kind = #{kind,jdbcType=INTEGER}, kind = #{kind,jdbcType=INTEGER},
...@@ -628,7 +628,7 @@ ...@@ -628,7 +628,7 @@
is_deleted = #{isDeleted,jdbcType=BIT}, is_deleted = #{isDeleted,jdbcType=BIT},
bid_time = #{bidTime,jdbcType=VARCHAR}, bid_time = #{bidTime,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR}, remark = #{remark,jdbcType=VARCHAR},
is_setted = #{isSetted,jdbcType=INTEGER}, `state` = #{state,jdbcType=INTEGER},
original_source_url = #{originalSourceUrl,jdbcType=VARCHAR}, original_source_url = #{originalSourceUrl,jdbcType=VARCHAR},
`source` = #{source,jdbcType=INTEGER}, `source` = #{source,jdbcType=INTEGER},
kind = #{kind,jdbcType=INTEGER} kind = #{kind,jdbcType=INTEGER}
...@@ -688,7 +688,7 @@ ...@@ -688,7 +688,7 @@
</when> </when>
<otherwise> <otherwise>
id, `name`, cid, is_on_sale, is_std, sort, share_image, top_image, price, create_time, 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, is_setted, original_source_url, source_type, update_time, is_deleted, bid_time, remark, `state`, original_source_url,
`source`, kind, extra, images, videos, detail, original_extra `source`, kind, extra, images, videos, detail, original_extra
</otherwise> </otherwise>
</choose> </choose>
...@@ -702,6 +702,7 @@ ...@@ -702,6 +702,7 @@
limit 1 limit 1
</select> </select>
<select id="selectNameByExample" parameterType="com.wwdz.ch.db.domain.ItemExample" resultMap="StringResultMap"> <select id="selectNameByExample" parameterType="com.wwdz.ch.db.domain.ItemExample" resultMap="StringResultMap">
select select
distinct distinct
......
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