Commit 6b7eaf73232d0fe026317538e2084f2bdd43c167
Merge branch 'dev'
Showing
1 changed file
with
8 additions
and
1 deletions
src/main/java/com/cnlive/shenhe/api/LiveControllerApi.java
| @@ -103,9 +103,15 @@ public class LiveControllerApi { | @@ -103,9 +103,15 @@ public class LiveControllerApi { | ||
| 103 | shylive1.setActivity_id(activityId); | 103 | shylive1.setActivity_id(activityId); |
| 104 | //查询一下 存在,更新 没有,插入 | 104 | //查询一下 存在,更新 没有,插入 |
| 105 | List<ShyLive> listshyLive = liveService.findshyLive(shylive1); | 105 | List<ShyLive> listshyLive = liveService.findshyLive(shylive1); |
| 106 | - | 106 | + //更新 |
| 107 | if (listshyLive.size() > 0) { | 107 | if (listshyLive.size() > 0) { |
| 108 | + | ||
| 108 | ShyLive shyLive = listshyLive.get(0); | 109 | ShyLive shyLive = listshyLive.get(0); |
| 110 | + //拒绝状态等于4 | ||
| 111 | + if (activityStatus == 4) { | ||
| 112 | + //领取状态改为未领 | ||
| 113 | + shyLive.setShenhe_state(CommonConst.RECEIVE_BEFORE); | ||
| 114 | + } | ||
| 109 | //封装数据入库 | 115 | //封装数据入库 |
| 110 | //设置spid | 116 | //设置spid |
| 111 | shyLive.setSp_id(spId); | 117 | shyLive.setSp_id(spId); |
| @@ -178,6 +184,7 @@ public class LiveControllerApi { | @@ -178,6 +184,7 @@ public class LiveControllerApi { | ||
| 178 | shyLive.setUpdated_at(CommonUtils.getCurrentTime()); | 184 | shyLive.setUpdated_at(CommonUtils.getCurrentTime()); |
| 179 | 185 | ||
| 180 | yorN = liveService.updateshyLive(shyLive); | 186 | yorN = liveService.updateshyLive(shyLive); |
| 187 | + // 插入 | ||
| 181 | } else { | 188 | } else { |
| 182 | //查了,没有,直接插入数据库 | 189 | //查了,没有,直接插入数据库 |
| 183 | //设置直播活动id | 190 | //设置直播活动id |