Commit 1ca4220a authored by 罗林杰's avatar 罗林杰

修改互要微信

parent f0f318c9
...@@ -185,7 +185,7 @@ public interface MemInfoRepository extends CyBaseMapper<MemInfo> { ...@@ -185,7 +185,7 @@ public interface MemInfoRepository extends CyBaseMapper<MemInfo> {
/** /**
* 修改索要微信任务 * 修改索要微信任务
*/ */
int updateWeChatTask(MemUserTaskDTO memUserTaskDTO); int updateWeChatTask(@Param("entity") MemUserTaskDTO memUserTaskDTO);
/** /**
* 查询互换微信任务记录 * 查询互换微信任务记录
......
...@@ -880,6 +880,8 @@ public class MemInfoServiceImpl extends ServiceImpl<MemInfoRepository,MemInfo> ...@@ -880,6 +880,8 @@ public class MemInfoServiceImpl extends ServiceImpl<MemInfoRepository,MemInfo>
DictData dictData2 = userLikeConfig.stream().filter(item -> item.getDictLabel().equals("accept_exchange_wechat")).findFirst().orElse(null); DictData dictData2 = userLikeConfig.stream().filter(item -> item.getDictLabel().equals("accept_exchange_wechat")).findFirst().orElse(null);
Integer requestGoldCoinCount = Integer.valueOf(dictData1.getDictValue());//发起请求需消耗的金币数 Integer requestGoldCoinCount = Integer.valueOf(dictData1.getDictValue());//发起请求需消耗的金币数
Integer acceptGoldCoinCount = Integer.valueOf(dictData2.getDictValue());//接收需消耗的金币数 Integer acceptGoldCoinCount = Integer.valueOf(dictData2.getDictValue());//接收需消耗的金币数
// Integer requestGoldCoinCount = Integer.valueOf('1');//发起请求需消耗的金币数
// Integer acceptGoldCoinCount = Integer.valueOf('1');//接收需消耗的金币数
if (memUserTaskDTO.getType().equals("1")){ if (memUserTaskDTO.getType().equals("1")){
//发起请求 //发起请求
//扣除该用户的金币数量 //扣除该用户的金币数量
...@@ -931,16 +933,15 @@ public class MemInfoServiceImpl extends ServiceImpl<MemInfoRepository,MemInfo> ...@@ -931,16 +933,15 @@ public class MemInfoServiceImpl extends ServiceImpl<MemInfoRepository,MemInfo>
memInfoRepository.updateById(memInfo); memInfoRepository.updateById(memInfo);
//修改微信任务 //修改微信任务
line = baseMapper.updateWeChatTask(memUserTaskDTO); line = baseMapper.updateWeChatTask(memUserTaskDTO);
lock.unlock();
} }
} catch (InterruptedException e) { } catch (InterruptedException e) {
Thread.currentThread().interrupt(); Thread.currentThread().interrupt();
lock.unlock();
isGetLock = false; isGetLock = false;
throw new CyServiceException(1004,"服务器繁忙,请稍后再试"); throw new CyServiceException(1004,"服务器繁忙,请稍后再试");
} finally {
lock.unlock();
log.error("释放成功");
return new CyPersistModel(line);
} }
return new CyPersistModel(line);
} else { } else {
//拒绝 //拒绝
//修改微信任务 //修改微信任务
......
...@@ -780,8 +780,8 @@ ...@@ -780,8 +780,8 @@
<select id="selectWeChatTask" resultType="org.rcisoft.business.memInfo.entity.MemUserTaskDTO"> <select id="selectWeChatTask" resultType="org.rcisoft.business.memInfo.entity.MemUserTaskDTO">
select * select *
from mem_user_task from mem_user_task
where 1=1 WHERE
and target_id = #{entity.targetId} (create_by = #{entity.createBy} and target_id = #{entity.targetId})
and create_by = #{entity.createBy} OR (create_by = #{entity.targetId} and target_id = #{entity.createBy})
</select> </select>
</mapper> </mapper>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment