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

Commit f704455d authored by 胡佳晨's avatar 胡佳晨

提交 脚本

parent aa76553e
...@@ -4,6 +4,8 @@ import com.github.pagehelper.PageInfo; ...@@ -4,6 +4,8 @@ import com.github.pagehelper.PageInfo;
import com.liquidnet.commons.lang.util.DateUtil; import com.liquidnet.commons.lang.util.DateUtil;
import com.liquidnet.commons.lang.util.IDGenerator; import com.liquidnet.commons.lang.util.IDGenerator;
import com.liquidnet.service.base.ResponseDto; import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.base.SqlMapping;
import com.liquidnet.service.base.constant.MQConst;
import com.liquidnet.service.goblin.dto.manage.GoblinStorePurchaseItemParam; import com.liquidnet.service.goblin.dto.manage.GoblinStorePurchaseItemParam;
import com.liquidnet.service.goblin.dto.vo.GoblinStoreMarketVo; import com.liquidnet.service.goblin.dto.vo.GoblinStoreMarketVo;
import com.liquidnet.service.goblin.entity.GoblinStoreMarketPurchasing; import com.liquidnet.service.goblin.entity.GoblinStoreMarketPurchasing;
...@@ -11,6 +13,7 @@ import com.liquidnet.service.goblin.entity.GoblinStoreMarketing; ...@@ -11,6 +13,7 @@ import com.liquidnet.service.goblin.entity.GoblinStoreMarketing;
import com.liquidnet.service.goblin.service.manage.IGoblinStorePurchasingService; import com.liquidnet.service.goblin.service.manage.IGoblinStorePurchasingService;
import com.liquidnet.service.goblin.util.GoblinMongoUtils; import com.liquidnet.service.goblin.util.GoblinMongoUtils;
import com.liquidnet.service.goblin.util.GoblinRedisUtils; import com.liquidnet.service.goblin.util.GoblinRedisUtils;
import com.liquidnet.service.goblin.util.QueueUtils;
import me.chanjar.weixin.common.util.DataUtils; import me.chanjar.weixin.common.util.DataUtils;
import org.apache.commons.lang.time.DateUtils; import org.apache.commons.lang.time.DateUtils;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
...@@ -30,6 +33,8 @@ public class GoblinStorePurchasingServiceImpl implements IGoblinStorePurchasingS ...@@ -30,6 +33,8 @@ public class GoblinStorePurchasingServiceImpl implements IGoblinStorePurchasingS
GoblinRedisUtils goblinRedisUtils; GoblinRedisUtils goblinRedisUtils;
@Autowired @Autowired
GoblinMongoUtils goblinMongoUtils; GoblinMongoUtils goblinMongoUtils;
@Autowired
QueueUtils queueUtils;
@Override @Override
public ResponseDto<PageInfo<GoblinStoreMarketVo>> purchasingList(int page, String purchaseName, int status, String st, String et, String ct) { public ResponseDto<PageInfo<GoblinStoreMarketVo>> purchasingList(int page, String purchaseName, int status, String st, String et, String ct) {
...@@ -75,7 +80,9 @@ public class GoblinStorePurchasingServiceImpl implements IGoblinStorePurchasingS ...@@ -75,7 +80,9 @@ public class GoblinStorePurchasingServiceImpl implements IGoblinStorePurchasingS
goblinRedisUtils.delGoblinStoreMarketVo(marketId, storeId); goblinRedisUtils.delGoblinStoreMarketVo(marketId, storeId);
break; break;
} }
//mysql todo //mysql
queueUtils.sendMsgByRedis(MQConst.GoblinQueue.GOBLIN_STORE_MARKET.getKey(),
SqlMapping.get("goblin.store.market.status", bean.getStatus(), bean.getDelFlag(), marketId, storeId));
return ResponseDto.success(); return ResponseDto.success();
} }
...@@ -95,6 +102,8 @@ public class GoblinStorePurchasingServiceImpl implements IGoblinStorePurchasingS ...@@ -95,6 +102,8 @@ public class GoblinStorePurchasingServiceImpl implements IGoblinStorePurchasingS
bean.setIsPre(isPre); bean.setIsPre(isPre);
if (isPre == 1) { if (isPre == 1) {
bean.setPreTime(LocalDateTime.parse(preTime, DTF_YMD_HMS)); bean.setPreTime(LocalDateTime.parse(preTime, DTF_YMD_HMS));
} else {
bean.setPreTime(null);
} }
bean.setCreatedAt(LocalDateTime.now()); bean.setCreatedAt(LocalDateTime.now());
...@@ -108,7 +117,9 @@ public class GoblinStorePurchasingServiceImpl implements IGoblinStorePurchasingS ...@@ -108,7 +117,9 @@ public class GoblinStorePurchasingServiceImpl implements IGoblinStorePurchasingS
goblinMongoUtils.insertStoreMarket(vo); goblinMongoUtils.insertStoreMarket(vo);
//redis //redis
goblinRedisUtils.setGoblinStoreMarketVo(storeMarketId, storeId, vo); goblinRedisUtils.setGoblinStoreMarketVo(storeMarketId, storeId, vo);
//mysql todo //mysql
queueUtils.sendMsgByRedis(MQConst.GoblinQueue.GOBLIN_STORE_MARKET.getKey(),
SqlMapping.get("goblin.store.market.insert", bean.getStoreMarketId(), bean.getName(), bean.getType(), bean.getStatus(), bean.getStoreId(), bean.getStartTime(), bean.getEndTime(), bean.getDelFlag(), bean.getIsPre(), bean.getPreTime(), bean.getCreatedAt()));
return ResponseDto.success(); return ResponseDto.success();
} }
...@@ -126,7 +137,7 @@ public class GoblinStorePurchasingServiceImpl implements IGoblinStorePurchasingS ...@@ -126,7 +137,7 @@ public class GoblinStorePurchasingServiceImpl implements IGoblinStorePurchasingS
bean.setIsPre(isPre); bean.setIsPre(isPre);
if (isPre == 1) { if (isPre == 1) {
bean.setPreTime(LocalDateTime.parse(preTime, DTF_YMD_HMS)); bean.setPreTime(LocalDateTime.parse(preTime, DTF_YMD_HMS));
}else{ } else {
bean.setPreTime(null); bean.setPreTime(null);
} }
bean.setUpdatedAt(LocalDateTime.now()); bean.setUpdatedAt(LocalDateTime.now());
...@@ -137,7 +148,9 @@ public class GoblinStorePurchasingServiceImpl implements IGoblinStorePurchasingS ...@@ -137,7 +148,9 @@ public class GoblinStorePurchasingServiceImpl implements IGoblinStorePurchasingS
goblinMongoUtils.updateStoreMarket(marketId, storeId, vo); goblinMongoUtils.updateStoreMarket(marketId, storeId, vo);
//redis //redis
goblinRedisUtils.setGoblinStoreMarketVo(marketId, storeId, vo); goblinRedisUtils.setGoblinStoreMarketVo(marketId, storeId, vo);
//mysql todo //mysql
queueUtils.sendMsgByRedis(MQConst.GoblinQueue.GOBLIN_STORE_MARKET.getKey(),
SqlMapping.get("goblin.store.market.update", bean.getName(), bean.getType(), bean.getStatus(), bean.getStoreId(), bean.getDescribes(), bean.getStartTime(), bean.getEndTime(), bean.getDelFlag(), bean.getIsPre(), bean.getPreTime(), bean.getUpdatedAt(), bean.getStoreMarketId(), bean.getStoreId()));
return ResponseDto.success(); return ResponseDto.success();
} }
...@@ -169,6 +182,8 @@ public class GoblinStorePurchasingServiceImpl implements IGoblinStorePurchasingS ...@@ -169,6 +182,8 @@ public class GoblinStorePurchasingServiceImpl implements IGoblinStorePurchasingS
bean.setDelFlag(0); bean.setDelFlag(0);
bean.setCreatedAt(now); bean.setCreatedAt(now);
//mongo //mongo
goblinRedisUtils.getGoodsInfoVo(item.getSpuId());
goblinRedisUtils.getGoodsSkuInfoVo(item.getSkuId());
//redis //redis
} }
......
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