huanghongfa
2021-01-27 a6039dd43de890a85d3586c044a23378b12cca02
随手拍
12个文件已修改
2个文件已添加
294 ■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/.idea/workspace.xml 68 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/applets_backstage/src/main/java/com/panzhihua/applets_backstage/api/AdvertisingManagementApi.java 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/advertisement/PageComOpsAdvDTO.java 47 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/advertisement/ComOpsAdvVO.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/community/CommunityService.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/target/classes/com/panzhihua/common/model/dtos/advertisement/PageComOpsAdvDTO.class 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/target/classes/com/panzhihua/common/model/vos/advertisement/ComOpsAdvVO.class 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/target/classes/com/panzhihua/common/service/community/CommunityService.class 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/AdvertisementApi.java 26 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActEasyPhotoDAO.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComOpsAdvDAO.java 55 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComOpsAdvService.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComOpsAdvServiceImpl.java 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/.idea/workspace.xml
@@ -23,10 +23,18 @@
  </component>
  <component name="ChangeListManager">
    <list default="true" id="8ba27629-3e5d-4f42-993e-d0c055bc9371" name="Default Changelist" comment="">
      <change afterPath="$PROJECT_DIR$/common/src/main/java/com/panzhihua/common/model/dtos/advertisement/PageComOpsAdvDTO.java" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/service_community/src/main/java/com/panzhihua/service_community/dao/ComActActivityDAO.java" beforeDir="false" afterPath="$PROJECT_DIR$/service_community/src/main/java/com/panzhihua/service_community/dao/ComActActivityDAO.java" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/service_community/src/main/java/com/panzhihua/service_community/dao/ComActDiscussOptionUserDAO.java" beforeDir="false" afterPath="$PROJECT_DIR$/service_community/src/main/java/com/panzhihua/service_community/dao/ComActDiscussOptionUserDAO.java" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActDiscussServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActDiscussServiceImpl.java" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/applets_backstage/src/main/java/com/panzhihua/applets_backstage/api/AdvertisingManagementApi.java" beforeDir="false" afterPath="$PROJECT_DIR$/applets_backstage/src/main/java/com/panzhihua/applets_backstage/api/AdvertisingManagementApi.java" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/common/src/main/java/com/panzhihua/common/model/vos/advertisement/ComOpsAdvVO.java" beforeDir="false" afterPath="$PROJECT_DIR$/common/src/main/java/com/panzhihua/common/model/vos/advertisement/ComOpsAdvVO.java" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/common/src/main/java/com/panzhihua/common/service/community/CommunityService.java" beforeDir="false" afterPath="$PROJECT_DIR$/common/src/main/java/com/panzhihua/common/service/community/CommunityService.java" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/common/target/classes/com/panzhihua/common/model/vos/advertisement/ComOpsAdvVO.class" beforeDir="false" afterPath="$PROJECT_DIR$/common/target/classes/com/panzhihua/common/model/vos/advertisement/ComOpsAdvVO.class" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/common/target/classes/com/panzhihua/common/service/community/CommunityService.class" beforeDir="false" afterPath="$PROJECT_DIR$/common/target/classes/com/panzhihua/common/service/community/CommunityService.class" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/service_community/src/main/java/com/panzhihua/service_community/api/AdvertisementApi.java" beforeDir="false" afterPath="$PROJECT_DIR$/service_community/src/main/java/com/panzhihua/service_community/api/AdvertisementApi.java" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/service_community/src/main/java/com/panzhihua/service_community/dao/ComOpsAdvDAO.java" beforeDir="false" afterPath="$PROJECT_DIR$/service_community/src/main/java/com/panzhihua/service_community/dao/ComOpsAdvDAO.java" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/service_community/src/main/java/com/panzhihua/service_community/service/ComOpsAdvService.java" beforeDir="false" afterPath="$PROJECT_DIR$/service_community/src/main/java/com/panzhihua/service_community/service/ComOpsAdvService.java" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComOpsAdvServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComOpsAdvServiceImpl.java" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java" afterDir="false" />
    </list>
    <option name="SHOW_DIALOG" value="false" />
    <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -411,7 +419,7 @@
      <workItem from="1611019208339" duration="94460000" />
      <workItem from="1611365644515" duration="33195000" />
      <workItem from="1611536010905" duration="21843000" />
      <workItem from="1611622682269" duration="22640000" />
      <workItem from="1611622682269" duration="28274000" />
    </task>
    <servers />
  </component>
