ImgInfoServiceImpl.java
766 Bytes
package com.example.service;
import com.example.mapper.ImgInfoMapper;
import com.example.models.ImgInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Date;
/**
* Created by JA on 17/11/22.
*/
@Service
public class ImgInfoServiceImpl implements ImgInfoService {
@Autowired
private ImgInfoMapper imgInfoMapper;
@Override
public boolean create(ImgInfo imgInfo) {
imgInfo.setStatus(1);
imgInfo.setCreateAt(new Date());
imgInfo.setUpdateAt(new Date());
return this.imgInfoMapper.create(imgInfo);
}
@Override
public ImgInfo getNewByOpenid(String openid) {
return this.imgInfoMapper.getNewByOpenid(openid);
}
}