浏览代码

Merge remote-tracking branch 'origin/developer' into developerD

huangzhiguo 1 年之前
父节点
当前提交
2c21c84ae6

+ 82 - 29
src/main/java/com/caimei365/user/controller/CmBrandLandingApi.java

@@ -1,21 +1,23 @@
 package com.caimei365.user.controller;
 
-import com.caimei365.user.idempotent.IpSave;
-import com.caimei365.user.mapper.CmBrandBannerMapper;
+import com.caimei365.user.mapper.BaseMapper;
 import com.caimei365.user.model.ResponseJson;
-import com.caimei365.user.model.dto.BaikeProductDto;
-import com.caimei365.user.model.dto.ShopArticleDto;
-import com.caimei365.user.model.dto.ShopBannerDto;
-import com.caimei365.user.model.dto.ShopUpdateDto;
-import com.caimei365.user.model.po.*;
-import com.caimei365.user.model.vo.*;
+import com.caimei365.user.model.po.CmBrandBanner;
+import com.caimei365.user.model.po.CmBrandFiles;
+import com.caimei365.user.model.po.CmBrandLanding;
+import com.caimei365.user.model.po.CmQuestionnaire;
+import com.caimei365.user.model.vo.CmBrandLandingVO;
 import com.caimei365.user.service.*;
+import com.caimei365.user.utils.BeanUtil;
+import com.caimei365.user.utils.DateUtil;
+import com.github.pagehelper.PageHelper;
 import com.github.pagehelper.PageInfo;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiImplicitParams;
 import io.swagger.annotations.ApiOperation;
 import lombok.RequiredArgsConstructor;
+import org.apache.commons.collections.CollectionUtils;
 import org.apache.commons.lang.StringUtils;
 import org.springframework.web.bind.annotation.*;
 
@@ -42,6 +44,7 @@ public class CmBrandLandingApi {
     private final CmBrandFilesService cmBrandFilesService;
 
     private final CmQuestionnaireService cmQuestionnaireService;
+    private final BaseMapper baseMapper;
     @Resource
     private RemoteCallService remoteCallService;
 
@@ -60,30 +63,75 @@ public class CmBrandLandingApi {
             return ResponseJson.error("source异常!", null);
         }
         CmBrandBanner cmBrandBanner = new CmBrandBanner().setType("2");
-        CmBrandLanding landing = new CmBrandLanding().setType("1,2,3");
+        CmBrandLanding landing = new CmBrandLanding().type("1").num(0).size(5);
         if (source == 1) {
             cmBrandBanner.setPcStatus("1");
             landing.setPcStatus("1");
-        }
-        if (source == 2) {
+        } else  {
             cmBrandBanner.setAppStatus("1");
             landing.setAppStatus("1");
         }
         HashMap<String, Object> map = new HashMap(2);
         List<CmBrandBanner> cmBrandBanners = cmBrandBannerService.selectCmBrandBannerList(cmBrandBanner);
         List<CmBrandLanding> cmBrandLandings = cmBrandLandingService.selectCmBrandLandingList(landing);
-        cmBrandLandings.forEach(cmBrandLanding -> {
-            CmBrandFiles cmBrandFiles = new CmBrandFiles();
-            cmBrandFiles.setId(cmBrandLanding.getVideo());
-            cmBrandFiles.setType("1");
-            cmBrandLanding.setCmBrandFiles(cmBrandLanding.getVideo() == null ? null :
-                    cmBrandFilesService.selectCmBrandFilesList(cmBrandFiles));
-        });
+        landing.type("2");
+        cmBrandLandings.addAll(cmBrandLandingService.selectCmBrandLandingList(landing));
+        landing.type("3");
+        cmBrandLandings.addAll(cmBrandLandingService.selectCmBrandLandingList(landing));
+        if (CollectionUtils.isNotEmpty(cmBrandLandings)) {
+            cmBrandLandings.forEach(cmBrandLanding -> {
+                CmBrandFiles cmBrandFiles = new CmBrandFiles();
+                cmBrandFiles.setId(cmBrandLanding.getVideo());
+                cmBrandFiles.setType("1");
+                cmBrandLanding.setCmBrandFiles(cmBrandLanding.getVideo() == null ? null :
+                        cmBrandFilesService.selectCmBrandFilesList(cmBrandFiles));
+            });
+        }
         map.put("banner", cmBrandBanners);
         map.put("landing", cmBrandLandings);
         return ResponseJson.success(map);
     }
 
