记得上下班打卡 | git大法好,push需谨慎

Commit 5f2dfeec authored by GaoHu's avatar GaoHu

exit

parent ec2672d8
...@@ -239,66 +239,6 @@ public class GoblinGoodsAnticipateServiceImpl implements IGoblinGoodsAnticipateS ...@@ -239,66 +239,6 @@ public class GoblinGoodsAnticipateServiceImpl implements IGoblinGoodsAnticipateS
return ResponseDto.success(); return ResponseDto.success();
} }
/* @Override
public ResponseDto<Object> update(GoblinGoodsAnticipateUpdateParam goodsAnticipateUpdateParam) {
//跟新mongodb
goblinMongoUtils.updateGoblinGoodsAnticipateVo(goodsAnticipateUpdateParam);
//修改mysql
LinkedList<Object[]> sqlValue = CollectionUtil.linkedListObjectArr();
sqlValue.add(new Object[]{
goodsAnticipateUpdateParam.getName(),
goodsAnticipateUpdateParam.getRule(),
goodsAnticipateUpdateParam.getAntId()
});
sendRedis("goblin_goods_anticipate_update", sqlValue);
return ResponseDto.success();
}
@Override
public ResponseDto<Object> updateAnticipateValues(List<GoblinGoodsAnticipateValueParam> list) {
if (list != null && list.size() > 0) {
list.forEach(item -> {
GoblinGoodsAnticipateValueVo goodsAnticipateValueVo = new GoblinGoodsAnticipateValueVo();
BeanUtils.copyProperties(item, goodsAnticipateValueVo);
LinkedList<Object[]> sqlValue = CollectionUtil.linkedListObjectArr();
if (goodsAnticipateValueVo.getDelTag() == 1) {
//删除该sku关联
goblinMongoUtils.delAnticipateValueVo(goodsAnticipateValueVo);
//删除redis
goblinRedisUtils.delAnticipateValue(goodsAnticipateValueVo.getSkuId());
//删除mysql中的关联数据
sqlValue.add(new Object[]{
goodsAnticipateValueVo.getAntId(),
goodsAnticipateValueVo.getSkuId()
});
sendRedis("goblin_goods_anticipate_value_delete_by_antId_and_skuId", sqlValue);
} else {
//保存mysql中间表
sqlValue.add(new Object[]{
goodsAnticipateValueVo.getAboutStartDate(),
goodsAnticipateValueVo.getAboutEndDate(),
goodsAnticipateValueVo.getAntId(),
goodsAnticipateValueVo.getSkuId(),
goodsAnticipateValueVo.getSpuId(),
});
sendRedis("goblin_goods_anticipate_value_update", sqlValue);
//修改mongodb
goblinMongoUtils.updateAnticipateValueVo(goodsAnticipateValueVo);
}
});
}
return ResponseDto.success();
}
@Override
public ResponseDto<Object> getAnticipateValues(String antId) {
return ResponseDto.success(goblinMongoUtils.getGoodsAnticipateValues(antId));
}*/
public void sendRedis(String sqlKey, LinkedList<Object[]> sqlData) { public void sendRedis(String sqlKey, LinkedList<Object[]> sqlData) {
LinkedList<String> sql = CollectionUtil.linkedListString(); LinkedList<String> sql = CollectionUtil.linkedListString();
sql.add(SqlMapping.get(sqlKey)); sql.add(SqlMapping.get(sqlKey));
......
...@@ -158,15 +158,6 @@ public class GoblinMongoUtils { ...@@ -158,15 +158,6 @@ public class GoblinMongoUtils {
mongoTemplate.remove(query, GoblinGoodAnticipateUserVo.class.getSimpleName()).getDeletedCount(); mongoTemplate.remove(query, GoblinGoodAnticipateUserVo.class.getSimpleName()).getDeletedCount();
} }
} }
/**
* 根据预约ID获取预约详情
*/
public GoblinGoodsAnticipateVo getAnticipateVo(String antId) {
return mongoTemplate.findOne(Query.query(Criteria.where("autId").is(antId)),
GoblinGoodsAnticipateVo.class, GoblinGoodsAnticipateVo.class.getSimpleName());
}
/** /**
* 添加预约中间表信息 * 添加预约中间表信息
*/ */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment