فهرست منبع

feat:“广告添加播放时机器状态字段“

soobin 1 سال پیش
والد
کامیت
7ae76cae96

+ 1 - 0
src/main/java/com/szwl/controller/TAdController.java

@@ -148,6 +148,7 @@ public class TAdController {
         oldAd.setScreenType(ad.getScreenType());
         oldAd.setTimeRule(ad.getTimeRule());
         oldAd.setType(ad.getType());
+        oldAd.setPlayTimeStatus(ad.getPlayTimeStatus());
         adService.updateById(oldAd);
         return R.ok(oldAd,"修改成功");
     }

+ 5 - 0
src/main/java/com/szwl/controller/TProportionController.java

@@ -288,6 +288,11 @@ public class TProportionController {
         if(equipment == null){
             return R.fail("找不到该机器!");
         }
+        String name = equipment.getName();
+        String clientId = equipment.getClientId();
+        if (StringUtils.isEmpty(name)) {
+            name = clientId.substring(clientId.length() - 6);
+        }
         //查看是否有审核中的
         LambdaQueryWrapper<TProportionCheck> queryCheck = Wrappers.lambdaQuery();
         queryCheck.eq(TProportionCheck::getAdminId,tProportion.getAdminId());

+ 1 - 1
src/main/java/com/szwl/mapper/TAdMapper.java

@@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
  * </p>
  *
  * @author wuhs
- * @since 2022-07-05
+ * @since 2024-07-12
  */
 public interface TAdMapper extends BaseMapper<TAd> {
 

+ 4 - 1
src/main/java/com/szwl/mapper/xml/TAdMapper.xml

@@ -20,11 +20,14 @@
         <result column="time_rule" property="timeRule" />
         <result column="screen_type" property="screenType" />
         <result column="equipment_type" property="equipmentType" />
+        <result column="type" property="type" />
+        <result column="username" property="username" />
+        <result column="play_time_status" property="playTimeStatus" />
     </resultMap>
 
     <!-- 通用查询结果列 -->
     <sql id="Base_Column_List">
-        id, create_date, modify_date, ad_type, admin_id, location_type, name, url, orders, duration, media_preview, plays, status, time_rule, screen_type, equipment_type
+        id, create_date, modify_date, ad_type, admin_id, location_type, name, url, orders, duration, media_preview, plays, status, time_rule, screen_type, equipment_type, type, username, play_time_status
     </sql>
 
 </mapper>

+ 16 - 8
src/main/java/com/szwl/model/entity/TAd.java

@@ -15,7 +15,7 @@ import lombok.EqualsAndHashCode;
  * </p>
  *
  * @author wuhs
- * @since 2022-07-05
+ * @since 2024-07-12
  */
 @Data
 @EqualsAndHashCode(callSuper = false)
@@ -31,21 +31,22 @@ public class TAd implements Serializable {
 
     private Date modifyDate;
 
-    @ApiModelProperty(value = "广告类型 0:图片,1:视频")
+    @ApiModelProperty(value = "广告类型0:图片,1:视频")
     private Integer adType;
 
+    @ApiModelProperty(value = "用户ID")
     private String adminId;
 
-    @ApiModelProperty(value = "位置类型 0:棉花糖宣传广告,1:外接广告")
+    @ApiModelProperty(value = "位置类型0:棉花糖宣传广告,1:外接广告")
     private Integer locationType;
 
+    @ApiModelProperty(value = "广告名称")
     private String name;
 
-    private String username;
-
     @ApiModelProperty(value = "广告地址")
     private String url;
 
+    @ApiModelProperty(value = "广告顺序")
     private Integer orders;
 
     @ApiModelProperty(value = "广告时长")
@@ -57,17 +58,24 @@ public class TAd implements Serializable {
     @ApiModelProperty(value = "播放次数")
     private Long plays;
 
-    @ApiModelProperty(value = "状态")
+    @ApiModelProperty(value = "推送状态")
     private String status;
 
     private String timeRule;
 
-    @ApiModelProperty(value = "0代表A屏,1代表B屏")
+    @ApiModelProperty(value = "0代表A屏1代表B屏")
     private Integer screenType;
 
     @ApiModelProperty(value = "适用机器类型")
     private String equipmentType;
 
-    @ApiModelProperty(value = "0默认下载,1不默认下载")
+    @ApiModelProperty(value = "0默认下载1不默认下载")
     private String type;
+
+    private String username;
+
+    @ApiModelProperty(value = "播放时机器状态,0:默认,1:待机状态,2:工作状态")
+    private String playTimeStatus;
+
+
 }

+ 1 - 1
src/main/java/com/szwl/service/TAdService.java

@@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
  * </p>
  *
  * @author wuhs
- * @since 2022-07-05
+ * @since 2024-07-12
  */
 public interface TAdService extends IService<TAd> {
 

+ 1 - 1
src/main/java/com/szwl/service/impl/TAdServiceImpl.java

@@ -12,7 +12,7 @@ import org.springframework.stereotype.Service;
  * </p>
  *
  * @author wuhs
- * @since 2022-07-05
+ * @since 2024-07-12
  */
 @Service
 public class TAdServiceImpl extends ServiceImpl<TAdMapper, TAd> implements TAdService {