| | |
| | | package com.yeshi.fanli.service.impl.user;
|
| | |
|
| | | import java.util.Date;
|
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import org.springframework.stereotype.Service;
|
| | |
|
| | | import com.yeshi.fanli.dao.mybatis.user.UserAccountBindingHistoryMapper;
|
| | | import com.yeshi.fanli.entity.bus.user.UserAccountBindingHistory;
|
| | | import com.yeshi.fanli.service.inter.user.UserAccountBindingHistoryService;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | |
|
| | | @Service
|
| | | public class UserAccountBindingHistoryServiceImpl implements UserAccountBindingHistoryService {
|
| | |
|
| | | @Resource
|
| | | private UserAccountBindingHistoryMapper userAccountBindingHistoryMapper;
|
| | |
|
| | | @Override
|
| | | public void addUserAccountBindingHistory(UserAccountBindingHistory history) {
|
| | | if (history.getType() == null || StringUtil.isNullOrEmpty(history.getContent()) || history.getUid() == null)
|
| | | return;
|
| | | history.setCreateTime(new Date());
|
| | | userAccountBindingHistoryMapper.insertSelective(history);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public UserAccountBindingHistory getLatestHistory(Long uid, int type) {
|
| | | return userAccountBindingHistoryMapper.selectLatestByTypeAndUid(uid, type);
|
| | | }
|
| | |
|
| | | }
|
| | | package com.yeshi.fanli.service.impl.user; |
| | | |
| | | import java.util.Date; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import com.yeshi.fanli.dao.mybatis.user.UserAccountBindingHistoryMapper; |
| | | import com.yeshi.fanli.entity.bus.user.UserAccountBindingHistory; |
| | | import com.yeshi.fanli.service.inter.user.UserAccountBindingHistoryService; |
| | | import com.yeshi.fanli.util.StringUtil; |
| | | |
| | | @Service |
| | | public class UserAccountBindingHistoryServiceImpl implements UserAccountBindingHistoryService { |
| | | |
| | | @Resource |
| | | private UserAccountBindingHistoryMapper userAccountBindingHistoryMapper; |
| | | |
| | | @Override |
| | | public void addUserAccountBindingHistory(UserAccountBindingHistory history) { |
| | | if (history.getType() == null || StringUtil.isNullOrEmpty(history.getContent()) || history.getUid() == null) |
| | | return; |
| | | history.setCreateTime(new Date()); |
| | | userAccountBindingHistoryMapper.insertSelective(history); |
| | | } |
| | | |
| | | @Override |
| | | public UserAccountBindingHistory getLatestHistory(Long uid, int type) { |
| | | return userAccountBindingHistoryMapper.selectLatestByTypeAndUid(uid, type); |
| | | } |
| | | |
| | | } |