@@ -435,10 +443,10 @@
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state x="249" y="0" key="#Project_Structure/0.0.1536.824@0.0.1536.824" timestamp="1608546608273" />
    <state x="574" y="118" key="#com.intellij.ide.util.MemberChooser" timestamp="1611626254015">
    <state x="574" y="118" key="#com.intellij.ide.util.MemberChooser" timestamp="1611717281377">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state x="574" y="118" key="#com.intellij.ide.util.MemberChooser/0.0.1536.824@0.0.1536.824" timestamp="1611626254015" />
    <state x="574" y="118" key="#com.intellij.ide.util.MemberChooser/0.0.1536.824@0.0.1536.824" timestamp="1611717281377" />
    <state x="405" y="335" key="#com.intellij.refactoring.move.MoveHandler.SelectRefactoringDialog" timestamp="1606099594079">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
@@ -467,54 +475,54 @@
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state x="549" y="167" key="FileChooserDialogImpl/0.0.1536.824@0.0.1536.824" timestamp="1610606590056" />
    <state width="1031" height="417" key="GridCell.Tab.0.bottom" timestamp="1611711599750">
    <state width="1031" height="417" key="GridCell.Tab.0.bottom" timestamp="1611726496121">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="417" key="GridCell.Tab.0.bottom/0.0.1536.824@0.0.1536.824" timestamp="1611711599750" />
    <state width="1031" height="417" key="GridCell.Tab.0.center" timestamp="1611711599750">
    <state width="1031" height="417" key="GridCell.Tab.0.bottom/0.0.1536.824@0.0.1536.824" timestamp="1611726496121" />
    <state width="1031" height="417" key="GridCell.Tab.0.center" timestamp="1611726496121">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="417" key="GridCell.Tab.0.center/0.0.1536.824@0.0.1536.824" timestamp="1611711599750" />
    <state width="1031" height="417" key="GridCell.Tab.0.left" timestamp="1611711599750">
    <state width="1031" height="417" key="GridCell.Tab.0.center/0.0.1536.824@0.0.1536.824" timestamp="1611726496121" />
    <state width="1031" height="417" key="GridCell.Tab.0.left" timestamp="1611726496120">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="417" key="GridCell.Tab.0.left/0.0.1536.824@0.0.1536.824" timestamp="1611711599750" />
    <state width="1031" height="417" key="GridCell.Tab.0.right" timestamp="1611711599750">
    <state width="1031" height="417" key="GridCell.Tab.0.left/0.0.1536.824@0.0.1536.824" timestamp="1611726496120" />
    <state width="1031" height="417" key="GridCell.Tab.0.right" timestamp="1611726496121">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="417" key="GridCell.Tab.0.right/0.0.1536.824@0.0.1536.824" timestamp="1611711599750" />
    <state width="1031" height="417" key="GridCell.Tab.1.bottom" timestamp="1611711599751">
    <state width="1031" height="417" key="GridCell.Tab.0.right/0.0.1536.824@0.0.1536.824" timestamp="1611726496121" />
    <state width="1031" height="417" key="GridCell.Tab.1.bottom" timestamp="1611726496121">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="417" key="GridCell.Tab.1.bottom/0.0.1536.824@0.0.1536.824" timestamp="1611711599751" />
    <state width="1031" height="417" key="GridCell.Tab.1.center" timestamp="1611711599750">
    <state width="1031" height="417" key="GridCell.Tab.1.bottom/0.0.1536.824@0.0.1536.824" timestamp="1611726496121" />
    <state width="1031" height="417" key="GridCell.Tab.1.center" timestamp="1611726496121">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="417" key="GridCell.Tab.1.center/0.0.1536.824@0.0.1536.824" timestamp="1611711599750" />
    <state width="1031" height="417" key="GridCell.Tab.1.left" timestamp="1611711599750">
    <state width="1031" height="417" key="GridCell.Tab.1.center/0.0.1536.824@0.0.1536.824" timestamp="1611726496121" />
    <state width="1031" height="417" key="GridCell.Tab.1.left" timestamp="1611726496121">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="417" key="GridCell.Tab.1.left/0.0.1536.824@0.0.1536.824" timestamp="1611711599750" />
    <state width="1031" height="417" key="GridCell.Tab.1.right" timestamp="1611711599750">
    <state width="1031" height="417" key="GridCell.Tab.1.left/0.0.1536.824@0.0.1536.824" timestamp="1611726496121" />
    <state width="1031" height="417" key="GridCell.Tab.1.right" timestamp="1611726496121">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="417" key="GridCell.Tab.1.right/0.0.1536.824@0.0.1536.824" timestamp="1611711599750" />
    <state width="1031" height="417" key="GridCell.Tab.2.bottom" timestamp="1611711599751">
    <state width="1031" height="417" key="GridCell.Tab.1.right/0.0.1536.824@0.0.1536.824" timestamp="1611726496121" />
    <state width="1031" height="417" key="GridCell.Tab.2.bottom" timestamp="1611726496121">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="417" key="GridCell.Tab.2.bottom/0.0.1536.824@0.0.1536.824" timestamp="1611711599751" />
    <state width="1031" height="417" key="GridCell.Tab.2.center" timestamp="1611711599751">
    <state width="1031" height="417" key="GridCell.Tab.2.bottom/0.0.1536.824@0.0.1536.824" timestamp="1611726496121" />
    <state width="1031" height="417" key="GridCell.Tab.2.center" timestamp="1611726496121">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="417" key="GridCell.Tab.2.center/0.0.1536.824@0.0.1536.824" timestamp="1611711599751" />
    <state width="1031" height="417" key="GridCell.Tab.2.left" timestamp="1611711599751">
    <state width="1031" height="417" key="GridCell.Tab.2.center/0.0.1536.824@0.0.1536.824" timestamp="1611726496121" />
    <state width="1031" height="417" key="GridCell.Tab.2.left" timestamp="1611726496121">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="417" key="GridCell.Tab.2.left/0.0.1536.824@0.0.1536.824" timestamp="1611711599751" />
    <state width="1031" height="417" key="GridCell.Tab.2.right" timestamp="1611711599751">
    <state width="1031" height="417" key="GridCell.Tab.2.left/0.0.1536.824@0.0.1536.824" timestamp="1611726496121" />
    <state width="1031" height="417" key="GridCell.Tab.2.right" timestamp="1611726496121">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="417" key="GridCell.Tab.2.right/0.0.1536.824@0.0.1536.824" timestamp="1611711599751" />
    <state width="1031" height="417" key="GridCell.Tab.2.right/0.0.1536.824@0.0.1536.824" timestamp="1611726496121" />
    <state x="299" y="67" key="Maven.ArtifactSearchDialog" timestamp="1610611848124">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
