| | |
| | | package com.ycl.jxkg.service.impl; |
| | | |
| | | import com.ycl.jxkg.domain.TextContent; |
| | | import com.ycl.jxkg.repository.TextContentMapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ycl.jxkg.domain.entity.TextContent; |
| | | import com.ycl.jxkg.mapper.TextContentMapper; |
| | | import com.ycl.jxkg.service.TextContentService; |
| | | import com.ycl.jxkg.utility.JsonUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.ycl.jxkg.utils.JsonUtil; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.Date; |
| | |
| | | import java.util.stream.Collectors; |
| | | |
| | | @Service |
| | | public class TextContentServiceImpl extends BaseServiceImpl<TextContent> implements TextContentService { |
| | | @RequiredArgsConstructor |
| | | public class TextContentServiceImpl extends ServiceImpl<TextContentMapper, TextContent> implements TextContentService { |
| | | |
| | | private final TextContentMapper textContentMapper; |
| | | |
| | | @Autowired |
| | | public TextContentServiceImpl(TextContentMapper textContentMapper) { |
| | | super(textContentMapper); |
| | | this.textContentMapper = textContentMapper; |
| | | } |
| | | |
| | | @Override |
| | | public TextContent selectById(Integer id) { |
| | | return super.selectById(id); |
| | | return baseMapper.selectById(id); |
| | | } |
| | | |
| | | @Override |
| | | public int insertByFilter(TextContent record) { |
| | | return super.insertByFilter(record); |
| | | return baseMapper.insert(record); |
| | | } |
| | | |
| | | @Override |
| | | public int updateByIdFilter(TextContent record) { |
| | | return super.updateByIdFilter(record); |
| | | return baseMapper.updateById(record); |
| | | } |
| | | |
| | | @Override |
| | |
| | | List<R> mapList = list.stream().map(mapper).collect(Collectors.toList()); |
| | | frameTextContent = JsonUtil.toJsonStr(mapList); |
| | | } |
| | | TextContent textContent = new TextContent(frameTextContent, now); |
| | | TextContent textContent = new TextContent(); |
| | | textContent.setContent(frameTextContent); |
| | | textContent.setCreateTime(now); |
| | | return textContent; |
| | | } |
| | | |