| | |
| | | import com.vci.ubcs.code.service.MdmEngineService; |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | import lombok.AllArgsConstructor; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import springfox.documentation.annotations.ApiIgnore; |
| | | |
| | |
| | | @RestController |
| | | @AllArgsConstructor |
| | | public class MdmEngineClient implements IMdmEngineClient { |
| | | |
| | | private final MdmEngineService mdmEngineService; |
| | | |
| | | /** |
| | |
| | | */ |
| | | @Override |
| | | @GetMapping(SELECT_BY_TYPE_OID) |
| | | public R<List<BaseModel>> selectByTypeAndOid(String btmType, String oids) throws SQLException, IntrospectionException, NoSuchFieldException, InvocationTargetException, IllegalAccessException, InstantiationException { |
| | | return R.data(mdmEngineService.selectByTypeAndOid(btmType,oids)); |
| | | public R<List<BaseModel>> selectByTypeAndOid(String btmType, String oids) { |
| | | try { |
| | | return R.data(mdmEngineService.selectByTypeAndOid(btmType, oids)); |
| | | } catch (Exception e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | |
| | | * @return 处理成功数据条数 |
| | | */ |
| | | @Override |
| | | @GetMapping(INSERT_BATCH_BY_TYPE) |
| | | public R<Integer> insertBatchByType(String btmType, List<BaseModel> baseModels) throws Exception { |
| | | return R.data(mdmEngineService.insertBatchByType(btmType,baseModels)); |
| | | @PostMapping(INSERT_BATCH_BY_TYPE) |
| | | public R<Integer> insertBatchByType(String btmType, List<BaseModel> baseModels) { |
| | | try { |
| | | return R.data(mdmEngineService.insertBatchByType(btmType,baseModels)); |
| | | } catch (Exception e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | } |
| | | |
| | | // private final CodeWupinMapper codeWupinMapper; |
| | | |
| | | // @Override |
| | | // @GetMapping(TOP) |
| | | // public BladePage<CodeWupin> top(Integer current, Integer size) { |
| | | // Query query = new Query(); |
| | | // query.setCurrent(current); |
| | | // query.setSize(size); |
| | | // IPage<CodeWupin> page = codeWupinMapper.selectPage(Condition.getPage(query), Wrappers.emptyWrapper());//service.page(Condition.getPage(query)); |
| | | // return BladePage.of(page); |
| | | // } |
| | | |
| | | /** |
| | | * 更新业务数据同时对码值表数据操作接口 |
| | | * |
| | | * @param btmType 业务类型 |
| | | * @param baseModels 处理数据 |
| | | * @return 处理状态 |
| | | */ |
| | | @Override |
| | | @PostMapping(UPDATE_BATCH_BY_TYPE) |
| | | public R<Integer>updateBatchBtypeDatas(String btmType, List<BaseModel> baseModels){ |
| | | try { |
| | | return mdmEngineService.updateBatchBtypeDatas(btmType,baseModels); |
| | | } catch (Exception e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | } |
| | | |
| | | } |