Parcourir la source

fix 解冻车票

zoujiajian il y a 8 mois
Parent
commit
0740b2499f

+ 18 - 0
netflix-dao/src/main/java/com/cyksj/model/manage/views/GroupsRelationBackView.java

@@ -125,6 +125,24 @@ public class GroupsRelationBackView {
 	@DbField("gr.is_vip")
 	private Boolean isVip;
 
+	/**
+	 * 是否冻结
+	 */
+	@DbField("gr.is_frozen")
+	private Boolean isFrozen;
+
+	/**
+	 * 解冻到期时间
+	 */
+	@DbField("gr.unfrozen_time")
+	private Date unfrozenTime;
+
+	/**
+	 * 冻结剩余时长(天)
+	 */
+	@DbField("gr.reserved_days")
+	private Integer reservedDays;
+
 	@DbIgnore
 	private Date updateExpiryTime;
 

+ 14 - 0
netflix-web/src/main/java/com/cyksj/web/controller/manage/group/CmsGroupRelationController.java

@@ -742,4 +742,18 @@ public class CmsGroupRelationController {
                 .build());
         return GatewayResponse.SUCCESS.newBuilder().toResult(search);
     }
+
+    /**
+     * 解冻车票
+     */
+    @PutMapping("/unfreeze/ticket/{relationId}")
+    @Log(module = "解冻车票", businessType = BusinessType.PUT, isSaveRequestData = true)
+    public Result<String> unfreezeTicket(@PathVariable Long relationId) {
+        GroupsRelation groupsRelation = groupsRelationMapper.selectById(relationId);
+        if (groupsRelation != null && groupsRelation.getIsFrozen()) {
+            groupsRelation.setIsFrozen(false);
+            groupsRelationMapper.updateById(groupsRelation);
+        }
+        return GatewayResponse.SUCCESS.newBuilder().toResult();
+    }
 }