小么熊🐻 3 роки тому
батько
коміт
5c6a079849

+ 146 - 0
jkt-service/src/main/java/com/miaxis/ad/domain/AdInfo.java

@@ -0,0 +1,146 @@
+package com.miaxis.ad.domain;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.miaxis.common.annotation.Excel;
+import com.miaxis.common.core.domain.BaseEntity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.miaxis.common.core.domain.BaseBusinessEntity;
+import lombok.Data;
+/**
+ * ad对象 ad_info
+ *
+ * @author miaxis
+ * @date 2021-08-19
+ */
+@Data
+@TableName("ad_info")
+@ApiModel(value = "AdInfo", description = "ad对象 ad_info")
+public class AdInfo extends BaseBusinessEntity{
+    private static final long serialVersionUID = 1L;
+
+    /** 主键 */
+    @TableId(value = "id")
+    @ApiModelProperty(value = "主键")
+    private Long id;
+
+    /** 标题 */
+    @Excel(name = "标题")
+    @TableField("title")
+    @ApiModelProperty(value = "标题")
+    private String title;
+
+    /** 链接 */
+    @Excel(name = "链接")
+    @TableField("link")
+    @ApiModelProperty(value = "链接")
+    private String link;
+
+    /** 是否启动 1启用 0关闭 */
+    @Excel(name = "是否启动 1启用 0关闭")
+    @TableField("status")
+    @ApiModelProperty(value = "是否启动 1启用 0关闭")
+    private Long status;
+
+    /** 打开类型 1站内打开 2站外打开 */
+    @Excel(name = "打开类型 1站内打开 2站外打开")
+    @TableField("open_type")
+    @ApiModelProperty(value = "打开类型 1站内打开 2站外打开")
+    private Long openType;
+
+    /** 弹出类型 1:H5 2:小程序 3:公众号 */
+    @Excel(name = "弹出类型 1:H5 2:小程序 3:公众号")
+    @TableField("ad_type")
+    @ApiModelProperty(value = "弹出类型 1:H5 2:小程序 3:公众号")
+    private Long adType;
+
+    /** 弹出小程序时的指定URL */
+    @Excel(name = "弹出小程序时的指定URL")
+    @TableField("xcx_url")
+    @ApiModelProperty(value = "弹出小程序时的指定URL")
+    private String xcxUrl;
+
+    /** 公众号一次性订阅 */
+    @Excel(name = "公众号一次性订阅")
+    @TableField("content")
+    @ApiModelProperty(value = "公众号一次性订阅")
+    private String content;
+
+    public void setId(Long id){
+        this.id = id;
+    }
+
+    public Long getId(){
+        return id;
+    }
+    public void setTitle(String title){
+        this.title = title;
+    }
+
+    public String getTitle(){
+        return title;
+    }
+    public void setLink(String link){
+        this.link = link;
+    }
+
+    public String getLink(){
+        return link;
+    }
+    public void setStatus(Long status){
+        this.status = status;
+    }
+
+    public Long getStatus(){
+        return status;
+    }
+    public void setOpenType(Long openType){
+        this.openType = openType;
+    }
+
+    public Long getOpenType(){
+        return openType;
+    }
+    public void setAdType(Long adType){
+        this.adType = adType;
+    }
+
+    public Long getAdType(){
+        return adType;
+    }
+    public void setXcxUrl(String xcxUrl){
+        this.xcxUrl = xcxUrl;
+    }
+
+    public String getXcxUrl(){
+        return xcxUrl;
+    }
+    public void setContent(String content){
+        this.content = content;
+    }
+
+    public String getContent(){
+        return content;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("title", getTitle())
+            .append("link", getLink())
+            .append("status", getStatus())
+            .append("openType", getOpenType())
+            .append("adType", getAdType())
+            .append("xcxUrl", getXcxUrl())
+            .append("content", getContent())
+            .append("createTime", getCreateTime())
+            .append("updateTime", getUpdateTime())
+            .toString();
+    }
+}

+ 22 - 0
jkt-service/src/main/java/com/miaxis/ad/mapper/AdInfoMapper.java

@@ -0,0 +1,22 @@
+package com.miaxis.ad.mapper;
+
+import java.util.List;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.miaxis.ad.domain.AdInfo;
+
+/**
+ * adMapper接口
+ *
+ * @author miaxis
+ * @date 2021-08-19
+ */
+public interface AdInfoMapper extends BaseMapper<AdInfo> {
+    /**
+     * 查询ad列表
+     *
+     * @param adInfo ad
+     * @return ad集合
+     */
+    public List<AdInfo> selectAdInfoList(AdInfo adInfo);
+
+}

+ 21 - 0
jkt-service/src/main/java/com/miaxis/ad/service/IAdInfoService.java

@@ -0,0 +1,21 @@
+package com.miaxis.ad.service;
+
+import java.util.List;
+import com.miaxis.ad.domain.AdInfo;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * adService接口
+ *
+ * @author miaxis
+ * @date 2021-08-19
+ */
+public interface IAdInfoService extends IService<AdInfo>{
+    /**
+     * 查询ad列表
+     *
+     * @param adInfo ad
+     * @return ad集合
+     */
+    public List<AdInfo> selectAdInfoList(AdInfo adInfo);
+}

+ 50 - 0
jkt-service/src/main/java/com/miaxis/ad/service/impl/AdInfoServiceImpl.java

@@ -0,0 +1,50 @@
+package com.miaxis.ad.service.impl;
+
+import java.io.Serializable;
+import java.util.List;
+import java.util.Objects;
+
+import com.baomidou.mybatisplus.core.metadata.TableInfo;
+import com.baomidou.mybatisplus.core.metadata.TableInfoHelper;
+import com.baomidou.mybatisplus.core.toolkit.Assert;
+import com.baomidou.mybatisplus.core.toolkit.ReflectionKit;
+import com.baomidou.mybatisplus.core.toolkit.StringUtils;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.miaxis.common.utils.DateUtils;
+import org.apache.poi.ss.formula.functions.T;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.cache.annotation.CacheConfig;
+import org.springframework.cache.annotation.CachePut;
+import org.springframework.stereotype.Service;
+import com.miaxis.ad.mapper.AdInfoMapper;
+import com.miaxis.ad.domain.AdInfo;
+import com.miaxis.ad.service.IAdInfoService;
+
+/**
+ * adService业务层处理
+ *
+ * @author miaxis
+ * @date 2021-08-19
+ */
+@Service
+@CacheConfig(cacheNames = "AdInfo")
+public class AdInfoServiceImpl extends ServiceImpl<AdInfoMapper, AdInfo> implements IAdInfoService {
+    @Autowired
+    private AdInfoMapper adInfoMapper;
+
+    /**
+     * 查询ad列表
+     *
+     * @param adInfo ad
+     * @return ad
+     */
+    @Override
+    public List<AdInfo> selectAdInfoList(AdInfo adInfo){
+        return adInfoMapper.selectAdInfoList(adInfo);
+    }
+
+
+
+}