springcloud_k8s_panzhihuazhihuishequ/applets_backstage/src/main/java/com/panzhihua/applets_backstage/api/AdvertisingManagementApi.java
@@ -2,9 +2,11 @@
import com.panzhihua.common.interfaces.OperLog;
import com.panzhihua.common.model.dtos.advertisement.ComOpsAdvDTO;
import com.panzhihua.common.model.dtos.advertisement.PageComOpsAdvDTO;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.vos.advertisement.ComOpsAdvJumpVO;
import com.panzhihua.common.model.vos.advertisement.ComOpsAdvPosVO;
import com.panzhihua.common.model.vos.advertisement.ComOpsAdvVO;
import com.panzhihua.common.service.community.CommunityService;
import com.panzhihua.common.validated.AddGroup;
import io.swagger.annotations.Api;
@@ -89,4 +91,17 @@
    public R listadvjump(){
        return communityService.listAdvjump();
    }
    @ApiOperation(value = "分页查询广告",response = ComOpsAdvVO.class)
    @PostMapping("pageadvertisement")
    public R pageAdvertisement(@RequestBody PageComOpsAdvDTO pageComOpsAdvDTO){
        return communityService.pageAdvertisement(pageComOpsAdvDTO);
    }
    @ApiOperation(value = "广告详情",response = ComOpsAdvVO.class)
    @GetMapping("advertisement")
    public R detailAdvertisement(@RequestParam("id") Long id){
        return communityService.detailAdvertisement(id);
    }
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/advertisement/PageComOpsAdvDTO.java
New file
@@ -0,0 +1,47 @@
package com.panzhihua.common.model.dtos.advertisement;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.panzhihua.common.validated.AddGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.util.Date;
/**
 * @program: springcloud_k8s_panzhihuazhihuishequ
 * @description: 分页广告查询
 * @author: huang.hongfa weixin hhf9596 qq 959656820
 * @create: 2021-01-27 10:26
 **/
