上传文件至 'op-modules/op-quality/src/main/java/com/op/quality/service/serviceImpl'

highway
zhaoxl 1 year ago
parent 96a998e66e
commit 33e8364c4a

@ -3,11 +3,14 @@ package com.op.quality.service.serviceImpl;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.dynamic.datasource.toolkit.DynamicDataSourceContextHolder;
import com.op.common.core.domain.R;
//import com.op.quality.domain.BaseFile;
import com.op.quality.domain.BaseFile;
import com.op.quality.domain.QcProCheck;
//import com.op.quality.mapper.BaseFileMapper;
import com.op.quality.mapper.BaseFileMapper;
import com.op.quality.mapper.QcProCheckMapper;
import com.op.quality.service.QcProCheckService;
import com.sap.conn.jco.JCoException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -32,13 +35,16 @@ public class QcProCheckServiceImpl implements QcProCheckService {
@Override
// @DS("#header.poolName")
public List<QcProCheck> selectQcProCheck() {
DynamicDataSourceContextHolder.push("ds_1000");
return qcProCheckMapper.selectQcProCheckList();
}
@Override
// @DS("#header.poolName")
public R<Boolean> saveQcProCheck(QcProCheck qcProCheck, BaseFile baseFile) {
DynamicDataSourceContextHolder.push("op_xiaolan");
// System.out.println("qian"+DynamicDataSourceContextHolder.peek());
DynamicDataSourceContextHolder.push("ds_1000");
// System.out.println("hou"+DynamicDataSourceContextHolder.peek());
qcProCheck.setId(UUID.randomUUID().toString().replace("-", ""));
if (baseFile.getFileAddress()==null){
@ -59,12 +65,14 @@ public class QcProCheckServiceImpl implements QcProCheckService {
@Override
// @DS("#header.poolName")
public int updateQcProCheck(String id) {
DynamicDataSourceContextHolder.push("ds_1000");
return qcProCheckMapper.updateQcProCheckById(id);
}
@Override
// @DS("#header.poolName")
public int deleteQcProCheck(String id) {
DynamicDataSourceContextHolder.push("ds_1000");
return qcProCheckMapper.deleteQcProCheckById(id);
}

Loading…
Cancel
Save