| | |
| | | import com.taoke.autopay.service.SystemConfigService; |
| | | import com.taoke.autopay.service.WxUserService; |
| | | import com.taoke.autopay.service.WxUserSettingService; |
| | | import com.taoke.autopay.service.credit.UserCreditBalanceService; |
| | | import com.taoke.autopay.utils.IPUtil; |
| | | import com.taoke.autopay.utils.StringUtil; |
| | | import com.taoke.autopay.utils.WxApiUtil; |
| | |
| | | @Resource |
| | | private SystemConfigService systemConfigService; |
| | | |
| | | @Resource |
| | | private UserCreditBalanceService userCreditBalanceService; |
| | | |
| | | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @Override |
| | |
| | | user.setLoginTime(new Date()); |
| | | user.setCreateTime(new Date()); |
| | | wxUserInfoMapper.insertSelective(user); |
| | | userCreditBalanceService.initializeCreditBalance(user.getId()); |
| | | return user; |
| | | } else { |
| | | WxUserInfo update = new WxUserInfo(); |
| | |
| | | update.setLoginTime(new Date()); |
| | | update.setUpdateTime(new Date()); |
| | | wxUserInfoMapper.updateByPrimaryKeySelective(update); |
| | | userCreditBalanceService.initializeCreditBalance(update.getId()); |
| | | return list.get(0); |
| | | } |
| | | } |