package com.yssh.service.impl;
|
|
|
import com.yssh.dao.DictRecordMapper;
|
import com.yssh.entity.DictRecord;
|
import com.yssh.service.IDictRecordService;
|
import lombok.Synchronized;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.stereotype.Service;
|
import org.springframework.transaction.annotation.Transactional;
|
|
import java.text.SimpleDateFormat;
|
import java.util.Calendar;
|
import java.util.Date;
|
import java.util.List;
|
|
/**
|
* 字典记录Service业务层处理
|
*
|
* @author xingjinshuang@smartearth.cn
|
* @date 2023-02-06
|
*/
|
@Service
|
public class DictRecordServiceImpl implements IDictRecordService
|
{
|
@Autowired
|
private DictRecordMapper dictRecordMapper;
|
|
/**
|
* 查询字典记录
|
*
|
* @param id 字典记录ID
|
* @return 字典记录
|
*/
|
/*@Override
|
public DictRecord selectDictRecordById(Long id)
|
{
|
return dictRecordMapper.selectDictRecordById(id);
|
}*/
|
|
/**
|
* 查询字典记录列表
|
*
|
* @param dictRecord 字典记录
|
* @return 字典记录
|
*/
|
@Override
|
public List<DictRecord> selectDictRecordList(DictRecord dictRecord)
|
{
|
return dictRecordMapper.selectDictRecordList(dictRecord);
|
}
|
|
/**
|
* 新增字典记录
|
*
|
* @param dictRecord 字典记录
|
* @return 结果
|
*/
|
@Override
|
public int insertDictRecord(DictRecord dictRecord)
|
{
|
return dictRecordMapper.insertDictRecord(dictRecord);
|
}
|
|
/**
|
* 修改字典记录
|
*
|
* @param dictRecord 字典记录
|
* @return 结果
|
*/
|
/*@Override
|
public int updateDictRecord(DictRecord dictRecord)
|
{
|
dictRecord.setUpdateTime(DateUtils.getNowDate());
|
return dictRecordMapper.updateDictRecord(dictRecord);
|
}*/
|
|
/**
|
* 删除字典记录对象
|
*
|
* @param ids 需要删除的数据ID
|
* @return 结果
|
*/
|
/*@Override
|
public int deleteDictRecordByIds(String ids)
|
{
|
return dictRecordMapper.deleteDictRecordByIds(Convert.toStrArray(ids));
|
}*/
|
|
/**
|
* 删除字典记录信息
|
*
|
* @param id 字典记录ID
|
* @return 结果
|
*/
|
/*@Override
|
public int deleteDictRecordById(Long id)
|
{
|
return dictRecordMapper.deleteDictRecordById(id);
|
}*/
|
|
/**
|
* 创建字典记录信息表接口
|
*/
|
@Transactional(rollbackFor = Exception.class)
|
@Synchronized
|
@Override
|
public int createDictRecoTable() {
|
String tableName = "yssh_dict_record";
|
return dictRecordMapper.createDictRecoTable(tableName);
|
}
|
|
}
|