提交 ca87ab45 编写于 作者: ibizdev's avatar ibizdev

zhouweidong 发布系统代码

上级 fdf0e4e4
package cn.ibizlab.core.extensions.service;
import cn.ibizlab.core.lite.service.impl.DstSystemServiceImpl;
import lombok.extern.slf4j.Slf4j;
import cn.ibizlab.core.lite.domain.DstSystem;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.context.annotation.Primary;
import java.util.*;
/**
* 实体[系统] 自定义服务对象
*/
@Slf4j
@Primary
@Service("DstSystemExService")
public class DstSystemExService extends DstSystemServiceImpl {
@Override
protected Class currentModelClass() {
return com.baomidou.mybatisplus.core.toolkit.ReflectionKit.getSuperClassGenericType(this.getClass().getSuperclass(), 1);
}
/**
* 自定义行为[SyncSysModel]用户扩展
* @param et
* @return
*/
@Override
@Transactional
public DstSystem syncSysModel(DstSystem et) {
return super.syncSysModel(et);
}
}
......@@ -37,6 +37,7 @@ public interface IDstSystemService extends IService<DstSystem>{
boolean checkKey(DstSystem et) ;
boolean save(DstSystem et) ;
void saveBatch(List<DstSystem> list) ;
DstSystem syncSysModel(DstSystem et) ;
Page<DstSystem> searchDefault(DstSystemSearchContext context) ;
/**
*自定义查询SQL
......
......@@ -165,6 +165,13 @@ public class DstSystemServiceImpl extends ServiceImpl<DstSystemMapper, DstSystem
saveOrUpdateBatch(list,batchSize);
}
@Override
@Transactional
public DstSystem syncSysModel(DstSystem et) {
//自定义代码
return et;
}
/**
......
......@@ -94,7 +94,7 @@
<!--输出实体[DST_SYSTEM]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-dst_system-29-5">
<changeSet author="a_A_5d9d78509" id="tab-dst_system-30-5">
<createTable tableName="IBZPSSYSTEM">
<column name="PSSYSTEMID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_DST_SYSTEM_PSSYSTEMID"/>
......
......@@ -135,6 +135,17 @@ public class DstSystemResource {
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzlite-DstSystem-SyncSysModel-all')")
@ApiOperation(value = "同步系统模型", tags = {"系统" }, notes = "同步系统模型")
@RequestMapping(method = RequestMethod.POST, value = "/dstsystems/{dstsystem_id}/syncsysmodel")
public ResponseEntity<DstSystemDTO> syncSysModel(@PathVariable("dstsystem_id") String dstsystem_id, @RequestBody DstSystemDTO dstsystemdto) {
DstSystem domain = dstsystemMapping.toDomain(dstsystemdto);
domain.setPssystemid(dstsystem_id);
domain = dstsystemService.syncSysModel(domain);
dstsystemdto = dstsystemMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(dstsystemdto);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzlite-DstSystem-searchDefault-all')")
@ApiOperation(value = "获取数据集", tags = {"系统" } ,notes = "获取数据集")
@RequestMapping(method= RequestMethod.GET , value="/dstsystems/fetchdefault")
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册