Commit c2f8e9e3 by yuwei

项目初始化

parent d8c10560
......@@ -393,7 +393,7 @@ public class DataApiServiceImpl extends BaseServiceImpl<DataApiDao, DataApiEntit
Map<String, Object> map = new HashMap<>(2);
map.put("id", id);
map.put("type", "1");
rabbitTemplate.convertAndSend(RabbitMqConstant.FANOUT_API_QUEUE, "", map);
rabbitTemplate.convertAndSend(RabbitMqConstant.FANOUT_EXCHANGE_API, "", map);
LambdaUpdateWrapper<DataApiEntity> updateWrapper = new LambdaUpdateWrapper<>();
updateWrapper.set(DataApiEntity::getStatus, DataConstant.ApiState.RELEASE.getKey());
updateWrapper.eq(DataApiEntity::getId, id);
......@@ -405,7 +405,7 @@ public class DataApiServiceImpl extends BaseServiceImpl<DataApiDao, DataApiEntit
Map<String, Object> map = new HashMap<>(2);
map.put("id", id);
map.put("type", "2");
rabbitTemplate.convertAndSend(RabbitMqConstant.FANOUT_API_QUEUE, "", map);
rabbitTemplate.convertAndSend(RabbitMqConstant.FANOUT_EXCHANGE_API, "", map);
LambdaUpdateWrapper<DataApiEntity> updateWrapper = new LambdaUpdateWrapper<>();
updateWrapper.set(DataApiEntity::getStatus, DataConstant.ApiState.CANCEL.getKey());
updateWrapper.eq(DataApiEntity::getId, id);
......
......@@ -14,7 +14,7 @@ public class IntegrityRule implements RuleItem {
@Override
public String parse(DbType dbType, String table, String column, Map<String, Object> map) {
final StringBuilder builder = new StringBuilder();
builder.append("SELECT SUM(CASE WHEN ").append(column).append(" IS NOT NULL AND TRIM(").append(column).append(") != '' THEN 1 ELSE 0 END), COUNT(*) FROM ").append(table);
builder.append("SELECT SUM(CASE WHEN ").append(column).append(" IS NOT NULL AND TRIM(").append(column).append(") != '' THEN 0 ELSE 1 END), COUNT(*) FROM ").append(table);
return builder.toString();
}
......
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