Commit bd6c2080 authored by 赵啸非's avatar 赵啸非

添加服务检测拉起脚本

parent 7e0289cd
...@@ -11,6 +11,7 @@ import com.mortals.xhx.module.access.model.AccessLogEntity; ...@@ -11,6 +11,7 @@ import com.mortals.xhx.module.access.model.AccessLogEntity;
import com.mortals.xhx.module.access.service.AccessLogService; import com.mortals.xhx.module.access.service.AccessLogService;
import java.util.Date; import java.util.Date;
import java.util.List;
/** /**
* AccessLogService * AccessLogService
...@@ -22,6 +23,19 @@ import java.util.Date; ...@@ -22,6 +23,19 @@ import java.util.Date;
@Service("accessLogService") @Service("accessLogService")
public class AccessLogServiceImpl extends AbstractCRUDServiceImpl<AccessLogDao, AccessLogEntity, Long> implements AccessLogService { public class AccessLogServiceImpl extends AbstractCRUDServiceImpl<AccessLogDao, AccessLogEntity, Long> implements AccessLogService {
@Override
public AccessLogEntity save(AccessLogEntity entity, Context context) throws AppException {
entity.setId(IdUtil.getSnowflake(0, 1).nextId());
return super.save(entity, context);
}
@Override
public int save(List<AccessLogEntity> list, Context context) throws AppException {
list.forEach(item->item.setId(IdUtil.getSnowflake(0, 1).nextId()));
return super.save(list, context);
}
public static void main(String[] args) { public static void main(String[] args) {
Snowflake snowflake = IdUtil.getSnowflake(0, 1); Snowflake snowflake = IdUtil.getSnowflake(0, 1);
long id = snowflake.nextId(); long id = snowflake.nextId();
......
...@@ -11,6 +11,7 @@ import com.mortals.xhx.module.biz.model.BizLogEntity; ...@@ -11,6 +11,7 @@ import com.mortals.xhx.module.biz.model.BizLogEntity;
import com.mortals.xhx.module.biz.service.BizLogService; import com.mortals.xhx.module.biz.service.BizLogService;
import java.util.Date; import java.util.Date;
import java.util.List;
/** /**
* BizLogService * BizLogService
...@@ -22,6 +23,19 @@ import java.util.Date; ...@@ -22,6 +23,19 @@ import java.util.Date;
@Service("bizLogService") @Service("bizLogService")
public class BizLogServiceImpl extends AbstractCRUDServiceImpl<BizLogDao, BizLogEntity, Long> implements BizLogService { public class BizLogServiceImpl extends AbstractCRUDServiceImpl<BizLogDao, BizLogEntity, Long> implements BizLogService {
@Override
public BizLogEntity save(BizLogEntity entity, Context context) throws AppException {
entity.setId(IdUtil.getSnowflake(0, 1).nextId());
return super.save(entity, context);
}
@Override
public int save(List<BizLogEntity> list, Context context) throws AppException {
list.forEach(item->item.setId(IdUtil.getSnowflake(0, 1).nextId()));
return super.save(list, context);
}
@Override @Override
public BizLogEntity get(Long key, Context context) throws AppException { public BizLogEntity get(Long key, Context context) throws AppException {
BizLogEntity bizLogEntity = new BizLogEntity(); BizLogEntity bizLogEntity = new BizLogEntity();
......
...@@ -35,9 +35,7 @@ public class ErrorLogServiceImpl extends AbstractCRUDServiceImpl<ErrorLogDao, Er ...@@ -35,9 +35,7 @@ public class ErrorLogServiceImpl extends AbstractCRUDServiceImpl<ErrorLogDao, Er
@Override @Override
public int save(List<ErrorLogEntity> list, Context context) throws AppException { public int save(List<ErrorLogEntity> list, Context context) throws AppException {
list.forEach(item->{ list.forEach(item->item.setId(IdUtil.getSnowflake(0, 1).nextId()));
item.setId(IdUtil.getSnowflake(0, 1).nextId());
});
return super.save(list, context); return super.save(list, context);
} }
......
...@@ -12,6 +12,7 @@ import com.mortals.xhx.module.operate.model.OperateLogEntity; ...@@ -12,6 +12,7 @@ import com.mortals.xhx.module.operate.model.OperateLogEntity;
import com.mortals.xhx.module.operate.service.OperateLogService; import com.mortals.xhx.module.operate.service.OperateLogService;
import java.util.Date; import java.util.Date;
import java.util.List;
/** /**
* OperateLogService * OperateLogService
...@@ -23,9 +24,15 @@ import java.util.Date; ...@@ -23,9 +24,15 @@ import java.util.Date;
@Service("operateLogService") @Service("operateLogService")
public class OperateLogServiceImpl extends AbstractCRUDServiceImpl<OperateLogDao, OperateLogEntity, Long> implements OperateLogService { public class OperateLogServiceImpl extends AbstractCRUDServiceImpl<OperateLogDao, OperateLogEntity, Long> implements OperateLogService {
@Override
public OperateLogEntity save(OperateLogEntity entity) throws AppException {
entity.setId(IdUtil.getSnowflake(0, 1).nextId());
return super.save(entity);
}
public static void main(String[] args) { @Override
System.out.println(RandomUtil.randomString(1024)); public int save(List<OperateLogEntity> list, Context context) throws AppException {
list.forEach(item->item.setId(IdUtil.getSnowflake(0, 1).nextId()));
return super.save(list, context);
} }
} }
\ No newline at end of file
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