Browse Source

供应商落地页后台

kaick 1 year ago
parent
commit
b4e341df30
20 changed files with 3060 additions and 9 deletions
  1. 278 0
      src/main/java/com/caimei/modules/landing/domain/CmBrandBanner.java
  2. 175 0
      src/main/java/com/caimei/modules/landing/domain/CmBrandFiles.java
  3. 276 0
      src/main/java/com/caimei/modules/landing/domain/CmBrandLanding.java
  4. 76 0
      src/main/java/com/caimei/modules/landing/mapper/CmBrandBannerMapper.java
  5. 69 0
      src/main/java/com/caimei/modules/landing/mapper/CmBrandFilesMapper.java
  6. 75 0
      src/main/java/com/caimei/modules/landing/mapper/CmBrandLandingMapper.java
  7. 122 0
      src/main/java/com/caimei/modules/landing/service/CmBrandBannerService.java
  8. 194 0
      src/main/java/com/caimei/modules/landing/service/CmBrandLandingService.java
  9. 188 0
      src/main/java/com/caimei/modules/landing/web/CmBrandBannerController.java
  10. 220 0
      src/main/java/com/caimei/modules/landing/web/CmBrandLandingController.java
  11. 1 1
      src/main/resources/config/beta/caimei.properties
  12. 7 7
      src/main/resources/config/dev/caimei.properties
  13. 1 1
      src/main/resources/config/prod/caimei.properties
  14. 168 0
      src/main/resources/mappings/modules/landing/CmBrandBannerMapper.xml
  15. 108 0
      src/main/resources/mappings/modules/landing/CmBrandFilesMapper.xml
  16. 173 0
      src/main/resources/mappings/modules/landing/CmBrandLandingMapper.xml
  17. 212 0
      src/main/webapp/WEB-INF/views/modules/landing/newPageCmBrandBannerList.jsp
  18. 240 0
      src/main/webapp/WEB-INF/views/modules/landing/newPageCmBrandLandingList.jsp
  19. 129 0
      src/main/webapp/WEB-INF/views/modules/landing/newPageCmbrandBannerForm.jsp
  20. 348 0
      src/main/webapp/WEB-INF/views/modules/landing/newPageCmbrandLandingForm.jsp

+ 278 - 0
src/main/java/com/caimei/modules/landing/domain/CmBrandBanner.java

