You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
1.3 KiB
Java

package com.nmgs.service.impl;
import com.nmgs.entity.IntegralCheck;
import com.nmgs.mapper.bak.IntegralCheckBakMapper;
import com.nmgs.mapper.petrol.IntegralCheckMapper;
import com.nmgs.util.PropertiesUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
@Service
public class SolveCheckServiceImpl {
public IntegralCheckMapper integralCheckMapper;
@Autowired
public void setIntegralCheckMapper(IntegralCheckMapper integralCheckMapper) {
this.integralCheckMapper = integralCheckMapper;
}
public IntegralCheckBakMapper integralCheckBakMapper;
@Autowired
public void setIntegralCheckBakMapper(IntegralCheckBakMapper integralCheckBakMapper) {
this.integralCheckBakMapper = integralCheckBakMapper;
}
@Transactional(timeout = 1800)
public void solveCheck(List<IntegralCheck> list){
int i=1;
for(IntegralCheck integralCheck:list){
i++;
integralCheckMapper.insert(integralCheck);
if(PropertiesUtil.getValue("IsBak").equals("1")){
integralCheckBakMapper.insert(integralCheck);
}
System.out.println("次数===" + i);
}
}
}