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

Commit 85f72375 authored by 胡佳晨's avatar 胡佳晨

正在下单活动 返回图片

parent b69ea764
...@@ -153,10 +153,15 @@ public class GoblinZhengzaiMarketServiceImpl implements IGoblinZhengzaiMarketSer ...@@ -153,10 +153,15 @@ public class GoblinZhengzaiMarketServiceImpl implements IGoblinZhengzaiMarketSer
@Override @Override
public ResponseDto<Boolean> zhengzaiUpdate(String marketId, String purchaseName, String performanceId, String img, String st, String et) { public ResponseDto<Boolean> zhengzaiUpdate(String marketId, String purchaseName, String performanceId, String img, String st, String et) {
GoblinSelfMarketingVo data =goblinRedisUtils.getSelfMarket(marketId);
if(data.getPerformanceId().equals(performanceId)){
}else {
int count = goblinSelfMarketingMapper.selectCount(Wrappers.lambdaUpdate(GoblinSelfMarketing.class).eq(GoblinSelfMarketing::getPerformanceId, performanceId).eq(GoblinSelfMarketing::getDelFlag, 0)); int count = goblinSelfMarketingMapper.selectCount(Wrappers.lambdaUpdate(GoblinSelfMarketing.class).eq(GoblinSelfMarketing::getPerformanceId, performanceId).eq(GoblinSelfMarketing::getDelFlag, 0));
if (count > 1) { if (count > 0) {
return ResponseDto.failure("该演出已关联活动"); return ResponseDto.failure("该演出已关联活动");
} }
}
GoblinSelfMarketing selfMarketing = GoblinSelfMarketing.getNew(); GoblinSelfMarketing selfMarketing = GoblinSelfMarketing.getNew();
selfMarketing.setSelfMarketId(marketId); selfMarketing.setSelfMarketId(marketId);
selfMarketing.setName(purchaseName); selfMarketing.setName(purchaseName);
......
...@@ -45,6 +45,21 @@ public class GoblinRedisUtils { ...@@ -45,6 +45,21 @@ public class GoblinRedisUtils {
redisDataSourceUtil.getRedisGoblinUtil().del(redisKey); redisDataSourceUtil.getRedisGoblinUtil().del(redisKey);
} }
/**
* 删除店铺活动
*
* @param selfMarketId
*/
public GoblinSelfMarketingVo getSelfMarket(String selfMarketId) {
String redisKey = GoblinRedisConst.REDIS_GOBLIN_SELF_MARKET.concat(selfMarketId);
Object obj = redisDataSourceUtil.getRedisGoblinUtil().get(redisKey);
if(obj==null){
return GoblinSelfMarketingVo.getNew();
}else{
return (GoblinSelfMarketingVo) obj;
}
}
/** /**
* 正在下单 可参加商户 * 正在下单 可参加商户
* *
......
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