admin
2024-01-23 81da61b828e29b7745e1382dfbbaeb685dc083ef
fanli/src/main/java/com/yeshi/fanli/service/impl/lable/MergeClassServiceImpl.java
@@ -1,54 +1,54 @@
package com.yeshi.fanli.service.impl.lable;
import javax.annotation.Resource;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;
import com.yeshi.fanli.dao.mybatis.lable.MergeClassMapper;
import com.yeshi.fanli.entity.bus.lable.MergeClass;
import com.yeshi.fanli.exception.MergeClassException;
import com.yeshi.fanli.service.inter.lable.MergeClassService;
@Service
public class MergeClassServiceImpl implements MergeClassService {
   @Resource
   private MergeClassMapper mergeClassMapper;
   @Override
   public int insert(MergeClass record) throws MergeClassException{
      return mergeClassMapper.insert(record);
   }
   @Override
   public int updateByPrimaryKey(MergeClass record) throws MergeClassException{
      return mergeClassMapper.updateByPrimaryKey(record);
   }
   @Override
   public int updateByPrimaryKeySelective(MergeClass record) throws MergeClassException{
      return mergeClassMapper.updateByPrimaryKeySelective(record);
   }
   @Override
   public int deleteByPrimaryKey(Long id) throws MergeClassException{
      return mergeClassMapper.deleteByPrimaryKey(id);
   }
   @Override
   public MergeClass selectByPrimaryKey(Long id) throws MergeClassException {
      return mergeClassMapper.selectByPrimaryKey(id);
   }
   @Override
   @Cacheable(value = "mergeClassCache",key="'selectByPrimaryKeyCache-'+#id")
   public MergeClass selectByPrimaryKeyCache(Long id) throws MergeClassException {
      return selectByPrimaryKey(id);
   }
}
package com.yeshi.fanli.service.impl.lable;
import javax.annotation.Resource;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;
import com.yeshi.fanli.dao.mybatis.lable.MergeClassMapper;
import com.yeshi.fanli.entity.bus.lable.MergeClass;
import com.yeshi.fanli.exception.goods.MergeClassException;
import com.yeshi.fanli.service.inter.lable.MergeClassService;
@Service
public class MergeClassServiceImpl implements MergeClassService {
   @Resource
   private MergeClassMapper mergeClassMapper;
   @Override
   public int insert(MergeClass record) throws MergeClassException{
      return mergeClassMapper.insert(record);
   }
   @Override
   public int updateByPrimaryKey(MergeClass record) throws MergeClassException{
      return mergeClassMapper.updateByPrimaryKey(record);
   }
   @Override
   public int updateByPrimaryKeySelective(MergeClass record) throws MergeClassException{
      return mergeClassMapper.updateByPrimaryKeySelective(record);
   }
   @Override
   public int deleteByPrimaryKey(Long id) throws MergeClassException{
      return mergeClassMapper.deleteByPrimaryKey(id);
   }
   @Override
   public MergeClass selectByPrimaryKey(Long id) throws MergeClassException {
      return mergeClassMapper.selectByPrimaryKey(id);
   }
   @Override
   @Cacheable(value = "mergeClassCache",key="'selectByPrimaryKeyCache-'+#id")
   public MergeClass selectByPrimaryKeyCache(Long id) throws MergeClassException {
      return selectByPrimaryKey(id);
   }
}