@Test public void testUseRedPacket() throws Exception { }
@Override public boolean useRedPacket(Long AccountId, Long rpId) { RedPackets rp = new RedPackets(); rp.setUserAccountId(AccountId); rp.setId(rpId); RedPackets redPacket = mapper.selectOne(rp); redPacket.setUseState(Settings.RED_PACKET_USE_STATE_USED); return mapper.updateByPrimaryKey(redPacket) > 0; }
RedPacketsServiceImpl implements IRedPacketsService { @Override public boolean useRedPacket(Long AccountId, Long rpId) { RedPackets rp = new RedPackets(); rp.setUserAccountId(AccountId); rp.setId(rpId); RedPackets redPacket = mapper.selectOne(rp); redPacket.setUseState(Settings.RED_PACKET_USE_STATE_USED); return mapper.updateByPrimaryKey(redPacket) > 0; } }
RedPacketsServiceImpl implements IRedPacketsService { @Override public boolean useRedPacket(Long AccountId, Long rpId) { RedPackets rp = new RedPackets(); rp.setUserAccountId(AccountId); rp.setId(rpId); RedPackets redPacket = mapper.selectOne(rp); redPacket.setUseState(Settings.RED_PACKET_USE_STATE_USED); return mapper.updateByPrimaryKey(redPacket) > 0; }  }
RedPacketsServiceImpl implements IRedPacketsService { @Override public boolean useRedPacket(Long AccountId, Long rpId) { RedPackets rp = new RedPackets(); rp.setUserAccountId(AccountId); rp.setId(rpId); RedPackets redPacket = mapper.selectOne(rp); redPacket.setUseState(Settings.RED_PACKET_USE_STATE_USED); return mapper.updateByPrimaryKey(redPacket) > 0; }  @Override List<Map<String, Object>> selectAllByUserAccountId(Long accountId); @Override boolean useRedPacket(Long AccountId, Long rpId); @Override RedPackets selectOne(Long accountId,Long rpId); boolean overdue(RedPackets r); }
RedPacketsServiceImpl implements IRedPacketsService { @Override public boolean useRedPacket(Long AccountId, Long rpId) { RedPackets rp = new RedPackets(); rp.setUserAccountId(AccountId); rp.setId(rpId); RedPackets redPacket = mapper.selectOne(rp); redPacket.setUseState(Settings.RED_PACKET_USE_STATE_USED); return mapper.updateByPrimaryKey(redPacket) > 0; }  @Override List<Map<String, Object>> selectAllByUserAccountId(Long accountId); @Override boolean useRedPacket(Long AccountId, Long rpId); @Override RedPackets selectOne(Long accountId,Long rpId); boolean overdue(RedPackets r);  }