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

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

修改 活动名称不能重复 修改配置文件指定 config goblin/order

parent db4621cf
...@@ -338,5 +338,7 @@ public class GoblinRedisConst { ...@@ -338,5 +338,7 @@ public class GoblinRedisConst {
public static final String GOBLIN_MIX_LIMIT = PREFIX.concat("mix:limit:");//$key:$mixId:$uid 混合售开始列表 public static final String GOBLIN_MIX_LIMIT = PREFIX.concat("mix:limit:");//$key:$mixId:$uid 混合售开始列表
/* ----------------------------------------------------------------- */ /* ----------------------------------------------------------------- */
public static final String GOBLIN_ORDER_LOG = PREFIX.concat("order:log:");//无用
/* ----------------------------------------------------------------- */ /* ----------------------------------------------------------------- */
} }
...@@ -151,6 +151,12 @@ public class GoblinMixServiceImpl implements IGoblinMixService { ...@@ -151,6 +151,12 @@ public class GoblinMixServiceImpl implements IGoblinMixService {
List<GoblinMixDetailsItemVo> itemList = ObjectUtil.goblinMixDetailsItemVo(); List<GoblinMixDetailsItemVo> itemList = ObjectUtil.goblinMixDetailsItemVo();
List<GoblinMixDetailsItemParam> itemParams = param.getItem(); List<GoblinMixDetailsItemParam> itemParams = param.getItem();
//判断活动名称
int count = (int) mongoUtils.getMixNameCount(param.getName());
if(count>0){
return ResponseDto.failure("活动名称重复");
}
LinkedList<String> sqls = CollectionUtil.linkedListString(); LinkedList<String> sqls = CollectionUtil.linkedListString();
sqls.add(SqlMapping.get("goblin_mix_insert")); sqls.add(SqlMapping.get("goblin_mix_insert"));
sqls.add(SqlMapping.get("goblin_mix_details_insert")); sqls.add(SqlMapping.get("goblin_mix_details_insert"));
......
...@@ -1746,6 +1746,11 @@ public class GoblinMongoUtils { ...@@ -1746,6 +1746,11 @@ public class GoblinMongoUtils {
return mongoTemplate.insert(vo, GoblinMixDetailsVo.class.getSimpleName()); return mongoTemplate.insert(vo, GoblinMixDetailsVo.class.getSimpleName());
} }
// 添加 混合售 数据
public long getMixNameCount(String name) {
return mongoTemplate.count(Query.query(Criteria.where("name").is(name)), GoblinMixDetailsVo.class, GoblinMixDetailsVo.class.getSimpleName());
}
//修改 混合售 数据 //修改 混合售 数据
public Boolean changeGoblinMixDetailsVo(GoblinMixDetailsVo vo) { public Boolean changeGoblinMixDetailsVo(GoblinMixDetailsVo vo) {
return mongoTemplate.getCollection(GoblinMixDetailsVo.class.getSimpleName()) return mongoTemplate.getCollection(GoblinMixDetailsVo.class.getSimpleName())
......
...@@ -9,10 +9,10 @@ eureka: ...@@ -9,10 +9,10 @@ eureka:
spring: spring:
cloud: cloud:
config: config:
# uri: http://127.0.0.1:7002/support-config uri: http://182.92.70.253:7002/support-config
# uri: http://39.107.71.112:7002/support-config # uri: http://39.107.71.112:7002/support-config
profile: ${liquidnet.cloudConfig.profile} # profile: ${liquidnet.cloudConfig.profile}
name: ${spring.application.name} #默认为spring.application.name # name: ${spring.application.name} #默认为spring.application.name
discovery: # discovery:
enabled: true # enabled: true
service-id: liquidnet-support-config # service-id: liquidnet-support-config
\ No newline at end of file \ No newline at end of file
...@@ -646,7 +646,9 @@ public class MixOrderServiceImpl implements IMixOrderService { ...@@ -646,7 +646,9 @@ public class MixOrderServiceImpl implements IMixOrderService {
logVo.setOperationName(orderVo.getUserName()); logVo.setOperationName(orderVo.getUserName());
logVo.setOperationType(GoblinStatusConst.Type.OPERATION_TYPE_1.getValue()); logVo.setOperationType(GoblinStatusConst.Type.OPERATION_TYPE_1.getValue());
logVo.setCreatedAt(LocalDateTime.now()); logVo.setCreatedAt(LocalDateTime.now());
mongoUtils.insertGoblinOrderLogVo(logVo); redisUtils.setLogVo(orderVo.getOrderId()+orderVo.getOrderCode(),logVo);
queueUtils.setMongoList(GoblinOrderLogVo.class.getSimpleName(), "orderId", orderVo.getOrderId()+orderVo.getOrderCode(), GoblinRedisConst.REDIS_GOBLIN_ORDER, 1);
// mongoUtils.insertGoblinOrderLogVo(logVo);
//mysql //mysql
sqlDataSku.add(new Object[]{ sqlDataSku.add(new Object[]{
......
...@@ -72,6 +72,11 @@ public class GoblinRedisUtils { ...@@ -72,6 +72,11 @@ public class GoblinRedisUtils {
return vo; return vo;
} }
public void setLogVo(String orderId, GoblinOrderLogVo vo) {
String rk = GoblinRedisConst.GOBLIN_ORDER_LOG.concat(orderId);
redisUtil.set(rk, vo);
}
/* ---------------------------------------- 商品数据源 ---------------------------------------- */ /* ---------------------------------------- 商品数据源 ---------------------------------------- */
/** /**
......
...@@ -9,7 +9,7 @@ eureka: ...@@ -9,7 +9,7 @@ eureka:
spring: spring:
cloud: cloud:
config: config:
uri: http://172.17.207.177:7002/support-config uri: http://182.92.70.253:7002/support-config
# uri: http://39.107.71.112:7002/support-config # uri: http://39.107.71.112:7002/support-config
# profile: ${liquidnet.cloudConfig.profile} # profile: ${liquidnet.cloudConfig.profile}
# name: ${spring.application.name} #默认为spring.application.name # name: ${spring.application.name} #默认为spring.application.name
......
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