@Data
@ApiModel(value = "分页广告查询")
public class PageComOpsAdvDTO {
    @ApiModelProperty("广告位置id")
    private Long posId;
    @ApiModelProperty(value = "上架时间--开始",example = "2021-01-04 00:00:00")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date onAtBegin;
    @ApiModelProperty(value = "上架时间--结束",example = "2021-01-04 00:00:00")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date onAtEnd;
    @ApiModelProperty(value = "下架时间--开始",example = "2024-01-04 00:00:00")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date offAtBegin;
    @ApiModelProperty(value = "下架时间--结束",example = "2024-01-04 00:00:00")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date offAtEnd;
    @ApiModelProperty(value = "当前页数",example = "1")
    private Long pageNum;
    @ApiModelProperty(value = "每页记录数",example = "10")
    private Long pageSize;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/advertisement/ComOpsAdvVO.java
@@ -23,6 +23,9 @@
    @ApiModelProperty("广告位置id 1 表示放在首页")
    private Integer posId;
    @ApiModelProperty("广告位置名字")
    private String advDesc;
    @ApiModelProperty("图片路径")
    private String photoPath;
@@ -43,6 +46,9 @@
    @ApiModelProperty("跳转url地址")
    private String jumpUrl;
    @ApiModelProperty("跳转内容")
    private String jumpContent;
    @ApiModelProperty("新增时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createAt;
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/community/CommunityService.java
@@ -2,6 +2,7 @@
import com.panzhihua.common.model.dtos.AppletesBackstageConfigDTO;
import com.panzhihua.common.model.dtos.advertisement.ComOpsAdvDTO;
import com.panzhihua.common.model.dtos.advertisement.PageComOpsAdvDTO;
import com.panzhihua.common.model.dtos.community.*;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.vos.SystemmanagementConfigVO;
@@ -807,4 +808,20 @@
     */
    @PostMapping("putdiscusscommentuser")
    R putDiscussCommentUser(@RequestBody ComActDiscussCommentUserDTO comActDiscussUserDTO);
    /**
     * 分页查询广告
     * @param pageComOpsAdvDTO 查询内容
     * @return 查询结果 ComOpsAdvVO
     */
    @PostMapping("pageadvertisement")
    R pageAdvertisement(@RequestBody PageComOpsAdvDTO pageComOpsAdvDTO);
    /**
     * 广告详情
     * @param id 主键
     * @return 广告内容
     */
    @PostMapping("detailadvertisement")
    R detailAdvertisement(@RequestParam("id") Long id);
}
springcloud_k8s_panzhihuazhihuishequ/common/target/classes/com/panzhihua/common/model/dtos/advertisement/PageComOpsAdvDTO.class
Binary files differ
springcloud_k8s_panzhihuazhihuishequ/common/target/classes/com/panzhihua/common/model/vos/advertisement/ComOpsAdvVO.class
Binary files differ
springcloud_k8s_panzhihuazhihuishequ/common/target/classes/com/panzhihua/common/service/community/CommunityService.class
Binary files differ
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/AdvertisementApi.java
@@ -2,13 +2,11 @@
import com.panzhihua.common.model.dtos.AppletesBackstageConfigDTO;
import com.panzhihua.common.model.dtos.advertisement.ComOpsAdvDTO;
import com.panzhihua.common.model.dtos.advertisement.PageComOpsAdvDTO;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.service_community.service.ComOpsAdvService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
@@ -90,4 +88,24 @@
    public R listAdvjump(){
        return comOpsAdvService.listAdvjump();
    }
    /**
     * 分页查询广告
     * @param pageComOpsAdvDTO 查询内容
     * @return 查询结果 ComOpsAdvVO
     */
    @PostMapping("pageadvertisement")
    R pageAdvertisement(@RequestBody PageComOpsAdvDTO pageComOpsAdvDTO){
        return comOpsAdvService.pageAdvertisement(pageComOpsAdvDTO);
    }
    /**
     * 广告详情
     * @param id 主键
     * @return 广告内容
     */
    @PostMapping("detailadvertisement")
    public R detailAdvertisement(@RequestParam("id") Long id){
        return comOpsAdvService.detailAdvertisement(id);
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActEasyPhotoDAO.java
@@ -194,8 +194,8 @@
            "p.id,\n" +
            "u.`name` sponsor_name,\n" +
            "u.phone sponsor_phone,\n" +
            "count(pu.id)giveThumbsUpNum,\n" +
            "count(c.id)commentNum,\n" +
            "count(DISTINCT pu.id)giveThumbsUpNum,\n" +
            "count(DISTINCT c.id)commentNum,\n" +
            "u.image_url,\n" +
            "p.happen_addr,\n" +
            "su.`name` handler_name,\n" +
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComOpsAdvDAO.java
@@ -1,8 +1,15 @@
package com.panzhihua.service_community.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.panzhihua.common.model.dtos.advertisement.PageComOpsAdvDTO;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.vos.advertisement.ComOpsAdvVO;
import com.panzhihua.common.model.vos.community.ComMngStructOtherBuildVO;
import com.panzhihua.service_community.model.dos.ComOpsAdvDO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List;
@@ -33,4 +40,52 @@
            "jump_id IS NOT NULL \n" +
            "AND jump_id !=0")
    List<Long> selectAllBeUsedContent();
    @Select("<script> " +
            "SELECT \n" +
            "a.id,\n" +
            "a.photo_path,\n" +
            "po.adv_desc,\n" +
            "if(a.jump_url is null,p.jump_content,a.jump_url)jump_url,\n" +
            "a.on_at,\n" +
            "a.off_at,\n" +
            "a.create_at \n" +
            "FROM\n" +
            "com_ops_adv a \n" +
            "JOIN com_ops_adv_pos po on a.pos_id=po.id\n" +
            "LEFT JOIN com_ops_adv_jump p on a.jump_id=p.id\n" +
            " <where>" +
            "<if test='pageComOpsAdvDTO.posId != null and pageComOpsAdvDTO.posId != 0'>" +
            " and a.pos_id = #{pageComOpsAdvDTO.posId} \n" +
            " </if> " +
            "<if test='pageComOpsAdvDTO.onAtBegin != null  '>" +
            "AND a.on_at BETWEEN #{pageComOpsAdvDTO.onAtBegin} \n" +
            "AND #{pageComOpsAdvDTO.onAtEnd} \n" +
            " </if> " +
            "<if test='pageComOpsAdvDTO.offAtBegin != null  '>" +
            "AND a.off_at BETWEEN #{pageComOpsAdvDTO.offAtBegin} \n" +
            "AND #{pageComOpsAdvDTO.offAtEnd}"+
            " </if> " +
            " </where>" +
            "</script>")
    IPage<ComOpsAdvVO> pageAdvertisement(Page page, @Param("pageComOpsAdvDTO") PageComOpsAdvDTO pageComOpsAdvDTO);
    @Select("SELECT \n" +
            "a.id,\n" +
            "a.photo_path,\n" +
            "po.adv_desc,\n" +
            "a.jump_url,\n" +
            "p.jump_content,\n" +
            "a.pos_id,\n" +
            "a.link_type,\n" +
            "a.jump_id,\n" +
            "a.on_at,\n" +
            "a.off_at,\n" +
            "a.create_at \n" +
            "FROM\n" +
            "com_ops_adv a \n" +
            "JOIN com_ops_adv_pos po on a.pos_id=po.id\n" +
            "LEFT JOIN com_ops_adv_jump p on a.jump_id=p.id\n" +
            "WHERE\n" +
            "a.id=#{id} ")
    ComOpsAdvVO detailAdvertisement(Long id);
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComOpsAdvService.java
@@ -2,6 +2,7 @@
import com.panzhihua.common.model.dtos.AppletesBackstageConfigDTO;
import com.panzhihua.common.model.dtos.advertisement.ComOpsAdvDTO;
import com.panzhihua.common.model.dtos.advertisement.PageComOpsAdvDTO;
import com.panzhihua.common.model.vos.R;
/**
@@ -49,4 +50,16 @@
     * @return 跳转集合
     */
    R listAdvjump();
    /**
     * 分页查询广告
     * @param pageComOpsAdvDTO 查询内容
     * @return 查询结果 ComOpsAdvVO
     */
    R pageAdvertisement(PageComOpsAdvDTO pageComOpsAdvDTO);
    /**
     * 广告详情
     * @param id 主键
     * @return 广告内容
     */
    R detailAdvertisement(Long id);
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComOpsAdvServiceImpl.java
@@ -1,14 +1,18 @@
package com.panzhihua.service_community.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.panzhihua.common.exceptions.ServiceException;
import com.panzhihua.common.model.dtos.AppletesBackstageConfigDTO;
import com.panzhihua.common.model.dtos.advertisement.ComOpsAdvDTO;
import com.panzhihua.common.model.dtos.advertisement.ComOpsAdvJumpDTO;
import com.panzhihua.common.model.dtos.advertisement.PageComOpsAdvDTO;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.vos.advertisement.ComOpsAdvJumpVO;
import com.panzhihua.common.model.vos.advertisement.ComOpsAdvPosVO;
import com.panzhihua.common.model.vos.advertisement.ComOpsAdvVO;
import com.panzhihua.common.model.vos.community.ComMngStructOtherBuildVO;
import com.panzhihua.service_community.dao.ComOpsAdvDAO;
import com.panzhihua.service_community.dao.ComOpsAdvJumpDAO;
import com.panzhihua.service_community.dao.ComOpsAdvPosDAO;
@@ -186,4 +190,39 @@
        }
        return R.ok(comOpsAdvJumpVOS);
    }
    /**
     * 分页查询广告
     *
     * @param pageComOpsAdvDTO 查询内容
     * @return 查询结果 ComOpsAdvVO
     */
    @Override
    public R pageAdvertisement(PageComOpsAdvDTO pageComOpsAdvDTO) {
        Page page = new Page<>();
        Long pageNum = pageComOpsAdvDTO.getPageNum();
        Long pageSize = pageComOpsAdvDTO.getPageSize();
        if (null==pageNum||0==pageNum) {
            pageNum = 1l;
        }
        if (null==pageSize||0==pageSize) {
            pageSize = 10l;
        }
        page.setSize(pageSize);
        page.setCurrent(pageNum);
        IPage<ComOpsAdvVO> iPage = comOpsAdvDAO.pageAdvertisement(page, pageComOpsAdvDTO);
        return R.ok(iPage);
    }
    /**
     * 广告详情
     *
     * @param id 主键
     * @return 广告内容 ComOpsAdvVO
     */
    @Override
    public R detailAdvertisement(Long id) {
        ComOpsAdvVO comOpsAdvVO=comOpsAdvDAO.detailAdvertisement(id);
        return R.ok(comOpsAdvVO);
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java
@@ -413,7 +413,9 @@
            loginUserInfoVO.setComMngFamilyInfoVOS(comMngFamilyInfoVOS);
        }
        ComActVO comActVO=userDao.selectCommunity(loginUserInfoVO.getCommunityId());
        loginUserInfoVO.setCommunityName(comActVO.getName());
        if (!ObjectUtils.isEmpty(comActVO)) {
            loginUserInfoVO.setCommunityName(comActVO.getName());
        }
        return R.ok(loginUserInfoVO);
    }