| | |
| | | return R.tokenError("登录失效"); |
| | | } |
| | | IPage<TIntegralRecord> page = integralRecordService.integralDetail(new Page<>(pageNum, pageSize), |
| | | tokenService.getLoginUserStudy().getUserid(), time); |
| | | tokenService.getLoginUser1().getUserid(), time); |
| | | for (TIntegralRecord record : page.getRecords()) { |
| | | if (!record.getIntegral().startsWith("-")) { |
| | | record.setIntegral("+" + record.getIntegral()); |
| | |
| | | String s1 = out_trade_no.split("_")[1]; |
| | | Integer integer1 = Integer.valueOf(s1); |
| | | TVipOrder byId = vipOrderService.getById(integer1); |
| | | if (byId.getBackTime()!=null){ |
| | | return; |
| | | } |
| | | byId.setPayState(2); |
| | | byId.setTransactionId(trade_no); |
| | | byId.setOutTradeNo(out_trade_no); |
| | |
| | | byId1.setVipEndTime(null); |
| | | byId1.setVipPayTime(null); |
| | | userService.updateById(byId1); |
| | | userService.updateOne(byId1.getId(),null,null); |
| | | } else { |
| | | System.err.println("最近的一次充值会员时间 将会员到期时间回退到上一次"); |
| | | // 最近的一次充值会员时间 |
| | |
| | | import com.ruoyi.study.vo.AppUserVO; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | |
| | | List<AppUserVO> listAll(@Param("req") AppUserQuery query); |
| | | |
| | | void updateOne(@Param("id") Integer id,@Param("vipEndTime") Date vipEndTime,@Param("vipPayTime") Date vipPayTime); |
| | | } |
| | |
| | | import com.ruoyi.study.dto.AppUserQuery; |
| | | import com.ruoyi.study.vo.AppUserVO; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | */ |
| | | Boolean isVip(); |
| | | |
| | | void updateOne(Integer id, Date vipEndTime,Date vipPayTime); |
| | | } |
| | |
| | | return null != vipEndTime && System.currentTimeMillis() <= vipEndTime.getTime(); |
| | | } |
| | | |
| | | @Override |
| | | public void updateOne(Integer id, Date vipEndTime,Date vipPayTime) { |
| | | this.baseMapper.updateOne(id,vipPayTime,vipPayTime); |
| | | } |
| | | |
| | | } |
| | |
| | | <sql id="Base_Column_List"> |
| | | id, name, account, phone, password, openId, birthday, gender, headImg, integral, state, insertTime, vipEndTime, vipPayTime, isBack, backTime |
| | | </sql> |
| | | <update id="updateOne"> |
| | | update t_user |
| | | <set> |
| | | vipEndTime = #{vipEndTime}, |
| | | vipPayTime = #{vipPayTime}, |
| | | </set> |
| | | and id = #{id} |
| | | </update> |
| | | <select id="listAll" resultType="com.ruoyi.study.vo.AppUserVO"> |
| | | select * |
| | | from t_user |