@@ -0,0 +1,278 @@
+package com.caimei.modules.landing.domain;
+
+import java.util.Date;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.thinkgem.jeesite.common.persistence.DataEntity;
+import lombok.AllArgsConstructor;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import org.apache.ibatis.type.Alias;
+
+import java.io.Serializable;
+
+/**
+ * 首页banner对象 cm_brand_banner
+ *
+ * @author Kaick
+ * @date 2023-05-24
+ */
+@Alias("CmBrandBanner")
+public class CmBrandBanner extends DataEntity<CmBrandBanner> implements Serializable {
+    private static final Long serialVersionUID = 1L;
+
+    /**
+     * id
+     */
+    private String id;
+
+    /**
+     * 供应商id
+     */
+    private Integer authUserId;
+
+    /**
+     * 分类:1首页banner,2供应商落地页banner
+     */
+    private Integer type;
+
+    /**
+     * 首页pc端banner
+     */
+    private String headPcBanner;
+
+    /**
+     * 首页移动端banner
+     */
+    private String headAppBanner;
+
+    /**
+     * 首页banner跳转方式状态:0无,1图片,2链接
+     */
+    private Integer jumpStatus;
+
+    /**
+     * 首页pc端banner跳转图片
+     */
+    private String jumpPcPicture;
+
+    /**
+     * 首页移动端banner跳转图片
+     */
+    private String jumpAppPicture;
+
+    /**
+     * 首页banner跳转链接
+     */
+    private String jumpLink;
+
+    /**
+     * 首页移动端banner跳转链接
+     */
+    private String jumpAppLink;
+
+    /**
+     * PC标题
+     */
+    private String titlePc;
+
+    /**
+     * App标题
+     */
+    private String titleApp;
+
+    /**
+     * 排序
+     */
+    private Integer sort;
+
+    /**
+     * pc端status 0启用,1停用
+     */
+    private Integer pcStatus;
+
+    /**
+     * 移动端status 0启用,1停用
+     */
+    private Integer appStatus;
+
+    /**
+     * 删除状态 0正常,1删除
+     */
+    private String delFlag;
+    /** 修改时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date updateTime;
+    /**
+     * 添加时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date addTime;
+
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getId() {
+        return id;
+    }
+
+    public void setAuthUserId(Integer authUserId) {
+        this.authUserId = authUserId;
+    }
+
+    public Integer getAuthUserId() {
+        return authUserId;
+    }
+
+    public void setType(Integer type) {
+        this.type = type;
+    }
+
+    public Integer getType() {
+        return type;
+    }
+
+    public void setHeadPcBanner(String headPcBanner) {
+        this.headPcBanner = headPcBanner;
+    }
+
+    public String getHeadPcBanner() {
+        return headPcBanner;
+    }
+
+    public void setHeadAppBanner(String headAppBanner) {
+        this.headAppBanner = headAppBanner;
+    }
+
+    public String getHeadAppBanner() {
+        return headAppBanner;
+    }
+
+    public void setJumpStatus(Integer jumpStatus) {
+        this.jumpStatus = jumpStatus;
+    }
+
+    public Integer getJumpStatus() {
+        return jumpStatus;
+    }
+
+    public void setJumpPcPicture(String jumpPcPicture) {
+        this.jumpPcPicture = jumpPcPicture;
+    }
+
+    public String getJumpPcPicture() {
+        return jumpPcPicture;
+    }
+
+    public void setJumpAppPicture(String jumpAppPicture) {
+        this.jumpAppPicture = jumpAppPicture;
+    }
+
+    public String getJumpAppPicture() {
+        return jumpAppPicture;
+    }
+
+    public void setJumpLink(String jumpLink) {
+        this.jumpLink = jumpLink;
+    }
+
+    public String getJumpLink() {
+        return jumpLink;
+    }
+
+    public void setJumpAppLink(String jumpAppLink) {
+        this.jumpAppLink = jumpAppLink;
+    }
+
+    public String getJumpAppLink() {
+        return jumpAppLink;
+    }
+
+    public void setTitlePc(String titlePc) {
+        this.titlePc = titlePc;
+    }
+
+    public String getTitlePc() {
+        return titlePc;
+    }
+
+    public void setTitleApp(String titleApp) {
+        this.titleApp = titleApp;
+    }
+
+    public String getTitleApp() {
+        return titleApp;
+    }
+
+    public void setSort(Integer sort) {
+        this.sort = sort;
+    }
+
+    public Integer getSort() {
+        return sort;
+    }
+
+    public void setPcStatus(Integer pcStatus) {
+        this.pcStatus = pcStatus;
+    }
+
+    public Integer getPcStatus() {
+        return pcStatus;
+    }
+
+    public void setAppStatus(Integer appStatus) {
+        this.appStatus = appStatus;
+    }
+
+    public Integer getAppStatus() {
+        return appStatus;
+    }
+
+    public void setDelFlag(String delFlag) {
+        this.delFlag = delFlag;
+    }
+
+    public String getDelFlag() {
+        return delFlag;
+    }
+
+    public void setAddTime(Date addTime) {
+        this.addTime = addTime;
+    }
+
+    public Date getAddTime() {
+        return addTime;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
+                .append("id", getId())
+                .append("authUserId", getAuthUserId())
+                .append("type", getType())
+                .append("headPcBanner", getHeadPcBanner())
+                .append("headAppBanner", getHeadAppBanner())
+                .append("jumpStatus", getJumpStatus())
+                .append("jumpPcPicture", getJumpPcPicture())
+                .append("jumpAppPicture", getJumpAppPicture())
+                .append("jumpLink", getJumpLink())
+                .append("jumpAppLink", getJumpAppLink())
+                .append("titlePc", getTitlePc())
+                .append("titleApp", getTitleApp())
+                .append("sort", getSort())
+                .append("pcStatus", getPcStatus())
+                .append("appStatus", getAppStatus())
+                .append("delFlag", getDelFlag())
+                .append("addTime", getAddTime())
+                .toString();
+    }
+}

+ 175 - 0
src/main/java/com/caimei/modules/landing/domain/CmBrandFiles.java

@@ -0,0 +1,175 @@
+package com.caimei.modules.landing.domain;
+
+import java.util.Date;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.thinkgem.jeesite.common.persistence.DataEntity;
+import lombok.experimental.Accessors;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import org.apache.ibatis.type.Alias;
+
+import java.io.Serializable;
+
+/**
+ * 【请填写功能名称】对象 cm_brand_files
+ * 
+ * @author Kaick
+ * @date 2023-05-30
+ */
+@Accessors(chain = true)
+@Alias("CmBrandFiles")
+public class CmBrandFiles extends DataEntity<CmBrandFiles> implements Serializable
+{
+    private static final Long serialVersionUID = 1L;
+
+    /** $column.columnComment */
+    private String id;
+
+    /** 视频文件分类:1供应商落地页 */
+    private String type;
+
+    /** 父id */
+    private String superId;
+
+    /** 文件名 */
+    private String fileName;
+
+    /** oss名称 */
+    private String ossName;
+
+    /** 水印oss名称 */
+    private String waterOssName;
+
+    /** oss链接 */
+    private String ossUrl;
+
+    /** 水印oss链接 */
+    private String waterOssUrl;
+
+    /** html链接 */
+    private String htmlUrl;
+
+    /** 上传时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date uploadTime;
+
+    /** 删除状态 0正常,其他删除 */
+    private String delFlag;
+
+    public void setId(String id) 
+    {
+        this.id = id;
+    }
+
+    public String getId() 
+    {
+        return id;
+    }
+    public void setType(String type) 
+    {
+        this.type = type;
+    }
+
+    public String getType() 
+    {
+        return type;
+    }
+    public void setSuperId(String superId) 
+    {
+        this.superId = superId;
+    }
+
+    public String getSuperId() 
+    {
+        return superId;
+    }
+    public void setFileName(String fileName) 
+    {
+        this.fileName = fileName;
+    }
+
+    public String getFileName() 
+    {
+        return fileName;
+    }
+    public void setOssName(String ossName) 
+    {
+        this.ossName = ossName;
+    }
+
+    public String getOssName() 
+    {
+        return ossName;
+    }
+    public void setWaterOssName(String waterOssName) 
+    {
+        this.waterOssName = waterOssName;
+    }
+
+    public String getWaterOssName() 
+    {
+        return waterOssName;
+    }
+    public void setOssUrl(String ossUrl) 
+    {
+        this.ossUrl = ossUrl;
+    }
+
+    public String getOssUrl() 
+    {
+        return ossUrl;
+    }
+    public void setWaterOssUrl(String waterOssUrl) 
+    {
+        this.waterOssUrl = waterOssUrl;
+    }
+
+    public String getWaterOssUrl() 
+    {
+        return waterOssUrl;
+    }
+    public void setHtmlUrl(String htmlUrl) 
+    {
+        this.htmlUrl = htmlUrl;
+    }
+
+    public String getHtmlUrl() 
+    {
+        return htmlUrl;
+    }
+    public void setUploadTime(Date uploadTime) 
+    {
+        this.uploadTime = uploadTime;
+    }
+
+    public Date getUploadTime() 
+    {
+        return uploadTime;
+    }
+    public void setDelFlag(String delFlag) 
+    {
+        this.delFlag = delFlag;
+    }
+
+    public String getDelFlag() 
+    {
+        return delFlag;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("type", getType())
+            .append("superId", getSuperId())
+            .append("fileName", getFileName())
+            .append("ossName", getOssName())
+            .append("waterOssName", getWaterOssName())
+            .append("ossUrl", getOssUrl())
+            .append("waterOssUrl", getWaterOssUrl())
+            .append("htmlUrl", getHtmlUrl())
+            .append("uploadTime", getUploadTime())
+            .append("delFlag", getDelFlag())
+            .toString();
+    }
+}

+ 276 - 0
src/main/java/com/caimei/modules/landing/domain/CmBrandLanding.java

@@ -0,0 +1,276 @@
+package com.caimei.modules.landing.domain;
+
+import java.util.Date;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.thinkgem.jeesite.common.persistence.DataEntity;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import org.apache.ibatis.type.Alias;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * 供应商落地页资源对象 cm_brand_landing
+ * 
+ * @author Kaick
+ * @date 2023-05-24
+ */
+@Alias("CmBrandLanding")
+public class CmBrandLanding extends DataEntity<CmBrandLanding> implements Serializable
+{
+    private static final Long serialVersionUID = 1L;
+
+    /** id */
+    private String id;
+
+    /** 供应商id */
+    private Integer authUserId;
+
+    /** 分类:1成功案例,2增长社区-视频列表,3增长社区-文章列表 */
+    private Integer type;
+
+    /** pc端picture */
+    private String headPcBanner;
+
+    /** 移动端picture */
+    private String headAppBanner;
+
+    /** picture跳转方式状态:0无,1图片,2链接 */
+    private Integer jumpStatus;
+
+    /** pc端picture跳转图片 */
+    private String jumpPcPicture;
+
+    /** 移动端picture跳转图片 */
+    private String jumpAppPicture;
+
+    /** picture跳转链接 */
+    private String jumpLink;
+
+    /** 标题
+ */
+    private String title;
+
+    /** 内容
+ */
+    private String content;
+
+    /** 视频文件 */
+    private String video;
+
+    /** 排序 */
+    private Integer sort;
+
+    /** pc端status 0启用,1停用 */
+    private Integer pcStatus;
+
+    /** 移动端status 0启用,1停用 */
+    private Integer appStatus;
+
+    /** 删除状态 0正常,1删除 */
+    private String delFlag;
+    /** 文件名称*/
+    private List<CmBrandFiles> cmBrandFiles;
+
+
+    /** 修改时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date updateTime;
+    /** 添加时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date addTime;
+
+    public List<CmBrandFiles> getCmBrandFiles() {
+        return cmBrandFiles;
+    }
+
+    public void setCmBrandFiles(List<CmBrandFiles> cmBrandFiles) {
+        this.cmBrandFiles = cmBrandFiles;
+    }
+
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+    public void setId(String id)
+    {
+        this.id = id;
+    }
+
+    public String getId()
+    {
+        return id;
+    }
+    public void setAuthUserId(Integer authUserId) 
+    {
+        this.authUserId = authUserId;
+    }
+
+    public Integer getAuthUserId() 
+    {
+        return authUserId;
+    }
+    public void setType(Integer type) 
+    {
+        this.type = type;
+    }
+
+    public Integer getType() 
+    {
+        return type;
+    }
+    public void setHeadPcBanner(String headPcBanner) 
+    {
+        this.headPcBanner = headPcBanner;
+    }
+
+    public String getHeadPcBanner() 
+    {
+        return headPcBanner;
+    }
+    public void setHeadAppBanner(String headAppBanner) 
+    {
+        this.headAppBanner = headAppBanner;
+    }
+
+    public String getHeadAppBanner() 
+    {
+        return headAppBanner;
+    }
+    public void setJumpStatus(Integer jumpStatus) 
+    {
+        this.jumpStatus = jumpStatus;
+    }
+
+    public Integer getJumpStatus() 
+    {
+        return jumpStatus;
+    }
+    public void setJumpPcPicture(String jumpPcPicture) 
+    {
+        this.jumpPcPicture = jumpPcPicture;
+    }
+
+    public String getJumpPcPicture() 
+    {
+        return jumpPcPicture;
+    }
+    public void setJumpAppPicture(String jumpAppPicture) 
+    {
+        this.jumpAppPicture = jumpAppPicture;
+    }
+
+    public String getJumpAppPicture() 
+    {
+        return jumpAppPicture;
+    }
+    public void setJumpLink(String jumpLink) 
+    {
+        this.jumpLink = jumpLink;
+    }
+
+    public String getJumpLink() 
+    {
+        return jumpLink;
+    }
+    public void setTitle(String title) 
+    {
+        this.title = title;
+    }
+
+    public String getTitle() 
+    {
+        return title;
+    }
+    public void setContent(String content) 
+    {
+        this.content = content;
+    }
+
+    public String getContent() 
+    {
+        return content;
+    }
+    public void setVideo(String video) 
+    {
+        this.video = video;
+    }
+
+    public String getVideo() 
+    {
+        return video;
+    }
+    public void setSort(Integer sort) 
+    {
+        this.sort = sort;
+    }
+
+    public Integer getSort() 
+    {
+        return sort;
+    }
+    public void setPcStatus(Integer pcStatus) 
+    {
+        this.pcStatus = pcStatus;
+    }
+
+    public Integer getPcStatus() 
+    {
+        return pcStatus;
+    }
+    public void setAppStatus(Integer appStatus) 
+    {
+        this.appStatus = appStatus;
+    }
+
+    public Integer getAppStatus() 
+    {
+        return appStatus;
+    }
+    public void setDelFlag(String delFlag)
+    {
+        this.delFlag = delFlag;
+    }
+
+    public String getDelFlag()
+    {
+        return delFlag;
+    }
+    public void setAddTime(Date addTime) 
+    {
+        this.addTime = addTime;
+    }
+
+    public Date getAddTime() 
+    {
+        return addTime;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("authUserId", getAuthUserId())
+            .append("type", getType())
+            .append("headPcBanner", getHeadPcBanner())
+            .append("headAppBanner", getHeadAppBanner())
+            .append("jumpStatus", getJumpStatus())
+            .append("jumpPcPicture", getJumpPcPicture())
+            .append("jumpAppPicture", getJumpAppPicture())
+            .append("jumpLink", getJumpLink())
+            .append("title", getTitle())
+            .append("content", getContent())
+            .append("video", getVideo())
+            .append("sort", getSort())
+            .append("pcStatus", getPcStatus())
+            .append("appStatus", getAppStatus())
+            .append("delFlag", getDelFlag())
+            .append("updateTime", getUpdateTime())
+            .append("addTime", getAddTime())
+            .toString();
+    }
+}

+ 76 - 0
src/main/java/com/caimei/modules/landing/mapper/CmBrandBannerMapper.java

@@ -0,0 +1,76 @@
+package com.caimei.modules.landing.mapper;
+
+import com.caimei.modules.info.entity.CmInfoDocSyn;
+import com.caimei.modules.landing.domain.CmBrandBanner;
+import com.thinkgem.jeesite.common.persistence.CrudDao;
+import com.thinkgem.jeesite.common.persistence.annotation.MyBatisDao;
+import org.apache.ibatis.annotations.Param;
+import org.apache.ibatis.type.Alias;
+
+import java.util.List;
+
+/**
+ * 首页bannerMapper接口
+ * 
+ * @author Kaick
+ * @date 2023-05-24
+ */
+@MyBatisDao
+public interface CmBrandBannerMapper  extends CrudDao<CmBrandBanner>
+{
+    /**
+     * 查询首页banner
+     * 
+     * @param id 首页banner主键
+     * @return 首页banner
+     */
+    public CmBrandBanner selectCmBrandBannerById(String id);
+
+    /**
+     * 查询首页banner desc Sort
+     *
+     * @return 首页banner
+     */
+    public String findBigSort();
+
+    /**
+     * 查询首页banner列表
+     * 
+     * @param cmBrandBanner 首页banner
+     * @return 首页banner集合
+     */
+    public List<CmBrandBanner> selectCmBrandBannerList(CmBrandBanner cmBrandBanner);
+
+    /**
+     * 新增首页banner
+     * 
+     * @param cmBrandBanner 首页banner
+     * @return 结果
+     */
+    public int insertCmBrandBanner(CmBrandBanner cmBrandBanner);
+
+    /**
+     * 修改首页banner
+     * 
+     * @param cmBrandBanner 首页banner
+     * @return 结果
+     */
+    public int updateCmBrandBanner(CmBrandBanner cmBrandBanner);
+
+    /**
+     * 删除首页banner
+     * 
+     * @param id 首页banner主键
+     * @return 结果
+     */
+    public int deleteCmBrandBannerById(String id);
+
+    /**
+     * 批量删除首页banner
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteCmBrandBannerByIds(String[] ids);
+    public int updateSort(@Param("id") String id, @Param("sort") String sort);
+}

+ 69 - 0
src/main/java/com/caimei/modules/landing/mapper/CmBrandFilesMapper.java

@@ -0,0 +1,69 @@
+package com.caimei.modules.landing.mapper;
+
+import com.caimei.modules.landing.domain.CmBrandFiles;
+import com.caimei.modules.landing.domain.CmBrandLanding;
+import com.thinkgem.jeesite.common.persistence.CrudDao;
+import com.thinkgem.jeesite.common.persistence.annotation.MyBatisDao;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * 供应商落地页资源Mapper接口
+ * 
+ * @author Kaick
+ * @date 2023-05-24
+ */
+@MyBatisDao
+public interface CmBrandFilesMapper extends CrudDao<CmBrandFiles>
+{
+
+    /**
+     * 查询【CmBrandFiles】
+     *
+     * @param id 【CmBrandFiles】主键
+     * @return 【CmBrandFiles】
+     */
+    public CmBrandFiles selectCmBrandFilesById(String id);
+
+    /**
+     * 查询【CmBrandFiles】列表
+     *
+     * @param cmBrandFiles 【CmBrandFiles】
+     * @return 【CmBrandFiles】集合
+     */
+    public List<CmBrandFiles> selectCmBrandFilesList(CmBrandFiles cmBrandFiles);
+
+    /**
+     * 新增【CmBrandFiles】
+     *
+     * @param cmBrandFiles 【CmBrandFiles】
+     * @return 结果
+     */
+    public int insertCmBrandFiles(CmBrandFiles cmBrandFiles);
+
+    /**
+     * 修改【CmBrandFiles】
+     *
+     * @param cmBrandFiles 【CmBrandFiles】
+     * @return 结果
+     */
+    public int updateCmBrandFiles(CmBrandFiles cmBrandFiles);
+
+    /**
+     * 删除【CmBrandFiles】
+     *
+     * @param id 【CmBrandFiles】主键
+     * @return 结果
+     */
+    public int deleteCmBrandFilesById(String id);
+
+    /**
+     * 批量删除【CmBrandFiles】
+     *
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteCmBrandFilesByIds(String[] ids);
+
+}

+ 75 - 0
src/main/java/com/caimei/modules/landing/mapper/CmBrandLandingMapper.java

@@ -0,0 +1,75 @@
+package com.caimei.modules.landing.mapper;
+
+import com.caimei.modules.landing.domain.CmBrandBanner;
+import com.caimei.modules.landing.domain.CmBrandFiles;
+import com.caimei.modules.landing.domain.CmBrandLanding;
+import com.thinkgem.jeesite.common.persistence.CrudDao;
+import com.thinkgem.jeesite.common.persistence.annotation.MyBatisDao;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * 供应商落地页资源Mapper接口
+ * 
+ * @author Kaick
+ * @date 2023-05-24
+ */
+@MyBatisDao
+public interface CmBrandLandingMapper  extends CrudDao<CmBrandLanding>
+{
+
+    public String findBigSort();
+
+    public int updateSort(@Param("id") String id, @Param("sort") String sort);
+    /**
+     * 查询供应商落地页资源
+     * 
+     * @param id 供应商落地页资源主键
+     * @return 供应商落地页资源
+     */
+    public CmBrandLanding selectCmBrandLandingById(String id);
+
+    /**
+     * 查询供应商落地页资源列表
+     * 
+     * @param cmBrandLanding 供应商落地页资源
+     * @return 供应商落地页资源集合
+     */
+    public List<CmBrandLanding> selectCmBrandLandingList(CmBrandLanding cmBrandLanding);
+
+    /**
+     * 新增供应商落地页资源
+     * 
+     * @param cmBrandLanding 供应商落地页资源
+     * @return 结果
+     */
+    public int insertCmBrandLanding(CmBrandLanding cmBrandLanding);
+
+    /**
+     * 修改供应商落地页资源
+     * 
+     * @param cmBrandLanding 供应商落地页资源
+     * @return 结果
+     */
+    public int updateCmBrandLanding(CmBrandLanding cmBrandLanding);
+
+    /**
+     * 删除供应商落地页资源
+     * 
+     * @param id 供应商落地页资源主键
+     * @return 结果
+     */
+    public int deleteCmBrandLandingById(String id);
+
+    /**
+     * 批量删除供应商落地页资源
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteCmBrandLandingByIds(String[] ids);
+
+
+
+}

+ 122 - 0
src/main/java/com/caimei/modules/landing/service/CmBrandBannerService.java

@@ -0,0 +1,122 @@
+package com.caimei.modules.landing.service;
+
+import java.util.List;
+
+import com.caimei.modules.info.dao.InfoAdDao;
+import com.caimei.modules.info.entity.InfoAd;
+import com.caimei.modules.landing.domain.CmBrandBanner;
+import com.caimei.modules.landing.mapper.CmBrandBannerMapper;
+import com.caimei.modules.newhome.entity.NewPageHomeimage;
+import com.thinkgem.jeesite.common.persistence.Page;
+import com.thinkgem.jeesite.common.service.CrudService;
+import com.thinkgem.jeesite.common.utils.DateUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+/**
+ * 首页bannerService业务层处理
+ * 
+ * @author Kaick
+ * @date 2023-05-24
+ */
+@Service
+@Transactional(readOnly = true)
+public class CmBrandBannerService extends CrudService<CmBrandBannerMapper, CmBrandBanner>
+{
+    @Autowired
+    private CmBrandBannerMapper cmBrandBannerMapper;
+
+    /**
+     * 查询首页banner
+     * 
+     * @param id 首页banner主键
+     * @return 首页banner
+     */
+    public CmBrandBanner selectCmBrandBannerById(String id)
+    {
+        return cmBrandBannerMapper.selectCmBrandBannerById(id);
+    }
+    /**
+     * 查询首页banner desc Sort
+     *
+     * @return 首页banner
+     */
+    public String findBigSort(){
+        return cmBrandBannerMapper.findBigSort();
+    }
+    /**
+     * 查询首页banner列表
+     * 
+     * @param cmBrandBanner 首页banner
+     * @return 首页banner
+     */
+    public List<CmBrandBanner> selectCmBrandBannerList(CmBrandBanner cmBrandBanner)
+    {
+        return cmBrandBannerMapper.selectCmBrandBannerList(cmBrandBanner);
+    }
+
+
+    /**
+     * 新增首页banner
+     * 
+     * @param cmBrandBanner 首页banner
+     * @return 结果
+     */
+    @Transactional(readOnly = false)
+    public int insertCmBrandBanner(CmBrandBanner cmBrandBanner)
+    {
+        return cmBrandBannerMapper.insertCmBrandBanner(cmBrandBanner);
+    }
+
+    /**
+     * 修改首页banner
+     * 
+     * @param cmBrandBanner 首页banner
+     * @return 结果
+     */
+    @Transactional(readOnly = false)
+    public int updateCmBrandBanner(CmBrandBanner cmBrandBanner)
+    {
+        return cmBrandBannerMapper.updateCmBrandBanner(cmBrandBanner);
+    }
+
+    /**
+     * 批量删除首页banner
+     * 
+     * @param ids 需要删除的首页banner主键
+     * @return 结果
+     */
+    @Transactional(readOnly = false)
+    public int deleteCmBrandBannerByIds(String[] ids)
+    {
+        return cmBrandBannerMapper.deleteCmBrandBannerByIds(ids);
+    }
+
+    /**
+     * 删除首页banner信息
+     * 
+     * @param id 首页banner主键
+     * @return 结果
+     */
+    @Transactional(readOnly = false)
+    public int deleteCmBrandBannerById(String id)
+    {
+        return cmBrandBannerMapper.deleteCmBrandBannerById(id);
+    }
+
+    @Transactional(readOnly = false)
+    public void updateSorts(String sortNums) {
+        if (sortNums.contains(",")) {
+            String[] sortNum = sortNums.split(",");
+            for (String s : sortNum) {
+                String[] s1 = s.split("_");
+                if (2 == s1.length) {
+                    String id=s1[0];
+                    String sort=s1[1];
+                    cmBrandBannerMapper.updateSort(id,sort);
+                }
+            }
+        }
+    }
+}

+ 194 - 0
src/main/java/com/caimei/modules/landing/service/CmBrandLandingService.java

@@ -0,0 +1,194 @@
+package com.caimei.modules.landing.service;
+
+import java.io.File;
+import java.util.*;
+
+import com.caimei.modules.archive.entity.CmProductArchiveFile;
+import com.caimei.modules.archive.utils.OssArchiveUtil;
+import com.caimei.modules.archive.utils.WaterMarkUtils;
+import com.caimei.modules.landing.domain.CmBrandBanner;
+import com.caimei.modules.landing.domain.CmBrandFiles;
+import com.caimei.modules.landing.domain.CmBrandLanding;
+import com.caimei.modules.landing.mapper.CmBrandBannerMapper;
+import com.caimei.modules.landing.mapper.CmBrandFilesMapper;
+import com.caimei.modules.landing.mapper.CmBrandLandingMapper;
+import com.thinkgem.jeesite.common.config.Global;
+import com.thinkgem.jeesite.common.service.CrudService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.web.multipart.MultipartFile;
+
+/**
+ * 供应商落地页资源Service业务层处理
+ *
+ * @author Kaick
+ * @date 2023-05-24
+ */
+@Service
+@Transactional(readOnly = true)
+public class CmBrandLandingService extends CrudService<CmBrandLandingMapper, CmBrandLanding> {
+    @Autowired
+    private CmBrandLandingMapper cmBrandLandingMapper;
+    @Autowired
+    private CmBrandFilesMapper cmBrandFilesMapper;
+    private final String tempPath = Global.getConfig("archive.tempPath");
+
+    /**
+     * 查询供应商落地页资源
+     *
+     * @param id 供应商落地页资源主键
+     * @return 供应商落地页资源
+     */
+    public CmBrandLanding selectCmBrandLandingById(String id) {
+        CmBrandLanding cmBrandLanding = cmBrandLandingMapper.selectCmBrandLandingById(id);
+        if (cmBrandLanding != null && cmBrandLanding.getVideo() != null && !cmBrandLanding.getVideo().equals("")) {
+            CmBrandFiles cmBrandFiles = new CmBrandFiles();
+            cmBrandFiles.setId(cmBrandLanding.getVideo());
+            cmBrandLanding.setCmBrandFiles(cmBrandFilesMapper.selectCmBrandFilesList(cmBrandFiles));
+        }
+        return cmBrandLanding;
+    }
+    /**
+     * 查询供应商落地页视频资源
+     *
+     * @return 供应商落地页资源
+     */
+    public List<CmBrandFiles>  selectCmBrandFilesList(CmBrandFiles cmBrandFile) {
+        List<CmBrandFiles>  cmBrandFiles =cmBrandFile.getId()!=null? cmBrandFilesMapper.selectCmBrandFilesList(cmBrandFile):null;
+        return cmBrandFiles;
+    }
+
+    /**
+     * 查询供应商落地页资源列表
+     *
+     * @param cmBrandLanding 供应商落地页资源
+     * @return 供应商落地页资源
+     */
+    public List<CmBrandLanding> selectCmBrandLandingList(CmBrandLanding cmBrandLanding) {
+        return cmBrandLandingMapper.selectCmBrandLandingList(cmBrandLanding);
+    }
+
+    /**
+     * 新增供应商落地页资源
+     *
+     * @param cmBrandLanding 供应商落地页资源
+     * @return 结果
+     */
+    @Transactional(readOnly = false)
+    public int insertCmBrandLanding(CmBrandLanding cmBrandLanding) {
+        return cmBrandLandingMapper.insertCmBrandLanding(cmBrandLanding);
+    }
+
+    /**
+     * 修改供应商落地页资源
+     *
+     * @param cmBrandLanding 供应商落地页资源
+     * @return 结果
+     */
+    @Transactional(readOnly = false)
+    public int updateCmBrandLanding(CmBrandLanding cmBrandLanding) {
+        return cmBrandLandingMapper.updateCmBrandLanding(cmBrandLanding);
+    }
+
+    /**
+     * 批量删除供应商落地页资源
+     *
+     * @param ids 需要删除的供应商落地页资源主键
+     * @return 结果
+     */
+    @Transactional(readOnly = false)
+    public int deleteCmBrandLandingByIds(String[] ids) {
+        return cmBrandLandingMapper.deleteCmBrandLandingByIds(ids);
+    }
+
+    /**
+     * 删除供应商落地页资源信息
+     *
+     * @param id 供应商落地页资源主键
+     * @return 结果
+     */
+    @Transactional(readOnly = false)
+    public int deleteCmBrandLandingById(String id) {
+        return cmBrandLandingMapper.deleteCmBrandLandingById(id);
+    }
+
+
+    /**
+     * 供应商落地页资源信息 desc Sort
+     *
+     * @return 首页banner
+     */
+    public String findBigSort() {
+        return cmBrandLandingMapper.findBigSort();
+    }
+
+    @Transactional(readOnly = false)
+    public void updateSorts(String sortNums) {
+        if (sortNums.contains(",")) {
+            String[] sortNum = sortNums.split(",");
+            for (String s : sortNum) {
+                String[] s1 = s.split("_");
+                if (2 == s1.length) {
+                    String id = s1[0];
+                    String sort = s1[1];
+                    cmBrandLandingMapper.updateSort(id, sort);
+                }
+            }
+        }
+    }
+
+    @Transactional(readOnly = false)
+    public Map<String, Object> upload(MultipartFile multipartFile, String fileName, CmBrandFiles cmBrandFiles) {
+        Map<String, Object> map = new HashMap<>();
+        String fileAllName = multipartFile.getOriginalFilename();
+        String fileType = fileAllName.substring(fileAllName.lastIndexOf(".") + 1);
+        String uuid1 = UUID.randomUUID().toString().replaceAll("-", "");
+        String filePath1 = uuid1 + "." + fileType;
+        String uuid2 = UUID.randomUUID().toString().replaceAll("-", "");
+        String filePath2 = uuid2 + "." + fileType;
+        String contentType = OssArchiveUtil.getContentType(fileAllName);
+        try {
+            //保存本地
+            logger.info("开始>>>");
+            File file = OssArchiveUtil.ossUpload(multipartFile);
+            logger.info("默认路径>>>" + file.getAbsolutePath());
+            String contentDispositon = "pdf".equals(fileType) ? "inline" : "attachment";
+            // 源文件上传oss
+            String url = OssArchiveUtil.ossUpload(filePath1, "archiveFile/", file, contentType, contentDispositon);
+            // 添加水印
+            WaterMarkUtils.addWaterMark(file, "采美365网", filePath2, fileType, url);
+            File waterMarkFile = new File(tempPath + filePath2);
+            //水印文件上传oss
+            String waterMarkUrl = OssArchiveUtil.ossUpload(filePath2, "archiveFile/", waterMarkFile, contentType, contentDispositon);
+            logger.info(">>>>>>>>>>>>>>>>>" + waterMarkUrl);
+            //删除本地文件
+            OssArchiveUtil.deleteFile(file);
+            OssArchiveUtil.deleteFile(waterMarkFile);
+            //保存关联关系
+            CmBrandFiles archiveFile = new CmBrandFiles();
+            archiveFile.setType(cmBrandFiles.getType());
+            archiveFile.setFileName(fileName);
+            archiveFile.setOssName(filePath1);
+            archiveFile.setWaterOssName(filePath2);
+            archiveFile.setOssUrl(url);
+            archiveFile.setWaterOssUrl(waterMarkUrl);
+            archiveFile.setUploadTime(new Date());
+            if(cmBrandFiles.getId()==null||cmBrandFiles.getId().equals("")){
+                cmBrandFilesMapper.insertCmBrandFiles(archiveFile);
+            }else {
+                archiveFile.setId(cmBrandFiles.getId());
+                cmBrandFilesMapper.updateCmBrandFiles(archiveFile);
+            }
+            map.put("success", true);
+            map.put("msg", "操作成功");
+            map.put("archiveFile", archiveFile);
+        } catch (Exception e) {
+            e.printStackTrace();
+            map.put("success", false);
+            map.put("msg", "操作失败");
+            logger.info("上传异常!!!");
+        }
+        return map;
+    }
+}

+ 188 - 0
src/main/java/com/caimei/modules/landing/web/CmBrandBannerController.java

@@ -0,0 +1,188 @@
+package com.caimei.modules.landing.web;
+
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import com.caimei.constants.common.RedisKeyUtil;
+import com.caimei.dfs.image.beens.ImageUploadInfo;
+import com.caimei.modules.banner.entity.CrmBanner;
+import com.caimei.modules.common.utils.UploadUtils;
+import com.caimei.modules.hehe.entity.CmHeheProduct;
+import com.caimei.modules.landing.domain.CmBrandBanner;
+import com.caimei.modules.landing.domain.CmBrandLanding;
+import com.caimei.modules.landing.service.CmBrandBannerService;
+import com.caimei.modules.opensearch.GenerateUtils;
+import com.caimei.modules.sys.utils.UploadImageUtils;
+import com.caimei.redis.RedisService;
+import com.caimei.vo.JsonModel;
+import com.google.common.collect.Maps;
+import com.thinkgem.jeesite.common.config.Global;
+import com.thinkgem.jeesite.common.persistence.Page;
+import com.thinkgem.jeesite.common.utils.Encodes;
+import com.thinkgem.jeesite.common.utils.StringUtils;
+import com.thinkgem.jeesite.common.web.BaseController;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.Model;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.servlet.mvc.support.RedirectAttributes;
+
+/**
+ * 首页bannerController
+ *
+ * @author Kaick
+ * @date 2023-05-29
+ */
+@Controller
+@RequestMapping("${adminPath}/cmBrandBanner")
+public class CmBrandBannerController extends BaseController {
+    @Resource
+    private RedisService redisService;
+    @Autowired
+    private CmBrandBannerService cmBrandBannerService;
+    @Resource
+    private GenerateUtils generateUtils;
+
+    /**
+     * 查询首页banner列表
+     */
+    @RequestMapping(value = {"list", ""})
+    public String list(CmBrandBanner cmBrandBanner, HttpServletRequest request, HttpServletResponse response, Model model) {
+        cmBrandBanner.setDelFlag("0");
+        Page<CmBrandBanner> page = cmBrandBannerService.findPage(new Page<CmBrandBanner>(request, response), cmBrandBanner);
+        model.addAttribute("page", page);
+        model.addAttribute("type", cmBrandBanner.getType());
+        return "modules/landing/newPageCmBrandBannerList";
+    }
+
+
+    /**
+     * 获取首页banner详细信息
+     */
+    @RequestMapping(value = "form")
+    public String form(CmBrandBanner cmBrandBanner, Model model) {
+        CmBrandBanner cmBrandBannerById = cmBrandBanner.getId() != null && cmBrandBanner.getId() != ""?
+                cmBrandBannerService.selectCmBrandBannerById(cmBrandBanner.getId()):null;
+        model.addAttribute("sort",cmBrandBannerService.findBigSort());
+        model.addAttribute("cmBrandBanner", cmBrandBannerById == null ? new CmBrandBanner() : cmBrandBannerById);
+        model.addAttribute("type", cmBrandBanner.getType());
+        return "modules/landing/newPageCmbrandBannerForm";
+    }
+
+    /**
+     * 新增/修改首页banner
+     */
+    @RequestMapping(value = "save")
+    public String save(CmBrandBanner cmBrandBanner, Model model, RedirectAttributes redirectAttributes, HttpServletRequest request) {
+        if (null != cmBrandBanner.getHeadPcBanner() && !"".equals(cmBrandBanner.getHeadPcBanner())) {
+            String img = saveImageToServer(cmBrandBanner.getHeadPcBanner(), request);
+            cmBrandBanner.setHeadPcBanner(img);
+        }
+        if (null != cmBrandBanner.getHeadAppBanner() && !"".equals(cmBrandBanner.getHeadAppBanner())) {
+            String img = saveImageToServer(cmBrandBanner.getHeadAppBanner(), request);
+            cmBrandBanner.setHeadAppBanner(img);
+        }
+        if (cmBrandBanner.getId() == null||cmBrandBanner.getId() == "") {
+            cmBrandBanner.setType(2);
+            cmBrandBanner.setAddTime(new Date());
+            cmBrandBannerService.insertCmBrandBanner(cmBrandBanner);
+            addMessage(redirectAttributes, "保存首页banner成功");
+        } else {
+            cmBrandBanner.setUpdateTime(new Date());
+            cmBrandBannerService.updateCmBrandBanner(cmBrandBanner);
+            addMessage(redirectAttributes, "修改首页banner成功");
+        }
+
+//        //清除首页轮播图缓存
+//        redisService.remove("getHomeBanners::www");
+        cleanRedisCache(null);
+        return "redirect:" + Global.getAdminPath() + "/cmBrandBanner/list?type="+cmBrandBanner.getType();
+    }
+
+    /**
+     * 删除首页banner
+     */
+    @RequestMapping(value = "del/{type}/{ids}")
+    public String delete(@PathVariable String[] ids,@PathVariable Integer type, RedirectAttributes redirectAttributes) {
+        for (String id : ids) {
+            CmBrandBanner cmBrandBanner = new CmBrandBanner();
+            cmBrandBanner.setId(id);
+            cmBrandBanner.setDelFlag("1");
+            cmBrandBannerService.updateCmBrandBanner(cmBrandBanner);
+        }
+//        cmBrandBannerService.deleteCmBrandBannerByIds(ids);
+        addMessage(redirectAttributes, "删除首页banner成功");
+        return "redirect:" + Global.getAdminPath() + "/cmBrandBanner/list?type="+type;
+    }
+
+    @RequestMapping(value = "updateSort")
+    @ResponseBody
+    public JsonModel updateSort(String sortNums) {
+        JsonModel jsonMode = JsonModel.newInstance();
+        cmBrandBannerService.updateSorts(sortNums);
+        return jsonMode.success("批量更新排序成功");
+    }
+
+    @ResponseBody
+    @RequestMapping(value = "updateEnabledStatus")
+    public Map<String, Object> updateEnabledStatus(CmBrandBanner cmBrandBanner, HttpServletRequest request, HttpServletResponse response) {
+        Map<String, Object> map = Maps.newLinkedHashMap();
+        try {
+            cmBrandBannerService.updateCmBrandBanner(cmBrandBanner);
+            cleanRedisCache(null);
+            map.put("success", true);
+            map.put("msg", "修改成功");
+        } catch (Exception e) {
+            logger.debug(e.toString(), e);
+            map.put("success", false);
+            map.put("msg", "修改失败");
+        }
+        //清除首页轮播图缓存
+//        redisService.remove("getHomeBanners::www");
+        return map;
+    }
+
+    public String saveImageToServer(String imagesHead, HttpServletRequest request) {
+        String photoServer = Global.getConfig("photoServer");//获取文件服务器地址
+        String res = "";
+        ImageUploadInfo saveImageSerivce = new ImageUploadInfo();
+        if (StringUtils.isNotBlank(imagesHead) && !imagesHead.startsWith("http:") && !imagesHead.startsWith("https:")) {
+            imagesHead = Encodes.urlDecode(imagesHead);
+//			String realPath = request.getSession().getServletContext().getRealPath(imagesHead);
+            String realPath = UploadImageUtils.getAbsolutePath(imagesHead);
+            //			realPath=Encodes.urlDecode(realPath);
+            int pointerIndex = realPath.lastIndexOf(".");
+            try {
+                saveImageSerivce = UploadUtils.saveImageSerivce(realPath, pointerIndex, realPath);
+                res = photoServer + saveImageSerivce.getSource();
+            } catch (Exception e) {
+                logger.error("图片上传错误:" + e.toString(), e);
+            }
+        } else {
+            res = imagesHead;
+        }
+        return res;
+    }
+
+    /**
+     * 有数据变动时需要清除缓存
+     */
+    public void cleanRedisCache(String caller) {
+        if (null == caller) {
+            String www = RedisKeyUtil.getNewPageHomeImageKey("WWW");
+            if (redisService.exists(www)) {
+                redisService.remove(www);
+            }
+            String crm = RedisKeyUtil.getNewPageHomeImageKey("CRM");
+            if (redisService.exists(crm)) {
+                redisService.remove(crm);
+            }
+            // 重新生成静态首页
+            generateUtils.generateHome();
+        }
+    }
+}

+ 220 - 0
src/main/java/com/caimei/modules/landing/web/CmBrandLandingController.java

@@ -0,0 +1,220 @@
+package com.caimei.modules.landing.web;
+
+import com.caimei.constants.common.RedisKeyUtil;
+import com.caimei.dfs.image.beens.ImageUploadInfo;
+import com.caimei.modules.common.utils.UploadUtils;
+import com.caimei.modules.landing.domain.CmBrandFiles;
+import com.caimei.modules.landing.domain.CmBrandLanding;
+import com.caimei.modules.landing.service.CmBrandLandingService;
+import com.caimei.modules.opensearch.GenerateUtils;
+import com.caimei.modules.sys.utils.UploadImageUtils;
+import com.caimei.redis.RedisService;
+import com.caimei.vo.JsonModel;
+import com.google.common.collect.Maps;
+import com.thinkgem.jeesite.common.config.Global;
+import com.thinkgem.jeesite.common.persistence.Page;
+import com.thinkgem.jeesite.common.utils.Encodes;
+import com.thinkgem.jeesite.common.utils.StringUtils;
+import com.thinkgem.jeesite.common.web.BaseController;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.Model;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+import org.springframework.web.servlet.mvc.support.RedirectAttributes;
+
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.util.Date;
+import java.util.Map;
+
+/**
+ * 首页bannerController
+ *
+ * @author Kaick
+ * @date 2023-05-29
+ */
+@Controller
+@RequestMapping("${adminPath}/cmBrandLanding")
+public class CmBrandLandingController extends BaseController {
+    @Autowired
+    private CmBrandLandingService cmBrandLandingService;
+    @Resource
+    private RedisService redisService;
+    @Resource
+    private GenerateUtils generateUtils;
+
+    /**
+     * 查询首页Landing列表
+     */
+    @RequestMapping(value = {"list", ""})
+    public String list(CmBrandLanding cmBrandLanding, HttpServletRequest request, HttpServletResponse response, Model model) {
+        cmBrandLanding.setDelFlag("0");
+        Page<CmBrandLanding> page = cmBrandLandingService.findPage(new Page<CmBrandLanding>(request, response), cmBrandLanding);
+        page.getList().forEach(s->{
+            CmBrandFiles cmBrandFiles = new CmBrandFiles();
+            cmBrandFiles.setId(s.getVideo());
+            s.setCmBrandFiles(cmBrandLandingService.selectCmBrandFilesList(cmBrandFiles));
+        });
+        model.addAttribute("page", page);
+        model.addAttribute("type", cmBrandLanding.getType());
+        return "modules/landing/newPageCmBrandLandingList";
+    }
+
+
+    /**
+     * 获取首页Landing详细信息
+     */
+    @RequestMapping(value = "form")
+    public String form(CmBrandLanding cmBrandLanding , Model model) {
+        CmBrandLanding cmBrandLandingById = cmBrandLanding.getId() != null && cmBrandLanding.getId() != ""?
+        cmBrandLandingService.selectCmBrandLandingById(cmBrandLanding.getId()):null;
+        model.addAttribute("sort", cmBrandLandingService.findBigSort());
+        model.addAttribute("type", cmBrandLanding.getType());
+        model.addAttribute("cmBrandLanding", cmBrandLandingById == null ? new CmBrandLanding() : cmBrandLandingById);
+        return "modules/landing/newPageCmbrandLandingForm";
+    }
+
+    /**
+     * 新增首页Landing
+     */
+    @RequestMapping(value = "save")
+    public String save(CmBrandLanding cmBrandLanding, Model model, RedirectAttributes redirectAttributes, HttpServletRequest request) {
+        if (null != cmBrandLanding.getHeadPcBanner() && !"".equals(cmBrandLanding.getHeadPcBanner())) {
+            String img = saveImageToServer(cmBrandLanding.getHeadPcBanner(), request);
+            cmBrandLanding.setHeadPcBanner(img);
+        }
+        if (null != cmBrandLanding.getHeadAppBanner() && !"".equals(cmBrandLanding.getHeadAppBanner())) {
+            String img = saveImageToServer(cmBrandLanding.getHeadAppBanner(), request);
+            cmBrandLanding.setHeadAppBanner(img);
+        }
+        if (cmBrandLanding.getId() == null || cmBrandLanding.getId() == "") {
+            cmBrandLanding.setAddTime(new Date());
+            cmBrandLandingService.insertCmBrandLanding(cmBrandLanding);
+            if(cmBrandLanding.getType()==1){
+                addMessage(redirectAttributes, "保存成功案例成功");
+            }
+            if(cmBrandLanding.getType()==2){
+                addMessage(redirectAttributes, "保存视频成功");
+            }
+            if(cmBrandLanding.getType()==3){
+                addMessage(redirectAttributes, "保存文章成功");
+            }
+        } else {
+            cmBrandLanding.setUpdateTime(new Date());
+            cmBrandLandingService.updateCmBrandLanding(cmBrandLanding);
+            if(cmBrandLanding.getType()==1){
+                addMessage(redirectAttributes, "修改成功案例成功");
+            }
+            if(cmBrandLanding.getType()==2){
+                addMessage(redirectAttributes, "修改视频成功");
+            }
+            if(cmBrandLanding.getType()==3){
+                addMessage(redirectAttributes, "修改文章成功");
+            }
+        }
+
+//        //清除首页轮播图缓存
+//        redisService.remove("getHomeLandings::www");
+        cleanRedisCache(null);
+        return "redirect:" + Global.getAdminPath() + "/cmBrandLanding/list?type="+cmBrandLanding.getType();
+    }
+
+    /**
+     * 删除首页Landing
+     */
+    @RequestMapping(value = "del/{type}/{ids}")
+    public String delete(@PathVariable String[] ids,@PathVariable() Integer type, RedirectAttributes redirectAttributes) {
+        for (String id : ids) {
+            CmBrandLanding cmBrandLanding = new CmBrandLanding();
+            cmBrandLanding.setId(id);
+            cmBrandLanding.setDelFlag("1");
+            cmBrandLandingService.updateCmBrandLanding(cmBrandLanding);
+        }
+//        cmBrandLandingService.deleteCmBrandLandingByIds(ids);
+        if(type==1){
+            addMessage(redirectAttributes, "删除成功案例成功");
+        }
+        if(type==2){
+            addMessage(redirectAttributes, "删除视频成功");
+        }
+        if(type==3){
+            addMessage(redirectAttributes, "删除文章成功");
+        }
+        return "redirect:" + Global.getAdminPath() + "/cmBrandLanding/list?type="+type;
+    }
+
+    @RequestMapping(value = "updateSort")
+    @ResponseBody
+    public JsonModel updateSort(String sortNums) {
+        JsonModel jsonMode = JsonModel.newInstance();
+        cmBrandLandingService.updateSorts(sortNums);
+        return jsonMode.success("批量更新排序成功");
+    }
+
+    @ResponseBody
+    @RequestMapping(value = "updateEnabledStatus")
+    public Map<String, Object> updateEnabledStatus(CmBrandLanding cmBrandLanding, HttpServletRequest request, HttpServletResponse response) {
+        Map<String, Object> map = Maps.newLinkedHashMap();
+        try {
+            cmBrandLandingService.updateCmBrandLanding(cmBrandLanding);
+            cleanRedisCache(null);
+            map.put("success", true);
+            map.put("msg", "修改成功");
+        } catch (Exception e) {
+            logger.debug(e.toString(), e);
+            map.put("success", false);
+            map.put("msg", "修改失败");
+        }
+        //清除首页轮播图缓存
+//        redisService.remove("getHomeLandings::www");
+        return map;
+    }
+
+    @ResponseBody
+    @RequestMapping(value = "upload")
+    public Map<String, Object> upload(@RequestParam("file") MultipartFile file, @RequestParam("fileName") String fileName, CmBrandFiles archiveFile) {
+        return cmBrandLandingService.upload(file, fileName, archiveFile);
+    }
+
+    public String saveImageToServer(String imagesHead, HttpServletRequest request) {
+        String photoServer = Global.getConfig("photoServer");//获取文件服务器地址
+        String res = "";
+        ImageUploadInfo saveImageSerivce = new ImageUploadInfo();
+        if (StringUtils.isNotBlank(imagesHead) && !imagesHead.startsWith("http:") && !imagesHead.startsWith("https:")) {
+            imagesHead = Encodes.urlDecode(imagesHead);
+//			String realPath = request.getSession().getServletContext().getRealPath(imagesHead);
+            String realPath = UploadImageUtils.getAbsolutePath(imagesHead);
+            //			realPath=Encodes.urlDecode(realPath);
+            int pointerIndex = realPath.lastIndexOf(".");
+            try {
+                saveImageSerivce = UploadUtils.saveImageSerivce(realPath, pointerIndex, realPath);
+                res = photoServer + saveImageSerivce.getSource();
+            } catch (Exception e) {
+                logger.error("图片上传错误:" + e.toString(), e);
+            }
+        } else {
+            res = imagesHead;
+        }
+        return res;
+    }
+
+    /**
+     * 有数据变动时需要清除缓存
+     */
+    public void cleanRedisCache(String caller) {
+        if (null == caller) {
+            String www = RedisKeyUtil.getNewPageHomeImageKey("WWW");
+            if (redisService.exists(www)) {
+                redisService.remove(www);
+            }
+            String crm = RedisKeyUtil.getNewPageHomeImageKey("CRM");
+            if (redisService.exists(crm)) {
+                redisService.remove(crm);
+            }
+            // 重新生成静态首页
+            generateUtils.generateHome();
+        }
+    }
+}

+ 1 - 1
src/main/resources/config/beta/caimei.properties

@@ -103,7 +103,7 @@ web.view.prefix=/WEB-INF/views/
 web.view.suffix=.jsp
 
 #\u6700\u5927\u6587\u4EF6\u4E0A\u4F20\u9650\u5236\uFF0C\u5355\u4F4D\u5B57\u8282. 30M=10*1024*1024*3(B)=10485760 bytes\uFF0C\u9700\u540C\u6B65\u4FEE\u6539\uFF1Ackfinder.xml
-web.maxUploadSize=104857600
+web.maxUploadSize=504857600
 
 #\u65E5\u5FD7\u62E6\u622A\u8BBE\u7F6E\uFF0C\u6392\u9664\u7684URI\uFF1B\u5305\u542B @RequestMapping\u6CE8\u89E3\u7684value\u3002\uFF08\u5DF2\u4F5C\u5E9F\uFF09
 #web.logInterceptExcludeUri=/, /login, /sys/menu/tree, /sys/menu/treeData, /oa/oaNotify/self/count

+ 7 - 7
src/main/resources/config/dev/caimei.properties

@@ -12,14 +12,14 @@
 #mysql database setting
 jdbc.type=mysql
 jdbc.driver=com.mysql.cj.jdbc.Driver
-jdbc.url=jdbc:mysql://120.79.25.27:3306/caimei?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
-jdbc.username=developer
-jdbc.password=J5p3tgOVazNl4ydf
+#jdbc.url=jdbc:mysql://120.79.25.27:3306/caimei?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
+#jdbc.username=developer
+#jdbc.password=J5p3tgOVazNl4ydf
 
 
-#jdbc.url=jdbc:mysql://192.168.2.100:3306/caimei?characterEncoding=UTF8&serverTimezone=Asia/Shanghai
-#jdbc.username=developer
-#jdbc.password=05bZ/OxTB:X+yd%1
+jdbc.url=jdbc:mysql://192.168.2.100:3306/caimei?characterEncoding=UTF8&serverTimezone=Asia/Shanghai
+jdbc.username=developer
+jdbc.password=05bZ/OxTB:X+yd%1
 
 #jdbc.url=jdbc:mysql://119.29.0.46:3306/caimei?useUnicode=true&characterEncoding=utf-8
 #jdbc.username=root
@@ -112,7 +112,7 @@ web.view.prefix=/WEB-INF/views/
 web.view.suffix=.jsp
 
 #\u6700\u5927\u6587\u4EF6\u4E0A\u4F20\u9650\u5236\uFF0C\u5355\u4F4D\u5B57\u8282. 30M=10*1024*1024*3(B)=10485760 bytes\uFF0C\u9700\u540C\u6B65\u4FEE\u6539\uFF1Ackfinder.xml
-web.maxUploadSize=104857600
+web.maxUploadSize=504857600
 
 #\u65E5\u5FD7\u62E6\u622A\u8BBE\u7F6E\uFF0C\u6392\u9664\u7684URI\uFF1B\u5305\u542B @RequestMapping\u6CE8\u89E3\u7684value\u3002\uFF08\u5DF2\u4F5C\u5E9F\uFF09
 #web.logInterceptExcludeUri=/, /login, /sys/menu/tree, /sys/menu/treeData, /oa/oaNotify/self/count

+ 1 - 1
src/main/resources/config/prod/caimei.properties

@@ -103,7 +103,7 @@ web.view.prefix=/WEB-INF/views/
 web.view.suffix=.jsp
 
 #\u6700\u5927\u6587\u4EF6\u4E0A\u4F20\u9650\u5236\uFF0C\u5355\u4F4D\u5B57\u8282. 30M=10*1024*1024*3(B)=10485760 bytes\uFF0C\u9700\u540C\u6B65\u4FEE\u6539\uFF1Ackfinder.xml
-web.maxUploadSize=104857600
+web.maxUploadSize=504857600
 
 #\u65E5\u5FD7\u62E6\u622A\u8BBE\u7F6E\uFF0C\u6392\u9664\u7684URI\uFF1B\u5305\u542B @RequestMapping\u6CE8\u89E3\u7684value\u3002\uFF08\u5DF2\u4F5C\u5E9F\uFF09
 #web.logInterceptExcludeUri=/, /login, /sys/menu/tree, /sys/menu/treeData, /oa/oaNotify/self/count

+ 168 - 0
src/main/resources/mappings/modules/landing/CmBrandBannerMapper.xml

@@ -0,0 +1,168 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.caimei.modules.landing.mapper.CmBrandBannerMapper">
+    
+    <resultMap type="CmBrandBanner" id="CmBrandBannerResult">
+        <result property="id"    column="id"    />
+        <result property="authUserId"    column="authUserId"    />
+        <result property="type"    column="type"    />
+        <result property="headPcBanner"    column="headPcBanner"    />
+        <result property="headAppBanner"    column="headAppBanner"    />
+        <result property="jumpStatus"    column="jumpStatus"    />
+        <result property="jumpPcPicture"    column="jumpPcPicture"    />
+        <result property="jumpAppPicture"    column="jumpAppPicture"    />
+        <result property="jumpLink"    column="jumpLink"    />
+        <result property="jumpAppLink"    column="jumpAppLink"    />
+        <result property="titlePc"    column="titlePc"    />
+        <result property="titleApp"    column="titleApp"    />
+        <result property="sort"    column="sort"    />
+        <result property="pcStatus"    column="pcStatus"    />
+        <result property="appStatus"    column="appStatus"    />
+        <result property="delFlag"    column="delFlag"    />
+        <result property="updateTime"    column="updateTime"    />
+        <result property="addTime"    column="addTime"    />
+    </resultMap>
+
+    <sql id="selectCmBrandBannerVo">
+        select id, authUserId, type, headPcBanner, headAppBanner, jumpStatus, jumpPcPicture, jumpAppPicture, jumpLink, jumpAppLink, titlePc, titleApp, sort, pcStatus, appStatus, delFlag, updateTime, addTime from cm_brand_banner
+    </sql>
+
+    <select id="selectCmBrandBannerList" parameterType="CmBrandBanner" resultMap="CmBrandBannerResult">
+        <include refid="selectCmBrandBannerVo"/>
+        <where>
+            <if test="id != null and id != '' "> and id = #{id}</if>
+            <if test="authUserId != null "> and authUserId = #{authUserId}</if>
+            <if test="type != null "> and type = #{type}</if>
+            <if test="headPcBanner != null  and headPcBanner != ''"> and headPcBanner = #{headPcBanner}</if>
+            <if test="headAppBanner != null  and headAppBanner != ''"> and headAppBanner = #{headAppBanner}</if>
+            <if test="jumpStatus != null "> and jumpStatus = #{jumpStatus}</if>
+            <if test="jumpPcPicture != null  and jumpPcPicture != ''"> and jumpPcPicture = #{jumpPcPicture}</if>
+            <if test="jumpAppPicture != null  and jumpAppPicture != ''"> and jumpAppPicture = #{jumpAppPicture}</if>
+            <if test="jumpLink != null  and jumpLink != ''"> and jumpLink = #{jumpLink}</if>
+            <if test="jumpAppLink != null  and jumpAppLink != ''"> and jumpAppLink = #{jumpAppLink}</if>
+            <if test="titlePc != null  and titlePc != ''"> and titlePc = #{titlePc}</if>
+            <if test="titleApp != null  and titleApp != ''"> and titleApp = #{titleApp}</if>
+            <if test="sort != null "> and sort = #{sort}</if>
+            <if test="pcStatus != null "> and pcStatus = #{pcStatus}</if>
+            <if test="appStatus != null "> and appStatus = #{appStatus}</if>
+            <if test="delFlag != null "> and delFlag = #{delFlag}</if>
+            <if test="updateTime != null "> and updateTime = #{updateTime}</if>
+            <if test="addTime != null "> and addTime = #{addTime}</if>
+        </where>
+        order by sort desc
+    </select>
+    <select id="findList" parameterType="CmBrandBanner" resultMap="CmBrandBannerResult">
+        <include refid="selectCmBrandBannerVo"/>
+        <where>
+            <if test="id != null  and id != ''"> and id = #{id}</if>
+            <if test="authUserId != null "> and authUserId = #{authUserId}</if>
+            <if test="type != null "> and type = #{type}</if>
+            <if test="headPcBanner != null  and headPcBanner != ''"> and headPcBanner = #{headPcBanner}</if>
+            <if test="headAppBanner != null  and headAppBanner != ''"> and headAppBanner = #{headAppBanner}</if>
+            <if test="jumpStatus != null "> and jumpStatus = #{jumpStatus}</if>
+            <if test="jumpPcPicture != null  and jumpPcPicture != ''"> and jumpPcPicture = #{jumpPcPicture}</if>
+            <if test="jumpAppPicture != null  and jumpAppPicture != ''"> and jumpAppPicture = #{jumpAppPicture}</if>
+            <if test="jumpLink != null  and jumpLink != ''"> and jumpLink = #{jumpLink}</if>
+            <if test="jumpAppLink != null  and jumpAppLink != ''"> and jumpAppLink = #{jumpAppLink}</if>
+            <if test="titlePc != null  and titlePc != ''"> and titlePc = #{titlePc}</if>
+            <if test="titleApp != null  and titleApp != ''"> and titleApp = #{titleApp}</if>
+            <if test="sort != null "> and sort = #{sort}</if>
+            <if test="pcStatus != null "> and pcStatus = #{pcStatus}</if>
+            <if test="appStatus != null "> and appStatus = #{appStatus}</if>
+            <if test="delFlag != null "> and delFlag = #{delFlag}</if>
+            <if test="updateTime != null "> and updateTime = #{updateTime}</if>
+            <if test="addTime != null "> and addTime = #{addTime}</if>
+        </where>
+        order by sort desc
+    </select>
+    <select id="findBigSort" resultType="java.lang.String">
+        SELECT sort FROM cm_brand_banner ORDER BY sort DESC LIMIT 1
+    </select>
+    <select id="selectCmBrandBannerById" parameterType="String" resultMap="CmBrandBannerResult">
+        <include refid="selectCmBrandBannerVo"/>
+        where id = #{id}
+    </select>
+        
+    <insert id="insertCmBrandBanner" parameterType="CmBrandBanner" useGeneratedKeys="true" keyProperty="id">
+        insert into cm_brand_banner
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="authUserId != null">authUserId,</if>
+            <if test="type != null">type,</if>
+            <if test="headPcBanner != null">headPcBanner,</if>
+            <if test="headAppBanner != null">headAppBanner,</if>
+            <if test="jumpStatus != null">jumpStatus,</if>
+            <if test="jumpPcPicture != null">jumpPcPicture,</if>
+            <if test="jumpAppPicture != null">jumpAppPicture,</if>
+            <if test="jumpLink != null">jumpLink,</if>
+            <if test="jumpAppLink != null">jumpAppLink,</if>
+            <if test="titlePc != null">titlePc,</if>
+            <if test="titleApp != null">titleApp,</if>
+            <if test="sort != null">sort,</if>
+            <if test="pcStatus != null">pcStatus,</if>
+            <if test="appStatus != null">appStatus,</if>
+            <if test="delFlag != null">delFlag,</if>
+            <if test="updateTime != null">updateTime,</if>
+            <if test="addTime != null">addTime,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="authUserId != null">#{authUserId},</if>
+            <if test="type != null">#{type},</if>
+            <if test="headPcBanner != null">#{headPcBanner},</if>
+            <if test="headAppBanner != null">#{headAppBanner},</if>
+            <if test="jumpStatus != null">#{jumpStatus},</if>
+            <if test="jumpPcPicture != null">#{jumpPcPicture},</if>
+            <if test="jumpAppPicture != null">#{jumpAppPicture},</if>
+            <if test="jumpLink != null">#{jumpLink},</if>
+            <if test="jumpAppLink != null">#{jumpAppLink},</if>
+            <if test="titlePc != null">#{titlePc},</if>
+            <if test="titleApp != null">#{titleApp},</if>
+            <if test="sort != null">#{sort},</if>
+            <if test="pcStatus != null">#{pcStatus},</if>
+            <if test="appStatus != null">#{appStatus},</if>
+            <if test="delFlag != null">#{delFlag},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="addTime != null">#{addTime},</if>
+         </trim>
+    </insert>
+
+    <update id="updateCmBrandBanner" parameterType="CmBrandBanner">
+        update cm_brand_banner
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="authUserId != null">authUserId = #{authUserId},</if>
+            <if test="type != null">type = #{type},</if>
+            <if test="headPcBanner != null">headPcBanner = #{headPcBanner},</if>
+            <if test="headAppBanner != null">headAppBanner = #{headAppBanner},</if>
+            <if test="jumpStatus != null">jumpStatus = #{jumpStatus},</if>
+            <if test="jumpPcPicture != null">jumpPcPicture = #{jumpPcPicture},</if>
+            <if test="jumpAppPicture != null">jumpAppPicture = #{jumpAppPicture},</if>
+            <if test="jumpLink != null">jumpLink = #{jumpLink},</if>
+            <if test="jumpAppLink != null">jumpAppLink = #{jumpAppLink},</if>
+            <if test="titlePc != null">titlePc = #{titlePc},</if>
+            <if test="titleApp != null">titleApp = #{titleApp},</if>
+            <if test="sort != null">sort = #{sort},</if>
+            <if test="pcStatus != null">pcStatus = #{pcStatus},</if>
+            <if test="appStatus != null">appStatus = #{appStatus},</if>
+            <if test="delFlag != null">delFlag = #{delFlag},</if>
+            <if test="updateTime != null">updateTime = #{updateTime},</if>
+            <if test="addTime != null">addTime = #{addTime},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteCmBrandBannerById" parameterType="String">
+        delete from cm_brand_banner where id = #{id}
+    </delete>
+
+    <delete id="deleteCmBrandBannerByIds" parameterType="String">
+        delete from cm_brand_banner where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+    <update id="updateSort">
+        update cm_brand_banner set sort=#{sort}
+        where id= #{id}
+    </update>
+</mapper>

+ 108 - 0
src/main/resources/mappings/modules/landing/CmBrandFilesMapper.xml

@@ -0,0 +1,108 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.caimei.modules.landing.mapper.CmBrandFilesMapper">
+    
+
+
+    <resultMap type="CmBrandFiles" id="CmBrandFilesResult">
+        <result property="id"    column="id"    />
+        <result property="type"    column="type"    />
+        <result property="superId"    column="superId"    />
+        <result property="fileName"    column="fileName"    />
+        <result property="ossName"    column="ossName"    />
+        <result property="waterOssName"    column="waterOssName"    />
+        <result property="ossUrl"    column="ossUrl"    />
+        <result property="waterOssUrl"    column="waterOssUrl"    />
+        <result property="htmlUrl"    column="htmlUrl"    />
+        <result property="uploadTime"    column="uploadTime"    />
+        <result property="delFlag"    column="delFlag"    />
+    </resultMap>
+
+    <sql id="selectCmBrandFilesVo">
+        select id, type, superId, fileName, ossName, waterOssName, ossUrl, waterOssUrl, htmlUrl, uploadTime, delFlag from cm_brand_files
+    </sql>
+
+
+
+<!--    cm_brand_files-->
+    <select id="selectCmBrandFilesList" parameterType="CmBrandFiles" resultMap="CmBrandFilesResult">
+        <include refid="selectCmBrandFilesVo"/>
+        <where>
+            <if test="id != null and id != '' "> and id = #{id}</if>
+            <if test="type != null "> and type = #{type}</if>
+            <if test="superId != null  and superId != ''"> and superId = #{superId}</if>
+            <if test="fileName != null  and fileName != ''"> and fileName like concat('%', #{fileName}, '%')</if>
+            <if test="ossName != null  and ossName != ''"> and ossName like concat('%', #{ossName}, '%')</if>
+            <if test="waterOssName != null  and waterOssName != ''"> and waterOssName like concat('%', #{waterOssName}, '%')</if>
+            <if test="ossUrl != null  and ossUrl != ''"> and ossUrl = #{ossUrl}</if>
+            <if test="waterOssUrl != null  and waterOssUrl != ''"> and waterOssUrl = #{waterOssUrl}</if>
+            <if test="htmlUrl != null  and htmlUrl != ''"> and htmlUrl = #{htmlUrl}</if>
+            <if test="uploadTime != null "> and uploadTime = #{uploadTime}</if>
+            <if test="delFlag != null "> and delFlag = #{delFlag}</if>
+        </where>
+    </select>
+
+    <select id="selectCmBrandFilesById" parameterType="String" resultMap="CmBrandFilesResult">
+        <include refid="selectCmBrandFilesVo"/>
+        where id = #{id}
+    </select>
+    <insert id="insertCmBrandFiles" parameterType="CmBrandFiles" useGeneratedKeys="true" keyProperty="id">
+        insert into cm_brand_files
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="type != null">type,</if>
+            <if test="superId != null">superId,</if>
+            <if test="fileName != null">fileName,</if>
+            <if test="ossName != null">ossName,</if>
+            <if test="waterOssName != null">waterOssName,</if>
+            <if test="ossUrl != null">ossUrl,</if>
+            <if test="waterOssUrl != null">waterOssUrl,</if>
+            <if test="htmlUrl != null">htmlUrl,</if>
+            <if test="uploadTime != null">uploadTime,</if>
+            <if test="delFlag != null">delFlag,</if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="type != null">#{type},</if>
+            <if test="superId != null">#{superId},</if>
+            <if test="fileName != null">#{fileName},</if>
+            <if test="ossName != null">#{ossName},</if>
+            <if test="waterOssName != null">#{waterOssName},</if>
+            <if test="ossUrl != null">#{ossUrl},</if>
+            <if test="waterOssUrl != null">#{waterOssUrl},</if>
+            <if test="htmlUrl != null">#{htmlUrl},</if>
+            <if test="uploadTime != null">#{uploadTime},</if>
+            <if test="delFlag != null">#{delFlag},</if>
+        </trim>
+    </insert>
+
+    <update id="updateCmBrandFiles" parameterType="CmBrandFiles">
+        update cm_brand_files
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="type != null">type = #{type},</if>
+            <if test="superId != null">superId = #{superId},</if>
+            <if test="fileName != null">fileName = #{fileName},</if>
+            <if test="ossName != null">ossName = #{ossName},</if>
+            <if test="waterOssName != null">waterOssName = #{waterOssName},</if>
+            <if test="ossUrl != null">ossUrl = #{ossUrl},</if>
+            <if test="waterOssUrl != null">waterOssUrl = #{waterOssUrl},</if>
+            <if test="htmlUrl != null">htmlUrl = #{htmlUrl},</if>
+            <if test="uploadTime != null">uploadTime = #{uploadTime},</if>
+            <if test="delFlag != null">delFlag = #{delFlag},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteCmBrandFilesById" parameterType="String">
+        delete from cm_brand_files where id = #{id}
+    </delete>
+
+    <delete id="deleteCmBrandFilesByIds" parameterType="String">
+        delete from cm_brand_files where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+
+
+</mapper>

+ 173 - 0
src/main/resources/mappings/modules/landing/CmBrandLandingMapper.xml

@@ -0,0 +1,173 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.caimei.modules.landing.mapper.CmBrandLandingMapper">
+    
+    <resultMap type="CmBrandLanding" id="CmBrandLandingResult">
+        <result property="id"    column="id"    />
+        <result property="authUserId"    column="authUserId"    />
+        <result property="type"    column="type"    />
+        <result property="headPcBanner"    column="headPcBanner"    />
+        <result property="headAppBanner"    column="headAppBanner"    />
+        <result property="jumpStatus"    column="jumpStatus"    />
+        <result property="jumpPcPicture"    column="jumpPcPicture"    />
+        <result property="jumpAppPicture"    column="jumpAppPicture"    />
+        <result property="jumpLink"    column="jumpLink"    />
+        <result property="title"    column="title"    />
+        <result property="content"    column="content"    />
+        <result property="video"    column="video"    />
+        <result property="sort"    column="sort"    />
+        <result property="pcStatus"    column="pcStatus"    />
+        <result property="appStatus"    column="appStatus"    />
+        <result property="delFlag"    column="delFlag"    />
+        <result property="updateTime"    column="updateTime"    />
+        <result property="addTime"    column="addTime"    />
+    </resultMap>
+
+
+    <sql id="selectCmBrandLandingVo">
+        select id, authUserId, type, headPcBanner, headAppBanner, jumpStatus, jumpPcPicture, jumpAppPicture, jumpLink, title, content, video, sort, pcStatus, appStatus, delFlag, updateTime, addTime from cm_brand_landing
+    </sql>
+
+    <select id="selectCmBrandLandingList" parameterType="CmBrandLanding" resultMap="CmBrandLandingResult">
+        <include refid="selectCmBrandLandingVo"/>
+        <where>
+            <if test="id != null  and id != ''"> and id = #{id}</if>
+            <if test="authUserId != null "> and authUserId = #{authUserId}</if>
+            <if test="type != null "> and type = #{type}</if>
+            <if test="headPcBanner != null  and headPcBanner != ''"> and headPcBanner = #{headPcBanner}</if>
+            <if test="headAppBanner != null  and headAppBanner != ''"> and headAppBanner = #{headAppBanner}</if>
+            <if test="jumpStatus != null "> and jumpStatus = #{jumpStatus}</if>
+            <if test="jumpPcPicture != null  and jumpPcPicture != ''"> and jumpPcPicture = #{jumpPcPicture}</if>
+            <if test="jumpAppPicture != null  and jumpAppPicture != ''"> and jumpAppPicture = #{jumpAppPicture}</if>
+            <if test="jumpLink != null  and jumpLink != ''"> and jumpLink = #{jumpLink}</if>
+            <if test="title != null  and title != ''"> and title = #{title}</if>
+            <if test="content != null  and content != ''"> and content = #{content}</if>
+            <if test="video != null  and video != ''"> and video = #{video}</if>
+            <if test="sort != null "> and sort = #{sort}</if>
+            <if test="pcStatus != null "> and pcStatus = #{pcStatus}</if>
+            <if test="appStatus != null "> and appStatus = #{appStatus}</if>
+            <if test="delFlag != null "> and delFlag = #{delFlag}</if>
+            <if test="updateTime != null "> and updateTime = #{updateTime}</if>
+            <if test="addTime != null "> and addTime = #{addTime}</if>
+        </where>
+        order by sort desc
+    </select>
+    <select id="findList" parameterType="CmBrandLanding" resultMap="CmBrandLandingResult">
+        <include refid="selectCmBrandLandingVo"/>
+        <where>
+            <if test="id != null  and id != ''"> and id = #{id}</if>
+            <if test="authUserId != null "> and authUserId = #{authUserId}</if>
+            <if test="type != null "> and type = #{type}</if>
+            <if test="headPcBanner != null  and headPcBanner != ''"> and headPcBanner = #{headPcBanner}</if>
+            <if test="headAppBanner != null  and headAppBanner != ''"> and headAppBanner = #{headAppBanner}</if>
+            <if test="jumpStatus != null "> and jumpStatus = #{jumpStatus}</if>
+            <if test="jumpPcPicture != null  and jumpPcPicture != ''"> and jumpPcPicture = #{jumpPcPicture}</if>
+            <if test="jumpAppPicture != null  and jumpAppPicture != ''"> and jumpAppPicture = #{jumpAppPicture}</if>
+            <if test="jumpLink != null  and jumpLink != ''"> and jumpLink = #{jumpLink}</if>
+            <if test="title != null  and title != ''"> and title = #{title}</if>
+            <if test="content != null  and content != ''"> and content = #{content}</if>
+            <if test="video != null  and video != ''"> and video = #{video}</if>
+            <if test="sort != null "> and sort = #{sort}</if>
+            <if test="pcStatus != null "> and pcStatus = #{pcStatus}</if>
+            <if test="appStatus != null "> and appStatus = #{appStatus}</if>
+            <if test="delFlag != null "> and delFlag = #{delFlag}</if>
+            <if test="updateTime != null "> and updateTime = #{updateTime}</if>
+            <if test="addTime != null "> and addTime = #{addTime}</if>
+        </where>
+        order by sort desc
+    </select>
+
+    <select id="selectCmBrandLandingById" parameterType="String" resultMap="CmBrandLandingResult">
+        <include refid="selectCmBrandLandingVo"/>
+        where id = #{id}
+    </select>
+
+    <select id="findBigSort" resultType="java.lang.String">
+        SELECT sort FROM cm_brand_landing ORDER BY sort DESC LIMIT 1
+    </select>
+    <update id="updateSort">
+        update cm_brand_landing set sort=#{sort}
+        where id= #{id}
+    </update>
+    <insert id="insertCmBrandLanding" parameterType="CmBrandLanding" useGeneratedKeys="true" keyProperty="id">
+        insert into cm_brand_landing
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="authUserId != null">authUserId,</if>
+            <if test="type != null">type,</if>
+            <if test="headPcBanner != null">headPcBanner,</if>
+            <if test="headAppBanner != null">headAppBanner,</if>
+            <if test="jumpStatus != null">jumpStatus,</if>
+            <if test="jumpPcPicture != null">jumpPcPicture,</if>
+            <if test="jumpAppPicture != null">jumpAppPicture,</if>
+            <if test="jumpLink != null">jumpLink,</if>
+            <if test="title != null">title,</if>
+            <if test="content != null">content,</if>
+            <if test="video != null">video,</if>
+            <if test="sort != null">sort,</if>
+            <if test="pcStatus != null">pcStatus,</if>
+            <if test="appStatus != null">appStatus,</if>
+            <if test="delFlag != null">delFlag,</if>
+            <if test="updateTime != null">updateTime,</if>
+            <if test="addTime != null">addTime,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="authUserId != null">#{authUserId},</if>
+            <if test="type != null">#{type},</if>
+            <if test="headPcBanner != null">#{headPcBanner},</if>
+            <if test="headAppBanner != null">#{headAppBanner},</if>
+            <if test="jumpStatus != null">#{jumpStatus},</if>
+            <if test="jumpPcPicture != null">#{jumpPcPicture},</if>
+            <if test="jumpAppPicture != null">#{jumpAppPicture},</if>
+            <if test="jumpLink != null">#{jumpLink},</if>
+            <if test="title != null">#{title},</if>
+            <if test="content != null">#{content},</if>
+            <if test="video != null">#{video},</if>
+            <if test="sort != null">#{sort},</if>
+            <if test="pcStatus != null">#{pcStatus},</if>
+            <if test="appStatus != null">#{appStatus},</if>
+            <if test="delFlag != null">#{delFlag},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="addTime != null">#{addTime},</if>
+         </trim>
+    </insert>
+
+    <update id="updateCmBrandLanding" parameterType="CmBrandLanding">
+        update cm_brand_landing
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="authUserId != null">authUserId = #{authUserId},</if>
+            <if test="type != null">type = #{type},</if>
+            <if test="headPcBanner != null">headPcBanner = #{headPcBanner},</if>
+            <if test="headAppBanner != null">headAppBanner = #{headAppBanner},</if>
+            <if test="jumpStatus != null">jumpStatus = #{jumpStatus},</if>
+            <if test="jumpPcPicture != null">jumpPcPicture = #{jumpPcPicture},</if>
+            <if test="jumpAppPicture != null">jumpAppPicture = #{jumpAppPicture},</if>
+            <if test="jumpLink != null">jumpLink = #{jumpLink},</if>
+            <if test="title != null">title = #{title},</if>
+            <if test="content != null">content = #{content},</if>
+            <if test="video != null">video = #{video},</if>
+            <if test="sort != null">sort = #{sort},</if>
+            <if test="pcStatus != null">pcStatus = #{pcStatus},</if>
+            <if test="appStatus != null">appStatus = #{appStatus},</if>
+            <if test="delFlag != null">delFlag = #{delFlag},</if>
+            <if test="updateTime != null">updateTime = #{updateTime},</if>
+            <if test="addTime != null">addTime = #{addTime},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteCmBrandLandingById" parameterType="String">
+        delete from cm_brand_landing where id = #{id}
+    </delete>
+
+    <delete id="deleteCmBrandLandingByIds" parameterType="String">
+        delete from cm_brand_landing where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+
+
+
+</mapper>

+ 212 - 0
src/main/webapp/WEB-INF/views/modules/landing/newPageCmBrandBannerList.jsp

@@ -0,0 +1,212 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/WEB-INF/views/include/taglib.jsp" %>
+<html>
+<head>
+    <title>供应商落地页Banner管理</title>
+    <meta name="decorator" content="default"/>
+    <style type="text/css">
+        .table th {
+            text-align: center;
+        }
+
+        .table td {
+            text-align: center;
+        }
+    </style>
+    <script type="text/javascript">
+        $(document).ready(function () {
+
+        });
+
+        var changeSortNumber = [];
+
+        function changeSort(id) {
+            changeSortNumber.push(id);
+            console.log("changeSortNumber------------>" + changeSortNumber);
+        }
+
+        var changeSorts = "";
+
+        //批量保存排序
+        function updateSortIndex() {
+            for (let i = 0; i < changeSortNumber.length; i++) {
+                var id = changeSortNumber[i];
+                var sortNum = $("#sortNum" + id).val();
+                changeSorts += id + '_' + sortNum + ',';
+            }
+            $.post("${ctx}/cmBrandBanner/updateSort", {'sortNums': changeSorts}, function (result) {
+                $.jBox.tip(result.data, 'info');
+                setTimeout(function () {
+                    $("#searchForm").submit();
+                }, 500);
+            })
+            changeSortNumber = null;
+            changeSorts = null;
+        }
+
+        function page(n, s) {
+            $("#pageNo").val(n);
+            $("#pageSize").val(s);
+            $("#searchForm").submit();
+            return false;
+        }
+
+        //PC端状态修改
+        function updateEnabledStatus(status, ids) {
+            var msg = '确定开启?';
+            if ('0' == status) {
+                msg = '确定停用?';
+            }
+            top.$.jBox.confirm(msg, '系统提示', function (v, h, f) {
+                if (v == 'ok') {
+                    $.post("${ctx}/cmBrandBanner/updateEnabledStatus", {
+                        'pcStatus': status,
+                        'id': ids
+                    }, function (data) {
+                        if (true == data.success) {
+                            $.jBox.tip(data.msg, 'info');
+                        } else {
+                            $.jBox.tip(data.msg, 'error');
+                        }
+                        setTimeout(function () {
+                            $("#searchForm").submit();
+                        }, 500);
+                    }, "JSON");//这里返回的类型有:json,html,xml,text
+                }
+                return;
+            }, {buttonsFocus: 1, persistent: true});
+        }
+
+        function onlynum(obj) {
+            obj.value = obj.value.replace(/[^\d]/g, ""); //清除"数字"以外的字符
+        }
+
+        //CRM端状态修改
+        function updateCrmEnabledStatusByIds(status, ids) {
+            var msg = '确定开启?';
+            if ('0' == status) {
+                msg = '确定停用?';
+            }
+            top.$.jBox.confirm(msg, '系统提示', function (v, h, f) {
+                if (v == 'ok') {
+                    $.post("${ctx}/cmBrandBanner/updateEnabledStatus", {
+                        'appStatus': status,
+                        'id': ids
+                    }, function (data) {
+                        if (true == data.success) {
+                            $.jBox.tip(data.msg, 'info');
+                        } else {
+                            $.jBox.tip(data.msg, 'error');
+                        }
+                        setTimeout(function () {
+                            $("#searchForm").submit();
+                        }, 500);
+                    }, "JSON");//这里返回的类型有:json,html,xml,text
+                }
+                return;
+            }, {buttonsFocus: 1, persistent: true});
+        }
+    </script>
+</head>
+<body>
+<ul class="nav nav-tabs">
+    <li class="active"><a href="${ctx}/cmBrandBanner/list?type=${type}">Banner管理</a></li>
+    <li><a href="${ctx}/cmBrandBanner/form?type=${type}">Banner添加</a></li>
+</ul>
+<form:form id="searchForm" modelAttribute="cmBrandBanner" action="${ctx}/cmBrandBanner/list?type=${type}" method="post"
+           class="breadcrumb form-search">
+    <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
+    <input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
+    <div class="ul-form">
+        <label>ID:</label>
+        <form:input path="id" htmlEscape="false" maxlength="11" class="input-mini"/>
+        <label>标题:</label>
+        <form:input path="titlePc" htmlEscape="false" maxlength="40" class="input-small"/>
+
+        <label>小程序端状态:</label>
+        <form:select path="appStatus" class="input-small">
+            <form:option value="" label=" "/>
+            <form:options items="${fns:getDictList('enabled_status')}" itemLabel="label" itemValue="value"
+                          htmlEscape="false"/>
+        </form:select>
+        <label>PC端状态:</label>
+        <form:select path="pcStatus" class="input-small">
+            <form:option value="" label=" "/>
+            <form:options items="${fns:getDictList('enabled_status')}" itemLabel="label" itemValue="value"
+                          htmlEscape="false"/>
+        </form:select>
+        &nbsp;&nbsp;<input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
+        <c:if test="${cmImage.flag eq 4}">
+            <label style="float:right;">活动专区首页:<a href="${fns:getConfig('wwwServer')}cmpage/area.html"
+                                                  target="_blank">${fns:getConfig('wwwServer')}cmpage/area.html</a></label>
+        </c:if>
+        <input class="btn btn-primary" type="button" value="一键排序" onclick="updateSortIndex()"
+               style="margin-left: 15px"/>
+        <div class="clearfix"></div>
+    </div>
+</form:form>
+<sys:message content="${message}"/>
+<table id="contentTable" class="table table-striped table-bordered table-condensed">
+    <thead>
+    <tr>
+        <th>ID</th>
+        <th>标题</th>
+        <th>图片</th>
+        <th>链接</th>
+        <th>排序</th>
+        <th>小程序端状态</th>
+        <th>PC端状态</th>
+        <th>创建时间</th>
+        <th>操作</th>
+    </tr>
+    </thead>
+    <tbody>
+    <c:forEach items="${page.list}" var="cmBrandBanner">
+        <tr>
+            <td>${cmBrandBanner.id}</td>
+            <td>${cmBrandBanner.titlePc}</td>
+            <td><img style="width:120px;height: 80px;" src="${cmBrandBanner.headPcBanner}"/></td>
+            <td><a href="${cmBrandBanner.jumpLink}" target="_blank">${cmBrandBanner.jumpLink}</a></td>
+
+            <td>
+                <input id="sortNum${cmBrandBanner.id}" type="text" name="sort" style="width:50px;"
+                       value="${cmBrandBanner.sort}" onkeyup="onlynum(this)"
+                       onchange="changeSort(${cmBrandBanner.id})"/>
+            </td>
+            <td>
+                <c:if test="${cmBrandBanner.appStatus eq 1 }">
+                    <a href="javascript:void(0);" onclick="updateCrmEnabledStatusByIds('0','${cmBrandBanner.id}');">
+                        <img alt="启用" src="/static/images/yes.gif" width="15px" border="none" title="启用">
+                    </a>
+                </c:if>
+                <c:if test="${cmBrandBanner.appStatus ne 1 }">
+                    <a href="javascript:void(0)" onclick="updateCrmEnabledStatusByIds('1','${cmBrandBanner.id}');">
+                        <img alt="停用" src="/static/images/no.gif" width="15px" border="none" title="停用">
+                    </a>
+                </c:if>
+            </td>
+            <td>
+                <c:if test="${cmBrandBanner.pcStatus == 1 }">
+                    <a href="javascript:void(0);" onclick="updateEnabledStatus('0','${cmBrandBanner.id}');">
+                        <img alt="启用" src="/static/images/yes.gif" width="15px" border="none" title="启用">
+                    </a>
+                </c:if>
+                <c:if test="${cmBrandBanner.pcStatus != 1 }">
+                    <a href="javascript:void(0)" onclick="updateEnabledStatus('1','${cmBrandBanner.id}');">
+                        <img alt="停用" src="/static/images/no.gif" width="15px" border="none" title="停用">
+                    </a>
+                </c:if>
+            </td>
+            <td><fmt:formatDate value="${cmBrandBanner.addTime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
+            <td>
+                <a href="${ctx}/cmBrandBanner/form?id=${cmBrandBanner.id}&type=${type}">编辑</a>
+                <a href="${ctx}/cmBrandBanner/del/${type}/${cmBrandBanner.id}"
+                   onclick="return confirmx('确认要删除该Banner吗?', this.href)">删除</a>
+            </td>
+        </tr>
+    </c:forEach>
+    </tbody>
+</table>
+<div class="pagination">${page}</div>
+</body>
+</html>

+ 240 - 0
src/main/webapp/WEB-INF/views/modules/landing/newPageCmBrandLandingList.jsp

@@ -0,0 +1,240 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/WEB-INF/views/include/taglib.jsp" %>
+<html>
+<head>
+    <title>供应商落地页资源管理</title>
+    <meta name="decorator" content="default"/>
+    <style type="text/css">
+        .table th {
+            text-align: center;
+        }
+
+        .table td {
+            text-align: center;
+        }
+    </style>
+    <script type="text/javascript">
+        function previewVideo(url) {
+            var url = "${ctx}/archive/cmProductArchiveContent/preview?url=" + encodeURIComponent(url);
+            var title = "视频播放";
+            top.$.jBox("iframe:" + url, {
+                iframeScrolling: 'yes',
+                width: 1000,
+                height: 750,
+                persistent: true,
+                title: title,
+                buttons: {"关闭": '-1'}
+            });
+        }
+
+        var changeSortNumber = [];
+
+        function changeSort(id) {
+            changeSortNumber.push(id);
+            console.log("changeSortNumber------------>" + changeSortNumber);
+        }
+
+        var changeSorts = "";
+
+        //批量保存排序
+        function updateSortIndex() {
+            for (let i = 0; i < changeSortNumber.length; i++) {
+                var id = changeSortNumber[i];
+                var sortNum = $("#sortNum" + id).val();
+                changeSorts += id + '_' + sortNum + ',';
+            }
+            $.post("${ctx}/cmBrandLanding/updateSort", {'sortNums': changeSorts}, function (result) {
+                $.jBox.tip(result.data, 'info');
+                setTimeout(function () {
+                    $("#searchForm").submit();
+                }, 500);
+            })
+            changeSortNumber = null;
+            changeSorts = null;
+        }
+
+        function page(n, s) {
+            $("#pageNo").val(n);
+            $("#pageSize").val(s);
+            $("#searchForm").submit();
+            return false;
+        }
+
+        //PC端状态修改
+        function updateEnabledStatus(status, ids) {
+            var msg = '确定开启?';
+            if ('0' == status) {
+                msg = '确定停用?';
+            }
+            top.$.jBox.confirm(msg, '系统提示', function (v, h, f) {
+                if (v == 'ok') {
+                    $.post("${ctx}/cmBrandLanding/updateEnabledStatus", {
+                        'pcStatus': status,
+                        'id': ids
+                    }, function (data) {
+                        if (true == data.success) {
+                            $.jBox.tip(data.msg, 'info');
+                        } else {
+                            $.jBox.tip(data.msg, 'error');
+                        }
+                        setTimeout(function () {
+                            $("#searchForm").submit();
+                        }, 500);
+                    }, "JSON");//这里返回的类型有:json,html,xml,text
+                }
+                return;
+            }, {buttonsFocus: 1, persistent: true});
+        }
+
+        function onlynum(obj) {
+            obj.value = obj.value.replace(/[^\d]/g, ""); //清除"数字"以外的字符
+        }
+
+        //CRM端状态修改
+        function updateCrmEnabledStatusByIds(status, ids) {
+            var msg = '确定开启?';
+            if ('0' == status) {
+                msg = '确定停用?';
+            }
+            top.$.jBox.confirm(msg, '系统提示', function (v, h, f) {
+                if (v == 'ok') {
+                    $.post("${ctx}/cmBrandLanding/updateEnabledStatus", {
+                        'appStatus': status,
+                        'id': ids
+                    }, function (data) {
+                        if (true == data.success) {
+                            $.jBox.tip(data.msg, 'info');
+                        } else {
+                            $.jBox.tip(data.msg, 'error');
+                        }
+                        setTimeout(function () {
+                            $("#searchForm").submit();
+                        }, 500);
+                    }, "JSON");//这里返回的类型有:json,html,xml,text
+                }
+                return;
+            }, {buttonsFocus: 1, persistent: true});
+        }
+    </script>
+</head>
+<body>
+<c:if test="${type eq 1}">
+    <ul class="nav nav-tabs">
+        <li class="active"><a href="${ctx}/cmBrandLanding/list?type=${type}">成功案例</a></li>
+        <li><a href="${ctx}/cmBrandLanding/form?type=${type}">成功案例添加</a></li>
+    </ul>
+</c:if>
+<c:if test="${type eq 2}">
+    <ul class="nav nav-tabs">
+        <li class="active"><a href="${ctx}/cmBrandLanding/list?type=${type}">视频列表</a></li>
+        <li><a href="${ctx}/cmBrandLanding/form?type=${type}">添加视频</a></li>
+        <li><a href="${ctx}/cmBrandLanding/list?type=3">文章列表</a></li>
+        <li><a href="${ctx}/cmBrandLanding/form?type=3">添加文章</a></li>
+    </ul>
+</c:if>
+<c:if test="${type eq 3}">
+    <ul class="nav nav-tabs">
+        <li><a href="${ctx}/cmBrandLanding/list?type=2">视频列表</a></li>
+        <li><a href="${ctx}/cmBrandLanding/form?type=2">添加视频</a></li>
+        <li class="active"><a href="${ctx}/cmBrandLanding/list?type=${type}">文章列表</a></li>
+        <li><a href="${ctx}/cmBrandLanding/form?type=${type}">添加文章</a></li>
+    </ul>
+</c:if>
+
+<form:form id="searchForm" modelAttribute="cmBrandLanding" action="${ctx}/cmBrandLanding/list?type=${type}" method="post"
+           class="breadcrumb form-search">
+    <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
+    <input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
+    <div class="ul-form">
+        <label>ID:</label>
+        <form:input path="id" htmlEscape="false" maxlength="11" class="input-mini"/>
+        <label>标题:</label>
+        <form:input path="title" htmlEscape="false" maxlength="40" class="input-small"/>
+
+        <label>小程序端状态:</label>
+        <form:select path="appStatus" class="input-small">
+            <form:option value="" label=" "/>
+            <form:options items="${fns:getDictList('enabled_status')}" itemLabel="label" itemValue="value"
+                          htmlEscape="false"/>
+        </form:select>
+        <label>PC端状态:</label>
+        <form:select path="pcStatus" class="input-small">
+            <form:option value="" label=" "/>
+            <form:options items="${fns:getDictList('enabled_status')}" itemLabel="label" itemValue="value"
+                          htmlEscape="false"/>
+        </form:select>
+        <input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
+        <input class="btn btn-primary" type="button" value="一键排序" onclick="updateSortIndex()"
+               style="margin-left: 15px"/>
+        <div class="clearfix"></div>
+    </div>
+</form:form>
+<sys:message content="${message}"/>
+<table id="contentTable" class="table table-striped table-bordered table-condensed">
+    <thead>
+    <tr>
+        <th>ID</th>
+        <th>标题</th>
+        <th>图片</th>
+        <c:if test="${type eq 1}">
+            <th>排序</th>
+        </c:if>
+        <th>小程序端状态</th>
+        <th>PC端状态</th>
+        <th>创建时间</th>
+        <th>操作</th>
+    </tr>
+    </thead>
+    <tbody>
+    <c:forEach items="${page.list}" var="cmBrandLanding">
+        <tr>
+            <td>${cmBrandLanding.id}</td>
+            <td>${cmBrandLanding.title}</td>
+            <td><img style="width:120px;height: 80px;" src="${cmBrandLanding.headPcBanner}"/></td>
+            <c:if test="${type eq 1}">
+                <td>
+                    <input id="sortNum${cmBrandLanding.id}" type="text" name="sort" style="width:50px;"
+                           value="${cmBrandLanding.sort}" onkeyup="onlynum(this)"
+                           onchange="changeSort(${cmBrandLanding.id})"/>
+                </td>
+            </c:if>
+            <td>
+                <c:if test="${cmBrandLanding.appStatus eq 1 }">
+                    <a href="javascript:void(0);" onclick="updateCrmEnabledStatusByIds('0','${cmBrandLanding.id}');">
+                        <img alt="启用" src="/static/images/yes.gif" width="15px" border="none" title="启用">
+                    </a>
+                </c:if>
+                <c:if test="${cmBrandLanding.appStatus ne 1 }">
+                    <a href="javascript:void(0)" onclick="updateCrmEnabledStatusByIds('1','${cmBrandLanding.id}');">
+                        <img alt="停用" src="/static/images/no.gif" width="15px" border="none" title="停用">
+                    </a>
+                </c:if>
+            </td>
+            <td>
+                <c:if test="${cmBrandLanding.pcStatus == 1 }">
+                    <a href="javascript:void(0);" onclick="updateEnabledStatus('0','${cmBrandLanding.id}');">
+                        <img alt="启用" src="/static/images/yes.gif" width="15px" border="none" title="启用">
+                    </a>
+                </c:if>
+                <c:if test="${cmBrandLanding.pcStatus != 1 }">
+                    <a href="javascript:void(0)" onclick="updateEnabledStatus('1','${cmBrandLanding.id}');">
+                        <img alt="停用" src="/static/images/no.gif" width="15px" border="none" title="停用">
+                    </a>
+                </c:if>
+            </td>
+            <td><fmt:formatDate value="${cmBrandLanding.addTime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
+            <td>
+                <a href="${ctx}/cmBrandLanding/form?id=${cmBrandLanding.id}&type=${type}">编辑</a>
+                <a href="${ctx}/cmBrandLanding/del/${type}/${cmBrandLanding.id}"
+                   onclick="return confirmx('确认要删除该Banner吗?', this.href)">删除</a>
+                <c:if test="${cmBrandLanding.type == 2 }">
+                <a href="javascript:;" onclick="previewVideo('${cmBrandLanding.cmBrandFiles.get(0).ossUrl}')">播放</a>
+                </c:if>
+            </td>
+        </tr>
+    </c:forEach>
+    </tbody>
+</table>
+<div class="pagination">${page}</div>
+</body>
+</html>

+ 129 - 0
src/main/webapp/WEB-INF/views/modules/landing/newPageCmbrandBannerForm.jsp

@@ -0,0 +1,129 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
+<html>
+<head>
+	<title>Banner管理</title>
+	<meta name="decorator" content="default"/>
+	<script type="text/javascript">
+		$(document).ready(function() {
+			//$("#name").focus();
+			$("#inputForm").validate({
+				submitHandler: function(form){
+                    var headPcBanner = $("#headPcBanner").val();
+                    var headAppBanner = $("#headAppBanner").val();
+                    if(!(headPcBanner != undefined && headPcBanner.trim() != "")){
+                        alertx("请先选择PC端图!");
+                        return false
+                    }
+                    if(!(headAppBanner != undefined && headAppBanner.trim() != "")){
+                        alertx("请先选择小程序端图!");
+						return false
+                    }
+					loading('正在提交,请稍等...');
+					form.submit();
+				},
+				errorContainer: "#messageBox",
+				errorPlacement: function(error, element) {
+					$("#messageBox").text("输入有误,请先更正。");
+					if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+						error.appendTo(element.parent().parent());
+					} else {
+						error.insertAfter(element);
+					}
+				}
+			});
+		});
+        //过滤转换特殊字符
+        function clearChar(obj) {
+            obj.value = obj.value.replace(",", "");
+            obj.value = obj.value.replace(",", "");
+        };
+	</script>
+</head>
+<body>
+	<ul class="nav nav-tabs">
+		<li><a href="${ctx}/cmBrandBanner/list?type=${type}">Banner管理</a></li>
+		<li class="active"><a href="${ctx}/cmBrandBanner/form?id=${cmBrandBanner.id}&type=${type}">Banner<shiro:hasPermission name="newhome:newPageHomeimage:edit">${not empty cmBrandBanner.id?'编辑':'添加'}</shiro:hasPermission><shiro:lacksPermission name="newhome:newPageHomeimage:edit">查看</shiro:lacksPermission></a></li>
+	</ul><br/>
+	<form:form id="inputForm" modelAttribute="cmBrandBanner" action="${ctx}/cmBrandBanner/save" method="post" class="form-horizontal">
+		<form:hidden path="id"/>
+		<form:hidden path="type" value="${type}"/>
+		<sys:message content="${message}"/>
+		<div class="control-group">
+			<label class="control-label"><span class="help-inline"><font color="red">*</font> </span>标题:</label>
+			<div class="controls">
+				<form:input path="titlePc" htmlEscape="false" maxlength="40" class="input-xlarge required" onkeyup="clearChar(this)" />
+			</div>
+		</div>
+		<div class="control-group">
+			<label class="control-label"><span class="required"><font color="red">*</font> </span>PC端图:</label>
+			<div class="controls">
+				<form:hidden id="headPcBanner" path="headPcBanner" htmlEscape="false" value="${headPcBanner}" maxlength="255" class="input-xlarge required"/>
+				<sys:ckfinder input="headPcBanner" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
+			</div>
+			<div class="controls" style="padding-top: 20px;">
+				<p style="color:#D0D0D0 ;">建议尺寸:1920 * 510 / PX</p>
+			</div>
+		</div>
+		<div class="control-group">
+			<label class="control-label"><span class="required"> </span>PC端链接:</label>
+			<div class="controls">
+				<form:input path="jumpLink" htmlEscape="false" maxlength="255" class="input-xlarge  url"/>
+			</div>
+		</div>
+		<div class="control-group">
+			<label class="control-label"><font color="red">*</font>小程序端图:</label>
+			<div class="controls">
+				<form:hidden id="headAppBanner" path="headAppBanner" htmlEscape="false"  value="${headAppBanner}" maxlength="255" class="input-xlarge"/>
+				<sys:ckfinder input="headAppBanner" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
+			</div>
+			<div class="controls" style="padding-top: 20px;">
+				<p style="color:#D0D0D0 ;">建议尺寸:750 * 366 / PX</p>
+			</div>
+		</div>
+		<div class="control-group">
+			<label class="control-label">小程序端链接:</label>
+			<div class="controls">
+				<form:input path="jumpAppLink" htmlEscape="false" maxlength="255" class="input-xlarge url"/>
+			</div>
+		</div>
+		<div class="control-group">
+			<label class="control-label">小程序页面title:</label>
+			<div class="controls">
+				<form:input path="titleApp" placeholder="最多输入15个汉字" htmlEscape="false" maxlength="15" class="input-xlarge"/>
+			</div>
+		</div>
+		<div class="control-group">
+			<label class="control-label"><span class="help-inline"><font color="red">*</font> </span>排序:</label>
+			<div class="controls">
+                <c:if test="${empty cmBrandBanner.id}">
+				    <form:input path="sort" htmlEscape="false" maxlength="9" class="input-xlarge required digits" value="${empty sort?0:sort+1}"/>
+                </c:if>
+                <c:if test="${not empty cmBrandBanner.id}">
+                    <form:input path="sort" htmlEscape="false" maxlength="9" class="input-xlarge required digits" value="${empty cmBrandBanner.sort?0:(cmBrandBanner.sort) }"/>
+                </c:if>
+			</div>
+		</div>
+		<div class="control-group crmstatus" style="" >
+			<label class="control-label">小程序状态:</label>
+			<div class="controls">
+				<form:select path="appStatus" class="input-xlarge ">
+					<form:options items="${fns:getDictList('enabled_status')}" itemLabel="label" itemValue="value" htmlEscape="false" />
+				</form:select>
+			</div>
+		</div>
+		<div class="control-group crmstatus" style="" >
+			<label class="control-label">PC端状态:</label>
+			<div class="controls">
+				<form:select path="pcStatus" class="input-xlarge ">
+					<form:options items="${fns:getDictList('enabled_status')}" itemLabel="label" itemValue="value" htmlEscape="false" />
+				</form:select>
+			</div>
+		</div>
+		<div class="form-actions">
+			<shiro:hasPermission name="newhome:newPageHomeimage:edit"><input id="btnSubmit" class="btn btn-primary" type="submit" value="保 存"/>&nbsp;</shiro:hasPermission>
+			<input id="btnCancel" class="btn" type="button" value="返 回" onclick="history.go(-1)"/>
+		</div>
+	</form:form>
+</body>
+</html>

+ 348 - 0
src/main/webapp/WEB-INF/views/modules/landing/newPageCmbrandLandingForm.jsp

@@ -0,0 +1,348 @@
+<%@ page import="com.thinkgem.jeesite.common.config.Global" %>
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/WEB-INF/views/include/taglib.jsp" %>
+<html>
+<head>
+	<title>供应商落地页资料管理</title>
+	<meta name="decorator" content="default"/>
+	<style>
+		.upload {
+			position: relative;
+			display: inline-block;
+			background: #D0EEFF;
+			border: 1px solid #99D3F5;
+			border-radius: 4px;
+			padding: 4px 12px;
+			color: #1E88C7;
+			text-decoration: none;
+			text-indent: 0;
+			line-height: 20px;
+			margin-left: 20px;
+			cursor: pointer;
+			width: 52px;
+			height: 20px;
+		}
+
+		.upload input {
+			position: absolute;
+			width: 170px;
+			font-size: 20px;
+			right: 0;
+			top: 0;
+			opacity: 0;
+			cursor: pointer;
+		}
+
+		.upload:hover {
+			background: #AADFFD;
+			border-color: #78C3F3;
+			color: #004974;
+			text-decoration: none;
+		}
+
+		.add-submit {
+			position: relative;
+			display: inline;
+			background: #D0EEFF;
+			border: 1px solid #99D3F5;
+			border-radius: 4px;
+			padding: 4px 12px;
+			color: #1E88C7;
+			text-decoration: none;
+			text-indent: 0;
+			line-height: 20px;
+			margin-left: 20px;
+			cursor: pointer;
+			width: 52px;
+			height: 30px;
+		}
+
+		.add-submit input {
+			position: absolute;
+			width: 50px;
+			font-size: 20px;
+			right: 0;
+			top: 0;
+			opacity: 0;
+			cursor: pointer;
+		}
+
+		.add-submit:hover {
+			background: #AADFFD;
+			border-color: #78C3F3;
+			color: #004974;
+			text-decoration: none;
+		}
+	</style>
+	<% request.setAttribute("caimeiCore", Global.getConfig("caimei.core"));%>
+	<script type="text/javascript" src="${ctxStatic}/ckeditor5-new/ckeditor.js"></script>
+	<script type="text/javascript">
+		//富文本框编辑
+		function checkInfo() {
+			// var content=CKEDITOR.instances.content.getData();
+			var content = contentEditor.getData();
+			$("#content").val(content);
+			console.log(content);
+		}
+
+		$(document).ready(function () {
+			//初始化文件名称
+			var id = '${cmBrandLanding.cmBrandFiles[0].id}';
+			if (${cmBrandLanding.video ne null}) {
+				var fileName = '${cmBrandLanding.cmBrandFiles[0].fileName}';
+				$("#uploadFileName").val(fileName);
+				fileId = id;
+			}
+			if (${type==2}) {
+				//点击上传按钮后上传文件
+				$('#addSubmit').click(function () {
+					var filesById = document.getElementById('productFile');
+					var files = $('#productFile');
+					var fileList = files.prop('files');
+					var fileName = $('#uploadFileName').val();
+					var superId =new Date().getTime();
+					if (files === '' || fileList.length == 0 || fileName == '') {
+						alertx('请选择上传文件');
+						return;
+					}
+					var data = new FormData();
+					data.append('type', 1);
+					data.append('id',id );
+					data.append('file', fileList[0]);
+					data.append('fileName', fileName);
+					$('.upload-loading').css("display", "inline");
+					$('.upload-loading').show();
+					$.ajax({
+						url: "${ctx}/cmBrandLanding/upload",
+						data: data,
+						type: "POST",
+						processData: false,
+						contentType: false,
+						dataType: "json",
+						success: function (res) {
+							if (res.success) {
+								debugger
+								filesById.value = '';
+								fileId = res.archiveFile.id;
+								$('.upload-loading').hide();
+								$('#video').val(fileId);
+								$.jBox.tip('上传成功', 'info');
+							} else {
+								$.jBox.tip(res.msg, 'error');
+								$('.upload-loading').hide();
+							}
+						},
+						error: function (json) {
+
+						}
+					});
+				});
+				var fileList = [];
+				var fileIds = '';
+				var files = document.getElementById("productFile");
+				//选择上传文件后显示文件名称
+				files.addEventListener("change", function (event) {
+					var name = event.target.files[0].name;
+					$('#uploadFileName').val(name);
+					$('#video').val("");
+					fileId = '';
+				});
+			}
+
+			//富文本框
+			// CKEDITOR.replace('content');
+			ClassicEditor.create(document.querySelector('#contentEditor'), {
+				ckfinder: {
+					uploadUrl: '${caimeiCore}/tools/image/upload/ckeditor'
+				}
+			}).then(function (editor) {
+				window.contentEditor = editor;
+			}).catch(function (error) {
+				console.log(error);
+			});
+			//$("#name").focus();
+			$("#inputForm").validate({
+				submitHandler: function (form) {
+					var headPcBanner = $("#headPcBanner").val();
+					var headAppBanner = $("#headAppBanner").val();
+					var content = $("#content").val();;
+					var video = $("#video").val();;
+					if (!(headPcBanner != undefined && headPcBanner.trim() != "")) {
+						alertx("请先选择PC端图!");
+						return false
+					}
+					if (!(headAppBanner != undefined && headAppBanner.trim() != "")) {
+						alertx("请先选择小程序端图!");
+						return false
+					}
+					if ((content== undefined || content.trim() == "")&&${type!=2}) {
+						alertx("请先输入内容!");
+						return false
+					}
+					if ((video== undefined || video.trim() == "")&&${type==2}) {
+						alertx("请先选择上传文件!");
+						return false
+					}
+					loading('正在提交,请稍等...');
+					form.submit();
+				},
+				errorContainer: "#messageBox",
+				errorPlacement: function (error, element) {
+					$("#messageBox").text("输入有误,请先更正。");
+					if (element.is(":checkbox") || element.is(":radio") || element.parent().is(".input-append")) {
+						error.appendTo(element.parent().parent());
+					} else {
+						error.insertAfter(element);
+					}
+				}
+			});
+		});
+
+		//过滤转换特殊字符
+		function clearChar(obj) {
+			obj.value = obj.value.replace(",", "");
+			obj.value = obj.value.replace(",", "");
+		};
+
+
+	</script>
+</head>
+<body>
+<c:if test="${type==1}">
+	<ul class="nav nav-tabs">
+		<li><a href="${ctx}/cmBrandLanding/list?type=${type}">成功案例</a></li>
+		<li class="active"><a href="${ctx}/cmBrandLanding/form?id=${cmBrandLanding.id}">成功案例<shiro:hasPermission
+				name="newhome:newPageHomeimage:edit">${not empty cmBrandLanding.id?'编辑':'添加'}</shiro:hasPermission><shiro:lacksPermission
+				name="newhome:newPageHomeimage:edit">查看</shiro:lacksPermission></a></li>
+	</ul>
+</c:if>
+<c:if test="${type==2}">
+	<ul class="nav nav-tabs">
+		<li><a href="${ctx}/cmBrandLanding/list?type=${type}">视频列表</a></li>
+		<li class="active"><a href="${ctx}/cmBrandLanding/form?id=${cmBrandLanding.id}">视频<shiro:hasPermission
+				name="newhome:newPageHomeimage:edit">${not empty cmBrandLanding.id?'编辑':'添加'}</shiro:hasPermission><shiro:lacksPermission
+				name="newhome:newPageHomeimage:edit">查看</shiro:lacksPermission></a></li>
+		<li><a href="${ctx}/cmBrandLanding/list?type=3">文章列表</a></li>
+		<li><a href="${ctx}/cmBrandLanding/form?type=3">添加文章</a></li>
+	</ul>
+</c:if>
+<c:if test="${type==3}">
+	<ul class="nav nav-tabs">
+		<li><a href="${ctx}/cmBrandLanding/list?type=2">视频列表</a></li>
+		<li><a href="${ctx}/cmBrandLanding/form?type=2">添加视频</a></li>
+		<li><a href="${ctx}/cmBrandLanding/list?type=${type}">文章列表</a></li>
+		<li class="active"><a href="${ctx}/cmBrandLanding/form?id=${cmBrandLanding.id}">文章<shiro:hasPermission
+				name="newhome:newPageHomeimage:edit">${not empty cmBrandLanding.id?'编辑':'添加'}</shiro:hasPermission><shiro:lacksPermission
+				name="newhome:newPageHomeimage:edit">查看</shiro:lacksPermission></a></li>
+	</ul>
+</c:if>
+<br/>
+<form:form id="inputForm" modelAttribute="cmBrandLanding" action="${ctx}/cmBrandLanding/save" method="post"
+		   class="form-horizontal">
+	<form:hidden path="id"/>
+	<form:hidden path="type" value="${type}"/>
+	<form:hidden path="video"/>
+	<sys:message content="${message}"/>
+	<div class="control-group">
+		<label class="control-label"><span class="help-inline"><font color="red">*</font> </span>标题:</label>
+		<div class="controls">
+			<form:input path="title" htmlEscape="false" maxlength="40" class="input-xlarge required"
+						onkeyup="clearChar(this)"/>
+		</div>
+	</div>
+	<div class="control-group">
+		<label class="control-label"><span class="required"><font color="red">*</font> </span>PC端图:</label>
+		<div class="controls">
+			<form:hidden id="headPcBanner" path="headPcBanner" htmlEscape="false" value="${headPcBanner}"
+						 maxlength="255" class="input-xlarge required"/>
+			<sys:ckfinder input="headPcBanner" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100"
+						  maxHeight="100"/>
+		</div>
+		<div class="controls" style="padding-top: 20px;">
+			<p style="color:#D0D0D0 ;">建议尺寸:1920 * 510 / PX</p>
+		</div>
+	</div>
+
+	<div class="control-group">
+		<label class="control-label"><font color="red">*</font>小程序端图:</label>
+		<div class="controls">
+			<form:hidden id="headAppBanner" path="headAppBanner" htmlEscape="false" value="${headAppBanner}"
+						 maxlength="255" class="input-xlarge"/>
+			<sys:ckfinder input="headAppBanner" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100"
+						  maxHeight="100"/>
+		</div>
+		<div class="controls" style="padding-top: 20px;">
+			<p style="color:#D0D0D0 ;">建议尺寸:750 * 366 / PX</p>
+		</div>
+	</div>
+	<c:if test="${type!=2}">
+		<div class="control-group" style="width:812px">
+			<label class="control-label"><font color="red">*</font>内容:</label>
+			<div class="controls">
+				<!-- 富文本编辑器 -->
+				<form:textarea path="content" class="input-xlarge required hide"/>
+				<div id="contentEditor">${cmBrandLanding.content}</div>
+			</div>
+		</div>
+	</c:if>
+	<c:if test="${type==2}">
+		<div class="control-group">
+			<label class="control-label" style="margin-top:10px"><font color="red">*</font>视频文件:</label>
+			<div class="controls" style="margin-top:10px;width: 600px;">
+				<input id="uploadFileName" type="text" style="display: inline;" placeholder="支持mp4" disabled="true"
+					   class="input-xlarge required"/>
+				<div class="upload">
+					<input type="file" name="file" id="productFile" accept=".mp4">选择文件
+				</div>
+				<div class="add-submit">
+					<input id="addSubmit" type="button" value="上传"/>上传&nbsp;
+				</div>
+				<div class="upload-loading hide">
+					<img alt="gif" src="/static/images/upload.gif" width="32px" border="none">
+				</div>
+			</div>
+		</div>
+	</c:if>
+	<c:if test="${type==1}">
+		<div class="control-group">
+			<label class="control-label"><span class="help-inline"><font color="red">*</font> </span>排序:</label>
+			<div class="controls">
+				<c:if test="${empty cmBrandLanding.id}">
+					<form:input path="sort" htmlEscape="false" maxlength="9" class="input-xlarge required digits"
+								value="${empty sort?0:sort+1}"/>
+				</c:if>
+				<c:if test="${not empty cmBrandLanding.id}">
+					<form:input path="sort" htmlEscape="false" maxlength="9" class="input-xlarge required digits"
+								value="${empty cmBrandLanding.sort?0:(cmBrandLanding.sort) }"/>
+				</c:if>
+			</div>
+		</div>
+	</c:if>
+	<div class="control-group crmstatus" style="">
+		<label class="control-label">小程序状态:</label>
+		<div class="controls">
+			<form:select path="appStatus" class="input-xlarge ">
+				<form:options items="${fns:getDictList('enabled_status')}" itemLabel="label" itemValue="value"
+							  htmlEscape="false"/>
+			</form:select>
+		</div>
+	</div>
+	<div class="control-group crmstatus" style="">
+		<label class="control-label">PC端状态:</label>
+		<div class="controls">
+			<form:select path="pcStatus" class="input-xlarge ">
+				<form:options items="${fns:getDictList('enabled_status')}" itemLabel="label" itemValue="value"
+							  htmlEscape="false"/>
+			</form:select>
+		</div>
+	</div>
+	<div class="form-actions">
+		<shiro:hasPermission name="newhome:newPageHomeimage:edit"><input id="btnSubmit" class="btn btn-primary"
+																		 type="submit"
+																		 value="保 存"
+																		 onclick="checkInfo()"/>&nbsp;</shiro:hasPermission>
+		<input id="btnCancel" class="btn" type="button" value="返 回" onclick="history.go(-1)"/>
+	</div>
+</form:form>
+</body>
+</html>