Authored by Gino Zhang

修改增量API的方法

package com.yoho.search.consumer.service.base;
import com.yoho.search.dal.SuggestConversionCustomMapper;
import com.yoho.search.dal.model.SuggestConversion;
import com.yoho.search.dal.model.SuggestConversionCustom;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
... ... @@ -44,4 +43,12 @@ public class SuggestConversionCustomService {
public void delete(Integer id) {
suggestConversionCustomMapper.deleteByPrimaryKey(id);
}
public int insertSelective(SuggestConversionCustom record){
return suggestConversionCustomMapper.insertSelective(record);
}
public int updateByPrimaryKeySelective(SuggestConversionCustom record){
return suggestConversionCustomMapper.updateByPrimaryKeySelective(record);
}
}
... ...
... ... @@ -64,12 +64,12 @@ public class SuggestConvertorService {
suggestConversion.setDest(dest);
suggestConversion.setUpdateTime(DateUtil.getCurrentTimeSecond());
suggestConversion.setStatus(1);
suggestConversionService.insertBatch(Arrays.asList(suggestConversion));
suggestConversionCustomService.insertSelective(suggestConversion);
} else {
suggestConversion.setDest(dest);
suggestConversion.setUpdateTime(DateUtil.getCurrentTimeSecond());
suggestConversion.setStatus(1);
suggestConversionService.updateByPrimaryKey(suggestConversion);
suggestConversionCustomService.updateByPrimaryKeySelective(suggestConversion);
}
}
... ...