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

添加服务检测拉起脚本

parent 7e0289cd
......@@ -11,6 +11,7 @@ import com.mortals.xhx.module.access.model.AccessLogEntity;
import com.mortals.xhx.module.access.service.AccessLogService;
import java.util.Date;
import java.util.List;
/**
* AccessLogService
......@@ -22,6 +23,19 @@ import java.util.Date;
@Service("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) {
Snowflake snowflake = IdUtil.getSnowflake(0, 1);
long id = snowflake.nextId();
......
......@@ -11,6 +11,7 @@ import com.mortals.xhx.module.biz.model.BizLogEntity;
import com.mortals.xhx.module.biz.service.BizLogService;
import java.util.Date;
import java.util.List;
/**
* BizLogService
......@@ -22,6 +23,19 @@ import java.util.Date;
@Service("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
public BizLogEntity get(Long key, Context context) throws AppException {
BizLogEntity bizLogEntity = new BizLogEntity();
......
......@@ -35,9 +35,7 @@ public class ErrorLogServiceImpl extends AbstractCRUDServiceImpl<ErrorLogDao, Er
@Override
public int save(List<ErrorLogEntity> list, Context context) throws AppException {
list.forEach(item->{
item.setId(IdUtil.getSnowflake(0, 1).nextId());
});
list.forEach(item->item.setId(IdUtil.getSnowflake(0, 1).nextId()));
return super.save(list, context);
}
......
......@@ -12,6 +12,7 @@ import com.mortals.xhx.module.operate.model.OperateLogEntity;
import com.mortals.xhx.module.operate.service.OperateLogService;
import java.util.Date;
import java.util.List;
/**
* OperateLogService
......@@ -23,9 +24,15 @@ import java.util.Date;
@Service("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) {
System.out.println(RandomUtil.randomString(1024));
@Override
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