| | |
| | | package com.taoke.autopay.service.impl; |
| | | |
| | | import com.google.gson.Gson; |
| | | import com.taoke.autopay.dao.WxUserInfoMapper; |
| | | import com.taoke.autopay.entity.SystemConfigKeyEnum; |
| | | import com.taoke.autopay.entity.WxUserInfo; |
| | |
| | | import com.taoke.autopay.service.SystemConfigService; |
| | | import com.taoke.autopay.service.WxUserService; |
| | | import com.taoke.autopay.service.WxUserSettingService; |
| | | import com.taoke.autopay.utils.IPUtil; |
| | | import com.taoke.autopay.utils.StringUtil; |
| | | import com.taoke.autopay.utils.WxApiUtil; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | public long count(WxUserInfoMapper.DaoQuery query) { |
| | | return wxUserInfoMapper.count(query); |
| | | } |
| | | |
| | | @Override |
| | | public void setLatestInfoInfo(Long uid, String ip, IPUtil.IPInfo ipInfo) { |
| | | WxUserInfo wxUserInfo=new WxUserInfo(); |
| | | wxUserInfo.setId(uid); |
| | | wxUserInfo.setLatestIP(ip); |
| | | wxUserInfo.setLatestIPInfo(ipInfo!=null?new Gson().toJson(ipInfo):null); |
| | | wxUserInfo.setUpdateTime(new Date()); |
| | | wxUserInfoMapper.updateByPrimaryKeySelective(wxUserInfo); |
| | | } |
| | | |
| | | @Override |
| | | public void update(WxUserInfo wxUserInfo) { |
| | | wxUserInfoMapper.updateByPrimaryKeySelective(wxUserInfo); |
| | | } |
| | | } |