commit for pull
This commit is contained in:
@@ -4,6 +4,7 @@ import com.cnbm.dynamic.datasource.annotation.DataSource;
|
||||
import com.cnbm.packing.dto.WoPowerLevelDTO;
|
||||
import com.cnbm.packing.mapper.CamlineMapper;
|
||||
|
||||
import io.swagger.models.auth.In;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
@@ -23,28 +24,20 @@ public class DynamicDataSourceService {
|
||||
WoPowerLevelServiceBiz powerLevelServiceBiz;
|
||||
|
||||
|
||||
public Integer getTodayBoxNum(){
|
||||
return mapper.getTodayBoxNum();
|
||||
}
|
||||
|
||||
@DataSource("camline")
|
||||
@Transactional
|
||||
@DataSource("slave1")
|
||||
public void salve1Get(){
|
||||
WoPowerLevelDTO woPowerLevelDTO = powerLevelServiceBiz.get(Long.valueOf(1));
|
||||
System.out.println(woPowerLevelDTO.toString());
|
||||
}
|
||||
|
||||
public void getTodayBoxNum(){
|
||||
Integer todayBoxNum = mapper.getTodayBoxNum();
|
||||
System.out.println(todayBoxNum);
|
||||
}
|
||||
|
||||
public float getPMPPBySubId(String subId){
|
||||
return mapper.getPMPPBySubId(subId);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@DataSource("slave2")
|
||||
@DataSource("camline")
|
||||
@Transactional
|
||||
public void salve3Get(){
|
||||
float byid = mapper.getByid("LTWeight");
|
||||
System.out.println(byid);
|
||||
public String getOrderNameBySubId(String subId){
|
||||
return mapper.getOrderNameBySubId(subId);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user