| | |
| | | return;
|
| | | }
|
| | |
|
| | | Set<Long> gidList = gson.fromJson(gids, new TypeToken<HashSet<Long>>() {}.getType());
|
| | |
|
| | | try {
|
| | | Integer goldCoin = integralTaskRecordService.receiveGoldCoin(uid, idList);
|
| | |
|
| | | Set<Long> gidList = gson.fromJson(gids, new TypeToken<HashSet<Long>>() {}.getType());
|
| | | List<IntegralTaskRecord> list = null;
|
| | | if (gidList != null && gidList.size() > 0) {
|
| | | list = integralTaskRecordService.listNotReceived(5 - gidList.size(), uid);
|
| | | list = integralTaskRecordService.listNotReceivedExcludeId(5 - gidList.size(), uid, gidList);
|
| | | } else {
|
| | | list = integralTaskRecordService.listNotReceived(5, uid);
|
| | | list = integralTaskRecordService.listNotReceivedExcludeId(5, uid, null);
|
| | | }
|
| | |
|
| | | if (list == null) {
|
| | |
| | | package com.yeshi.fanli.dao.mybatis.integral; |
| | | |
| | | import java.util.List; |
| | | import java.util.Set; |
| | | |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * 未领取金币- 排除id |
| | | * @param count |
| | | * @param uid |
| | | * @return |
| | | */ |
| | | List<IntegralTaskRecord> listNotReceivedExcludeId(@Param("count") int count, @Param("uid") Long uid, |
| | | @Param("list")Set<Long> idList); |
| | | |
| | | |
| | | /** |
| | | * 总完成 |
| | | * @param uid |
| | | * @param dateType |
| | |
| | | LIMIT #{count} |
| | | </select> |
| | | |
| | | <select id="listNotReceivedExcludeId" resultMap="BaseResultMap"> |
| | | SELECT tc.`tc_name` AS taskName,d.* FROM yeshi_ec_integral_task_record d |
| | | LEFT JOIN `yeshi_ec_integral_task_class` tc ON tc.`tc_id` = d.`ir_cid` |
| | | WHERE d.`ir_uid` = #{uid} AND d.ir_state = 0 |
| | | <if test="list != null"> |
| | | AND d.ir_id not in |
| | | <foreach collection="list" item="item" open="(" separator="," close=")"> |
| | | ${item} |
| | | </foreach> |
| | | </if> |
| | | ORDER BY d.ir_create_time |
| | | LIMIT #{count} |
| | | </select> |
| | | |
| | | <select id="getTotalGoldCoin" resultType="Integer"> |
| | | SELECT SUM(tr.`ir_gold_coin`) FROM yeshi_ec_integral_task_record tr |
| | | WHERE tr.ir_uid = #{uid} AND tr.`ir_cid`=#{cid} <!-- tr.ir_state <![CDATA[<>]]>2 AND --> |
| | |
| | | }
|
| | |
|
| | |
|
| | | |
| | | @Override
|
| | | public ExchangeTipVO verifyInviteCode(Long uid, Long id) throws IntegralExchangeException{
|
| | | if (uid == null || uid <= 0)
|
| | |
| | |
|
| | |
|
| | | @Override
|
| | | public List<IntegralTaskRecord> listNotReceivedExcludeId(int count, long uid, Set<Long> idList) {
|
| | | if (idList != null && idList.size() == 0) {
|
| | | idList = null;
|
| | | }
|
| | | return integralTaskRecordMapper.listNotReceivedExcludeId(count, uid, idList);
|
| | | }
|
| | | |
| | | |
| | | @Override
|
| | | @Transactional
|
| | | public Integer receiveGoldCoin(Long uid, Set<Long> idList) throws IntegralTaskRecordException {
|
| | | if(idList == null || idList.size() == 0) {
|
| | |
| | | */
|
| | | public Integer receiveGoldCoin(Long uid, Set<Long> idList) throws IntegralTaskRecordException;
|
| | |
|
| | | /**
|
| | | * 返回领取列表
|
| | | * @param count
|
| | | * @param uid
|
| | | * @param idList
|
| | | * @return
|
| | | */
|
| | | public List<IntegralTaskRecord> listNotReceivedExcludeId(int count, long uid, Set<Long> idList);
|
| | |
|
| | | }
|