| | |
| | | import java.util.List; |
| | | |
| | | |
| | | import org.springframework.data.annotation.Id; |
| | | import org.springframework.data.mongodb.core.index.Indexed; |
| | | import org.springframework.data.mongodb.core.mapping.Document; |
| | | import org.springframework.data.mongodb.core.mapping.Field; |
| | |
| | | @Column(name = "id") |
| | | @Expose |
| | | private Long id; |
| | | |
| | | //mongodb主键 |
| | | @Id |
| | | private String mid; |
| | | |
| | | @Field |
| | | @Column(name = "rootCatId") |
| | |
| | | public void setMaterialLibTypes(String materialLibTypes) { |
| | | this.materialLibTypes = materialLibTypes; |
| | | } |
| | | |
| | | public String getMid() { |
| | | return mid; |
| | | } |
| | | |
| | | public void setMid(String mid) { |
| | | this.mid = mid; |
| | | } |
| | | } |
| | |
| | | <dependency> |
| | | <groupId>com.ks</groupId> |
| | | <artifactId>facade-lijin</artifactId> |
| | | <version>0.1.1</version> |
| | | <version>0.1.2</version> |
| | | </dependency> |
| | | |
| | | <dependency> |
| | |
| | | |
| | | |
| | | try { |
| | | LiJinExpendRecord record = goodsLijinMnager.createTBLijin(Long.parseLong(goodsId), uid, new Date(user.getCreatetime())); |
| | | LiJinExpendRecord record = goodsLijinMnager.createTBLijin(goodsId, uid, new Date(user.getCreatetime())); |
| | | String sendUrl = record.getSendUrl(); |
| | | if (StringUtil.isNullOrEmpty(sendUrl)) { |
| | | out.print(JsonUtil.loadFalseResult("礼金创建失败")); |
| | |
| | | for (String auctionIdStr : idStr) { |
| | | scanHistoryV2Service.deleteByAuctionIdAndDeviceOrUid( |
| | | StringUtil.isNullOrEmpty(uid) ? null : Long.parseLong(uid), acceptData.getDevice(), |
| | | Long.parseLong(auctionIdStr)); |
| | | auctionIdStr); |
| | | } |
| | | } else { |
| | | scanHistoryV2Service.deleteByDeviceOrUid(StringUtil.isNullOrEmpty(uid) ? null : Long.parseLong(uid), |
| | |
| | | |
| | | if (shareHistory != null) {// 有分享记录 |
| | | token = shareHistory.getTkCode(); |
| | | goods = redisManager.getTaoBaoGoodsTemp(Long.parseLong(id)); |
| | | goods = redisManager.getTaoBaoGoodsTemp(id); |
| | | if (goods == null) |
| | | try { |
| | | goods = TaoKeApiUtil.searchGoodsDetail(id); |
| | |
| | | public void run() { |
| | | try { |
| | | if (!StringUtil.isNullOrEmpty(tempUid)) |
| | | userShareGoodsGroupService.updateBrowseRecord(Long.parseLong(tempUid), Long.parseLong(id), 1); |
| | | userShareGoodsGroupService.updateBrowseRecord(Long.parseLong(tempUid), id, 1); |
| | | } catch (NumberFormatException e) { |
| | | e.printStackTrace(); |
| | | } catch (UserShareGoodsRecordException e) { |
| | |
| | | |
| | | int priceType = 1; |
| | | BigDecimal price = jdGoods.getPrice(); |
| | | ; |
| | | JDPingouInfo pinGouInfo = jdGoods.getPinGouInfo(); |
| | | if (pinGouInfo != null) { |
| | | priceType = 2; // 拼购价 |
| | |
| | | public void run() { |
| | | try { |
| | | if (!StringUtil.isNullOrEmpty(tempUid)) |
| | | userShareGoodsGroupService.updateBrowseNum(Long.parseLong(tempUid), id, |
| | | userShareGoodsGroupService.updateBrowseNum(Long.parseLong(tempUid), id+"", |
| | | Constant.SOURCE_TYPE_JD); |
| | | } catch (NumberFormatException e) { |
| | | e.printStackTrace(); |
| | |
| | | public void run() { |
| | | try { |
| | | if (!StringUtil.isNullOrEmpty(tempUid)) |
| | | userShareGoodsGroupService.updateBrowseNum(Long.parseLong(tempUid), id, |
| | | userShareGoodsGroupService.updateBrowseNum(Long.parseLong(tempUid), id+"", |
| | | Constant.SOURCE_TYPE_PDD); |
| | | } catch (NumberFormatException e) { |
| | | e.printStackTrace(); |
| | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.yeshi.fanli.entity.SystemEnum; |
| | | import com.yeshi.fanli.util.taobao.TaoBaoUtil; |
| | | import org.springframework.data.domain.Sort; |
| | | import org.springframework.data.mongodb.core.MongoTemplate; |
| | | import org.springframework.data.mongodb.core.query.Criteria; |
| | |
| | | list.add(Criteria.where("state").is(1)); |
| | | if (system != null) |
| | | list.add(Criteria.where("system").is(system)); |
| | | list.add(Criteria.where("imgList.goods.goodsId").is(goodsId)); |
| | | list.add(TaoBaoUtil.getAuctionIdEqualCriteria( "imgList.goods.goodsId",goodsId)); |
| | | list.add(Criteria.where("imgList.goods.goodsType").is(goodsType)); |
| | | |
| | | if (list.size() > 0) { |
| | |
| | | list.add(Criteria.where("type").is("single")); |
| | | if (system != null) |
| | | list.add(Criteria.where("system").is(system)); |
| | | list.add(Criteria.where("imgList.goods.goodsId").is(goodsId)); |
| | | list.add(TaoBaoUtil.getAuctionIdEqualCriteria( "imgList.goods.goodsId",goodsId)); |
| | | list.add(Criteria.where("imgList.goods.goodsType").is(goodsType)); |
| | | |
| | | if (list.size() > 0) { |
| | |
| | | List<Criteria> list = new ArrayList<Criteria>(); |
| | | list.add(Criteria.where("dynamicType").is(1)); |
| | | list.add(Criteria.where("state").is(1)); |
| | | list.add(Criteria.where("goods.goodsId").is(goodsId)); |
| | | list.add(TaoBaoUtil.getAuctionIdEqualCriteria("goods.goodsId",goodsId)); |
| | | list.add(Criteria.where("goods.goodsType").is(goodsType)); |
| | | |
| | | // 限制时间内 |
| | |
| | | import java.util.List; |
| | | import java.util.regex.Pattern; |
| | | |
| | | import com.yeshi.fanli.util.taobao.TaoBaoUtil; |
| | | import org.springframework.data.domain.Sort; |
| | | import org.springframework.data.domain.Sort.Direction; |
| | | import org.springframework.data.domain.Sort.Order; |
| | |
| | | @Repository |
| | | public class DaTaoKeGoodsDetailV2Dao extends MongodbBaseDao<DaTaoKeDetailV2> { |
| | | |
| | | public void updateSelective(DaTaoKeDetailV2 v2) { |
| | | // 计算佣金 |
| | | DaTaoKeDetailV2 old = get(v2.getId()); |
| | | if (old != null) {// 更新 |
| | | Query query = new Query(); |
| | | query.addCriteria(Criteria.where("id").is(v2.getId())); |
| | | Field[] fields = DaTaoKeDetailV2.class.getDeclaredFields(); |
| | | public void updateSelective(DaTaoKeDetailV2 v2) { |
| | | // 计算佣金 |
| | | DaTaoKeDetailV2 old = get(v2.getId()); |
| | | if (old != null) {// 更新 |
| | | Query query = new Query(); |
| | | query.addCriteria(Criteria.where("id").is(v2.getId())); |
| | | Field[] fields = DaTaoKeDetailV2.class.getDeclaredFields(); |
| | | |
| | | Update update = new Update(); |
| | | for (Field f : fields) { |
| | | f.setAccessible(true); |
| | | String name = f.getName(); |
| | | Object value = null; |
| | | try { |
| | | value = f.get(v2); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | if (value != null) |
| | | update.set(name, value); |
| | | } |
| | | update(query, update); |
| | | } |
| | | } |
| | | Update update = new Update(); |
| | | for (Field f : fields) { |
| | | f.setAccessible(true); |
| | | String name = f.getName(); |
| | | Object value = null; |
| | | try { |
| | | value = f.get(v2); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | if (value != null) |
| | | update.set(name, value); |
| | | } |
| | | update(query, update); |
| | | } |
| | | } |
| | | |
| | | public void saveWithCommision(DaTaoKeDetailV2 v2) { |
| | | v2.setUpdateTime(new Date()); |
| | | BigDecimal commision = MoneyBigDecimalUtil |
| | | .div(MoneyBigDecimalUtil.mul(v2.getActualPrice(), v2.getCommissionRate()), new BigDecimal(100)); |
| | | int commissionInt = commision.multiply(new BigDecimal(100)).intValue(); |
| | | v2.setCommission(commissionInt); |
| | | save(v2); |
| | | } |
| | | public void saveWithCommision(DaTaoKeDetailV2 v2) { |
| | | v2.setUpdateTime(new Date()); |
| | | BigDecimal commision = MoneyBigDecimalUtil |
| | | .div(MoneyBigDecimalUtil.mul(v2.getActualPrice(), v2.getCommissionRate()), new BigDecimal(100)); |
| | | int commissionInt = commision.multiply(new BigDecimal(100)).intValue(); |
| | | v2.setCommission(commissionInt); |
| | | save(v2); |
| | | } |
| | | |
| | | public DaTaoKeDetailV2 selectLatest() { |
| | | Query query = new Query(); |
| | | List<Order> orders = new ArrayList<>(); |
| | | orders.add(new Order(Direction.DESC, "createTime")); |
| | | query.with(new Sort(orders)); |
| | | query.limit(1); |
| | | List<DaTaoKeDetailV2> list = mongoTemplate.find(query, getEntityClass()); |
| | | if (list != null && list.size() > 0) |
| | | return list.get(0); |
| | | else |
| | | return null; |
| | | } |
| | | public DaTaoKeDetailV2 selectLatest() { |
| | | Query query = new Query(); |
| | | List<Order> orders = new ArrayList<>(); |
| | | orders.add(new Order(Direction.DESC, "createTime")); |
| | | query.with(new Sort(orders)); |
| | | query.limit(1); |
| | | List<DaTaoKeDetailV2> list = mongoTemplate.find(query, getEntityClass()); |
| | | if (list != null && list.size() > 0) |
| | | return list.get(0); |
| | | else |
| | | return null; |
| | | } |
| | | |
| | | public List<DaTaoKeDetailV2> listByGoodsIds(List<String> goodsIdList) { |
| | | if (goodsIdList == null || goodsIdList.size() == 0) |
| | | return null; |
| | | Query query = new Query(); |
| | | Criteria[] criterias = new Criteria[goodsIdList.size()]; |
| | | for (int i = 0; i < goodsIdList.size(); i++) { |
| | | criterias[i] = Criteria.where("goodsId").is(goodsIdList.get(i)); |
| | | } |
| | | query.addCriteria(new Criteria().orOperator(criterias)); |
| | | return mongoTemplate.find(query, getEntityClass()); |
| | | } |
| | | public List<DaTaoKeDetailV2> listByGoodsIds(List<String> goodsIdList) { |
| | | if (goodsIdList == null || goodsIdList.size() == 0) |
| | | return null; |
| | | Query query = new Query(); |
| | | Criteria[] criterias = new Criteria[goodsIdList.size()]; |
| | | for (int i = 0; i < goodsIdList.size(); i++) { |
| | | criterias[i] =TaoBaoUtil.getAuctionIdEqualCriteria("goodsId",goodsIdList.get(i)); |
| | | } |
| | | query.addCriteria(new Criteria().orOperator(criterias)); |
| | | return mongoTemplate.find(query, getEntityClass()); |
| | | } |
| | | |
| | | public List<DaTaoKeDetailV2> listByIds(List<Long> idsList) { |
| | | if (idsList == null || idsList.size() == 0) |
| | | return null; |
| | | Query query = new Query(); |
| | | Criteria[] criterias = new Criteria[idsList.size()]; |
| | | for (int i = 0; i < idsList.size(); i++) { |
| | | criterias[i] = Criteria.where("id").is(idsList.get(i)); |
| | | } |
| | | public List<DaTaoKeDetailV2> listByIds(List<Long> idsList) { |
| | | if (idsList == null || idsList.size() == 0) |
| | | return null; |
| | | Query query = new Query(); |
| | | Criteria[] criterias = new Criteria[idsList.size()]; |
| | | for (int i = 0; i < idsList.size(); i++) { |
| | | criterias[i] = Criteria.where("id").is(idsList.get(i)); |
| | | } |
| | | |
| | | query.addCriteria(new Criteria().orOperator(criterias)); |
| | | return mongoTemplate.find(query, getEntityClass()); |
| | | } |
| | | query.addCriteria(new Criteria().orOperator(criterias)); |
| | | return mongoTemplate.find(query, getEntityClass()); |
| | | } |
| | | |
| | | public List<DaTaoKeDetailV2> listByDtitle(String dtitle) { |
| | | Query query = new Query(); |
| | | query.addCriteria(Criteria.where("dtitle").is(dtitle)); |
| | | return mongoTemplate.find(query, getEntityClass()); |
| | | } |
| | | public List<DaTaoKeDetailV2> listByDtitle(String dtitle) { |
| | | Query query = new Query(); |
| | | query.addCriteria(Criteria.where("dtitle").is(dtitle)); |
| | | return mongoTemplate.find(query, getEntityClass()); |
| | | } |
| | | |
| | | public List<DaTaoKeDetailV2> listSearchByTitleWithCid(String key, Long cid, int start, int count) { |
| | | Pattern pattern = Pattern.compile("^.*" + key + ".*$", Pattern.CASE_INSENSITIVE); |
| | | List<Criteria> criteriasList = new ArrayList<>(); |
| | | criteriasList.add(Criteria.where("dtitle").regex(pattern)); |
| | | criteriasList.add(Criteria.where("title").regex(pattern)); |
| | | Criteria[] criterias = new Criteria[criteriasList.size()]; |
| | | Query query = new Query(); |
| | | if (cid != null) |
| | | query.addCriteria(new Criteria().andOperator(Criteria.where("cid").is(Integer.parseInt(cid + "")), |
| | | new Criteria().orOperator(criteriasList.toArray(criterias)))); |
| | | else |
| | | query.addCriteria(new Criteria().orOperator(criteriasList.toArray(criterias))); |
| | | query.skip(start); |
| | | query.limit(count); |
| | | return mongoTemplate.find(query, getEntityClass()); |
| | | } |
| | | public List<DaTaoKeDetailV2> listSearchByTitleWithCid(String key, Long cid, int start, int count) { |
| | | Pattern pattern = Pattern.compile("^.*" + key + ".*$", Pattern.CASE_INSENSITIVE); |
| | | List<Criteria> criteriasList = new ArrayList<>(); |
| | | criteriasList.add(Criteria.where("dtitle").regex(pattern)); |
| | | criteriasList.add(Criteria.where("title").regex(pattern)); |
| | | Criteria[] criterias = new Criteria[criteriasList.size()]; |
| | | Query query = new Query(); |
| | | if (cid != null) |
| | | query.addCriteria(new Criteria().andOperator(Criteria.where("cid").is(Integer.parseInt(cid + "")), |
| | | new Criteria().orOperator(criteriasList.toArray(criterias)))); |
| | | else |
| | | query.addCriteria(new Criteria().orOperator(criteriasList.toArray(criterias))); |
| | | query.skip(start); |
| | | query.limit(count); |
| | | return mongoTemplate.find(query, getEntityClass()); |
| | | } |
| | | |
| | | public long countSearchByTitleWithCid(String key, Long cid) { |
| | | Pattern pattern = Pattern.compile("^.*" + key + ".*$", Pattern.CASE_INSENSITIVE); |
| | | List<Criteria> criteriasList = new ArrayList<>(); |
| | | criteriasList.add(Criteria.where("dtitle").regex(pattern)); |
| | | criteriasList.add(Criteria.where("title").regex(pattern)); |
| | | Criteria[] criterias = new Criteria[criteriasList.size()]; |
| | | Query query = new Query(); |
| | | if (cid != null) |
| | | query.addCriteria(new Criteria().andOperator(Criteria.where("cid").is(Integer.parseInt(cid + "")), |
| | | new Criteria().orOperator(criteriasList.toArray(criterias)))); |
| | | else |
| | | query.addCriteria(new Criteria().orOperator(criteriasList.toArray(criterias))); |
| | | return mongoTemplate.count(query, getEntityClass()); |
| | | } |
| | | public long countSearchByTitleWithCid(String key, Long cid) { |
| | | Pattern pattern = Pattern.compile("^.*" + key + ".*$", Pattern.CASE_INSENSITIVE); |
| | | List<Criteria> criteriasList = new ArrayList<>(); |
| | | criteriasList.add(Criteria.where("dtitle").regex(pattern)); |
| | | criteriasList.add(Criteria.where("title").regex(pattern)); |
| | | Criteria[] criterias = new Criteria[criteriasList.size()]; |
| | | Query query = new Query(); |
| | | if (cid != null) |
| | | query.addCriteria(new Criteria().andOperator(Criteria.where("cid").is(Integer.parseInt(cid + "")), |
| | | new Criteria().orOperator(criteriasList.toArray(criterias)))); |
| | | else |
| | | query.addCriteria(new Criteria().orOperator(criteriasList.toArray(criterias))); |
| | | return mongoTemplate.count(query, getEntityClass()); |
| | | } |
| | | |
| | | public List<DaTaoKeDetailV2> getGoodsNotInList(Long cid, List<Long> listId, int count) { |
| | | List<Criteria> criteriasList = new ArrayList<>(); |
| | | if (cid != null) |
| | | criteriasList.add(Criteria.where("cid").is(Integer.parseInt(cid + ""))); |
| | | if (listId != null) |
| | | for (Long id : listId) |
| | | criteriasList.add(Criteria.where("id").ne(id)); |
| | | // 更新时间倒序 |
| | | List<Order> orders = new ArrayList<>(); |
| | | orders.add(new Order(Direction.DESC, "updateTime")); |
| | | public List<DaTaoKeDetailV2> getGoodsNotInList(Long cid, List<Long> listId, int count) { |
| | | List<Criteria> criteriasList = new ArrayList<>(); |
| | | if (cid != null) |
| | | criteriasList.add(Criteria.where("cid").is(Integer.parseInt(cid + ""))); |
| | | if (listId != null) |
| | | for (Long id : listId) |
| | | criteriasList.add(Criteria.where("id").ne(id)); |
| | | // 更新时间倒序 |
| | | List<Order> orders = new ArrayList<>(); |
| | | orders.add(new Order(Direction.DESC, "updateTime")); |
| | | |
| | | Criteria[] criterias = new Criteria[criteriasList.size()]; |
| | | Query query = new Query(); |
| | | query.with(new Sort(orders)); |
| | | query.addCriteria(new Criteria().andOperator(criteriasList.toArray(criterias))); |
| | | query.limit(count); |
| | | return mongoTemplate.find(query, getEntityClass()); |
| | | } |
| | | Criteria[] criterias = new Criteria[criteriasList.size()]; |
| | | Query query = new Query(); |
| | | query.with(new Sort(orders)); |
| | | query.addCriteria(new Criteria().andOperator(criteriasList.toArray(criterias))); |
| | | query.limit(count); |
| | | return mongoTemplate.find(query, getEntityClass()); |
| | | } |
| | | |
| | | /** |
| | | * 爆款商品备选库 |
| | | * |
| | | * @return |
| | | */ |
| | | public List<DaTaoKeDetailV2> listPreShareHotGoods(int start, int count, String sortName, BigDecimal minCommission) { |
| | | Query query = new Query(); |
| | | query.addCriteria(Criteria.where("commission").gt(minCommission.multiply(new BigDecimal(100)).intValue())); |
| | | /** |
| | | * 爆款商品备选库 |
| | | * |
| | | * @return |
| | | */ |
| | | public List<DaTaoKeDetailV2> listPreShareHotGoods(int start, int count, String sortName, BigDecimal minCommission) { |
| | | Query query = new Query(); |
| | | query.addCriteria(Criteria.where("commission").gt(minCommission.multiply(new BigDecimal(100)).intValue())); |
| | | |
| | | List<Order> orders = new ArrayList<>(); |
| | | orders.add(new Order(Direction.DESC, sortName)); |
| | | query.with(new Sort(orders)).skip(start); |
| | | List<Order> orders = new ArrayList<>(); |
| | | orders.add(new Order(Direction.DESC, sortName)); |
| | | query.with(new Sort(orders)).skip(start); |
| | | |
| | | query.limit(count); |
| | | return mongoTemplate.find(query, getEntityClass()); |
| | | } |
| | | query.limit(count); |
| | | return mongoTemplate.find(query, getEntityClass()); |
| | | } |
| | | |
| | | /** |
| | | * 查询删除更新时间超过一段时间的 |
| | | * |
| | | * @param minUpdateTime |
| | | * @param start |
| | | * @param count |
| | | * @return |
| | | */ |
| | | public int listAndRemoveByMinUpdateTime(Date minUpdateTime, int start, int count) { |
| | | Query query = new Query(); |
| | | query.addCriteria(Criteria.where("updateTime").lt(minUpdateTime)); |
| | | query.skip(start); |
| | | query.limit(count); |
| | | List<DaTaoKeDetailV2> list = mongoTemplate.findAllAndRemove(query, DaTaoKeDetailV2.class); |
| | | return list.size(); |
| | | } |
| | | /** |
| | | * 查询删除更新时间超过一段时间的 |
| | | * |
| | | * @param minUpdateTime |
| | | * @param start |
| | | * @param count |
| | | * @return |
| | | */ |
| | | public int listAndRemoveByMinUpdateTime(Date minUpdateTime, int start, int count) { |
| | | Query query = new Query(); |
| | | query.addCriteria(Criteria.where("updateTime").lt(minUpdateTime)); |
| | | query.skip(start); |
| | | query.limit(count); |
| | | List<DaTaoKeDetailV2> list = mongoTemplate.findAllAndRemove(query, DaTaoKeDetailV2.class); |
| | | return list.size(); |
| | | } |
| | | |
| | | public long countByMinUpdateTime(Date minUpdateTime) { |
| | | Query query = new Query(); |
| | | query.addCriteria(Criteria.where("updateTime").gt(minUpdateTime)); |
| | | return mongoTemplate.count(query, DaTaoKeDetailV2.class); |
| | | } |
| | | public long countByMinUpdateTime(Date minUpdateTime) { |
| | | Query query = new Query(); |
| | | query.addCriteria(Criteria.where("updateTime").gt(minUpdateTime)); |
| | | return mongoTemplate.count(query, DaTaoKeDetailV2.class); |
| | | } |
| | | |
| | | public List<DaTaoKeDetailV2> listByMaxPrice(Integer cid, BigDecimal maxPrice, String sortName, int start, |
| | | int count) { |
| | | Query query = new Query(); |
| | | if (cid != null) |
| | | query.addCriteria(Criteria.where("actualPrice").lt(maxPrice).andOperator(Criteria.where("cid").is(cid))); |
| | | else |
| | | query.addCriteria(Criteria.where("actualPrice").lt(maxPrice)); |
| | | public List<DaTaoKeDetailV2> listByMaxPrice(Integer cid, BigDecimal maxPrice, String sortName, int start, |
| | | int count) { |
| | | Query query = new Query(); |
| | | if (cid != null) |
| | | query.addCriteria(Criteria.where("actualPrice").lt(maxPrice).andOperator(Criteria.where("cid").is(cid))); |
| | | else |
| | | query.addCriteria(Criteria.where("actualPrice").lt(maxPrice)); |
| | | |
| | | if (!StringUtil.isNullOrEmpty(sortName)) { |
| | | List<Order> orders = new ArrayList<>(); |
| | | orders.add(new Order(Direction.DESC, sortName)); |
| | | query.with(new Sort(orders)); |
| | | } |
| | | query.skip(start); |
| | | query.limit(count); |
| | | return mongoTemplate.find(query, getEntityClass()); |
| | | } |
| | | if (!StringUtil.isNullOrEmpty(sortName)) { |
| | | List<Order> orders = new ArrayList<>(); |
| | | orders.add(new Order(Direction.DESC, sortName)); |
| | | query.with(new Sort(orders)); |
| | | } |
| | | query.skip(start); |
| | | query.limit(count); |
| | | return mongoTemplate.find(query, getEntityClass()); |
| | | } |
| | | |
| | | public long countByMaxPrice(Integer cid, BigDecimal maxPrice) { |
| | | Query query = new Query(); |
| | | if (cid != null) |
| | | query.addCriteria(Criteria.where("actualPrice").lt(maxPrice).andOperator(Criteria.where("cid").is(cid))); |
| | | else |
| | | query.addCriteria(Criteria.where("actualPrice").lt(maxPrice)); |
| | | return mongoTemplate.count(query, getEntityClass()); |
| | | } |
| | | public long countByMaxPrice(Integer cid, BigDecimal maxPrice) { |
| | | Query query = new Query(); |
| | | if (cid != null) |
| | | query.addCriteria(Criteria.where("actualPrice").lt(maxPrice).andOperator(Criteria.where("cid").is(cid))); |
| | | else |
| | | query.addCriteria(Criteria.where("actualPrice").lt(maxPrice)); |
| | | return mongoTemplate.count(query, getEntityClass()); |
| | | } |
| | | |
| | | /** |
| | | * |
| | | * @Title: listBySellerId @Description: 根据商家ID查询商品 @param start @param |
| | | * count @param sellerId @return List<DaTaoKeDetailV2> 返回类型 @throws |
| | | */ |
| | | public List<DaTaoKeDetailV2> listBySellerId(int start, int count, Long sellerId) { |
| | | Query query = new Query(); |
| | | query.addCriteria(Criteria.where("sellerId").is(sellerId)); |
| | | query.skip(start); |
| | | query.limit(count); |
| | | return mongoTemplate.find(query, DaTaoKeDetailV2.class); |
| | | } |
| | | /** |
| | | * @Title: listBySellerId @Description: 根据商家ID查询商品 @param start @param |
| | | * count @param sellerId @return List<DaTaoKeDetailV2> 返回类型 @throws |
| | | */ |
| | | public List<DaTaoKeDetailV2> listBySellerId(int start, int count, Long sellerId) { |
| | | Query query = new Query(); |
| | | query.addCriteria(Criteria.where("sellerId").is(sellerId)); |
| | | query.skip(start); |
| | | query.limit(count); |
| | | return mongoTemplate.find(query, DaTaoKeDetailV2.class); |
| | | } |
| | | |
| | | /** |
| | | * 根据商品ID检索 |
| | | * @Title: selectByAuctionId |
| | | * @Description: |
| | | * @param auctionId |
| | | * @return |
| | | * DaTaoKeDetailV2 返回类型 |
| | | * @throws |
| | | */ |
| | | public DaTaoKeDetailV2 selectByAuctionId(String auctionId) { |
| | | Query query = new Query(); |
| | | query.addCriteria(Criteria.where("goodsId").is(auctionId)); |
| | | query.limit(1); |
| | | List<DaTaoKeDetailV2> list = mongoTemplate.find(query, DaTaoKeDetailV2.class); |
| | | if (list != null && list.size() > 0) { |
| | | return list.get(0); |
| | | } else |
| | | return null; |
| | | } |
| | | /** |
| | | * 根据商品ID检索 |
| | | * |
| | | * @param auctionId |
| | | * @return DaTaoKeDetailV2 返回类型 |
| | | * @throws |
| | | * @Title: selectByAuctionId |
| | | * @Description: |
| | | */ |
| | | public DaTaoKeDetailV2 selectByAuctionId(String auctionId) { |
| | | Query query = new Query(); |
| | | query.addCriteria(TaoBaoUtil.getAuctionIdEqualCriteria("goodsId", auctionId)); |
| | | query.limit(1); |
| | | List<DaTaoKeDetailV2> list = mongoTemplate.find(query, DaTaoKeDetailV2.class); |
| | | if (list != null && list.size() > 0) { |
| | | return list.get(0); |
| | | } else |
| | | return null; |
| | | } |
| | | |
| | | } |
| | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | import com.yeshi.fanli.util.taobao.TaoBaoUtil; |
| | | import org.springframework.data.mongodb.core.query.Criteria; |
| | | import org.springframework.data.mongodb.core.query.Query; |
| | | import org.springframework.data.mongodb.core.query.Update; |
| | |
| | | @Repository |
| | | public class HDKGoodsDetailDao extends MongodbBaseDao<HDKGoodsDetail> { |
| | | |
| | | /** |
| | | * 根据商品ID检索 |
| | | * @Title: selectByAuctionId |
| | | * @Description: |
| | | * @param auctionId |
| | | * @return |
| | | * DaTaoKeDetailV2 返回类型 |
| | | * @throws |
| | | */ |
| | | public HDKGoodsDetail selectByAuctionId(Long auctionId) { |
| | | Query query = new Query(); |
| | | query.addCriteria(Criteria.where("itemid").is(auctionId)); |
| | | query.limit(1); |
| | | List<HDKGoodsDetail> list = mongoTemplate.find(query, HDKGoodsDetail.class); |
| | | if (list != null && list.size() > 0) { |
| | | return list.get(0); |
| | | } else |
| | | return null; |
| | | } |
| | | /** |
| | | * 根据商品ID检索 |
| | | * |
| | | * @param auctionId |
| | | * @return DaTaoKeDetailV2 返回类型 |
| | | * @throws |
| | | * @Title: selectByAuctionId |
| | | * @Description: |
| | | */ |
| | | public HDKGoodsDetail selectByAuctionId(String auctionId) { |
| | | Query query = new Query(); |
| | | query.addCriteria(TaoBaoUtil.getAuctionIdEqualCriteria("itemid", auctionId)); |
| | | query.limit(1); |
| | | List<HDKGoodsDetail> list = mongoTemplate.find(query, HDKGoodsDetail.class); |
| | | if (list != null && list.size() > 0) { |
| | | return list.get(0); |
| | | } else |
| | | return null; |
| | | } |
| | | |
| | | /** |
| | | * 选择更新 |
| | | * @Title: updateSelective |
| | | * @Description: |
| | | * @param goods |
| | | * void 返回类型 |
| | | * @throws |
| | | */ |
| | | /** |
| | | * 选择更新 |
| | | * |
| | | * @param goods void 返回类型 |
| | | * @throws |
| | | * @Title: updateSelective |
| | | * @Description: |
| | | */ |
| | | |
| | | public void updateSelective(HDKGoodsDetail goods) { |
| | | Query query = new Query(); |
| | | query.addCriteria(Criteria.where("_id").is(goods.getProduct_id())); |
| | | public void updateSelective(HDKGoodsDetail goods) { |
| | | Query query = new Query(); |
| | | query.addCriteria( TaoBaoUtil.getAuctionIdEqualCriteria("_id",goods.getProduct_id())); |
| | | |
| | | Update update = new Update(); |
| | | if (goods.getItemsale() != null) |
| | | update.set("itemsale", goods.getItemsale()); |
| | | if (goods.getItemsale2() != null) |
| | | update.set("itemsale2", goods.getItemsale2()); |
| | | if (goods.getTodaysale() != null) |
| | | update.set("todaysale", goods.getTodaysale()); |
| | | if (goods.getGeneral_index() != null) |
| | | update.set("general_index", goods.getGeneral_index()); |
| | | if (goods.getCouponurl() != null) |
| | | update.set("couponurl", goods.getCouponurl()); |
| | | if (goods.getCouponreceive2() != null) |
| | | update.set("couponreceive2", goods.getCouponreceive2()); |
| | | if (goods.getCouponsurplus() != null) |
| | | update.set("couponsurplus", goods.getCouponsurplus()); |
| | | if (goods.getActivityid() != null) |
| | | update.set("activityid", goods.getActivityid()); |
| | | if (goods.getCouponmoney() != null) |
| | | update.set("couponmoney", goods.getCouponmoney()); |
| | | Update update = new Update(); |
| | | if (goods.getItemsale() != null) |
| | | update.set("itemsale", goods.getItemsale()); |
| | | if (goods.getItemsale2() != null) |
| | | update.set("itemsale2", goods.getItemsale2()); |
| | | if (goods.getTodaysale() != null) |
| | | update.set("todaysale", goods.getTodaysale()); |
| | | if (goods.getGeneral_index() != null) |
| | | update.set("general_index", goods.getGeneral_index()); |
| | | if (goods.getCouponurl() != null) |
| | | update.set("couponurl", goods.getCouponurl()); |
| | | if (goods.getCouponreceive2() != null) |
| | | update.set("couponreceive2", goods.getCouponreceive2()); |
| | | if (goods.getCouponsurplus() != null) |
| | | update.set("couponsurplus", goods.getCouponsurplus()); |
| | | if (goods.getActivityid() != null) |
| | | update.set("activityid", goods.getActivityid()); |
| | | if (goods.getCouponmoney() != null) |
| | | update.set("couponmoney", goods.getCouponmoney()); |
| | | |
| | | update.set("updateTime", new Date()); |
| | | update(query, update); |
| | | } |
| | | update.set("updateTime", new Date()); |
| | | update(query, update); |
| | | } |
| | | |
| | | /** |
| | | * 批量删除 |
| | | * @Title: deleteByItemIds |
| | | * @Description: |
| | | * @param itemIds |
| | | * void 返回类型 |
| | | * @throws |
| | | */ |
| | | public void deleteByItemIds(List<Long> itemIds) { |
| | | if (itemIds == null || itemIds.size() == 0) |
| | | return; |
| | | Criteria[] ids = new Criteria[itemIds.size()]; |
| | | for (int i = 0; i < itemIds.size(); i++) |
| | | ids[i] = Criteria.where("itemid").is(itemIds.get(i)); |
| | | /** |
| | | * 批量删除 |
| | | * |
| | | * @param itemIds void 返回类型 |
| | | * @throws |
| | | * @Title: deleteByItemIds |
| | | * @Description: |
| | | */ |
| | | public void deleteByItemIds(List<Long> itemIds) { |
| | | if (itemIds == null || itemIds.size() == 0) |
| | | return; |
| | | Criteria[] ids = new Criteria[itemIds.size()]; |
| | | for (int i = 0; i < itemIds.size(); i++) |
| | | ids[i] = Criteria.where("itemid").is(itemIds.get(i)); |
| | | |
| | | Query query = new Query(); |
| | | query.addCriteria(new Criteria().orOperator(ids)); |
| | | mongoTemplate.remove(query, HDKGoodsDetail.class); |
| | | } |
| | | Query query = new Query(); |
| | | query.addCriteria(new Criteria().orOperator(ids)); |
| | | mongoTemplate.remove(query, HDKGoodsDetail.class); |
| | | } |
| | | |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | List<ScanHistoryV2> selectByDeviceOrUidAndGoodsIdAndGoodsType(@Param("uid") Long uid, |
| | | @Param("device") String device, @Param("goodsId") long goodsId); |
| | | @Param("device") String device, @Param("goodsId") String goodsId); |
| | | |
| | | |
| | | /** |
| | |
| | | /** |
| | | * 删除商品多个标签 |
| | | */ |
| | | void deleteByAuctionIdAndLabIDs(@Param("auctionId")Long auctionId, @Param("list") List<Long> list); |
| | | void deleteByAuctionIdAndLabIDs(@Param("auctionId")String auctionId, @Param("list") List<Long> list); |
| | | |
| | | |
| | | |
| | |
| | | |
| | | void insertPidUser(PidUser pidUser); |
| | | |
| | | int getAunctionPidCount(@Param("auctionId")long auctionId, @Param("pid")String pid); |
| | | int getAunctionPidCount(@Param("auctionId")String auctionId, @Param("pid")String pid); |
| | | |
| | | ShareTaoPassword getShareTaoPassword(@Param("auctionId")long auctionId, @Param("pid")String pid); |
| | | ShareTaoPassword getShareTaoPassword(@Param("auctionId")String auctionId, @Param("pid")String pid); |
| | | |
| | | void updateByPrimaryKeySelective(ShareTaoPassword shareTaoPassword); |
| | | |
| | |
| | | * @param auctionId |
| | | * @return |
| | | */ |
| | | UserShareGoodsGroup getNewestRecord (@Param("uid") Long uid, @Param("goodsId") Long goodsId, @Param("goodsType") Integer goodsType); |
| | | UserShareGoodsGroup getNewestRecord (@Param("uid") Long uid, @Param("goodsId") String goodsId, @Param("goodsType") Integer goodsType); |
| | | } |
| | |
| | | |
| | | public interface TaoBaoLinkMapper extends BaseMapper<TaoBaoLink>{ |
| | | |
| | | TaoBaoLink getTaoBaoLink(@Param("auctionId") Long auctionId, @Param("systemId") Long systemId); |
| | | TaoBaoLink getTaoBaoLink(@Param("auctionId") String auctionId, @Param("systemId") Long systemId); |
| | | |
| | | } |
| | |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.yeshi.fanli.util.taobao.TaoBaoUtil; |
| | | import org.springframework.data.domain.Sort; |
| | | import org.springframework.data.mongodb.core.query.Criteria; |
| | | import org.springframework.data.mongodb.core.query.Query; |
| | |
| | | |
| | | public void deleteByGoodsId(String goodsId) { |
| | | Query query = new Query(); |
| | | Criteria ca = Criteria.where("goods.auctionId").is(goodsId); |
| | | Criteria ca = TaoBaoUtil.getAuctionIdEqualCriteria("goods.auctionId",goodsId); |
| | | query.addCriteria(ca); |
| | | |
| | | List<ShareHotGoods> list = mongoTemplate.find(query, ShareHotGoods.class); |
| | |
| | | |
| | | public List<ShareHotGoods> listByAuctionId(String auctionid) { |
| | | Query query = new Query(); |
| | | Criteria ca = Criteria.where("goods.auctionId").is(auctionid); |
| | | Criteria ca = TaoBaoUtil.getAuctionIdEqualCriteria("goods.auctionId",auctionid); |
| | | query.addCriteria(ca); |
| | | return mongoTemplate.find(query, ShareHotGoods.class); |
| | | } |
| | |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.yeshi.fanli.util.taobao.TaoBaoUtil; |
| | | import org.springframework.data.domain.Sort; |
| | | import org.springframework.data.mongodb.core.query.Criteria; |
| | | import org.springframework.data.mongodb.core.query.Query; |
| | |
| | | |
| | | public void deleteByGoodsId(String goodsId) { |
| | | Query query = new Query(); |
| | | Criteria ca = Criteria.where("goods.auctionId").is(goodsId); |
| | | Criteria ca = TaoBaoUtil.getAuctionIdEqualCriteria("goods.auctionId",goodsId); |
| | | query.addCriteria(ca); |
| | | |
| | | List<TLJBuyGoods> list = mongoTemplate.find(query, TLJBuyGoods.class); |
| | |
| | | |
| | | public List<TLJBuyGoods> listByAuctionId(String auctionid) { |
| | | Query query = new Query(); |
| | | Criteria ca = Criteria.where("goods.auctionId").is(auctionid); |
| | | Criteria ca =TaoBaoUtil.getAuctionIdEqualCriteria("goods.auctionId",auctionid); |
| | | query.addCriteria(ca); |
| | | return mongoTemplate.find(query, TLJBuyGoods.class); |
| | | } |
| | |
| | | */ |
| | | public void deleteByAuctionId(String auctionId) { |
| | | Query query = new Query(); |
| | | Criteria ca = Criteria.where("goods.auctionId").is(auctionId); |
| | | Criteria ca = TaoBaoUtil.getAuctionIdEqualCriteria("goods.auctionId",auctionId) ; |
| | | query.addCriteria(ca); |
| | | mongoTemplate.findAndRemove(query, TLJBuyGoods.class); |
| | | } |
| | |
| | | |
| | | public TLJBuyGoods selectByAuctionIdAndDay(String auctionId, String day) { |
| | | Query query = new Query(); |
| | | Criteria ca = Criteria.where("goods.auctionId").is(auctionId).and("day").is(day); |
| | | Criteria ca = TaoBaoUtil.getAuctionIdEqualCriteria("goods.auctionId",auctionId).and("day").is(day); |
| | | query.addCriteria(ca); |
| | | return mongoTemplate.findOne(query, TLJBuyGoods.class); |
| | | } |
| | |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.yeshi.fanli.util.taobao.TaoBaoUtil; |
| | | import org.springframework.data.domain.Sort; |
| | | import org.springframework.data.mongodb.core.query.Criteria; |
| | | import org.springframework.data.mongodb.core.query.Query; |
| | |
| | | @Repository |
| | | public class TLJFreeBuyGoodsDao extends MongodbBaseDao<TLJFreeBuyGoods> { |
| | | |
| | | public List<TLJFreeBuyGoods> listByDay(String day, int page, int pageSize) { |
| | | Query query = new Query(); |
| | | Criteria ca = Criteria.where("day").is(day); |
| | | query.addCriteria(ca); |
| | | query.limit(pageSize); |
| | | query.skip((page - 1) * pageSize).with(new Sort(Sort.Direction.DESC, "updateTime")); |
| | | return mongoTemplate.find(query, TLJFreeBuyGoods.class); |
| | | } |
| | | public List<TLJFreeBuyGoods> listByDay(String day, int page, int pageSize) { |
| | | Query query = new Query(); |
| | | Criteria ca = Criteria.where("day").is(day); |
| | | query.addCriteria(ca); |
| | | query.limit(pageSize); |
| | | query.skip((page - 1) * pageSize).with(new Sort(Sort.Direction.DESC, "updateTime")); |
| | | return mongoTemplate.find(query, TLJFreeBuyGoods.class); |
| | | } |
| | | |
| | | public long countByDay(String day) { |
| | | Query query = new Query(); |
| | | Criteria ca = Criteria.where("day").is(day); |
| | | query.addCriteria(ca); |
| | | return mongoTemplate.count(query, TLJFreeBuyGoods.class); |
| | | } |
| | | public long countByDay(String day) { |
| | | Query query = new Query(); |
| | | Criteria ca = Criteria.where("day").is(day); |
| | | query.addCriteria(ca); |
| | | return mongoTemplate.count(query, TLJFreeBuyGoods.class); |
| | | } |
| | | |
| | | |
| | | public List<TLJFreeBuyGoods> listByGoodsId(String auctionid) { |
| | | Query query = new Query(); |
| | | Criteria ca = Criteria.where("goods.auctionId").is(auctionid); |
| | | query.addCriteria(ca); |
| | | return mongoTemplate.find(query, TLJFreeBuyGoods.class); |
| | | } |
| | | |
| | | public TLJFreeBuyGoods selectByAuctionIdAndDay(String auctionId, String day) { |
| | | Query query = new Query(); |
| | | Criteria ca = Criteria.where("goods.auctionId").is(auctionId).and("day").is(day); |
| | | query.addCriteria(ca); |
| | | return mongoTemplate.findOne(query, TLJFreeBuyGoods.class); |
| | | } |
| | | public List<TLJFreeBuyGoods> listByGoodsId(String auctionid) { |
| | | Query query = new Query(); |
| | | query.addCriteria(TaoBaoUtil.getAuctionIdEqualCriteria("goods.auctionId",auctionid)); |
| | | |
| | | /** |
| | | * 根据商品ID删除 |
| | | * |
| | | * @param auctionId |
| | | */ |
| | | public void deleteByGoodsId(String auctionId) { |
| | | Query query = new Query(); |
| | | Criteria ca = Criteria.where("goods.auctionId").is(auctionId); |
| | | query.addCriteria(ca); |
| | | mongoTemplate.findAndRemove(query, TLJFreeBuyGoods.class); |
| | | } |
| | | return mongoTemplate.find(query, TLJFreeBuyGoods.class); |
| | | } |
| | | |
| | | public TLJFreeBuyGoods selectByAuctionIdAndDay(String auctionId, String day) { |
| | | Query query = new Query(); |
| | | query.addCriteria(TaoBaoUtil.getAuctionIdEqualCriteria("goods.auctionId",auctionId).and("day").is(day)); |
| | | return mongoTemplate.findOne(query, TLJFreeBuyGoods.class); |
| | | } |
| | | |
| | | /** |
| | | * 根据商品ID删除 |
| | | * |
| | | * @param auctionId |
| | | */ |
| | | public void deleteByGoodsId(String auctionId) { |
| | | Query query = new Query(); |
| | | query.addCriteria(TaoBaoUtil.getAuctionIdEqualCriteria("goods.auctionId",auctionId)); |
| | | mongoTemplate.findAndRemove(query, TLJFreeBuyGoods.class); |
| | | } |
| | | |
| | | } |
| | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | import com.yeshi.fanli.util.taobao.TaoBaoUtil; |
| | | import org.springframework.data.mongodb.core.query.Criteria; |
| | | import org.springframework.data.mongodb.core.query.Query; |
| | | import org.springframework.stereotype.Repository; |
| | |
| | | @Repository |
| | | public class TaoBaoGoodsUpdateDao extends MongodbBaseDao<TaoBaoGoodsBrief> { |
| | | |
| | | /** |
| | | * 根据商品ID删除 |
| | | * |
| | | * @param auctionid |
| | | */ |
| | | public void deleteByAuctionId(Long auctionid) { |
| | | Query query = new Query(); |
| | | Criteria ca = Criteria.where("auctionId").is(auctionid); |
| | | query.addCriteria(ca); |
| | | mongoTemplate.remove(query, TaoBaoGoodsBrief.class); |
| | | } |
| | | /** |
| | | * 根据商品ID删除 |
| | | * |
| | | * @param auctionId |
| | | */ |
| | | public void deleteByAuctionId(String auctionId) { |
| | | Query query = new Query(); |
| | | query.addCriteria(TaoBaoUtil.getAuctionIdEqualCriteria("goodsId",auctionId)); |
| | | mongoTemplate.remove(query, TaoBaoGoodsBrief.class); |
| | | } |
| | | |
| | | /** |
| | | * 根据商品ID获取 |
| | | * |
| | | * @param auctionid |
| | | * @return |
| | | */ |
| | | public TaoBaoGoodsBrief selectByAuctionId(Long auctionid) { |
| | | Query query = new Query(); |
| | | Criteria ca = Criteria.where("auctionId").is(auctionid); |
| | | query.addCriteria(ca); |
| | | return mongoTemplate.findOne(query, TaoBaoGoodsBrief.class); |
| | | } |
| | | /** |
| | | * 根据商品ID获取 |
| | | * |
| | | * @param auctionid |
| | | * @return |
| | | */ |
| | | public TaoBaoGoodsBrief selectByAuctionId(String auctionId) { |
| | | Query query = new Query(); |
| | | query.addCriteria(TaoBaoUtil.getAuctionIdEqualCriteria("auctionId",auctionId)); |
| | | |
| | | /** |
| | | * 批量查询 |
| | | * |
| | | * @param auctionIds |
| | | * @return |
| | | */ |
| | | public List<TaoBaoGoodsBrief> listByAuctionIds(List<String> auctionIds) { |
| | | if (auctionIds == null || auctionIds.size() == 0) |
| | | return null; |
| | | Query query = new Query(); |
| | | Criteria ca = new Criteria(); |
| | | Criteria[] cas = new Criteria[auctionIds.size()]; |
| | | for (int i = 0; i < auctionIds.size(); i++) { |
| | | cas[i] = Criteria.where("auctionId").is(auctionIds.get(i)); |
| | | } |
| | | query.addCriteria(ca.orOperator(cas)); |
| | | return mongoTemplate.find(query, TaoBaoGoodsBrief.class); |
| | | } |
| | | |
| | | /** |
| | | * 查询删除数据 |
| | | * |
| | | * @param date |
| | | * @param start |
| | | * @param count |
| | | * @return |
| | | */ |
| | | public int listAndRemoveByMaxUpdateTime(Date date, int start, int count) { |
| | | BasicDBObject fieldsObject = new BasicDBObject(); |
| | | fieldsObject.put("auctionId", 1); |
| | | Query query = new Query(); |
| | | // 时区问题,需加8小时 |
| | | Criteria ca = Criteria.where("updatetime").lt(new Date(date.getTime() + 1000 * 60 * 60 * 8L)); |
| | | query.skip(start); |
| | | query.limit(count); |
| | | query.addCriteria(ca); |
| | | List<TaoBaoGoodsBrief> goodsList = mongoTemplate.findAllAndRemove(query, TaoBaoGoodsBrief.class); |
| | | return goodsList.size(); |
| | | } |
| | | return mongoTemplate.findOne(query, TaoBaoGoodsBrief.class); |
| | | } |
| | | |
| | | /** |
| | | * 根据最大更新时间获取数据条数 |
| | | * |
| | | * @param date |
| | | * @return |
| | | */ |
| | | public long countByMaxUpdateTime(Date date) { |
| | | Query query = new Query(); |
| | | Criteria ca = Criteria.where("updatetime").lt(date); |
| | | query.addCriteria(ca); |
| | | return mongoTemplate.count(query, TaoBaoGoodsBrief.class); |
| | | } |
| | | /** |
| | | * 批量查询 |
| | | * |
| | | * @param auctionIds |
| | | * @return |
| | | */ |
| | | public List<TaoBaoGoodsBrief> listByAuctionIds(List<String> auctionIds) { |
| | | if (auctionIds == null || auctionIds.size() == 0) |
| | | return null; |
| | | Query query = new Query(); |
| | | Criteria ca = new Criteria(); |
| | | Criteria[] cas = new Criteria[auctionIds.size()]; |
| | | for (int i = 0; i < auctionIds.size(); i++) { |
| | | cas[i] = TaoBaoUtil.getAuctionIdEqualCriteria("auctionId", auctionIds.get(i)); |
| | | } |
| | | query.addCriteria(ca.orOperator(cas)); |
| | | return mongoTemplate.find(query, TaoBaoGoodsBrief.class); |
| | | } |
| | | |
| | | /** |
| | | * 查询删除数据 |
| | | * |
| | | * @param date |
| | | * @param start |
| | | * @param count |
| | | * @return |
| | | */ |
| | | public int listAndRemoveByMaxUpdateTime(Date date, int start, int count) { |
| | | BasicDBObject fieldsObject = new BasicDBObject(); |
| | | fieldsObject.put("auctionId", 1); |
| | | Query query = new Query(); |
| | | // 时区问题,需加8小时 |
| | | Criteria ca = Criteria.where("updatetime").lt(new Date(date.getTime() + 1000 * 60 * 60 * 8L)); |
| | | query.skip(start); |
| | | query.limit(count); |
| | | query.addCriteria(ca); |
| | | List<TaoBaoGoodsBrief> goodsList = mongoTemplate.findAllAndRemove(query, TaoBaoGoodsBrief.class); |
| | | return goodsList.size(); |
| | | } |
| | | |
| | | /** |
| | | * 根据最大更新时间获取数据条数 |
| | | * |
| | | * @param date |
| | | * @return |
| | | */ |
| | | public long countByMaxUpdateTime(Date date) { |
| | | Query query = new Query(); |
| | | Criteria ca = Criteria.where("updatetime").lt(date); |
| | | query.addCriteria(ca); |
| | | return mongoTemplate.count(query, TaoBaoGoodsBrief.class); |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.yeshi.fanli.util.taobao.TaoBaoUtil; |
| | | import org.springframework.data.mongodb.core.query.Criteria; |
| | | import org.springframework.data.mongodb.core.query.Query; |
| | | import org.springframework.stereotype.Repository; |
| | |
| | | @Repository |
| | | public class UserTLJBuyHistoryDao extends MongodbBaseDao<UserTLJBuyHistory> { |
| | | |
| | | public List<UserTLJBuyHistory> listByDayAndUidAndAuctionId(Long uid, String auctionId, String day) { |
| | | Query query = new Query(); |
| | | query.addCriteria(Criteria.where("uid").is(uid).andOperator(Criteria.where("auctionId").is(auctionId), |
| | | Criteria.where("day").is(day))); |
| | | return mongoTemplate.find(query, UserTLJBuyHistory.class); |
| | | } |
| | | public List<UserTLJBuyHistory> listByDayAndUidAndAuctionId(Long uid, String auctionId, String day) { |
| | | Query query = new Query(); |
| | | query.addCriteria(Criteria.where("uid").is(uid).andOperator(TaoBaoUtil.getAuctionIdEqualCriteria("auctionId",auctionId), |
| | | Criteria.where("day").is(day))); |
| | | return mongoTemplate.find(query, UserTLJBuyHistory.class); |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | private UserInfo userInfo; |
| | | |
| | | private Long auctionId; |
| | | private String auctionId; |
| | | |
| | | private BigDecimal payMoney; |
| | | |
| | |
| | | return urank; |
| | | } |
| | | |
| | | public Long getAuctionId() { |
| | | public String getAuctionId() { |
| | | return auctionId; |
| | | } |
| | | |
| | | public void setAuctionId(Long auctionId) { |
| | | public void setAuctionId(String auctionId) { |
| | | this.auctionId = auctionId; |
| | | } |
| | | |
| | |
| | | private String createTime; // 创建时间 |
| | | private String clickTime; // 点击时间 |
| | | private String title; // 商品名称 |
| | | private Long auctionId; // 商品ID |
| | | private String auctionId; // 商品ID |
| | | private String managerWangWang; // 掌柜旺旺 |
| | | private String shop; // 所属店铺 |
| | | private Integer count; // 商品数 |
| | |
| | | this.title = title; |
| | | } |
| | | |
| | | public Long getAuctionId() { |
| | | public String getAuctionId() { |
| | | return auctionId; |
| | | } |
| | | |
| | | public void setAuctionId(Long auctionId) { |
| | | public void setAuctionId(String auctionId) { |
| | | this.auctionId = auctionId; |
| | | } |
| | | |
| | |
| | | |
| | | public class OrderVital { |
| | | |
| | | private long auctionId;//商品ID。多个中任选一个 |
| | | private String auctionId;//商品ID。多个中任选一个 |
| | | private String orderId; //订单编号 |
| | | private BigDecimal money;//订单总金额 |
| | | private BigDecimal yongjin; //总佣金 |
| | |
| | | public void setHb(BigDecimal hb) { |
| | | this.hb = hb; |
| | | } |
| | | public long getAuctionId() { |
| | | public String getAuctionId() { |
| | | return auctionId; |
| | | } |
| | | public void setAuctionId(long auctionId) { |
| | | public void setAuctionId(String auctionId) { |
| | | this.auctionId = auctionId; |
| | | } |
| | | public String getOrderId() { |
| | |
| | | /** |
| | | * 商品id |
| | | */ |
| | | private Long auctionId; |
| | | private String auctionId; |
| | | |
| | | /** |
| | | * pid |
| | |
| | | this.id = id; |
| | | } |
| | | |
| | | public Long getAuctionId() { |
| | | public String getAuctionId() { |
| | | return auctionId; |
| | | } |
| | | |
| | | public void setAuctionId(Long auctionId) { |
| | | public void setAuctionId(String auctionId) { |
| | | this.auctionId = auctionId; |
| | | } |
| | | |
| | |
| | | @Column(name = "tog_price") |
| | | private String price;// 价格 |
| | | @Column(name = "tog_goods_id") |
| | | private Long goodsId;// 商品ID |
| | | private String goodsId;// 商品ID |
| | | @Column(name = "tog_link") |
| | | private String link;// 链接 |
| | | @Column(name = "tog_create_time") |
| | |
| | | this.price = price; |
| | | } |
| | | |
| | | public Long getGoodsId() { |
| | | public String getGoodsId() { |
| | | return goodsId; |
| | | } |
| | | |
| | | public void setGoodsId(Long goodsId) { |
| | | public void setGoodsId(String goodsId) { |
| | | this.goodsId = goodsId; |
| | | } |
| | | |
| | |
| | | |
| | | //获取自有礼金 |
| | | try { |
| | | BigDecimal money = lijinCreateService.getTBLijinAmount(Long.parseLong(goodsInfoVO.getGoodsId()), rank); |
| | | BigDecimal money = lijinCreateService.getTBLijinAmount(goodsInfoVO.getGoodsId(), rank); |
| | | GoodsHongBaoListVO price = loadLijinInfo(money, goodsInfoVO, userLevelVO); |
| | | price.setId(GoodsHongBaoListVO.TYPE_LIJIN_OWN); |
| | | lijinList.add(price); |
| | |
| | | |
| | | |
| | | //获取链接 |
| | | List<LiJinProviderLink> links = liJinLinkService.getValidLijinLink(Long.parseLong(goodsInfoVO.getGoodsId()), 1, 10); |
| | | List<LiJinProviderLink> links = liJinLinkService.getValidLijinLink(goodsInfoVO.getGoodsId(), 1, 10); |
| | | if (links != null) |
| | | for (LiJinProviderLink link : links) { |
| | | BigDecimal money = link.getMoney(); |
| | |
| | | } |
| | | |
| | | |
| | | public LiJinExpendRecord createTBLijin(Long auctionId, Long uid, Date registDate) throws LiJinException, LiJinGoodsException, LiJinAmountException, LiJinUserException { |
| | | public LiJinExpendRecord createTBLijin(String auctionId, Long uid, Date registDate) throws LiJinException, LiJinGoodsException, LiJinAmountException, LiJinUserException { |
| | | return lijinCreateService.createTBLijin(getUid(uid), registDate, auctionId); |
| | | } |
| | | |
| | |
| | | boolean isUpdate = false; |
| | | String auctionId = taoBaoGoodsBrief.getAuctionId(); |
| | | for (TaoBaoGoodsBrief goods : listGoods) { |
| | | if (goods.getAuctionId().equals(auctionId) || goods.getAuctionId() == auctionId) { |
| | | if (TaoBaoUtil.isEqual( goods.getAuctionId(),auctionId)) { |
| | | listNew.add(goods); |
| | | isUpdate = true; |
| | | break; |
| | |
| | | } |
| | | for (SystemEnum system : SystemEnum.values()) { |
| | | List<GoodsEvaluate> queryExist = goodsEvaluateDao.queryExist(Constant.SOURCE_TYPE_TAOBAO, |
| | | goods.getAuctionId() + "", system); |
| | | goods.getAuctionId(), system); |
| | | if (queryExist == null || queryExist.size() == 0) { |
| | | continue; |
| | | } |
| | |
| | | } |
| | | |
| | | @Override |
| | | public void deleteByAuctionIdAndDeviceOrUid(Long uid, String device, Long auctionId) { |
| | | public void deleteByAuctionIdAndDeviceOrUid(Long uid, String device, String auctionId) { |
| | | if (uid == null && StringUtil.isNullOrEmpty(device)) |
| | | return; |
| | | List<ScanHistoryV2> list = scanHistoryV2Mapper.selectByDeviceOrUidAndGoodsIdAndGoodsType(uid, device, |
| | |
| | | } |
| | | |
| | | @Override |
| | | public int getAunctionPidCount(long auctionId, String pid) { |
| | | public int getAunctionPidCount(String auctionId, String pid) { |
| | | return shareMapper.getAunctionPidCount(auctionId, pid); |
| | | } |
| | | |
| | | @Override |
| | | public ShareTaoPassword getShareTaoPassword(long auctionId, String pid) { |
| | | public ShareTaoPassword getShareTaoPassword(String auctionId, String pid) { |
| | | return shareMapper.getShareTaoPassword(auctionId, pid); |
| | | } |
| | | |
| | |
| | | private TaoBaoLinkMapper taoBaoLinkMapper; |
| | | |
| | | |
| | | public TaoBaoLink find(long auctionId, BusinessSystem system) { |
| | | public TaoBaoLink find(String auctionId, BusinessSystem system) { |
| | | if (system == null) { |
| | | return null; |
| | | } |
| | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.yeshi.fanli.entity.SystemEnum; |
| | | import com.yeshi.fanli.util.taobao.TaoBaoUtil; |
| | | import org.springframework.context.annotation.Lazy; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | |
| | | if (goods != null) { |
| | | try { |
| | | if (userSystemCouponService.updateCouponRecordUsed(commonOrder.getUserInfo().getId(), |
| | | commonOrder.getOrderNo(), payMent, Long.parseLong(goods.getGoodsId()), commonOrder.getSourceType())) |
| | | commonOrder.getOrderNo(), payMent, goods.getGoodsId(), commonOrder.getSourceType())) |
| | | mianDanMoney = payMent; |
| | | } catch (NumberFormatException e) { |
| | | throw new HongBaoException(10, "免单商品处理出错"); |
| | |
| | | |
| | | HongBao hb = new HongBao(); |
| | | if (goods != null) |
| | | hb.setAuctionId(Long.parseLong(goods.getGoodsId())); |
| | | hb.setAuctionId(TaoBaoUtil.getAuctionId(goods.getGoodsId())); |
| | | hb.setUserInfo(hongBao.getUserInfo()); |
| | | hb.setMoney(hongBao.getMoney()); |
| | | |
| | |
| | | |
| | | try { |
| | | if (userSystemCouponService.updateCouponRecordUsed(commonOrder.getUserInfo().getId(), |
| | | commonOrder.getOrderNo(), payMent, Long.parseLong(goods.getGoodsId()),commonOrder.getSourceType())) |
| | | commonOrder.getOrderNo(), payMent, goods.getGoodsId(),commonOrder.getSourceType())) |
| | | mianDanMoney = payMent; |
| | | } catch (NumberFormatException e) { |
| | | throw new HongBaoException(10, "免单商品处理出错"); |
| | |
| | | return; |
| | | } |
| | | goods.setUpdatetime(new Date()); |
| | | goods.setMid(goods.getAuctionId()); |
| | | taoBaoGoodsUpdateDao.save(goods); |
| | | taoBaoGoodsCacheUtil.addUpdateHistory(goods.getAuctionId()); |
| | | } |
| | |
| | | * @param device |
| | | * @param auctionId |
| | | */ |
| | | public void deleteByAuctionIdAndDeviceOrUid(Long uid, String device, Long auctionId); |
| | | public void deleteByAuctionIdAndDeviceOrUid(Long uid, String device, String auctionId); |
| | | |
| | | /** |
| | | * 添加京东商品足迹记录 |
| | |
| | | |
| | | void insertPidUser(PidUser pidUser); |
| | | |
| | | int getAunctionPidCount(long auctionId, String pid); |
| | | int getAunctionPidCount(String auctionId, String pid); |
| | | |
| | | ShareTaoPassword getShareTaoPassword(long auctionId, String pid); |
| | | ShareTaoPassword getShareTaoPassword(String auctionId, String pid); |
| | | |
| | | void updateByPrimaryKeySelective(ShareTaoPassword shareTaoPassword); |
| | | |
| | |
| | | |
| | | public interface TaoBaoLinkService { |
| | | |
| | | TaoBaoLink find(long auctionId, BusinessSystem system); |
| | | TaoBaoLink find(String auctionId, BusinessSystem system); |
| | | |
| | | } |
| | |
| | | * @param auctionId |
| | | * @return |
| | | */ |
| | | public UserShareGoodsGroup getNewestRecord(Long uid, Long auctionId, Integer goodsType); |
| | | public UserShareGoodsGroup getNewestRecord(Long uid, String auctionId, Integer goodsType); |
| | | |
| | | |
| | | /** |
| | |
| | | * @param count |
| | | * @throws UserShareGoodsRecordException |
| | | */ |
| | | public void updateBrowseRecord(Long uid, Long auctionId, int count) throws UserShareGoodsRecordException; |
| | | public void updateBrowseRecord(Long uid, String auctionId, int count) throws UserShareGoodsRecordException; |
| | | |
| | | /** |
| | | * 记录浏览次数 |
| | |
| | | * @param goodsType |
| | | * @throws UserShareGoodsRecordException |
| | | */ |
| | | public void updateBrowseNum(Long uid, Long id, int goodsType) throws UserShareGoodsRecordException; |
| | | public void updateBrowseNum(Long uid, String id, int goodsType) throws UserShareGoodsRecordException; |
| | | } |
| | |
| | | * @throws Exception |
| | | */ |
| | | public boolean updateCouponRecordUsed(Long uid, String orderNo, BigDecimal payment, |
| | | Long auctionId , Integer sourceType) throws Exception; |
| | | String auctionId , Integer sourceType) throws Exception; |
| | | |
| | | /** |
| | | * 订单退款更新 券记录状态并退回券 |
| | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.yeshi.fanli.entity.SystemEnum; |
| | | import com.yeshi.fanli.util.taobao.TaoBaoUtil; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import com.yeshi.fanli.dao.mybatis.HongBaoV2Mapper; |
| | |
| | | if (goods != null) { |
| | | try { |
| | | if (userSystemCouponService.updateCouponRecordUsed(commonOrder.getUserInfo().getId(), |
| | | commonOrder.getOrderNo(), payMent, Long.parseLong(goods.getGoodsId()), commonOrder.getSourceType())) |
| | | commonOrder.getOrderNo(), payMent, goods.getGoodsId(), commonOrder.getSourceType())) |
| | | mianDanMoney = payMent; |
| | | } catch (NumberFormatException e) { |
| | | throw new HongBaoException(10, "免单商品处理出错"); |
| | |
| | | |
| | | HongBao hb = new HongBao(); |
| | | if (goods != null) |
| | | hb.setAuctionId(Long.parseLong(goods.getGoodsId())); |
| | | hb.setAuctionId(TaoBaoUtil.getAuctionId(goods.getGoodsId())); |
| | | hb.setUserInfo(hongBao.getUserInfo()); |
| | | hb.setMoney(hongBao.getMoney()); |
| | | |
| | |
| | | |
| | | @Override |
| | | public int compare(HongBao o1, HongBao o2) { |
| | | return o1.getAuctionId().longValue() == o2.getAuctionId() ? o1.getPayMoney().compareTo(o2.getPayMoney()) |
| | | : (int) ((o1.getAuctionId() - o2.getAuctionId()) |
| | | / Math.abs(o1.getAuctionId() - o2.getAuctionId())); |
| | | return TaoBaoUtil.isEqual( o1.getAuctionId(), o2.getAuctionId()) ? o1.getPayMoney().compareTo(o2.getPayMoney()) |
| | | : o1.getAuctionId().compareTo(o2.getAuctionId()); |
| | | } |
| | | }; |
| | | |
| | |
| | | |
| | | @Override |
| | | public int compare(HongBao o1, HongBao o2) { |
| | | return o1.getAuctionId().longValue() == o2.getAuctionId() ? o1.getPayMoney().compareTo(o2.getPayMoney()) |
| | | : (int) ((o1.getAuctionId() - o2.getAuctionId()) |
| | | / Math.abs(o1.getAuctionId() - o2.getAuctionId())); |
| | | return TaoBaoUtil.isEqual( o1.getAuctionId(), o2.getAuctionId()) ? o1.getPayMoney().compareTo(o2.getPayMoney()) |
| | | : o1.getAuctionId().compareTo(o2.getAuctionId()); |
| | | } |
| | | }; |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | public TaoBaoGoodsBrief getTaoBaoGoodsTemp(Long auctionId) { |
| | | public TaoBaoGoodsBrief getTaoBaoGoodsTemp(String auctionId) { |
| | | String key = RedisKeyEnum.getRedisKey(RedisKeyEnum.taobaoGoodsTemp, auctionId + ""); |
| | | String value = getCommonString(key); |
| | | if (!StringUtil.isNullOrEmpty(value)) { |
| | |
| | | * |
| | | * @param auctionId |
| | | */ |
| | | public void deleteTaoBaoGoodsBrief(Long auctionId) { |
| | | public void deleteTaoBaoGoodsBrief(String auctionId) { |
| | | String key = RedisKeyEnum.getRedisKey(RedisKeyEnum.taobaoGoods, auctionId + ""); |
| | | if (Constant.IS_OUTNET) |
| | | removeKey(key); |
| | |
| | | * @param auctionId |
| | | * @return |
| | | */ |
| | | public List<String> getTBImg(Long auctionId) { |
| | | public List<String> getTBImg(String auctionId) { |
| | | String key = RedisKeyEnum.getRedisKey(RedisKeyEnum.taobaoImgs, auctionId + ""); |
| | | String value = ""; |
| | | if (Constant.IS_OUTNET) |
| | |
| | | } |
| | | |
| | | public static HongBao createHongBao(BigDecimal money, String param, Long orderId, HongBao parent, UserInfo userInfo, |
| | | int type, BigDecimal payMoney, Long auctionId) { |
| | | int type, BigDecimal payMoney, String auctionId) { |
| | | return createHongBao(money, param, orderId, parent, userInfo, null, type, payMoney, auctionId); |
| | | } |
| | | |
| | | public static HongBao createHongBao(BigDecimal money, String param, Long orderId, HongBao parent, UserInfo userInfo, |
| | | Long preGettime, int type, BigDecimal payMoney, Long auctionId) { |
| | | Long preGettime, int type, BigDecimal payMoney, String auctionId) { |
| | | HongBao hongBao = new HongBao(); |
| | | long timeMillis = System.currentTimeMillis(); |
| | | hongBao.setCreatetime(timeMillis); |
| | |
| | | GoodsDetailVO goodsInfo = new GoodsDetailVO(); |
| | | goodsInfo.setBaoyou(true); |
| | | goodsInfo.setGoodsType(Constant.SOURCE_TYPE_TAOBAO); |
| | | goodsInfo.setGoodsId(goods.getAuctionId() + ""); |
| | | goodsInfo.setGoodsId(goods.getAuctionId() ); |
| | | goodsInfo.setTitle(goods.getTitle()); |
| | | goodsInfo.setSalesType(1); // 默认月销量 |
| | | goodsInfo.setZkPrice(goods.getZkPrice()); |
| | |
| | | import org.jsoup.nodes.Element; |
| | | import org.jsoup.select.Elements; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.data.mongodb.core.query.Criteria; |
| | | import org.springframework.stereotype.Component; |
| | | import org.w3c.dom.NamedNodeMap; |
| | | import org.w3c.dom.NodeList; |
| | |
| | | return false; |
| | | } |
| | | |
| | | public static boolean isEqual(String auctionId1,String auctionId2){ |
| | | /** |
| | | * @return boolean |
| | | * @author hxh |
| | | * @description 判断淘宝商品ID是否相等 |
| | | * @date 14:55 2022/8/24 |
| | | * @param: auctionId1 |
| | | * @param: auctionId2 |
| | | **/ |
| | | public static boolean isEqual(String auctionId1, String auctionId2) { |
| | | if (auctionId1 == null || auctionId2 == null) { |
| | | return false; |
| | | } |
| | | |
| | | if (auctionId1.indexOf("-") > 0 && auctionId2.indexOf("-") > 0) { |
| | | return auctionId1.split("-")[1].equals(auctionId2.split("-")[1]); |
| | | } |
| | | return auctionId1.equals(auctionId2); |
| | | } |
| | | |
| | | /** |
| | | * @return java.lang.String |
| | | * @author hxh |
| | | * @description 获取商品ID的后半段 |
| | | * @date 15:20 2022/8/24 |
| | | * @param: auctionId |
| | | **/ |
| | | public static String getAuctionId(String auctionId) { |
| | | if (auctionId == null) |
| | | return auctionId; |
| | | if (auctionId.indexOf("-") > 0) { |
| | | return auctionId.split("-")[1]; |
| | | } else { |
| | | return auctionId; |
| | | } |
| | | |
| | | } |
| | | |
| | | /** |
| | | * @author hxh |
| | | * @description 获取mongodb商品ID相同的条件 |
| | | * @date 16:05 2022/8/24 |
| | | * @param: key |
| | | * @param: auctionId |
| | | * @return org.springframework.data.mongodb.core.query.Criteria |
| | | **/ |
| | | public static Criteria getAuctionIdEqualCriteria(String key, String auctionId) { |
| | | if (!isNewAuctionId(auctionId)) { |
| | | return Criteria.where(key).is(auctionId); |
| | | } else { |
| | | return Criteria.where(key).regex("*-" + getAuctionId(auctionId)); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * @return boolean |
| | | * @author hxh |
| | | * @description 是否为新的商品ID |
| | | * @date 15:39 2022/8/24 |
| | | * @param: auctionId |
| | | **/ |
| | | public static boolean isNewAuctionId(String auctionId) { |
| | | if (auctionId != null && auctionId.indexOf("-") > 0) |
| | | return true; |
| | | return false; |
| | | } |
| | | |
| | | |
| | |
| | | */ |
| | | public static TaoBaoGoodsBrief getSimpleGoodsInfo(String id) throws TaobaoGoodsDownException { |
| | | Map<String, String> map = new HashMap<>(); |
| | | map.put("method", "taobao.tbk.item.info.get"); |
| | | //TODO 临时接口 taobao.tbk.item.info.get |
| | | map.put("method", "taobao.tbk.item.info.temporary.get"); |
| | | map.put("num_iids", id + ""); |
| | | String resultStr = TaoKeBaseUtil.baseRequestForThreeTimes(map, true); |
| | | System.out.println(resultStr); |
| | |
| | | throw new TaobaoGoodsDownException(data.optJSONObject("error_response").optInt("code"), "商品下架"); |
| | | } |
| | | |
| | | if (data.optJSONObject("tbk_item_info_get_response") == null) |
| | | //TODO 修改临时接口 tbk_item_info_get_response |
| | | if (data.optJSONObject("tbk_item_info_temporary_get_response") == null) |
| | | return null; |
| | | JSONArray array = data.optJSONObject("tbk_item_info_get_response").optJSONObject("results") |
| | | JSONArray array = data.optJSONObject("tbk_item_info_temporary_get_response").optJSONObject("results") |
| | | .optJSONArray("n_tbk_item"); |
| | | if (array != null && array.size() > 0) { |
| | | JSONObject item = array.optJSONObject(0); |
| | |
| | | if (result != null && result.getTaoBaoGoodsBriefs() != null) |
| | | for (TaoBaoGoodsBrief g : result.getTaoBaoGoodsBriefs()) { |
| | | System.out.println(goods.getAuctionId() + ":" + g.getAuctionId()); |
| | | if (goods.getAuctionId().equals(g.getAuctionId())) { |
| | | if (TaoBaoUtil.isEqual(goods.getAuctionId(),g.getAuctionId())) { |
| | | g.setAuctionId(goods.getAuctionId()); |
| | | g.setCreatetime(new Date()); |
| | | g.setMaterialLibType(goods.getMaterialLibType()); |
| | |
| | | goods.getUserType(), app, null, null); |
| | | if (result != null && result.getTaoBaoGoodsBriefs() != null) |
| | | for (TaoBaoGoodsBrief g : result.getTaoBaoGoodsBriefs()) { |
| | | if (goods.getAuctionId() == g.getAuctionId()|| goods.getAuctionId().equals(g.getAuctionId())) { |
| | | if (TaoBaoUtil.isEqual( goods.getAuctionId() , g.getAuctionId())) { |
| | | g.setAuctionId(goods.getAuctionId()); |
| | | // 判断是否有优惠券 |
| | | if (!StringUtil.isNullOrEmpty(g.getCouponActivityId())) { |
| | |
| | | PageEntity pageEntity = new PageEntity(); |
| | | TaoBaoSearchResult taoBaoSearchResult = new TaoBaoSearchResult(); |
| | | Map<String, String> map = new HashMap<>(); |
| | | map.put("method", "taobao.tbk.dg.material.optional"); |
| | | //TODO 临时接口taobao.tbk.dg.material.optional |
| | | map.put("method", "taobao.tbk.dg.material.temporary.optional"); |
| | | map.put("page_size", filter.getPageSize() == 0 ? "20" : filter.getPageSize() + ""); |
| | | map.put("page_no", (filter.getPage() <= 0 ? 1 : filter.getPage()) + ""); |
| | | if (!StringUtil.isNullOrEmpty(specialId) && !StringUtil.isNullOrEmpty(relationId)) { |
| | |
| | | } |
| | | |
| | | String resultStr = TaoKeBaseUtil.baseRequestForThreeTimes(map, true); |
| | | // System.out.println("resultStr"+ resultStr); |
| | | System.out.println("resultStr"+ resultStr); |
| | | JSONObject data = JSONObject.fromObject(resultStr); |
| | | if (data.optJSONObject("tbk_dg_material_optional_response") != null |
| | | && data.optJSONObject("tbk_dg_material_optional_response").optJSONObject("result_list") != null) { |
| | | JSONArray array = data.optJSONObject("tbk_dg_material_optional_response").optJSONObject("result_list") |
| | | //TODO 临时接口tbk_dg_material_optional_response |
| | | if (data.optJSONObject("tbk_dg_material_temporary_optional_response") != null |
| | | && data.optJSONObject("tbk_dg_material_temporary_optional_response").optJSONObject("result_list") != null) { |
| | | JSONArray array = data.optJSONObject("tbk_dg_material_temporary_optional_response").optJSONObject("result_list") |
| | | .optJSONArray("map_data"); |
| | | List<TaoBaoGoodsBrief> goodsList = new ArrayList<>(); |
| | | if (array != null) { |
| | |
| | | } |
| | | taoBaoSearchResult.setTaoBaoGoodsBriefs(goodsList); |
| | | |
| | | JSONObject optJSONObject = data.optJSONObject("tbk_dg_material_optional_response"); |
| | | JSONObject optJSONObject = data.optJSONObject("tbk_dg_material_temporary_optional_response"); |
| | | int totalResults = optJSONObject.getInt("total_results"); |
| | | int totalPage = totalResults % pageEntity.getPageSize() == 0 ? totalResults / pageEntity.getPageSize() |
| | | : totalResults / pageEntity.getPageSize() + 1; |
| | |
| | | provcity = provcity.split(" ")[provcity.split(" ").length - 1]; |
| | | TaoBaoSearchResult taoBaoSearchResult = new TaoBaoSearchResult(); |
| | | Map<String, String> map = new HashMap<>(); |
| | | map.put("method", "taobao.tbk.dg.material.optional"); |
| | | //TODO 临时接口 taobao.tbk.dg.material.optional |
| | | map.put("method", "taobao.tbk.dg.material.temporary.optional"); |
| | | map.put("page_size", 50 + ""); |
| | | map.put("page_no", 1 + ""); |
| | | map.put("start_price", (int) zkPrice.subtract(new BigDecimal(1)).doubleValue() + ""); |
| | |
| | | String resultStr = TaoKeBaseUtil.baseRequestForThreeTimes(map, true); |
| | | System.out.println(resultStr); |
| | | JSONObject data = JSONObject.fromObject(resultStr); |
| | | if (data.optJSONObject("tbk_dg_material_optional_response") != null |
| | | && data.optJSONObject("tbk_dg_material_optional_response").optJSONObject("result_list") != null) { |
| | | JSONArray array = data.optJSONObject("tbk_dg_material_optional_response").optJSONObject("result_list") |
| | | //TODO 临时接口 tbk_dg_material_optional_response |
| | | if (data.optJSONObject("tbk_dg_material_temporary_optional_response") != null |
| | | && data.optJSONObject("tbk_dg_material_temporary_optional_response").optJSONObject("result_list") != null) { |
| | | JSONArray array = data.optJSONObject("tbk_dg_material_temporary_optional_response").optJSONObject("result_list") |
| | | .optJSONArray("map_data"); |
| | | List<TaoBaoGoodsBrief> goodsList = new ArrayList<>(); |
| | | if (array != null) { |
| | |
| | | } |
| | | } |
| | | |
| | | public static void main(String[] args) throws TaobaoGoodsDownException { |
| | | //搜索 |
| | | TaoBaoGoodsBrief goods= searchGoodsDetail("X4g0DS2OK34iwyyI06AQQCg-XQWo4eH00jgRjx3iB0"); |
| | | |
| | | System.out.println(goods); |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | JSONArray array = null; |
| | | JSONObject data = JSONObject.fromObject(response); |
| | | try { |
| | | JSONObject rootData = data.optJSONObject("tbk_order_details_get_response").optJSONObject("data"); |
| | | //TODO 临时测试 tbk_order_details_get_response |
| | | JSONObject rootData = data.optJSONObject("tbk_order_details_temporary_get_response").optJSONObject("data"); |
| | | array = rootData.optJSONObject("results").optJSONArray("publisher_order_dto"); |
| | | dto.setHasPre(rootData.optBoolean("has_pre")); |
| | | dto.setPositionIndex(rootData.optString("position_index")); |
| | |
| | | params.put("order_scene", orderScene + ""); |
| | | if (!StringUtil.isNullOrEmpty(positionIndex)) |
| | | params.put("position_index", positionIndex + ""); |
| | | params.put("method", "taobao.tbk.order.details.get"); |
| | | //TODO 临时测试taobao.tbk.order.details.get |
| | | params.put("method", "taobao.tbk.order.details.temporary.get"); |
| | | TaoKeAppInfo app = new TaoKeAppInfo(); |
| | | app.setAppKey(TaoBaoConstant.TAOBAO_AUTH_APPKEY); |
| | | app.setAppSecret(TaoBaoConstant.TAOBAO_AUTH_APPSECRET); |
| | |
| | | TaoBaoOrderGoods goods = new TaoBaoOrderGoods(); |
| | | goods.setCategoryName(item.optString("item_category_name")); |
| | | goods.setCreateTime(new Date()); |
| | | goods.setGoodsId(item.optLong("item_id")); |
| | | goods.setGoodsId(item.optString("item_id")); |
| | | goods.setImg(item.optString("item_img")); |
| | | goods.setLink(item.optString("item_link")); |
| | | goods.setPrice(item.optString("item_price")); |
| | |
| | | |
| | | return null; |
| | | } |
| | | |
| | | public static void main(String[] args){ |
| | | |
| | | long endTime=System.currentTimeMillis(); |
| | | long startTime=endTime-1000*60*60*3; |
| | | |
| | | List<TaoBaoOrder> orderList= getTaoBaoCommonOrderList(startTime,endTime,1); |
| | | System.out.println(orderList); |
| | | |
| | | } |
| | | } |
| | |
| | | |
| | | <dubbo:annotation package="com.yeshi.fanli"></dubbo:annotation> |
| | | |
| | | <!--<dubbo:registry address="zookeeper://172.16.16.46:2181"/>--> |
| | | <dubbo:registry address="zookeeper://193.112.35.168:2182"/> |
| | | <dubbo:registry address="zookeeper://172.16.16.46:2181"/> |
| | | <!--<dubbo:registry address="zookeeper://193.112.35.168:2182"/>--> |
| | | |
| | | <!-- url=dubbo://192.168.3.122:20882/com.yeshi.goods.facade.service.TaoBaoCouponCacheService --> |
| | | |
| | |
| | | <resultMap id="BaseResultMap" type="com.yeshi.fanli.entity.bus.share.UserShareGoodsHistory"> |
| | | <id column="sgus_id" property="id" jdbcType="BIGINT" /> |
| | | <result column="sgus_goods_type" property="goodsType" jdbcType="INTEGER" /> |
| | | <result column="sgus_goods_id" property="goodsId" jdbcType="BIGINT" /> |
| | | <result column="sgus_goods_id" property="goodsId" jdbcType="VARCHAR" /> |
| | | <result column="sgus_post_picture" property="postPicture" |
| | | jdbcType="VARCHAR" /> |
| | | <result column="sgu_pictures" property="pictures" jdbcType="VARCHAR" /> |
| | |
| | | yeshi_ec_share_goods_usershare |
| | | (sgus_id,sgus_uid,sgus_goods_type,sgus_goods_id,sgus_post_picture,sgu_pictures,sgu_hongbao,sgu_link,sgu_quanlink,sgu_tkcode,sgu_createtime,sgus_share_img) |
| | | values |
| | | (#{id,jdbcType=BIGINT},#{user.id,jdbcType=BIGINT},#{goodsType,jdbcType=INTEGER},#{goodsId,jdbcType=BIGINT},#{postPicture,jdbcType=VARCHAR},#{pictures,jdbcType=VARCHAR},#{hongbao,jdbcType=DECIMAL},#{link,jdbcType=VARCHAR},#{quanLink,jdbcType=VARCHAR},#{tkCode,jdbcType=VARCHAR},#{createTime,jdbcType=TIMESTAMP},#{shareImg,jdbcType=VARCHAR}) |
| | | (#{id,jdbcType=BIGINT},#{user.id,jdbcType=BIGINT},#{goodsType,jdbcType=INTEGER},#{goodsId,jdbcType=VARCHAR},#{postPicture,jdbcType=VARCHAR},#{pictures,jdbcType=VARCHAR},#{hongbao,jdbcType=DECIMAL},#{link,jdbcType=VARCHAR},#{quanLink,jdbcType=VARCHAR},#{tkCode,jdbcType=VARCHAR},#{createTime,jdbcType=TIMESTAMP},#{shareImg,jdbcType=VARCHAR}) |
| | | </insert> |
| | | <insert id="insertSelective" |
| | | parameterType="com.yeshi.fanli.entity.bus.share.UserShareGoodsHistory" |
| | |
| | | <if test="id != null">#{id,jdbcType=BIGINT},</if> |
| | | <if test="user != null">#{user.id,jdbcType=BIGINT},</if> |
| | | <if test="goodsType != null">#{goodsType,jdbcType=INTEGER},</if> |
| | | <if test="goodsId != null">#{goodsId,jdbcType=BIGINT},</if> |
| | | <if test="goodsId != null">#{goodsId,jdbcType=VARCHAR},</if> |
| | | <if test="postPicture != null">#{postPicture,jdbcType=VARCHAR},</if> |
| | | <if test="pictures != null">#{pictures,jdbcType=VARCHAR},</if> |
| | | <if test="hongbao != null">#{hongbao,jdbcType=DECIMAL},</if> |
| | |
| | | parameterType="com.yeshi.fanli.entity.bus.share.UserShareGoodsHistory">update yeshi_ec_share_goods_usershare set sgus_uid = |
| | | #{user.id,jdbcType=BIGINT},sgus_goods_type = |
| | | #{goodsType,jdbcType=INTEGER},sgus_goods_id = |
| | | #{goodsId,jdbcType=BIGINT},sgus_post_picture = |
| | | #{goodsId,jdbcType=VARCHAR},sgus_post_picture = |
| | | #{postPicture,jdbcType=VARCHAR},sgu_pictures = |
| | | #{pictures,jdbcType=VARCHAR},sgu_hongbao = |
| | | #{hongbao,jdbcType=DECIMAL},sgu_link = |
| | |
| | | <set> |
| | | <if test="user != null">sgus_uid=#{user.id,jdbcType=BIGINT},</if> |
| | | <if test="goodsType != null">sgus_goods_type=#{goodsType,jdbcType=INTEGER},</if> |
| | | <if test="goodsId != null">sgus_goods_id=#{goodsId,jdbcType=BIGINT},</if> |
| | | <if test="goodsId != null">sgus_goods_id=#{goodsId,jdbcType=VARCHAR},</if> |
| | | <if test="postPicture != null">sgus_post_picture=#{postPicture,jdbcType=VARCHAR},</if> |
| | | <if test="pictures != null">sgu_pictures=#{pictures,jdbcType=VARCHAR},</if> |
| | | <if test="hongbao != null">sgu_hongbao=#{hongbao,jdbcType=DECIMAL},</if> |
| | |
| | | </select> |
| | | |
| | | <select id="selectByAuctionId" resultMap="BaseResultMap" |
| | | parameterType="java.lang.Long"> |
| | | parameterType="java.lang.String"> |
| | | SELECT * FROM yeshi_ec_activity_goods_taobao where agt_auctionid=#{0} |
| | | </select> |
| | | |
| | |
| | | #{id,jdbcType=BIGINT} |
| | | </update> |
| | | <update id="updateStateByAuctionId">update yeshi_ec_activity_goods_taobao set agt_state |
| | | =#{state} where agt_goods_id = #{auctionId,jdbcType=BIGINT} |
| | | =#{state} where agt_goods_id = #{auctionId,jdbcType=VARCHAR} |
| | | </update> |
| | | <update id="updateByPrimaryKeySelective" |
| | | parameterType="com.yeshi.fanli.entity.bus.activity.RecommendActivityTaoBaoGoods"> |
| | |
| | | <resultMap id="BaseResultMap" type="com.yeshi.fanli.entity.goods.CommonGoods"> |
| | | <id column="cg_id" property="id" jdbcType="BIGINT" /> |
| | | <result column="cg_title" property="title" jdbcType="VARCHAR" /> |
| | | <result column="cg_goods_id" property="goodsId" jdbcType="BIGINT" /> |
| | | <result column="cg_goods_id" property="goodsId" jdbcType="VARCHAR" /> |
| | | <result column="cg_goods_type" property="goodsType" jdbcType="INTEGER" /> |
| | | <result column="cg_shop_type" property="shopType" jdbcType="INTEGER" /> |
| | | <result column="cg_seller_id" property="sellerId" jdbcType="BIGINT" /> |
| | |
| | | useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_common_goods |
| | | (cg_id,cg_title,cg_goods_id,cg_goods_type,cg_shop_type,cg_seller_id,cg_seller_name,cg_sales,cg_rate,cg_picture,cg_picture_white,cg_state,cg_price,cg_coupon_info,cg_coupon_startprice,cg_coupon_amount,cg_coupon_left_count,cg_coupon_total_count,cg_video_cover,cg_video_url,cg_other_info,cg_createtime,cg_updatetime,cg_material_lib_type,cg_category_info) |
| | | values |
| | | (#{id,jdbcType=BIGINT},#{title,jdbcType=VARCHAR},#{goodsId,jdbcType=BIGINT},#{goodsType,jdbcType=INTEGER},#{shopType,jdbcType=INTEGER},#{sellerId,jdbcType=BIGINT},#{sellerName,jdbcType=VARCHAR},#{sales,jdbcType=INTEGER},#{rate,jdbcType=DECIMAL},#{picture,jdbcType=VARCHAR},#{state,jdbcType=INTEGER},#{price,jdbcType=DECIMAL},#{couponInfo,jdbcType=VARCHAR},#{couponStartPrice,jdbcType=DECIMAL},#{couponAmount,jdbcType=DECIMAL},#{couponLeftCount,jdbcType=INTEGER},#{couponTotalCount,jdbcType=INTEGER},#{videoCover,jdbcType=VARCHAR},#{videoUrl,jdbcType=VARCHAR},#{otherInfo,jdbcType=VARCHAR},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP},#{materialLibType,jdbcType=INTEGER},#{categoryInfo,jdbcType=VARCHAR}) |
| | | (#{id,jdbcType=BIGINT},#{title,jdbcType=VARCHAR},#{goodsId,jdbcType=VARCHAR},#{goodsType,jdbcType=INTEGER},#{shopType,jdbcType=INTEGER},#{sellerId,jdbcType=BIGINT},#{sellerName,jdbcType=VARCHAR},#{sales,jdbcType=INTEGER},#{rate,jdbcType=DECIMAL},#{picture,jdbcType=VARCHAR},#{state,jdbcType=INTEGER},#{price,jdbcType=DECIMAL},#{couponInfo,jdbcType=VARCHAR},#{couponStartPrice,jdbcType=DECIMAL},#{couponAmount,jdbcType=DECIMAL},#{couponLeftCount,jdbcType=INTEGER},#{couponTotalCount,jdbcType=INTEGER},#{videoCover,jdbcType=VARCHAR},#{videoUrl,jdbcType=VARCHAR},#{otherInfo,jdbcType=VARCHAR},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP},#{materialLibType,jdbcType=INTEGER},#{categoryInfo,jdbcType=VARCHAR}) |
| | | </insert> |
| | | <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.goods.CommonGoods" |
| | | useGeneratedKeys="true" keyProperty="id"> |
| | |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">#{id,jdbcType=BIGINT},</if> |
| | | <if test="title != null">#{title,jdbcType=VARCHAR},</if> |
| | | <if test="goodsId != null">#{goodsId,jdbcType=BIGINT},</if> |
| | | <if test="goodsId != null">#{goodsId,jdbcType=VARCHAR},</if> |
| | | <if test="goodsType != null">#{goodsType,jdbcType=INTEGER},</if> |
| | | <if test="shopType != null">#{shopType,jdbcType=INTEGER},</if> |
| | | <if test="sellerId != null">#{sellerId,jdbcType=BIGINT},</if> |
| | |
| | | <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.goods.CommonGoods">update |
| | | yeshi_ec_common_goods set cg_title = |
| | | #{title,jdbcType=VARCHAR},cg_goods_id = |
| | | #{goodsId,jdbcType=BIGINT},cg_goods_type = |
| | | #{goodsId,jdbcType=VARCHAR},cg_goods_type = |
| | | #{goodsType,jdbcType=INTEGER},cg_shop_type = |
| | | #{shopType,jdbcType=INTEGER},cg_seller_id = |
| | | #{sellerId,jdbcType=BIGINT},cg_seller_name = |
| | |
| | | update yeshi_ec_common_goods |
| | | <set> |
| | | <if test="title != null">cg_title=#{title,jdbcType=VARCHAR},</if> |
| | | <if test="goodsId != null">cg_goods_id=#{goodsId,jdbcType=BIGINT},</if> |
| | | <if test="goodsId != null">cg_goods_id=#{goodsId,jdbcType=VARCHAR},</if> |
| | | <if test="goodsType != null">cg_goods_type=#{goodsType,jdbcType=INTEGER},</if> |
| | | <if test="shopType != null">cg_shop_type=#{shopType,jdbcType=INTEGER},</if> |
| | | <if test="sellerId != null">cg_seller_id=#{sellerId,jdbcType=BIGINT},</if> |
| | |
| | | <id column="ud_id" property="id" jdbcType="BIGINT" /> |
| | | <result column="ud_device" property="device" jdbcType="VARCHAR" /> |
| | | <result column="ud_uid" property="uid" jdbcType="BIGINT" /> |
| | | <result column="ud_goods_id" property="goodsId" jdbcType="BIGINT" /> |
| | | <result column="ud_goods_id" property="goodsId" jdbcType="VARCHAR" /> |
| | | <result column="ud_goods_source" property="goodsSource" |
| | | jdbcType="INTEGER" /> |
| | | <result column="ud_reason" property="reason" jdbcType="VARCHAR" /> |
| | |
| | | yeshi_ec_recommend_goods_user_delete |
| | | (ud_id,ud_device,ud_uid,ud_goods_id,ud_goods_source,ud_reason,ud_create_time,ud_beizhu) |
| | | values |
| | | (#{id,jdbcType=BIGINT},#{device,jdbcType=VARCHAR},#{uid,jdbcType=BIGINT},#{goodsId,jdbcType=BIGINT},#{goodsSource,jdbcType=INTEGER},#{reason,jdbcType=VARCHAR},#{createTime,jdbcType=TIMESTAMP},#{beiZhu,jdbcType=VARCHAR}) |
| | | (#{id,jdbcType=BIGINT},#{device,jdbcType=VARCHAR},#{uid,jdbcType=BIGINT},#{goodsId,jdbcType=VARCHAR},#{goodsSource,jdbcType=INTEGER},#{reason,jdbcType=VARCHAR},#{createTime,jdbcType=TIMESTAMP},#{beiZhu,jdbcType=VARCHAR}) |
| | | </insert> |
| | | <insert id="insertSelective" |
| | | parameterType="com.yeshi.fanli.entity.goods.recommend.RecommendGoodsDeleteHistory" |
| | |
| | | <if test="id != null">#{id,jdbcType=BIGINT},</if> |
| | | <if test="device != null">#{device,jdbcType=VARCHAR},</if> |
| | | <if test="uid != null">#{uid,jdbcType=BIGINT},</if> |
| | | <if test="goodsId != null">#{goodsId,jdbcType=BIGINT},</if> |
| | | <if test="goodsId != null">#{goodsId,jdbcType=VARCHAR},</if> |
| | | <if test="goodsSource != null">#{goodsSource,jdbcType=INTEGER},</if> |
| | | <if test="reason != null">#{reason,jdbcType=VARCHAR},</if> |
| | | <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if> |
| | |
| | | parameterType="com.yeshi.fanli.entity.goods.recommend.RecommendGoodsDeleteHistory">update yeshi_ec_recommend_goods_user_delete set |
| | | ud_device = #{device,jdbcType=VARCHAR},ud_uid = |
| | | #{uid,jdbcType=BIGINT},ud_goods_id = |
| | | #{goodsId,jdbcType=BIGINT},ud_goods_source = |
| | | #{goodsId,jdbcType=VARCHAR},ud_goods_source = |
| | | #{goodsSource,jdbcType=INTEGER},ud_reason = |
| | | #{reason,jdbcType=VARCHAR},ud_create_time = |
| | | #{createTime,jdbcType=TIMESTAMP},ud_beizhu = |
| | |
| | | <set> |
| | | <if test="device != null">ud_device=#{device,jdbcType=VARCHAR},</if> |
| | | <if test="uid != null">ud_uid=#{uid,jdbcType=BIGINT},</if> |
| | | <if test="goodsId != null">ud_goods_id=#{goodsId,jdbcType=BIGINT},</if> |
| | | <if test="goodsId != null">ud_goods_id=#{goodsId,jdbcType=VARCHAR},</if> |
| | | <if test="goodsSource != null">ud_goods_source=#{goodsSource,jdbcType=INTEGER},</if> |
| | | <if test="reason != null">ud_reason=#{reason,jdbcType=VARCHAR},</if> |
| | | <if test="createTime != null">ud_create_time=#{createTime,jdbcType=TIMESTAMP},</if> |
| | |
| | | </delete> |
| | | |
| | | <delete id="deleteByGoodsIdAndLabId"> |
| | | delete from yeshi_ec_label_goods where lg_goods_id = #{goodsId,jdbcType=BIGINT} and lg_label_id = #{labId,jdbcType=BIGINT} |
| | | delete from yeshi_ec_label_goods where lg_goods_id = #{goodsId,jdbcType=VARCHAR} and lg_label_id = #{labId,jdbcType=BIGINT} |
| | | </delete> |
| | | |
| | | <select id="getRelationNum" resultType="java.lang.Long"> |
| | |
| | | <resultMap id="BaseResultMap" type="com.yeshi.fanli.entity.pdd.PDDOrder"> |
| | | <id column="po_id" property="id" jdbcType="BIGINT"/> |
| | | <result column="po_order_sn" property="orderSn" jdbcType="VARCHAR"/> |
| | | <result column="po_goods_id" property="goodsId" jdbcType="BIGINT"/> |
| | | <result column="po_goods_id" property="goodsId" jdbcType="VARCHAR"/> |
| | | <result column="po_group_id" property="groupId" jdbcType="BIGINT"/> |
| | | <result column="po_goods_name" property="goodsName" jdbcType="VARCHAR"/> |
| | | <result column="po_goods_thumbnail_url" property="goodsThumbnailUrl" jdbcType="VARCHAR"/> |
| | |
| | | <delete id="deleteByPrimaryKey" |
| | | parameterType="java.lang.Long">delete from yeshi_ec_pdd_order where po_id = #{id,jdbcType=BIGINT}</delete> |
| | | <insert id="insert" parameterType="com.yeshi.fanli.entity.pdd.PDDOrder" useGeneratedKeys="true" |
| | | keyProperty="id">insert into yeshi_ec_pdd_order (po_id,po_order_sn,po_goods_id,po_group_id,po_goods_name,po_goods_thumbnail_url,po_goods_quantity,po_goods_price,po_order_amount,po_p_id,po_promotion_rate,po_promotion_amount,po_order_status,po_order_status_desc,po_order_create_time,po_order_pay_time,po_order_group_success_time,po_order_verify_time,po_order_modify_at,po_custom_parameters,po_order_settle_time,po_order_id,po_create_time,po_update_time,po_order_receive_time,po_fail_reason) values (#{id,jdbcType=BIGINT},#{orderSn,jdbcType=VARCHAR},#{goodsId,jdbcType=BIGINT},#{groupId,jdbcType=BIGINT},#{goodsName,jdbcType=VARCHAR},#{goodsThumbnailUrl,jdbcType=VARCHAR},#{goodsQuantity,jdbcType=INTEGER},#{goodsPrice,jdbcType=BIGINT},#{orderAmount,jdbcType=BIGINT},#{pId,jdbcType=VARCHAR},#{promotionRate,jdbcType=BIGINT},#{promotionAmount,jdbcType=BIGINT},#{orderStatus,jdbcType=INTEGER},#{orderStatusDesc,jdbcType=VARCHAR},#{orderCreateTime,jdbcType=BIGINT},#{orderPayTime,jdbcType=BIGINT},#{orderGroupSuccessTime,jdbcType=BIGINT},#{orderVerifyTime,jdbcType=BIGINT},#{orderModifyAt,jdbcType=BIGINT},#{customParameters,jdbcType=VARCHAR},#{orderSettleTime,jdbcType=BIGINT},#{orderId,jdbcType=VARCHAR},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP},#{orderReceiveTime,jdbcType=BIGINT},#{failReason,jdbcType=VARCHAR})</insert> |
| | | keyProperty="id">insert into yeshi_ec_pdd_order (po_id,po_order_sn,po_goods_id,po_group_id,po_goods_name,po_goods_thumbnail_url,po_goods_quantity,po_goods_price,po_order_amount,po_p_id,po_promotion_rate,po_promotion_amount,po_order_status,po_order_status_desc,po_order_create_time,po_order_pay_time,po_order_group_success_time,po_order_verify_time,po_order_modify_at,po_custom_parameters,po_order_settle_time,po_order_id,po_create_time,po_update_time,po_order_receive_time,po_fail_reason) values (#{id,jdbcType=BIGINT},#{orderSn,jdbcType=VARCHAR},#{goodsId,jdbcType=VARCHAR},#{groupId,jdbcType=BIGINT},#{goodsName,jdbcType=VARCHAR},#{goodsThumbnailUrl,jdbcType=VARCHAR},#{goodsQuantity,jdbcType=INTEGER},#{goodsPrice,jdbcType=BIGINT},#{orderAmount,jdbcType=BIGINT},#{pId,jdbcType=VARCHAR},#{promotionRate,jdbcType=BIGINT},#{promotionAmount,jdbcType=BIGINT},#{orderStatus,jdbcType=INTEGER},#{orderStatusDesc,jdbcType=VARCHAR},#{orderCreateTime,jdbcType=BIGINT},#{orderPayTime,jdbcType=BIGINT},#{orderGroupSuccessTime,jdbcType=BIGINT},#{orderVerifyTime,jdbcType=BIGINT},#{orderModifyAt,jdbcType=BIGINT},#{customParameters,jdbcType=VARCHAR},#{orderSettleTime,jdbcType=BIGINT},#{orderId,jdbcType=VARCHAR},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP},#{orderReceiveTime,jdbcType=BIGINT},#{failReason,jdbcType=VARCHAR})</insert> |
| | | <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.pdd.PDDOrder" useGeneratedKeys="true" |
| | | keyProperty="id">insert into yeshi_ec_pdd_order |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">#{id,jdbcType=BIGINT},</if> |
| | | <if test="orderSn != null">#{orderSn,jdbcType=VARCHAR},</if> |
| | | <if test="goodsId != null">#{goodsId,jdbcType=BIGINT},</if> |
| | | <if test="goodsId != null">#{goodsId,jdbcType=VARCHAR},</if> |
| | | <if test="groupId != null">#{groupId,jdbcType=BIGINT},</if> |
| | | <if test="goodsName != null">#{goodsName,jdbcType=VARCHAR},</if> |
| | | <if test="goodsThumbnailUrl != null">#{goodsThumbnailUrl,jdbcType=VARCHAR},</if> |
| | |
| | | </trim> |
| | | </insert> |
| | | <update id="updateByPrimaryKey" |
| | | parameterType="com.yeshi.fanli.entity.pdd.PDDOrder">update yeshi_ec_pdd_order set po_order_sn = #{orderSn,jdbcType=VARCHAR},po_goods_id = #{goodsId,jdbcType=BIGINT},po_group_id = #{groupId,jdbcType=BIGINT},po_goods_name = #{goodsName,jdbcType=VARCHAR},po_goods_thumbnail_url = #{goodsThumbnailUrl,jdbcType=VARCHAR},po_goods_quantity = #{goodsQuantity,jdbcType=INTEGER},po_goods_price = #{goodsPrice,jdbcType=BIGINT},po_order_amount = #{orderAmount,jdbcType=BIGINT},po_p_id = #{pId,jdbcType=VARCHAR},po_promotion_rate = #{promotionRate,jdbcType=BIGINT},po_promotion_amount = #{promotionAmount,jdbcType=BIGINT},po_order_status = #{orderStatus,jdbcType=INTEGER},po_order_status_desc = #{orderStatusDesc,jdbcType=VARCHAR},po_order_create_time = #{orderCreateTime,jdbcType=BIGINT},po_order_pay_time = #{orderPayTime,jdbcType=BIGINT},po_order_group_success_time = #{orderGroupSuccessTime,jdbcType=BIGINT},po_order_verify_time = #{orderVerifyTime,jdbcType=BIGINT},po_order_modify_at = #{orderModifyAt,jdbcType=BIGINT},po_custom_parameters = #{customParameters,jdbcType=VARCHAR},po_order_settle_time = #{orderSettleTime,jdbcType=BIGINT},po_order_id = #{orderId,jdbcType=VARCHAR},po_create_time = #{createTime,jdbcType=TIMESTAMP},po_update_time = #{updateTime,jdbcType=TIMESTAMP},po_order_receive_time = #{orderReceiveTime,jdbcType=BIGINT} ,po_fail_reason =#{failReason,jdbcType=VARCHAR} where po_id = #{id,jdbcType=BIGINT}</update> |
| | | parameterType="com.yeshi.fanli.entity.pdd.PDDOrder">update yeshi_ec_pdd_order set po_order_sn = #{orderSn,jdbcType=VARCHAR},po_goods_id = #{goodsId,jdbcType=VARCHAR},po_group_id = #{groupId,jdbcType=BIGINT},po_goods_name = #{goodsName,jdbcType=VARCHAR},po_goods_thumbnail_url = #{goodsThumbnailUrl,jdbcType=VARCHAR},po_goods_quantity = #{goodsQuantity,jdbcType=INTEGER},po_goods_price = #{goodsPrice,jdbcType=BIGINT},po_order_amount = #{orderAmount,jdbcType=BIGINT},po_p_id = #{pId,jdbcType=VARCHAR},po_promotion_rate = #{promotionRate,jdbcType=BIGINT},po_promotion_amount = #{promotionAmount,jdbcType=BIGINT},po_order_status = #{orderStatus,jdbcType=INTEGER},po_order_status_desc = #{orderStatusDesc,jdbcType=VARCHAR},po_order_create_time = #{orderCreateTime,jdbcType=BIGINT},po_order_pay_time = #{orderPayTime,jdbcType=BIGINT},po_order_group_success_time = #{orderGroupSuccessTime,jdbcType=BIGINT},po_order_verify_time = #{orderVerifyTime,jdbcType=BIGINT},po_order_modify_at = #{orderModifyAt,jdbcType=BIGINT},po_custom_parameters = #{customParameters,jdbcType=VARCHAR},po_order_settle_time = #{orderSettleTime,jdbcType=BIGINT},po_order_id = #{orderId,jdbcType=VARCHAR},po_create_time = #{createTime,jdbcType=TIMESTAMP},po_update_time = #{updateTime,jdbcType=TIMESTAMP},po_order_receive_time = #{orderReceiveTime,jdbcType=BIGINT} ,po_fail_reason =#{failReason,jdbcType=VARCHAR} where po_id = #{id,jdbcType=BIGINT}</update> |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.pdd.PDDOrder">update |
| | | yeshi_ec_pdd_order |
| | | <set> |
| | | <if test="orderSn != null">po_order_sn=#{orderSn,jdbcType=VARCHAR},</if> |
| | | <if test="goodsId != null">po_goods_id=#{goodsId,jdbcType=BIGINT},</if> |
| | | <if test="goodsId != null">po_goods_id=#{goodsId,jdbcType=VARCHAR},</if> |
| | | <if test="groupId != null">po_group_id=#{groupId,jdbcType=BIGINT},</if> |
| | | <if test="goodsName != null">po_goods_name=#{goodsName,jdbcType=VARCHAR},</if> |
| | | <if test="goodsThumbnailUrl != null">po_goods_thumbnail_url=#{goodsThumbnailUrl,jdbcType=VARCHAR},</if> |
| | |
| | | <resultMap id="BaseResultMap" |
| | | type="com.yeshi.fanli.entity.taobao.ShareTaoPassword"> |
| | | <id column="id" property="id" jdbcType="BIGINT" /> |
| | | <result column="auctionId" property="auctionId" jdbcType="BIGINT" /> |
| | | <result column="auctionId" property="auctionId" jdbcType="VARCHAR" /> |
| | | <result column="pid" property="pid" jdbcType="VARCHAR" /> |
| | | <result column="taoToken" property="taoToken" jdbcType="VARCHAR" /> |
| | | <result column="couponLink" property="couponLink" jdbcType="VARCHAR" /> |
| | |
| | | </trim> |
| | | values |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="auctionId != null">#{auctionId,jdbcType=BIGINT},</if> |
| | | <if test="auctionId != null">#{auctionId,jdbcType=VARCHAR},</if> |
| | | <if test="pid != null">#{pid,jdbcType=VARCHAR},</if> |
| | | <if test="taoToken != null">#{taoToken,jdbcType=VARCHAR},</if> |
| | | <if test="couponLink != null">#{couponLink,jdbcType=VARCHAR},</if> |
| | |
| | | update yeshi_ec_share_tao_password |
| | | <set> |
| | | <if test="auctionId != null"> |
| | | auctionId = #{auctionId,jdbcType=BIGINT}, |
| | | auctionId = #{auctionId,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="pid != null"> |
| | | pid = #{pid,jdbcType=VARCHAR}, |
| | |
| | | <result column="og_create_time" property="createTime" jdbcType="TIMESTAMP" /> |
| | | <result column="og_state" property="state" jdbcType="INTEGER" /> |
| | | <result column="og_zk_price" property="zkPrice" jdbcType="DECIMAL" /> |
| | | <result column="og_goods_id" property="goodsId" jdbcType="BIGINT" /> |
| | | <result column="og_goods_id" property="goodsId" jdbcType="VARCHAR" /> |
| | | <result column="og_goods_set_id" property="goodsSetId" |
| | | jdbcType="BIGINT" /> |
| | | <result column="og_picture" property="picture" jdbcType="VARCHAR" /> |
| | |
| | | yeshi_ec_shop_order_goods |
| | | (og_id,og_goods_name,og_set_name,og_create_time,og_state,og_zk_price,og_goods_id,og_goods_set_id,og_picture) |
| | | values |
| | | (#{id,jdbcType=BIGINT},#{goodsName,jdbcType=VARCHAR},#{setName,jdbcType=VARCHAR},#{createTime,jdbcType=TIMESTAMP},#{state,jdbcType=INTEGER},#{zkPrice,jdbcType=DECIMAL},#{goodsId,jdbcType=BIGINT},#{goodsSetId,jdbcType=BIGINT},#{picture,jdbcType=VARCHAR}) |
| | | (#{id,jdbcType=BIGINT},#{goodsName,jdbcType=VARCHAR},#{setName,jdbcType=VARCHAR},#{createTime,jdbcType=TIMESTAMP},#{state,jdbcType=INTEGER},#{zkPrice,jdbcType=DECIMAL},#{goodsId,jdbcType=VARCHAR},#{goodsSetId,jdbcType=BIGINT},#{picture,jdbcType=VARCHAR}) |
| | | </insert> |
| | | <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.shop.BanLiShopOrderGoods" |
| | | useGeneratedKeys="true" keyProperty="id"> |
| | |
| | | <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="state != null">#{state,jdbcType=INTEGER},</if> |
| | | <if test="zkPrice != null">#{zkPrice,jdbcType=DECIMAL},</if> |
| | | <if test="goodsId != null">#{goodsId,jdbcType=BIGINT},</if> |
| | | <if test="goodsId != null">#{goodsId,jdbcType=VARCHAR},</if> |
| | | <if test="goodsSetId != null">#{goodsSetId,jdbcType=BIGINT},</if> |
| | | <if test="picture != null">#{picture,jdbcType=VARCHAR}</if> |
| | | </trim> |
| | |
| | | #{createTime,jdbcType=TIMESTAMP},og_state = |
| | | #{state,jdbcType=INTEGER},og_zk_price = |
| | | #{zkPrice,jdbcType=DECIMAL},og_goods_id = |
| | | #{goodsId,jdbcType=BIGINT},og_goods_set_id = |
| | | #{goodsId,jdbcType=VARCHAR},og_goods_set_id = |
| | | #{goodsSetId,jdbcType=BIGINT} ,og_picture =#{picture,jdbcType=VARCHAR} |
| | | where og_id = #{id,jdbcType=BIGINT}</update> |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.shop.BanLiShopOrderGoods"> |
| | |
| | | <if test="createTime != null">og_create_time=#{createTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="state != null">og_state=#{state,jdbcType=INTEGER},</if> |
| | | <if test="zkPrice != null">og_zk_price=#{zkPrice,jdbcType=DECIMAL},</if> |
| | | <if test="goodsId != null">og_goods_id=#{goodsId,jdbcType=BIGINT},</if> |
| | | <if test="goodsId != null">og_goods_id=#{goodsId,jdbcType=VARCHAR},</if> |
| | | <if test="goodsSetId != null">og_goods_set_id=#{goodsSetId,jdbcType=BIGINT},</if> |
| | | <if test="picture !=null">og_picture =#{picture,jdbcType=VARCHAR},</if> |
| | | </set> |
| | |
| | | <result column="pictUrl" property="pictUrl" jdbcType="VARCHAR" /> |
| | | <result column="pictUrlWhite" property="pictUrlWhite" jdbcType="VARCHAR" /> |
| | | <result column="title" property="title" jdbcType="VARCHAR" /> |
| | | <result column="auctionId" property="auctionId" jdbcType="BIGINT" /> |
| | | <result column="auctionId" property="auctionId" jdbcType="VARCHAR" /> |
| | | <result column="couponLink" property="couponLink" jdbcType="VARCHAR" /> |
| | | <result column="couponLinkTaoToken" property="couponLinkTaoToken" |
| | | jdbcType="VARCHAR" /> |
| | |
| | | yeshi_ec_taobao_goods where id = #{id,jdbcType=BIGINT} |
| | | </delete> |
| | | |
| | | <delete id="deleteByAuctionId" parameterType="java.lang.Long">delete from |
| | | yeshi_ec_taobao_goods where auctionId = #{auctionId,jdbcType=BIGINT} |
| | | <delete id="deleteByAuctionId" parameterType="java.lang.String">delete from |
| | | yeshi_ec_taobao_goods where auctionId = #{auctionId,jdbcType=VARCHAR} |
| | | </delete> |
| | | |
| | | <delete id="deleteBatchByGoodsId" parameterType="java.util.List"> |
| | |
| | | useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_taobao_goods |
| | | (id,rootCatId,eventCreatorId,leafCatId,debugInfo,rootCatScore,sellerId,userType,shopTitle,pictUrl,pictUrlWhite,title,auctionId,couponLink,couponLinkTaoToken,couponActivityId,biz30day,tkRate,nick,includeDxjh,reservePrice,tkCommFee,totalFee,totalNum,zkPrice,dayLeft,tk3rdRate,auctionUrl,rlRate,hasRecommended,hasSame,sameItemPid,couponTotalCount,couponLeftCount,couponAmount,eventRate,couponShortLink,couponInfo,couponStartFee,couponEffectiveStartTime,couponEffectiveEndTime,hasUmpBonus,isBizActivity,umpBonus,rootCategoryName,couponOriLink,userTypeName,createtime,tkMktStatus,updatetime,state,totalSales,material_lib_type) |
| | | values |
| | | (#{id,jdbcType=BIGINT},#{rootCatId,jdbcType=INTEGER},#{eventCreatorId,jdbcType=INTEGER},#{leafCatId,jdbcType=INTEGER},#{debugInfo,jdbcType=VARCHAR},#{rootCatScore,jdbcType=INTEGER},#{sellerId,jdbcType=BIGINT},#{userType,jdbcType=INTEGER},#{shopTitle,jdbcType=VARCHAR},#{pictUrl,jdbcType=VARCHAR},#{pictUrlWhite,jdbcType=VARCHAR},#{title,jdbcType=VARCHAR},#{auctionId,jdbcType=BIGINT},#{couponLink,jdbcType=VARCHAR},#{couponLinkTaoToken,jdbcType=VARCHAR},#{couponActivityId,jdbcType=VARCHAR},#{biz30day,jdbcType=INTEGER},#{tkRate,jdbcType=DECIMAL},#{nick,jdbcType=VARCHAR},#{includeDxjh,jdbcType=INTEGER},#{reservePrice,jdbcType=DECIMAL},#{tkCommFee,jdbcType=DECIMAL},#{totalFee,jdbcType=DECIMAL},#{totalNum,jdbcType=INTEGER},#{zkPrice,jdbcType=DECIMAL},#{dayLeft,jdbcType=INTEGER},#{tk3rdRate,jdbcType=VARCHAR},#{auctionUrl,jdbcType=VARCHAR},#{rlRate,jdbcType=DECIMAL},#{hasRecommended,jdbcType=INTEGER},#{hasSame,jdbcType=INTEGER},#{sameItemPid,jdbcType=BIGINT},#{couponTotalCount,jdbcType=INTEGER},#{couponLeftCount,jdbcType=INTEGER},#{couponAmount,jdbcType=DECIMAL},#{eventRate,jdbcType=VARCHAR},#{couponShortLink,jdbcType=VARCHAR},#{couponInfo,jdbcType=VARCHAR},#{couponStartFee,jdbcType=DECIMAL},#{couponEffectiveStartTime,jdbcType=VARCHAR},#{couponEffectiveEndTime,jdbcType=VARCHAR},#{hasUmpBonus,jdbcType=VARCHAR},#{isBizActivity,jdbcType=VARCHAR},#{umpBonus,jdbcType=VARCHAR},#{rootCategoryName,jdbcType=VARCHAR},#{couponOriLink,jdbcType=VARCHAR},#{userTypeName,jdbcType=VARCHAR},#{createtime,jdbcType=TIMESTAMP},#{tkMktStatus,jdbcType=VARCHAR},#{updatetime,jdbcType=TIMESTAMP},#{state,jdbcType=INTEGER},#{totalSales,jdbcType=INTEGER},#{materialLibType,jdbcType=INTEGER}) |
| | | (#{id,jdbcType=BIGINT},#{rootCatId,jdbcType=INTEGER},#{eventCreatorId,jdbcType=INTEGER},#{leafCatId,jdbcType=INTEGER},#{debugInfo,jdbcType=VARCHAR},#{rootCatScore,jdbcType=INTEGER},#{sellerId,jdbcType=BIGINT},#{userType,jdbcType=INTEGER},#{shopTitle,jdbcType=VARCHAR},#{pictUrl,jdbcType=VARCHAR},#{pictUrlWhite,jdbcType=VARCHAR},#{title,jdbcType=VARCHAR},#{auctionId,jdbcType=VARCHAR},#{couponLink,jdbcType=VARCHAR},#{couponLinkTaoToken,jdbcType=VARCHAR},#{couponActivityId,jdbcType=VARCHAR},#{biz30day,jdbcType=INTEGER},#{tkRate,jdbcType=DECIMAL},#{nick,jdbcType=VARCHAR},#{includeDxjh,jdbcType=INTEGER},#{reservePrice,jdbcType=DECIMAL},#{tkCommFee,jdbcType=DECIMAL},#{totalFee,jdbcType=DECIMAL},#{totalNum,jdbcType=INTEGER},#{zkPrice,jdbcType=DECIMAL},#{dayLeft,jdbcType=INTEGER},#{tk3rdRate,jdbcType=VARCHAR},#{auctionUrl,jdbcType=VARCHAR},#{rlRate,jdbcType=DECIMAL},#{hasRecommended,jdbcType=INTEGER},#{hasSame,jdbcType=INTEGER},#{sameItemPid,jdbcType=BIGINT},#{couponTotalCount,jdbcType=INTEGER},#{couponLeftCount,jdbcType=INTEGER},#{couponAmount,jdbcType=DECIMAL},#{eventRate,jdbcType=VARCHAR},#{couponShortLink,jdbcType=VARCHAR},#{couponInfo,jdbcType=VARCHAR},#{couponStartFee,jdbcType=DECIMAL},#{couponEffectiveStartTime,jdbcType=VARCHAR},#{couponEffectiveEndTime,jdbcType=VARCHAR},#{hasUmpBonus,jdbcType=VARCHAR},#{isBizActivity,jdbcType=VARCHAR},#{umpBonus,jdbcType=VARCHAR},#{rootCategoryName,jdbcType=VARCHAR},#{couponOriLink,jdbcType=VARCHAR},#{userTypeName,jdbcType=VARCHAR},#{createtime,jdbcType=TIMESTAMP},#{tkMktStatus,jdbcType=VARCHAR},#{updatetime,jdbcType=TIMESTAMP},#{state,jdbcType=INTEGER},#{totalSales,jdbcType=INTEGER},#{materialLibType,jdbcType=INTEGER}) |
| | | </insert> |
| | | <insert id="insertSelective" parameterType="com.yeshi.goods.facade.entity.taobao.TaoBaoGoodsBrief" |
| | | useGeneratedKeys="true" keyProperty="id"> |
| | |
| | | <if test="pictUrl != null">#{pictUrl,jdbcType=VARCHAR},</if> |
| | | <if test="pictUrlWhite != null">#{pictUrlWhite,jdbcType=VARCHAR},</if> |
| | | <if test="title != null">#{title,jdbcType=VARCHAR},</if> |
| | | <if test="auctionId != null">#{auctionId,jdbcType=BIGINT},</if> |
| | | <if test="auctionId != null">#{auctionId,jdbcType=VARCHAR},</if> |
| | | <if test="couponLink != null">#{couponLink,jdbcType=VARCHAR},</if> |
| | | <if test="couponLinkTaoToken != null">#{couponLinkTaoToken,jdbcType=VARCHAR},</if> |
| | | <if test="couponActivityId != null">#{couponActivityId,jdbcType=VARCHAR},</if> |
| | |
| | | pictUrlWhite = |
| | | #{pictUrlWhite,jdbcType=VARCHAR}, |
| | | title = #{title,jdbcType=VARCHAR}, |
| | | auctionId = #{auctionId,jdbcType=BIGINT}, |
| | | auctionId = #{auctionId,jdbcType=VARCHAR}, |
| | | couponLink = |
| | | #{couponLink,jdbcType=VARCHAR}, |
| | | couponLinkTaoToken = |
| | |
| | | <if test="pictUrl != null">pictUrl=#{pictUrl,jdbcType=VARCHAR},</if> |
| | | <if test="pictUrlWhite != null">pictUrlWhite=#{pictUrlWhite,jdbcType=VARCHAR},</if> |
| | | <if test="title != null">title=#{title,jdbcType=VARCHAR},</if> |
| | | <if test="auctionId != null">auctionId=#{auctionId,jdbcType=BIGINT},</if> |
| | | <if test="auctionId != null">auctionId=#{auctionId,jdbcType=VARCHAR},</if> |
| | | <if test="couponLink != null">couponLink=#{couponLink,jdbcType=VARCHAR},</if> |
| | | <if test="couponLinkTaoToken != null">couponLinkTaoToken=#{couponLinkTaoToken,jdbcType=VARCHAR}, |
| | | </if> |
| | |
| | | #{item.pictUrl,jdbcType=VARCHAR}, |
| | | #{item.pictUrlWhite,jdbcType=VARCHAR}, |
| | | #{item.title,jdbcType=VARCHAR}, |
| | | #{item.auctionId,jdbcType=BIGINT}, |
| | | #{item.auctionId,jdbcType=VARCHAR}, |
| | | #{item.couponLink,jdbcType=VARCHAR}, |
| | | #{item.couponLinkTaoToken,jdbcType=VARCHAR}, |
| | | #{item.couponActivityId,jdbcType=VARCHAR}, |
| | |
| | | <mapper namespace="com.yeshi.fanli.dao.mybatis.taobao.TaoBaoLinkMapper"> |
| | | <resultMap id="BaseResultMap" type="com.yeshi.fanli.entity.taobao.TaoBaoLink"> |
| | | <id column="id" property="id" jdbcType="BIGINT"/> |
| | | <result column="auctionId" property="auctionId" jdbcType="BIGINT"/> |
| | | <result column="auctionId" property="auctionId" jdbcType="VARCHAR"/> |
| | | <result column="taoToken" property="taoToken" jdbcType="VARCHAR"/> |
| | | <result column="couponLink" property="couponLink" jdbcType="VARCHAR"/> |
| | | <result column="clickUrl" property="clickUrl" jdbcType="VARCHAR"/> |
| | |
| | | |
| | | |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from yeshi_ec_taobao_link where id = #{id,jdbcType=BIGINT}</delete> |
| | | <insert id="insert" parameterType="com.yeshi.fanli.entity.taobao.TaoBaoLink" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_taobao_link (id,auctionId,sid,taoToken,couponLink,clickUrl) values (#{id,jdbcType=BIGINT},#{auctionId,jdbcType=BIGINT},#{system.id,jdbcType=BIGINT},#{taoToken,jdbcType=VARCHAR},#{couponLink,jdbcType=VARCHAR},#{clickUrl,jdbcType=VARCHAR})</insert> |
| | | <insert id="insert" parameterType="com.yeshi.fanli.entity.taobao.TaoBaoLink" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_taobao_link (id,auctionId,sid,taoToken,couponLink,clickUrl) values (#{id,jdbcType=BIGINT},#{auctionId,jdbcType=VARCHAR},#{system.id,jdbcType=BIGINT},#{taoToken,jdbcType=VARCHAR},#{couponLink,jdbcType=VARCHAR},#{clickUrl,jdbcType=VARCHAR})</insert> |
| | | <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.taobao.TaoBaoLink" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_taobao_link |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">id,</if> |
| | |
| | | </trim>values |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">#{id,jdbcType=BIGINT},</if> |
| | | <if test="auctionId != null">#{auctionId,jdbcType=BIGINT},</if> |
| | | <if test="auctionId != null">#{auctionId,jdbcType=VARCHAR},</if> |
| | | <if test="system != null">#{system.id,jdbcType=BIGINT},</if> |
| | | <if test="taoToken != null">#{taoToken,jdbcType=VARCHAR},</if> |
| | | <if test="couponLink != null">#{couponLink,jdbcType=VARCHAR},</if> |
| | | <if test="clickUrl != null">#{clickUrl,jdbcType=VARCHAR},</if> |
| | | </trim> |
| | | </insert> |
| | | <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.taobao.TaoBaoLink">update yeshi_ec_taobao_link set auctionId = #{auctionId,jdbcType=BIGINT},sid = #{system.id,jdbcType=BIGINT},taoToken = #{taoToken,jdbcType=VARCHAR},couponLink = #{couponLink,jdbcType=VARCHAR},clickUrl = #{clickUrl,jdbcType=VARCHAR} where id = #{id,jdbcType=BIGINT}</update> |
| | | <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.taobao.TaoBaoLink">update yeshi_ec_taobao_link set auctionId = #{auctionId,jdbcType=VARCHAR},sid = #{system.id,jdbcType=BIGINT},taoToken = #{taoToken,jdbcType=VARCHAR},couponLink = #{couponLink,jdbcType=VARCHAR},clickUrl = #{clickUrl,jdbcType=VARCHAR} where id = #{id,jdbcType=BIGINT}</update> |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.taobao.TaoBaoLink">update yeshi_ec_taobao_link |
| | | <set> |
| | | <if test="auctionId != null">auctionId=#{auctionId,jdbcType=BIGINT},</if> |
| | | <if test="auctionId != null">auctionId=#{auctionId,jdbcType=VARCHAR},</if> |
| | | <if test="system != null">sid=#{system.id,jdbcType=BIGINT},</if> |
| | | <if test="taoToken != null">taoToken=#{taoToken,jdbcType=VARCHAR},</if> |
| | | <if test="couponLink != null">couponLink=#{couponLink,jdbcType=VARCHAR},</if> |
| | |
| | | <result column="to_click_time" property="clickTime" jdbcType="VARCHAR" /> |
| | | <result column="to_pay_time" property="payTime" jdbcType="VARCHAR" /> |
| | | <result column="to_title" property="title" jdbcType="VARCHAR" /> |
| | | <result column="to_auction_id" property="auctionId" jdbcType="BIGINT" /> |
| | | <result column="to_auction_id" property="auctionId" jdbcType="VARCHAR" /> |
| | | <result column="to_manager_wangwang" property="managerWangWang" |
| | | jdbcType="VARCHAR" /> |
| | | <result column="to_shop" property="shop" jdbcType="VARCHAR" /> |
| | |
| | | from yeshi_ec_taobao_order where to_order_id = #{0} for update |
| | | </select> |
| | | <select id="selectLatestByAuctionId" resultMap="BaseResultMap" |
| | | parameterType="java.lang.Long"> |
| | | parameterType="java.lang.String"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from yeshi_ec_taobao_order where to_auction_id = #{0} order by to_id |
| | |
| | | useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_taobao_order |
| | | (to_id,to_create_time,to_click_time,to_pay_time,to_title,to_auction_id,to_manager_wangwang,to_shop,to_count,to_price,to_order_state,to_order_type,to_iratio,to_sratio,to_payment,to_estimate,to_settlement,to_eIncome,to_settlement_time,to_tk_rate,to_tk_money,to_technology_support_percent,to_subsidy_ratio,to_subsidy,to_subsidy_type,to_transaction_platform,to_third_service,to_order_id,to_class_name,to_source_media_id,to_source_media_name,to_ad_position_id,to_ad_position_name,to_latest_updatetime,to_orderby,to_relation_id,to_special_id,to_trade_id) |
| | | values |
| | | (#{id,jdbcType=BIGINT},#{createTime,jdbcType=VARCHAR},#{clickTime,jdbcType=VARCHAR},#{payTime,jdbcType=VARCHAR},#{title,jdbcType=VARCHAR},#{auctionId,jdbcType=BIGINT},#{managerWangWang,jdbcType=VARCHAR},#{shop,jdbcType=VARCHAR},#{count,jdbcType=INTEGER},#{price,jdbcType=DECIMAL},#{orderState,jdbcType=VARCHAR},#{orderType,jdbcType=VARCHAR},#{iRatio,jdbcType=DECIMAL},#{sRatio,jdbcType=DECIMAL},#{payment,jdbcType=DECIMAL},#{estimate,jdbcType=DECIMAL},#{settlement,jdbcType=DECIMAL},#{eIncome,jdbcType=DECIMAL},#{settlementTime,jdbcType=VARCHAR},#{tkRate,jdbcType=DECIMAL},#{tkMoney,jdbcType=DECIMAL},#{technologySupportPercent,jdbcType=DECIMAL},#{subsidyRatio,jdbcType=DECIMAL},#{subsidy,jdbcType=DECIMAL},#{subsidyType,jdbcType=VARCHAR},#{transactionPlatform,jdbcType=VARCHAR},#{thirdService,jdbcType=VARCHAR},#{orderId,jdbcType=VARCHAR},#{className,jdbcType=VARCHAR},#{sourceMediaId,jdbcType=VARCHAR},#{sourceMediaName,jdbcType=VARCHAR},#{adPositionId,jdbcType=VARCHAR},#{adPositionName,jdbcType=VARCHAR}, |
| | | (#{id,jdbcType=BIGINT},#{createTime,jdbcType=VARCHAR},#{clickTime,jdbcType=VARCHAR},#{payTime,jdbcType=VARCHAR},#{title,jdbcType=VARCHAR},#{auctionId,jdbcType=VARCHAR},#{managerWangWang,jdbcType=VARCHAR},#{shop,jdbcType=VARCHAR},#{count,jdbcType=INTEGER},#{price,jdbcType=DECIMAL},#{orderState,jdbcType=VARCHAR},#{orderType,jdbcType=VARCHAR},#{iRatio,jdbcType=DECIMAL},#{sRatio,jdbcType=DECIMAL},#{payment,jdbcType=DECIMAL},#{estimate,jdbcType=DECIMAL},#{settlement,jdbcType=DECIMAL},#{eIncome,jdbcType=DECIMAL},#{settlementTime,jdbcType=VARCHAR},#{tkRate,jdbcType=DECIMAL},#{tkMoney,jdbcType=DECIMAL},#{technologySupportPercent,jdbcType=DECIMAL},#{subsidyRatio,jdbcType=DECIMAL},#{subsidy,jdbcType=DECIMAL},#{subsidyType,jdbcType=VARCHAR},#{transactionPlatform,jdbcType=VARCHAR},#{thirdService,jdbcType=VARCHAR},#{orderId,jdbcType=VARCHAR},#{className,jdbcType=VARCHAR},#{sourceMediaId,jdbcType=VARCHAR},#{sourceMediaName,jdbcType=VARCHAR},#{adPositionId,jdbcType=VARCHAR},#{adPositionName,jdbcType=VARCHAR}, |
| | | #{latestUpdateTime,jdbcType=TIMESTAMP},#{orderBy,jdbcType=INTEGER}, |
| | | #{relationId,jdbcType=VARCHAR},#{specialId,jdbcType=VARCHAR} |
| | | ,#{tradeId,jdbcType=VARCHAR}) |
| | |
| | | <if test="clickTime != null">#{clickTime,jdbcType=VARCHAR},</if> |
| | | <if test="payTime != null">#{payTime,jdbcType=VARCHAR},</if> |
| | | <if test="title != null">#{title,jdbcType=VARCHAR},</if> |
| | | <if test="auctionId != null">#{auctionId,jdbcType=BIGINT},</if> |
| | | <if test="auctionId != null">#{auctionId,jdbcType=VARCHAR},</if> |
| | | <if test="managerWangWang != null">#{managerWangWang,jdbcType=VARCHAR},</if> |
| | | <if test="shop != null">#{shop,jdbcType=VARCHAR},</if> |
| | | <if test="count != null">#{count,jdbcType=INTEGER},</if> |
| | |
| | | #{clickTime,jdbcType=VARCHAR},to_pay_time = |
| | | #{payTime,jdbcType=VARCHAR},to_title = |
| | | #{title,jdbcType=VARCHAR},to_auction_id = |
| | | #{auctionId,jdbcType=BIGINT},to_manager_wangwang = |
| | | #{auctionId,jdbcType=VARCHAR},to_manager_wangwang = |
| | | #{managerWangWang,jdbcType=VARCHAR},to_shop = |
| | | #{shop,jdbcType=VARCHAR},to_count = #{count,jdbcType=INTEGER},to_price |
| | | = #{price,jdbcType=DECIMAL},to_order_state = |
| | |
| | | <if test="clickTime != null">to_click_time=#{clickTime,jdbcType=VARCHAR},</if> |
| | | <if test="payTime != null">to_pay_time=#{payTime,jdbcType=VARCHAR},</if> |
| | | <if test="title != null">to_title=#{title,jdbcType=VARCHAR},</if> |
| | | <if test="auctionId != null">to_auction_id=#{auctionId,jdbcType=BIGINT},</if> |
| | | <if test="auctionId != null">to_auction_id=#{auctionId,jdbcType=VARCHAR},</if> |
| | | <if test="managerWangWang != null">to_manager_wangwang=#{managerWangWang,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="shop != null">to_shop=#{shop,jdbcType=VARCHAR},</if> |
| | |
| | | <result column="to_click_time" property="clickTime" jdbcType="VARCHAR" /> |
| | | <result column="to_pay_time" property="payTime" jdbcType="VARCHAR" /> |
| | | <result column="to_title" property="title" jdbcType="VARCHAR" /> |
| | | <result column="to_auction_id" property="auctionId" jdbcType="BIGINT" /> |
| | | <result column="to_auction_id" property="auctionId" jdbcType="VARCHAR" /> |
| | | <result column="to_manager_wangwang" property="managerWangWang" |
| | | jdbcType="VARCHAR" /> |
| | | <result column="to_shop" property="shop" jdbcType="VARCHAR" /> |
| | |
| | | <id column="tt_id" property="id" jdbcType="BIGINT" /> |
| | | <result column="tt_pid" property="pid" jdbcType="VARCHAR" /> |
| | | <result column="tt_token" property="token" jdbcType="VARCHAR" /> |
| | | <result column="tt_auction_id" property="auctionId" jdbcType="BIGINT" /> |
| | | <result column="tt_auction_id" property="auctionId" jdbcType="VARCHAR" /> |
| | | <result column="tt_create_time" property="createTime" jdbcType="TIMESTAMP" /> |
| | | <result column="tt_expire_time" property="expireTime" jdbcType="TIMESTAMP" /> |
| | | </resultMap> |
| | |
| | | useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_taobao_token |
| | | (tt_id,tt_pid,tt_token,tt_auction_id,tt_create_time,tt_expire_time) |
| | | values |
| | | (#{id,jdbcType=BIGINT},#{pid,jdbcType=VARCHAR},#{token,jdbcType=VARCHAR},#{auctionId,jdbcType=BIGINT},#{createTime,jdbcType=TIMESTAMP},#{expireTime,jdbcType=TIMESTAMP}) |
| | | (#{id,jdbcType=BIGINT},#{pid,jdbcType=VARCHAR},#{token,jdbcType=VARCHAR},#{auctionId,jdbcType=VARCHAR},#{createTime,jdbcType=TIMESTAMP},#{expireTime,jdbcType=TIMESTAMP}) |
| | | </insert> |
| | | <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.taobao.TaoBaoToken" |
| | | useGeneratedKeys="true" keyProperty="id"> |
| | |
| | | <if test="id != null">#{id,jdbcType=BIGINT},</if> |
| | | <if test="pid != null">#{pid,jdbcType=VARCHAR},</if> |
| | | <if test="token != null">#{token,jdbcType=VARCHAR},</if> |
| | | <if test="auctionId != null">#{auctionId,jdbcType=BIGINT},</if> |
| | | <if test="auctionId != null">#{auctionId,jdbcType=VARCHAR},</if> |
| | | <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="expireTime != null">#{expireTime,jdbcType=TIMESTAMP},</if> |
| | | </trim> |
| | |
| | | <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.taobao.TaoBaoToken">update |
| | | yeshi_ec_taobao_token set tt_pid = #{pid,jdbcType=VARCHAR},tt_token = |
| | | #{token,jdbcType=VARCHAR},tt_auction_id = |
| | | #{auctionId,jdbcType=BIGINT},tt_create_time = |
| | | #{auctionId,jdbcType=VARCHAR},tt_create_time = |
| | | #{createTime,jdbcType=TIMESTAMP},tt_expire_time = |
| | | #{expireTime,jdbcType=TIMESTAMP} where tt_id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | |
| | | <set> |
| | | <if test="pid != null">tt_pid=#{pid,jdbcType=VARCHAR},</if> |
| | | <if test="token != null">tt_token=#{token,jdbcType=VARCHAR},</if> |
| | | <if test="auctionId != null">tt_auction_id=#{auctionId,jdbcType=BIGINT},</if> |
| | | <if test="auctionId != null">tt_auction_id=#{auctionId,jdbcType=VARCHAR},</if> |
| | | <if test="createTime != null">tt_create_time=#{createTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="expireTime != null">tt_expire_time=#{expireTime,jdbcType=TIMESTAMP},</if> |
| | | </set> |
| | |
| | | <resultMap id="BaseResultMap" type="com.yeshi.fanli.entity.bus.tlj.UserTaoLiJinRecord"> |
| | | <id column="utlj_id" property="id" jdbcType="BIGINT"/> |
| | | <result column="utlj_uid" property="uid" jdbcType="BIGINT"/> |
| | | <result column="utlj_goods_id" property="goodsId" jdbcType="BIGINT"/> |
| | | <result column="utlj_goods_id" property="goodsId" jdbcType="VARCHAR"/> |
| | | <result column="utlj_total_num" property="totalNum" jdbcType="INTEGER"/> |
| | | <result column="utlj_name" property="name" jdbcType="VARCHAR"/> |
| | | <result column="utlj_per_face" property="perFace" jdbcType="DECIMAL"/> |
| | |
| | | </resultMap> |
| | | |
| | | <resultMap id="ResultVOMap" type="com.yeshi.fanli.vo.user.UserTaoLiJinRecordVO"> |
| | | <result column="utlj_goods_id" property="auctionId" jdbcType="BIGINT"/> |
| | | <result column="utlj_goods_id" property="auctionId" jdbcType="VARCHAR"/> |
| | | <result column="utlj_total_num" property="totalNum" jdbcType="INTEGER"/> |
| | | <result column="utlj_create_time" property="createTime" jdbcType="TIMESTAMP"/> |
| | | |
| | |
| | | </select> |
| | | |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from yeshi_ec_user_taolijin_record where utlj_id = #{id,jdbcType=BIGINT}</delete> |
| | | <insert id="insert" parameterType="com.yeshi.fanli.entity.bus.tlj.UserTaoLiJinRecord" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_user_taolijin_record (utlj_id,utlj_uid,utlj_goods_id,utlj_total_num,utlj_name,utlj_per_face,utlj_send_start_time,utlj_send_end_time,utlj_use_start_time,utlj_use_end_time,utlj_rights_id,utlj_send_url,utlj_create_time,utlj_use_type) values (#{id,jdbcType=BIGINT},#{uid,jdbcType=BIGINT},#{goodsId,jdbcType=BIGINT},#{totalNum,jdbcType=INTEGER},#{name,jdbcType=VARCHAR},#{perFace,jdbcType=DECIMAL},#{sendStartTime,jdbcType=TIMESTAMP},#{sendEndTime,jdbcType=TIMESTAMP},#{useStartTime,jdbcType=TIMESTAMP},#{useEndTime,jdbcType=TIMESTAMP},#{rightsId,jdbcType=VARCHAR},#{sendUrl,jdbcType=VARCHAR},#{createTime,jdbcType=TIMESTAMP},#{useType,jdbcType=INTEGER})</insert> |
| | | <insert id="insert" parameterType="com.yeshi.fanli.entity.bus.tlj.UserTaoLiJinRecord" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_user_taolijin_record (utlj_id,utlj_uid,utlj_goods_id,utlj_total_num,utlj_name,utlj_per_face,utlj_send_start_time,utlj_send_end_time,utlj_use_start_time,utlj_use_end_time,utlj_rights_id,utlj_send_url,utlj_create_time,utlj_use_type) values (#{id,jdbcType=BIGINT},#{uid,jdbcType=BIGINT},#{goodsId,jdbcType=VARCHAR},#{totalNum,jdbcType=INTEGER},#{name,jdbcType=VARCHAR},#{perFace,jdbcType=DECIMAL},#{sendStartTime,jdbcType=TIMESTAMP},#{sendEndTime,jdbcType=TIMESTAMP},#{useStartTime,jdbcType=TIMESTAMP},#{useEndTime,jdbcType=TIMESTAMP},#{rightsId,jdbcType=VARCHAR},#{sendUrl,jdbcType=VARCHAR},#{createTime,jdbcType=TIMESTAMP},#{useType,jdbcType=INTEGER})</insert> |
| | | <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.bus.tlj.UserTaoLiJinRecord" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_user_taolijin_record |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">utlj_id,</if> |
| | |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">#{id,jdbcType=BIGINT},</if> |
| | | <if test="uid != null">#{uid,jdbcType=BIGINT},</if> |
| | | <if test="goodsId != null">#{goodsId,jdbcType=BIGINT},</if> |
| | | <if test="goodsId != null">#{goodsId,jdbcType=VARCHAR},</if> |
| | | <if test="totalNum != null">#{totalNum,jdbcType=INTEGER},</if> |
| | | <if test="name != null">#{name,jdbcType=VARCHAR},</if> |
| | | <if test="perFace != null">#{perFace,jdbcType=DECIMAL},</if> |
| | |
| | | <if test="useType != null">#{useType,jdbcType=INTEGER},</if> |
| | | </trim> |
| | | </insert> |
| | | <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.bus.tlj.UserTaoLiJinRecord">update yeshi_ec_user_taolijin_record set utlj_uid = #{uid,jdbcType=BIGINT},utlj_goods_id = #{goodsId,jdbcType=BIGINT},utlj_total_num = #{totalNum,jdbcType=INTEGER},utlj_name = #{name,jdbcType=VARCHAR},utlj_per_face = #{perFace,jdbcType=DECIMAL},utlj_send_start_time = #{sendStartTime,jdbcType=TIMESTAMP},utlj_send_end_time = #{sendEndTime,jdbcType=TIMESTAMP},utlj_use_start_time = #{useStartTime,jdbcType=TIMESTAMP},utlj_use_end_time = #{useEndTime,jdbcType=TIMESTAMP},utlj_rights_id = #{rightsId,jdbcType=VARCHAR},utlj_send_url = #{sendUrl,jdbcType=VARCHAR},utlj_create_time = #{createTime,jdbcType=TIMESTAMP},utlj_use_type = #{useType,jdbcType=INTEGER} where utlj_id = #{id,jdbcType=BIGINT}</update> |
| | | <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.bus.tlj.UserTaoLiJinRecord">update yeshi_ec_user_taolijin_record set utlj_uid = #{uid,jdbcType=BIGINT},utlj_goods_id = #{goodsId,jdbcType=VARCHAR},utlj_total_num = #{totalNum,jdbcType=INTEGER},utlj_name = #{name,jdbcType=VARCHAR},utlj_per_face = #{perFace,jdbcType=DECIMAL},utlj_send_start_time = #{sendStartTime,jdbcType=TIMESTAMP},utlj_send_end_time = #{sendEndTime,jdbcType=TIMESTAMP},utlj_use_start_time = #{useStartTime,jdbcType=TIMESTAMP},utlj_use_end_time = #{useEndTime,jdbcType=TIMESTAMP},utlj_rights_id = #{rightsId,jdbcType=VARCHAR},utlj_send_url = #{sendUrl,jdbcType=VARCHAR},utlj_create_time = #{createTime,jdbcType=TIMESTAMP},utlj_use_type = #{useType,jdbcType=INTEGER} where utlj_id = #{id,jdbcType=BIGINT}</update> |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.bus.tlj.UserTaoLiJinRecord">update yeshi_ec_user_taolijin_record |
| | | <set> |
| | | <if test="uid != null">utlj_uid=#{uid,jdbcType=BIGINT},</if> |
| | | <if test="goodsId != null">utlj_goods_id=#{goodsId,jdbcType=BIGINT},</if> |
| | | <if test="goodsId != null">utlj_goods_id=#{goodsId,jdbcType=VARCHAR},</if> |
| | | <if test="totalNum != null">utlj_total_num=#{totalNum,jdbcType=INTEGER},</if> |
| | | <if test="name != null">utlj_name=#{name,jdbcType=VARCHAR},</if> |
| | | <if test="perFace != null">utlj_per_face=#{perFace,jdbcType=DECIMAL},</if> |