+    /**
+     * 查询供应商落地页资料
+     *
+     * @return source 1PC端,2小程序
+     * @return Map(userPo, clubPo)
+     * @return banner > banner管理
+     * @return landing.type 1成功案例,2视频列表,3文章列表
+     */
+    @ApiOperation("查询供应商落地页资料")
+    @GetMapping("/shopTypeInfo")
+    public ResponseJson shopTypeInfo(Integer source, CmBrandLanding landing,
+                                     @RequestParam(value = "pageNum", defaultValue = "1") int pageNum,
+                                     @RequestParam(value = "pageSize", defaultValue = "20") int pageSize) {
+        if (source == null) {
+            return ResponseJson.error("source异常!", null);
+        }
+        if (landing.type() == null || (!landing.type().equals("2") && !landing.type().equals("3"))) {
+            return ResponseJson.error("type异常!", null);
+        }
+        if (source == 1) {
+            landing.setPcStatus("1");
+        } else  {
+            landing.setAppStatus("1");
+        }
+        List<CmBrandLanding> cmBrandLandings = cmBrandLandingService.selectCmBrandLandingList(landing);
+        if (landing.type().equals("2") && CollectionUtils.isNotEmpty(cmBrandLandings)) {
+            cmBrandLandings.forEach(s -> {
+                CmBrandFiles cmBrandFiles = new CmBrandFiles();
+                cmBrandFiles.setId(s.getVideo());
+                cmBrandFiles.setType("1");
+                s.setCmBrandFiles(s.getVideo() == null ? null :
+                        cmBrandFilesService.selectCmBrandFilesList(cmBrandFiles));
+            });
+        }
+        PageHelper.startPage(pageNum, pageSize);
+        List<CmBrandLandingVO> cmBrandLandingVOS = BeanUtil.setValues(cmBrandLandings, CmBrandLandingVO.class);
+        PageInfo<CmBrandLandingVO> pageInfo = new PageInfo<>(cmBrandLandingVOS);
+        return ResponseJson.success(pageInfo);
+    }
+
     @ApiOperation("供应商落地页解决方案用户需求")
     @ApiImplicitParams({
             @ApiImplicitParam(name = "userId", required = true, value = "userId"),
@@ -97,18 +145,23 @@ public class CmBrandLandingApi {
     public ResponseJson cmQuestionnaireSave(CmQuestionnaire cmQuestionnaire) {
         cmQuestionnaire.setType("1");
         if (StringUtils.isBlank(cmQuestionnaire.getId())) {
-            if (cmQuestionnaire.getType().equals("1")) {
-                //发短信
-                String message = "【采美365】尊敬的客户,已收到您的方案咨询信息,1-3个工作日内采美工作人员将通过此手机号15338851365联系您,期间请留意来电。";
-                if (StringUtils.isNotBlank(cmQuestionnaire.getMobile())) {
-                    CmQuestionnaire byCmQuestionnaire = cmQuestionnaireService.getByCmQuestionnaire(new CmQuestionnaire()
-                            .setLevel(cmQuestionnaire.getLevel())
-                            .setMobile(cmQuestionnaire.getMobile()));
-                    if (byCmQuestionnaire==null||byCmQuestionnaire.getCreateTime().getTime() < (new Date().getTime()-3600000)) {
-                        remoteCallService.remoteSendSms(24, 1, cmQuestionnaire.getMobile(), message);
-                    }
-                    cmQuestionnaireService.addCmQuestionnaire(cmQuestionnaire);
+            //发短信
+            String message = "【采美365】尊敬的客户,已收到您的方案咨询信息,1-3个工作日内采美工作人员将通过此手机号15338851365联系您,期间请留意来电。";
+            if (StringUtils.isNotBlank(cmQuestionnaire.getMobile())) {
+                CmQuestionnaire byCmQuestionnaire = cmQuestionnaireService.getByCmQuestionnaire(new CmQuestionnaire()
+                        .setLevel(cmQuestionnaire.getLevel())
+                        .setMobile(cmQuestionnaire.getMobile()));
+                //管理员手机号短信通知
+                List<String> adminMobileList = baseMapper.findAdminMobileList(1);
+                if (CollectionUtils.isNotEmpty(adminMobileList)) {
+                    adminMobileList.forEach(s -> {
+                        remoteCallService.remoteSendSms(0, 1, s, "【采美365】采美后台-供应商落地页-用户需求:" + DateUtil.formatDateTime(new Date(), "yyyy-MM-dd HH:mm") + "新增一条供应商需求,请及时查看。");
+                    });
+                }
+                if (byCmQuestionnaire == null || byCmQuestionnaire.getCreateTime().getTime() < (new Date().getTime() - 3600000)) {
+                    remoteCallService.remoteSendSms(24, 1, cmQuestionnaire.getMobile(), message);
                 }
+                cmQuestionnaireService.addCmQuestionnaire(cmQuestionnaire);
                 return ResponseJson.success("提交成功");
             }
         } else {

+ 5 - 3
src/main/java/com/caimei365/user/controller/DistributionApi.java

@@ -10,6 +10,7 @@ import com.caimei365.user.model.vo.*;
 import com.caimei365.user.service.BaseService;
 import com.caimei365.user.service.CmDistributionService;
 import com.caimei365.user.service.SellerService;
+import com.caimei365.user.utils.BeanUtil;
 import com.caimei365.user.utils.RequestUtil;
 import com.caimei365.user.utils.ValidateUtil;
 import com.github.pagehelper.PageHelper;
@@ -53,7 +54,7 @@ public class DistributionApi {
         List<CmDistribution> cmDistributionList = cmDistributionService.getCmDistributionList(new CmDistribution()
                 .parentId(cmDistribution.parentId())
         );
-        return ResponseJson.success(CmDistributionVO.setValues(cmDistributionList));
+        return ResponseJson.success(BeanUtil.setValues(cmDistributionList,CmDistributionVO.class));
     }
 
 
@@ -65,10 +66,11 @@ public class DistributionApi {
         if (null == cmDistribution.userId()&&null == cmDistribution.id()) {
             return ResponseJson.error("参数异常:用户Id不能为空!", null);
         }
-        return ResponseJson.success(CmDistributionVO.setValue(cmDistributionService.getByCmDistribution(new CmDistribution()
+        CmDistributionVO cmDistributionVO = BeanUtil.setValue(cmDistributionService.getByCmDistribution(new CmDistribution()
                 .id(cmDistribution.id())
                 .userId(cmDistribution.userId())
-        )));
+        ), CmDistributionVO.class);
+        return ResponseJson.success(cmDistributionVO);
     }
 
     /**

+ 2 - 0
src/main/java/com/caimei365/user/mapper/BaseMapper.java

@@ -220,6 +220,8 @@ public interface BaseMapper {
      */
     public CmUser getByUser(CmUser user);
 
+    public List<String> findAdminMobileList(Integer type);
+
     CmUser findUserByMobile(@Param("mobile") String mobile, @Param("oldUserId") Integer oldUserId, @Param("userIdentity") Integer userIdentity);
 
 }

+ 0 - 1
src/main/java/com/caimei365/user/mapper/CmBrandLandingMapper.java

@@ -2,7 +2,6 @@ package com.caimei365.user.mapper;
 
 import java.util.List;
 import com.caimei365.user.model.po.CmBrandLanding;
-import com.caimei365.user.model.vo.CmBrandLandingVO;
 import org.apache.ibatis.annotations.Mapper;
 
 /**

+ 2 - 0
src/main/java/com/caimei365/user/mapper/CmQuestionnaireMapper.java

@@ -39,6 +39,8 @@ public interface CmQuestionnaireMapper
      */
     public List<String> getByIds(CmQuestionnaire cmQuestionnaire);
 
+
+
     /**
      * 查询用户需求调查
      *

+ 203 - 194
src/main/java/com/caimei365/user/model/po/CmBrandLanding.java

@@ -19,7 +19,7 @@ import java.util.List;
  * @author Kaick
  * @date 2023-05-31
  */
-@Accessors(chain  = true )
+@Accessors(fluent   = true )
 @Data
 @Alias("CmBrandLanding")
 public class CmBrandLanding
@@ -53,6 +53,9 @@ public class CmBrandLanding
     /** picture跳转链接 */
     private String jumpLink;
 
+    /** picture跳转链接 */
+    private String jumpAppLink;
+
     /** 标题
  */
     private String title;
@@ -76,7 +79,14 @@ public class CmBrandLanding
     /** 删除状态 0正常,1删除 */
     private String delFlag;
 
-
+    /** 归属者Id(type字段表Id) */
+    private String authorId;
+    /** 子级分类: (type=4){1 大图,2小图}(已弃用),(type=5){1 大图,2小图,2小图}  */
+    private String levelType;
+    /** 分页参数 */
+    private Integer num;
+    /**  分页参数 */
+    private Integer size;
     /** 修改时间 */
     @JsonFormat(pattern = "yyyy-MM-dd")
     private Date updateTime;
@@ -86,196 +96,195 @@ public class CmBrandLanding
     /** 文件资料 */
     private List<CmBrandFilesVO> cmBrandFiles;
 
-//    public List<CmBrandFiles> getCmBrandFiles() {
-//        return cmBrandFiles;
-//    }
-//
-//    public void setCmBrandFiles(List<CmBrandFiles> cmBrandFiles) {
-//        this.cmBrandFiles = cmBrandFiles;
-//    }
-//
-//    public void setId(String id)
-//    {
-//        this.id = id;
-//    }
-//
-//    public String getId()
-//    {
-//        return id;
-//    }
-//    public void setAuthUserId(String authUserId)
-//    {
-//        this.authUserId = authUserId;
-//    }
-//
-//    public String getAuthUserId()
-//    {
-//        return authUserId;
-//    }
-//    public void setType(String type)
-//    {
-//        this.type = type;
-//    }
-//
-//    public String 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(String jumpStatus)
-//    {
-//        this.jumpStatus = jumpStatus;
-//    }
-//
-//    public String 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(String sort)
-//    {
-//        this.sort = sort;
-//    }
-//
-//    public String getSort()
-//    {
-//        return sort;
-//    }
-//    public void setPcStatus(String pcStatus)
-//    {
-//        this.pcStatus = pcStatus;
-//    }
-//
-//    public String getPcStatus()
-//    {
-//        return pcStatus;
-//    }
-//    public void setAppStatus(String appStatus)
-//    {
-//        this.appStatus = appStatus;
-//    }
-//
-//    public String 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;
-//    }
-//    public Date getUpdateTime() {
-//        return updateTime;
-//    }
-//
-//    public void setUpdateTime(Date updateTime) {
-//        this.updateTime = updateTime;
-//    }
-//
-//    @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();
-//    }
+    public Integer getNum() {
+        return num;
+    }
+
+    public void setNum(Integer num) {
+        this.num = num;
+    }
+
+    public Integer getSize() {
+        return size;
+    }
+
+    public void setSize(Integer size) {
+        this.size = size;
+    }
+
+    public String getAuthorId() {
+        return authorId;
+    }
+
+    public void setAuthorId(String authorId) {
+        this.authorId = authorId;
+    }
+
+    public String getLevelType() {
+        return levelType;
+    }
+
+    public void setLevelType(String levelType) {
+        this.levelType = levelType;
+    }
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getAuthUserId() {
+        return authUserId;
+    }
+
+    public void setAuthUserId(String authUserId) {
+        this.authUserId = authUserId;
+    }
+
+    public String getType() {
+        return type;
+    }
+
+    public void setType(String type) {
+        this.type = type;
+    }
+
+    public String getHeadPcBanner() {
+        return headPcBanner;
+    }
+
+    public void setHeadPcBanner(String headPcBanner) {
+        this.headPcBanner = headPcBanner;
+    }
+
+    public String getHeadAppBanner() {
+        return headAppBanner;
+    }
+
+    public void setHeadAppBanner(String headAppBanner) {
+        this.headAppBanner = headAppBanner;
+    }
+
+    public String getJumpStatus() {
+        return jumpStatus;
+    }
+
+    public void setJumpStatus(String jumpStatus) {
+        this.jumpStatus = jumpStatus;
+    }
+
+    public String getJumpPcPicture() {
+        return jumpPcPicture;
+    }
+
+    public void setJumpPcPicture(String jumpPcPicture) {
+        this.jumpPcPicture = jumpPcPicture;
+    }
+
+    public String getJumpAppPicture() {
+        return jumpAppPicture;
+    }
+
+    public void setJumpAppPicture(String jumpAppPicture) {
+        this.jumpAppPicture = jumpAppPicture;
+    }
+
+    public String getJumpLink() {
+        return jumpLink;
+    }
+
+    public void setJumpLink(String jumpLink) {
+        this.jumpLink = jumpLink;
+    }
+
+    public String getJumpAppLink() {
+        return jumpAppLink;
+    }
+
+    public void setJumpAppLink(String jumpAppLink) {
+        this.jumpAppLink = jumpAppLink;
+    }
+
+    public String getTitle() {
+        return title;
+    }
+
+    public void setTitle(String title) {
+        this.title = title;
+    }
+
+    public String getContent() {
+        return content;
+    }
+
+    public void setContent(String content) {
+        this.content = content;
+    }
+
+    public String getVideo() {
+        return video;
+    }
+
+    public void setVideo(String video) {
+        this.video = video;
+    }
+
+    public String getSort() {
+        return sort;
+    }
+
+    public void setSort(String sort) {
+        this.sort = sort;
+    }
+
+    public String getPcStatus() {
+        return pcStatus;
+    }
+
+    public void setPcStatus(String pcStatus) {
+        this.pcStatus = pcStatus;
+    }
+
+    public String getAppStatus() {
+        return appStatus;
+    }
+
+    public void setAppStatus(String appStatus) {
+        this.appStatus = appStatus;
+    }
+
+    public String getDelFlag() {
+        return delFlag;
+    }
+
+    public void setDelFlag(String delFlag) {
+        this.delFlag = delFlag;
+    }
+
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    public Date getAddTime() {
+        return addTime;
+    }
+
+    public void setAddTime(Date addTime) {
+        this.addTime = addTime;
+    }
+
+    public List<CmBrandFilesVO> getCmBrandFiles() {
+        return cmBrandFiles;
+    }
+
+    public void setCmBrandFiles(List<CmBrandFilesVO> cmBrandFiles) {
+        this.cmBrandFiles = cmBrandFiles;
+    }
 }

+ 34 - 14
src/main/java/com/caimei365/user/model/vo/CmBrandLandingVO.java

@@ -1,16 +1,12 @@
 package com.caimei365.user.model.vo;
 
-import java.util.Date;
-
-import com.caimei365.user.model.vo.CmBrandFilesVO;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import lombok.Data;
 import lombok.experimental.Accessors;
 import org.apache.ibatis.type.Alias;
-import org.apache.commons.lang3.builder.ToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
 
 import java.io.Serializable;
+import java.util.Date;
 import java.util.List;
 
 /**
@@ -19,21 +15,24 @@ import java.util.List;
  * @author Kaick
  * @date 2023-05-31
  */
-@Accessors(chain  = true )
+@Accessors(chain = true )
 @Data
 @Alias("CmBrandLandingVO")
 public class CmBrandLandingVO implements Serializable
 {
-    private static final Long serialVersionUID = 1L;
+    private static final long serialVersionUID = 1L;
 
     /** id */
     private String id;
 
+    /** 分类:1成功案例,2增长社区-视频列表,3增长社区-文章列表, 4信息中心导航栏(info_type)(已弃用) , 5信息中心首页轮播图 */
+    private String type;
+
     /** 供应商id */
     private String authUserId;
 
-    /** 分类:1成功案例,2增长社区-视频列表,3增长社区-文章列表 */
-    private String type;
+    /** 归属者Id(type字段表Id) */
+    private String authorId;
 
     /** pc端picture */
     private String headPcBanner;
@@ -54,21 +53,42 @@ public class CmBrandLandingVO implements Serializable
     private String jumpLink;
 
     /** 标题
- */
+     */
     private String title;
 
     /** 内容
- */
+     */
     private String content;
 
-    /** 视频文件 */
+    /** 视频文件 cm_brand_files表id */
     private String video;
 
     /** 排序 */
     private String sort;
 
-    /** 文件资料 */
-    List<CmBrandFilesVO> cmBrandFiles;
+    /** pc端status 1启用,0停用 */
+    private String pcStatus;
+
+    /**
+     * 移动端status 1启用,0停用
+     */
+    private String appStatus;
+
+    /**
+     * 子级分类: (type=4){1 大图,2小图}(已弃用),(type=5){1 大图,2小图,2小图}
+     */
+    private String levelType;
+
+    /**
+     * 添加时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date addTime;
+
+    /**
+     * 文件资料
+     */
+    private List<CmBrandFilesVO> cmBrandFiles;
 
 
 }

+ 0 - 29
src/main/java/com/caimei365/user/model/vo/CmDistributionVO.java

@@ -84,33 +84,4 @@ public class CmDistributionVO implements Serializable {
      */
     private String parentIds;
 
-    public static List<CmDistributionVO> setValues(List<CmDistribution> cmDistributionList) {
-        List<CmDistributionVO> cmDistributionVOList = new ArrayList<>();
-        if(null!=cmDistributionList) {
-
-            cmDistributionList.forEach(cmDistribution -> {
-                cmDistributionVOList.add(setValue(cmDistribution));
-            });
-        }
-        return cmDistributionVOList;
-    }
-
-    public static CmDistributionVO setValue(CmDistribution cmDistribution) {
-            CmDistributionVO cmDistributionVO = new CmDistributionVO();
-            if(null!=cmDistribution) {
-
-                cmDistributionVO.setId(cmDistribution.getId());
-                cmDistributionVO.setUserId(cmDistribution.getUserId());
-                cmDistributionVO.setName(cmDistribution.getName());
-                cmDistributionVO.setLinkMan(cmDistribution.getLinkMan());
-                cmDistributionVO.setMobile(cmDistribution.getMobile());
-                cmDistributionVO.setSplitCode(cmDistribution.getSplitCode());
-                cmDistributionVO.setStatus(cmDistribution.getStatus());
-                cmDistributionVO.setQrCode(cmDistribution.getQrCode());
-                cmDistributionVO.setImage(cmDistribution.getImage());
-                cmDistributionVO.setParentId(cmDistribution.getParentId());
-                cmDistributionVO.setParentIds(cmDistribution.getParentIds());
-            }
-        return cmDistributionVO;
-    }
 }

+ 0 - 39
src/main/java/com/caimei365/user/service/CmBrandLandingService.java

@@ -1,7 +1,6 @@
 package com.caimei365.user.service;
 
 import com.caimei365.user.model.po.CmBrandLanding;
-import com.caimei365.user.model.vo.CmBrandLandingVO;
 
 import java.util.List;
 
@@ -13,13 +12,6 @@ import java.util.List;
  */
 public interface CmBrandLandingService
 {
-    /**
-     * 查询供应商落地页资源
-     *
-     * @param id 供应商落地页资源主键
-     * @return 供应商落地页资源
-     */
-    public CmBrandLanding selectCmBrandLandingById(String id);
 
     /**
      * 查询供应商落地页资源列表
@@ -29,35 +21,4 @@ public interface CmBrandLandingService
      */
     public List<CmBrandLanding> selectCmBrandLandingList(CmBrandLanding cmBrandLanding);
 
-    /**
-     * 新增供应商落地页资源
-     *
-     * @param cmBrandLanding 供应商落地页资源
-     * @return 结果
-     */
-    public int insertCmBrandLanding(CmBrandLanding cmBrandLanding);
-
-    /**
-     * 修改供应商落地页资源
-     *
-     * @param cmBrandLanding 供应商落地页资源
-     * @return 结果
-     */
-    public int updateCmBrandLanding(CmBrandLanding cmBrandLanding);
-
-    /**
-     * 批量删除供应商落地页资源
-     *
-     * @param ids 需要删除的供应商落地页资源主键集合
-     * @return 结果
-     */
-    public int deleteCmBrandLandingByIds(String[] ids);
-
-    /**
-     * 删除供应商落地页资源信息
-     *
-     * @param id 供应商落地页资源主键
-     * @return 结果
-     */
-    public int deleteCmBrandLandingById(String id);
 }

+ 0 - 15
src/main/java/com/caimei365/user/service/CmQuestionnaireService.java

@@ -91,19 +91,4 @@ public interface CmQuestionnaireService
      */
     public int delCmQuestionnaireById(String id);
 
-    /**
-     * 批量新增用户需求调查
-     *
-     * @param cmQuestionnaireList 用户需求调查列表
-     * @return 结果
-     */
-    public void batchAddCmQuestionnaire(List<CmQuestionnaire> cmQuestionnaireList);
-
-    /**
-     * 批量修改用户需求调查
-     *
-     * @param cmQuestionnaireList 用户需求调查列表
-     * @return 结果
-     */
-    public void batchUpdateCmQuestionnaire(List<CmQuestionnaire> cmQuestionnaireList);
 }

+ 0 - 60
src/main/java/com/caimei365/user/service/impl/CmBrandLandingServiceImpl.java

@@ -5,7 +5,6 @@ import java.util.List;
 
 import com.caimei365.user.mapper.CmBrandLandingMapper;
 import com.caimei365.user.model.po.CmBrandLanding;
-import com.caimei365.user.model.vo.CmBrandLandingVO;
 import com.caimei365.user.service.CmBrandLandingService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -22,17 +21,6 @@ public class CmBrandLandingServiceImpl implements CmBrandLandingService
     @Autowired
     private CmBrandLandingMapper cmBrandLandingMapper;
 
-    /**
-     * 查询供应商落地页资源
-     *
-     * @param id 供应商落地页资源主键
-     * @return 供应商落地页资源
-     */
-    @Override
-    public CmBrandLanding selectCmBrandLandingById(String id)
-    {
-        return cmBrandLandingMapper.selectCmBrandLandingById(id);
-    }
 
     /**
      * 查询供应商落地页资源列表
@@ -46,52 +34,4 @@ public class CmBrandLandingServiceImpl implements CmBrandLandingService
         return cmBrandLandingMapper.selectCmBrandLandingList(cmBrandLanding);
     }
 
-    /**
-     * 新增供应商落地页资源
-     *
-     * @param cmBrandLanding 供应商落地页资源
-     * @return 结果
-     */
-    @Override
-    public int insertCmBrandLanding(CmBrandLanding cmBrandLanding)
-    {
-        return cmBrandLandingMapper.insertCmBrandLanding(cmBrandLanding);
-    }
-
-    /**
-     * 修改供应商落地页资源
-     *
-     * @param cmBrandLanding 供应商落地页资源
-     * @return 结果
-     */
-    @Override
-    public int updateCmBrandLanding(CmBrandLanding cmBrandLanding)
-    {
-        cmBrandLanding.setUpdateTime(new Date());
-        return cmBrandLandingMapper.updateCmBrandLanding(cmBrandLanding);
-    }
-
-    /**
-     * 批量删除供应商落地页资源
-     *
-     * @param ids 需要删除的供应商落地页资源主键
-     * @return 结果
-     */
-    @Override
-    public int deleteCmBrandLandingByIds(String[] ids)
-    {
-        return cmBrandLandingMapper.deleteCmBrandLandingByIds(ids);
-    }
-
-    /**
-     * 删除供应商落地页资源信息
-     *
-     * @param id 供应商落地页资源主键
-     * @return 结果
-     */
-    @Override
-    public int deleteCmBrandLandingById(String id)
-    {
-        return cmBrandLandingMapper.deleteCmBrandLandingById(id);
-    }
 }

+ 14 - 53
src/main/java/com/caimei365/user/service/impl/CmQuestionnaireServiceImpl.java

@@ -16,8 +16,7 @@ import com.caimei365.user.service.CmQuestionnaireService;
  * @date 2023-07-14
  */
 @Service
-public class CmQuestionnaireServiceImpl implements CmQuestionnaireService
-{
+public class CmQuestionnaireServiceImpl implements CmQuestionnaireService {
     @Autowired
     private CmQuestionnaireMapper cmQuestionnaireMapper;
 
@@ -28,8 +27,7 @@ public class CmQuestionnaireServiceImpl implements CmQuestionnaireService
      * @return 用户需求调查
      */
     @Override
-    public CmQuestionnaire getCmQuestionnaireById(String id)
-    {
+    public CmQuestionnaire getCmQuestionnaireById(String id) {
         return cmQuestionnaireMapper.getCmQuestionnaireById(id);
     }
 
@@ -40,8 +38,7 @@ public class CmQuestionnaireServiceImpl implements CmQuestionnaireService
      * @return String
      */
     @Override
-    public String getById(CmQuestionnaire cmQuestionnaire)
-    {
+    public String getById(CmQuestionnaire cmQuestionnaire) {
         return cmQuestionnaireMapper.getById(cmQuestionnaire);
     }
 
@@ -52,8 +49,7 @@ public class CmQuestionnaireServiceImpl implements CmQuestionnaireService
      * @return List<String>
      */
     @Override
-    public List<String> getByIds(CmQuestionnaire cmQuestionnaire)
-    {
+    public List<String> getByIds(CmQuestionnaire cmQuestionnaire) {
         return cmQuestionnaireMapper.getByIds(cmQuestionnaire);
     }
 
@@ -64,8 +60,7 @@ public class CmQuestionnaireServiceImpl implements CmQuestionnaireService
      * @return 用户需求调查
      */
     @Override
-    public CmQuestionnaire getByCmQuestionnaire(CmQuestionnaire cmQuestionnaire)
-    {
+    public CmQuestionnaire getByCmQuestionnaire(CmQuestionnaire cmQuestionnaire) {
         return cmQuestionnaireMapper.getByCmQuestionnaire(cmQuestionnaire);
     }
 
@@ -76,10 +71,10 @@ public class CmQuestionnaireServiceImpl implements CmQuestionnaireService
      * @return 用户需求调查
      */
     @Override
-    public List<CmQuestionnaire> getCmQuestionnaireList(CmQuestionnaire cmQuestionnaire)
-    {
+    public List<CmQuestionnaire> getCmQuestionnaireList(CmQuestionnaire cmQuestionnaire) {
         return cmQuestionnaireMapper.getCmQuestionnaireList(cmQuestionnaire);
     }
+
     /**
      * 查询用户需求调查记录总数
      *
@@ -87,8 +82,7 @@ public class CmQuestionnaireServiceImpl implements CmQuestionnaireService
      * @return 用户需求调查
      */
     @Override
-    public int getCmQuestionnaireCount(CmQuestionnaire cmQuestionnaire)
-    {
+    public int getCmQuestionnaireCount(CmQuestionnaire cmQuestionnaire) {
         return cmQuestionnaireMapper.getCmQuestionnaireCount(cmQuestionnaire);
     }
 
@@ -99,8 +93,7 @@ public class CmQuestionnaireServiceImpl implements CmQuestionnaireService
      * @return 结果
      */
     @Override
-    public int addCmQuestionnaire(CmQuestionnaire cmQuestionnaire)
-    {
+    public int addCmQuestionnaire(CmQuestionnaire cmQuestionnaire) {
         cmQuestionnaire.setCreateTime(new Date());
         return cmQuestionnaireMapper.addCmQuestionnaire(cmQuestionnaire);
     }
@@ -112,8 +105,7 @@ public class CmQuestionnaireServiceImpl implements CmQuestionnaireService
      * @return 结果
      */
     @Override
-    public int updateCmQuestionnaire(CmQuestionnaire cmQuestionnaire)
-    {
+    public int updateCmQuestionnaire(CmQuestionnaire cmQuestionnaire) {
         cmQuestionnaire.setUpdateTime(new Date());
         return cmQuestionnaireMapper.updateCmQuestionnaire(cmQuestionnaire);
     }
@@ -125,9 +117,8 @@ public class CmQuestionnaireServiceImpl implements CmQuestionnaireService
      * @return 结果
      */
     @Override
-    public int delCmQuestionnaireByIds(String[] ids)
-    {
-        return cmQuestionnaireMapper.updateDelCmQuestionnaireByIds(ids,1);
+    public int delCmQuestionnaireByIds(String[] ids) {
+        return cmQuestionnaireMapper.updateDelCmQuestionnaireByIds(ids, 1);
         //return cmQuestionnaireMapper.delCmQuestionnaireByIds(ids);
     }
 
@@ -138,39 +129,9 @@ public class CmQuestionnaireServiceImpl implements CmQuestionnaireService
      * @return 结果
      */
     @Override
-    public int delCmQuestionnaireById(String id)
-    {
+    public int delCmQuestionnaireById(String id) {
         return cmQuestionnaireMapper.updateCmQuestionnaire(new CmQuestionnaire().setId(id).setDelFlag(1));
         //return cmQuestionnaireMapper.delCmQuestionnaireById(id);
     }
+}
 
-    /**
-     * 批量新增用户需求调查
-     *
-     * @param cmQuestionnaireList 用户需求调查列表
-     * @return 结果
-     */
-    @Override
-    public void batchAddCmQuestionnaire(List<CmQuestionnaire> cmQuestionnaireList)
-    {
-            for (CmQuestionnaire cmQuestionnaire : cmQuestionnaireList)
-            {
-                    cmQuestionnaireMapper.addCmQuestionnaire(cmQuestionnaire);
-            }
-    }
-
-    /**
-     * 批量修改用户需求调查
-     *
-     * @param cmQuestionnaireList 用户需求调查列表
-     * @return 结果
-     */
-    @Override
-    public void batchUpdateCmQuestionnaire(List<CmQuestionnaire> cmQuestionnaireList)
-    {
-            for (CmQuestionnaire cmQuestionnaire : cmQuestionnaireList)
-            {
-                   cmQuestionnaireMapper.updateCmQuestionnaire(cmQuestionnaire);
-            }
-        }
-    }

+ 33 - 0
src/main/java/com/caimei365/user/utils/BeanUtil.java

@@ -0,0 +1,33 @@
+package com.caimei365.user.utils;
+
+import org.apache.commons.collections.CollectionUtils;
+import org.springframework.beans.BeanUtils;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author :Kaick
+ * @date :Created in 2023/10/27
+ * @description:BeanUtil
+ */
+public class BeanUtil {
+
+    public static <T, S> T setValue(S source, Class<T> clazz) {
+        if (null == source) {
+            return null;
+        }
+        T target = BeanUtils.instantiate(clazz);
+        BeanUtils.copyProperties(source, target);
+        return target;
+    }
+
+    public static <T, S> List<T> setValues(List<S> sourceList, Class<T> target) {
+        if (CollectionUtils.isEmpty(sourceList)) {
+            return null;
+        }
+        List<T> targetList = new ArrayList<>(sourceList.size());
+        sourceList.forEach(s -> targetList.add(setValue(s, target)));
+        return targetList;
+    }
+}

+ 7 - 1
src/main/java/com/caimei365/user/utils/DateUtil.java

@@ -123,6 +123,12 @@ public class DateUtil {
     public static String formatDateTime(Date date) {
         return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(date);
     }
+    /**
+     * 得到日期时间字符串,转换格式(yyyy-MM-dd HH:mm:ss)
+     */
+    public static String formatDateTime(Date date,String format) {
+        return new SimpleDateFormat(format!=null?format:"yyyy-MM-dd HH:mm:ss").format(date);
+    }
 
     /**
      * date2比date1多的天数
@@ -159,4 +165,4 @@ public class DateUtil {
             return day2 - day1;
         }
     }
-}
+}

+ 10 - 0
src/main/resources/mapper/BaseMapper.xml

@@ -676,4 +676,14 @@
         limit 0,1
     </select>
 
+    <select id="findAdminMobileList" parameterType="String" resultType="String">
+        select
+        cm_admin_mobile.mobile
+        from cm_admin_mobile AS cm_admin_mobile
+        <where>  cm_admin_mobile.delFlag = 0 and cm_admin_mobile.enabledStatus = 1
+            <if test="type != null  and type != ''"> and cm_admin_mobile.type = #{type}</if>
+        </where>
+        group by cm_admin_mobile.id
+        order by cm_admin_mobile.createTime desc
+    </select>
 </mapper>

+ 1 - 0
src/main/resources/mapper/CmBrandBannerMapper.xml

@@ -55,6 +55,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="updateTime != null "> and updateTime = #{updateTime}</if>
             <if test="addTime != null "> and addTime = #{addTime}</if>
         </where>
+        order by sort desc,addTime desc
     </select>
 
     <select id="selectCmBrandBannerById" parameterType="String" resultMap="CmBrandBannerResult">

+ 5 - 1
src/main/resources/mapper/CmBrandLandingMapper.xml

@@ -14,6 +14,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="jumpPcPicture"    column="jumpPcPicture"    />
         <result property="jumpAppPicture"    column="jumpAppPicture"    />
         <result property="jumpLink"    column="jumpLink"    />
+        <result property="jumpAppLink"    column="jumpAppLink"    />
         <result property="title"    column="title"    />
         <result property="content"    column="content"    />
         <result property="video"    column="video"    />
@@ -27,7 +28,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
 
     <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
+        select id, authUserId, type, headPcBanner, headAppBanner, jumpStatus, jumpPcPicture, jumpAppPicture, jumpLink,jumpAppLink, title, content, video, sort, pcStatus, appStatus, delFlag, updateTime, addTime from cm_brand_landing
     </sql>
 
     <select id="selectCmBrandLandingList" parameterType="com.caimei365.user.model.po.CmBrandLanding" resultMap="CmBrandLandingResult">
@@ -56,6 +57,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="updateTime != null "> and updateTime = #{updateTime}</if>
             <if test="addTime != null "> and addTime = #{addTime}</if>
         </where>
+        order by sort desc,addTime desc
+        <if test="num != null ">limit #{num},#{size} </if>
     </select>
 
     <select id="selectCmBrandLandingById" parameterType="String" resultMap="CmBrandLandingResult">
@@ -116,6 +119,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <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="title != null">title = #{title},</if>
             <if test="content != null">content = #{content},</if>
             <if test="video != null">video = #{video},</if>

+ 2 - 0
src/main/resources/mapper/CmQuestionnaireMapper.xml

@@ -165,6 +165,8 @@
         where  cm_questionnaire.delFlag = 0 and cm_questionnaire.id = #{id}
     </select>
 
+
+
     <select id="getByIds" parameterType="CmQuestionnaire" resultMap="CmQuestionnaireResult">
         select id
         from cm_questionnaire AS cm_questionnaire

+ 111 - 111
src/test/java/com/caimei365/user/UserApplicationTests.java

@@ -1,115 +1,115 @@
-package com.caimei365.user;
-
-import com.caimei365.user.feign.ToolsFeign;
-import com.caimei365.user.mapper.SuperVipMapper;
-import com.caimei365.user.model.po.SuperVipPo;
-import com.caimei365.user.model.po.VipPayHistoryPo;
-import com.caimei365.user.service.LoginService;
-import com.caimei365.user.utils.AliyunSmsUtil;
-import com.caimei365.user.utils.CodeUtil;
-import com.caimei365.user.utils.ValidateUtil;
-import com.caimei365.user.utils.message.InsideMessage;
-import com.caimei365.user.utils.message.MessageModel;
-import com.caimei365.user.utils.message.MessageType;
-import com.caimei365.user.utils.message.MqInfo;
-import org.junit.jupiter.api.Test;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.boot.test.context.SpringBootTest;
-
-import javax.annotation.Resource;
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Calendar;
-import java.util.Date;
-import java.util.List;
-
-@SpringBootTest
-class UserApplicationTests {
-    @Resource
-    private ToolsFeign smsFeign;
-    @Resource
-    LoginService loginService;
-    @Test
-    void contextLoads() {
-
-//        //站内信
-//        MessageModel<InsideMessage> insideMessageMessageModel = new MessageModel<>();
-//        insideMessageMessageModel.code(MessageType.WEB_INSIDE_MESSAGE)
-//                .mqInfo(new MqInfo().topic("MessageLine").delay(1).async(0))
-//                .info(new InsideMessage()
-//                        .userType(3)
-//                        .messageType(3)
-//                        .shopTieredType(4)
-//                        .name("user.getUserName()")
-//                        .userName("user.getUserName()")
-//                        .mobile("164848989")
-//                        .thisId(4648)
-//                        .clubId(448)
-//                );
-//        smsFeign.sendCommonMessage(insideMessageMessageModel);
-        /*List<Integer> listShopId = loginService.getMessageCenterListDay(1);
-        System.out.println("-------->listShopId == "+listShopId.toString()+" <--------------");*/
-//        boolean b = ValidateUtil.validateEmail("182126@qq.com");
-//        System.out.println(b);
-    }
-//    @Resource
-//    private ToolsFeign feign;
+// package com.caimei365.user;
 //
+// import com.caimei365.user.feign.ToolsFeign;
+// import com.caimei365.user.mapper.SuperVipMapper;
+// import com.caimei365.user.model.po.SuperVipPo;
+// import com.caimei365.user.model.po.VipPayHistoryPo;
+// import com.caimei365.user.service.LoginService;
+// import com.caimei365.user.utils.AliyunSmsUtil;
+// import com.caimei365.user.utils.CodeUtil;
+// import com.caimei365.user.utils.ValidateUtil;
+// import com.caimei365.user.utils.message.InsideMessage;
+// import com.caimei365.user.utils.message.MessageModel;
+// import com.caimei365.user.utils.message.MessageType;
+// import com.caimei365.user.utils.message.MqInfo;
+// import org.junit.jupiter.api.Test;
+// import org.springframework.beans.factory.annotation.Autowired;
+// import org.springframework.boot.test.context.SpringBootTest;
 //
-//    @Test
-//    void sms(){
-//        String mobile = "15827317748";
-////        String randomCode = CodeUtil.generateCodeInt(6);
-////        String name ="dsfsd";
-//        //AliyunSmsUtil.sendSms(mobile, 6, "{name:"+ mobile +",content:"+ randomCode +"}");
-////        AliyunSmsUtil.sendSms(mobile, 11, "{name:\""+ name +"\",code:" + randomCode + "}");
-//        feign.getSendSms(mobile,"恭喜您成功开通采美平台超级会员,为期1个月,快戳采美网站链接www.caimei365.com或微信搜索“采美采购商城”小程序登录采美平台畅享会员特权吧。关注公众号“采美365网”可获取更多优惠和精彩资讯!");
-//    }
-//    @Test
-//    public static void main(String[] args) {
-//        Calendar cal = Calendar.getInstance();
-//        System.out.println(cal.get(Calendar.MONTH));
+// import javax.annotation.Resource;
+// import java.text.ParseException;
+// import java.text.SimpleDateFormat;
+// import java.util.ArrayList;
+// import java.util.Calendar;
+// import java.util.Date;
+// import java.util.List;
 //
-//    }
-//    @Resource
-//    SuperVipMapper mapper;
+// @SpringBootTest
+// class UserApplicationTests {
+//     @Resource
+//     private ToolsFeign smsFeign;
+//     @Resource
+//     LoginService loginService;
+//     @Test
+//     void contextLoads() {
 //
-//    @Test
-//    void testmap(){
-//        Calendar cal = Calendar.getInstance();
-//        SuperVipPo vip = new SuperVipPo();
-//        Date date = new Date();
-//        vip.setUpdateTime(date);
-//        cal.setTime(date);
-//        cal.add(Calendar.MONTH,36);
-//        vip.setUserId(13990);
-//        vip.setEndTime(cal.getTime());
-//        mapper.updateVip(vip);
-//    }
-    /*@Autowired
-    private SuperVipMapper vipMapper;
-
-    @Test
-    void time() throws ParseException {
-        List<VipPayHistoryPo> vipHistory = vipMapper.findVipHistory(13990);
-        for (VipPayHistoryPo vipPayHistoryPo : vipHistory) {
-            System.out.println(vipPayHistoryPo);
-        }
-    }*/
-
-//    @Test
-//    void contextLoads() {
-//        Calendar cal = Calendar.getInstance();
-//        cal.setTime(new Date());
-//        cal.set(Calendar.HOUR_OF_DAY, 0);
-//        cal.set(Calendar.MINUTE, 0);
-//        cal.set(Calendar.SECOND,0);
-//        cal.set(Calendar.MILLISECOND, 0);
-//        Date now = cal.getTime();
-//        System.out.println(now);
-//        System.out.println("=======================");
-//        cal.add(Calendar.DAY_OF_MONTH,1);
-//        System.out.println(cal.getTime());
-//    }
-}
+// //        //站内信
+// //        MessageModel<InsideMessage> insideMessageMessageModel = new MessageModel<>();
+// //        insideMessageMessageModel.code(MessageType.WEB_INSIDE_MESSAGE)
+// //                .mqInfo(new MqInfo().topic("MessageLine").delay(1).async(0))
+// //                .info(new InsideMessage()
+// //                        .userType(3)
+// //                        .messageType(3)
+// //                        .shopTieredType(4)
+// //                        .name("user.getUserName()")
+// //                        .userName("user.getUserName()")
+// //                        .mobile("164848989")
+// //                        .thisId(4648)
+// //                        .clubId(448)
+// //                );
+// //        smsFeign.sendCommonMessage(insideMessageMessageModel);
+//         /*List<Integer> listShopId = loginService.getMessageCenterListDay(1);
+//         System.out.println("-------->listShopId == "+listShopId.toString()+" <--------------");*/
+// //        boolean b = ValidateUtil.validateEmail("182126@qq.com");
+// //        System.out.println(b);
+//     }
+// //    @Resource
+// //    private ToolsFeign feign;
+// //
+// //
+// //    @Test
+// //    void sms(){
+// //        String mobile = "15827317748";
+// ////        String randomCode = CodeUtil.generateCodeInt(6);
+// ////        String name ="dsfsd";
+// //        //AliyunSmsUtil.sendSms(mobile, 6, "{name:"+ mobile +",content:"+ randomCode +"}");
+// ////        AliyunSmsUtil.sendSms(mobile, 11, "{name:\""+ name +"\",code:" + randomCode + "}");
+// //        feign.getSendSms(mobile,"恭喜您成功开通采美平台超级会员,为期1个月,快戳采美网站链接www.caimei365.com或微信搜索“采美采购商城”小程序登录采美平台畅享会员特权吧。关注公众号“采美365网”可获取更多优惠和精彩资讯!");
+// //    }
+// //    @Test
+// //    public static void main(String[] args) {
+// //        Calendar cal = Calendar.getInstance();
+// //        System.out.println(cal.get(Calendar.MONTH));
+// //
+// //    }
+// //    @Resource
+// //    SuperVipMapper mapper;
+// //
+// //    @Test
+// //    void testmap(){
+// //        Calendar cal = Calendar.getInstance();
+// //        SuperVipPo vip = new SuperVipPo();
+// //        Date date = new Date();
+// //        vip.setUpdateTime(date);
+// //        cal.setTime(date);
+// //        cal.add(Calendar.MONTH,36);
+// //        vip.setUserId(13990);
+// //        vip.setEndTime(cal.getTime());
+// //        mapper.updateVip(vip);
+// //    }
+//     /*@Autowired
+//     private SuperVipMapper vipMapper;
+//
+//     @Test
+//     void time() throws ParseException {
+//         List<VipPayHistoryPo> vipHistory = vipMapper.findVipHistory(13990);
+//         for (VipPayHistoryPo vipPayHistoryPo : vipHistory) {
+//             System.out.println(vipPayHistoryPo);
+//         }
+//     }*/
+//
+// //    @Test
+// //    void contextLoads() {
+// //        Calendar cal = Calendar.getInstance();
+// //        cal.setTime(new Date());
+// //        cal.set(Calendar.HOUR_OF_DAY, 0);
+// //        cal.set(Calendar.MINUTE, 0);
+// //        cal.set(Calendar.SECOND,0);
+// //        cal.set(Calendar.MILLISECOND, 0);
+// //        Date now = cal.getTime();
+// //        System.out.println(now);
+// //        System.out.println("=======================");
+// //        cal.add(Calendar.DAY_OF_MONTH,1);
+// //        System.out.println(cal.getTime());
+// //    }
+// }