Helius
2021-12-20 bda2b9375e9e7fbefe22fbc56b2ea85e9b12f9d7
Merge branch 'master' of http://120.27.238.55:7000/r/xc-video
5 files modified
113 ■■■■ changed files
pom.xml 17 ●●●● patch | view | raw | blame | history
src/main/java/cc/mrbird/febs/video/mapper/VideoHistoryMapper.java 2 ●●●●● patch | view | raw | blame | history
src/main/java/cc/mrbird/febs/video/service/impl/VideoMasterInfoServiceImpl.java 42 ●●●●● patch | view | raw | blame | history
src/main/resources/mapper/modules/VideoHistoryMapper.xml 3 ●●●●● patch | view | raw | blame | history
xc-video.iml 49 ●●●●● patch | view | raw | blame | history
pom.xml
@@ -27,7 +27,6 @@
    </properties>
    <dependencies>
        <dependency>
            <groupId>org.mapstruct</groupId>
            <artifactId>mapstruct</artifactId>
@@ -237,6 +236,14 @@
        </dependency>
        <dependency>
            <groupId>com.sunlight</groupId>
            <artifactId>tron-sdk</artifactId>
            <version>1.0-SNAPSHOT</version>
            <scope>system</scope>
            <systemPath>${basedir}/lib/tron-sdk-1.0.jar</systemPath>
        </dependency>
        <dependency>
            <groupId>org.tron.trident</groupId>
            <artifactId>abi</artifactId>
            <version>0.3.0</version>
@@ -257,14 +264,6 @@
            <version>0.3.0</version>
            <scope>system</scope>
            <systemPath>${basedir}/lib/core-0.3.0.jar</systemPath>
        </dependency>
        <dependency>
            <groupId>com.sunlight</groupId>
            <artifactId>tron-sdk</artifactId>
            <version>1.0-SNAPSHOT</version>
            <scope>system</scope>
            <systemPath>${basedir}/lib/tron-sdk-1.0.jar</systemPath>
        </dependency>
        <dependency>
src/main/java/cc/mrbird/febs/video/mapper/VideoHistoryMapper.java
@@ -9,4 +9,6 @@
public interface VideoHistoryMapper extends BaseMapper<VideoHistoryEntity> {
    int delVideoHistoryByIdsAndMemberId(@Param("list")List<String> idList, @Param("memberId")Long id);
    VideoHistoryEntity selectByMemberIdAndVideoId(@Param("memberId") Long memberId, @Param("videoId") Long videoId);
}
src/main/java/cc/mrbird/febs/video/service/impl/VideoMasterInfoServiceImpl.java
@@ -179,19 +179,6 @@
        videoInfoVo.setCollectCnt(data.getCollectCnt());
        videoInfoVo.setStarCnt(data.getStarCnt());
        if (AppContants.FLAG_INT_N.equals(videoInfoEntity.getIsFree())) {
            if (loginUser == null) {
                videoInfoVo.setNotLogin(AppContants.FLAG_INT_N);
                return videoInfoVo;
            }
            VideoMemberEntity member = this.videoMemberMapper.selectById(loginUser.getId());
            if (AppContants.FLAG_INT_N.equals(member.getIsVip())) {
                videoInfoVo.setNotVip(AppContants.FLAG_INT_N);
                return videoInfoVo;
            }
        }
        if (loginUser != null) {
            VideoCommentLikeEntity commentLike = this.videoCommentLikeMapper.selectCommentLikeByMemberIdAndRelateId(loginUser.getId(), videoInfoEntity.getId());
            if (commentLike != null) {
@@ -208,6 +195,20 @@
            }
        }
        if (AppContants.FLAG_INT_N.equals(videoInfoEntity.getIsFree())) {
            if (loginUser == null) {
                videoInfoVo.setNotLogin(AppContants.FLAG_INT_N);
                return videoInfoVo;
            }
            VideoMemberEntity member = this.videoMemberMapper.selectById(loginUser.getId());
            if (AppContants.FLAG_INT_N.equals(member.getIsVip())) {
                videoInfoVo.setNotVip(AppContants.FLAG_INT_N);
                return videoInfoVo;
            }
        }
        VideoMasterItemsEntity currentItem = this.videoMasterItemsMapper.selectItemByVideoIdAndItemId(videoId, itemId);
        if (currentItem == null) {
            throw new FebsException("视频不存在");
@@ -220,6 +221,21 @@
        videoInfoVo.setThumb(currentItem.getThumb());
        videoInfoVo.setItemId(currentItem.getId());
        videoInfoVo.setTimeLength(currentItem.getTimeLength());
        if (loginUser != null) {
            VideoHistoryEntity history = this.videoHistoryMapper.selectByMemberIdAndVideoId(loginUser.getId(), videoInfoEntity.getId());
            if (history == null) {
                history = new VideoHistoryEntity();
                history.setVideoId(videoInfoEntity.getId());
                history.setMemberId(loginUser.getId());
                history.setVideoItemId(currentItem.getId());
                this.videoHistoryMapper.insert(history);
            } else {
                history.setVideoItemId(currentItem.getId());
                this.videoHistoryMapper.updateById(history);
            }
        }
        return videoInfoVo;
    }
src/main/resources/mapper/modules/VideoHistoryMapper.xml
@@ -13,4 +13,7 @@
    </delete>
    <select id="selectByMemberIdAndVideoId" resultType="cc.mrbird.febs.video.entity.VideoHistoryEntity">
        select * from video_history where member_id=#{memberId} and video_id=#{videoId}
    </select>
</mapper>
xc-video.iml
@@ -168,5 +168,54 @@
    <orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-metadata:1.2.0.RELEASE" level="project" />
    <orderEntry type="library" name="Maven: io.springfox:springfox-swagger-ui:2.9.2" level="project" />
    <orderEntry type="library" name="Maven: xml-apis:xml-apis:1.4.01" level="project" />
    <orderEntry type="library" name="Maven: com.github.javen205:IJPay-AliPay:2.7.8" level="project" />
    <orderEntry type="library" name="Maven: com.alipay.sdk:alipay-sdk-java:4.16.50.ALL" level="project" />
    <orderEntry type="library" name="Maven: org.bouncycastle:bcprov-jdk15on:1.62" level="project" />
    <orderEntry type="library" name="Maven: cn.hutool:hutool-crypto:5.7.13" level="project" />
    <orderEntry type="library" name="Maven: cn.hutool:hutool-core:5.7.13" level="project" />
    <orderEntry type="library" name="Maven: cn.hutool:hutool-http:5.7.13" level="project" />
    <orderEntry type="library" name="Maven: cn.hutool:hutool-json:5.7.13" level="project" />
    <orderEntry type="module-library">
      <library name="Maven: com.sunlight:tron-sdk:1.0-SNAPSHOT">
        <CLASSES>
          <root url="jar://$MODULE_DIR$/lib/tron-sdk-1.0.jar!/" />
        </CLASSES>
        <JAVADOC />
        <SOURCES />
      </library>
    </orderEntry>
    <orderEntry type="module-library">
      <library name="Maven: org.tron.trident:abi:0.3.0">
        <CLASSES>
          <root url="jar://$MODULE_DIR$/lib/abi-0.3.0.jar!/" />
        </CLASSES>
        <JAVADOC />
        <SOURCES />
      </library>
    </orderEntry>
    <orderEntry type="module-library">
      <library name="Maven: org.tron.trident:utils:0.3.0">
        <CLASSES>
          <root url="jar://$MODULE_DIR$/lib/utils-0.3.0.jar!/" />
        </CLASSES>
        <JAVADOC />
        <SOURCES />
      </library>
    </orderEntry>
    <orderEntry type="module-library">
      <library name="Maven: org.tron.trident:core:0.3.0">
        <CLASSES>
          <root url="jar://$MODULE_DIR$/lib/core-0.3.0.jar!/" />
        </CLASSES>
        <JAVADOC />
        <SOURCES />
      </library>
    </orderEntry>
    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-amqp:2.2.5.RELEASE" level="project" />
    <orderEntry type="library" name="Maven: org.springframework:spring-messaging:5.2.4.RELEASE" level="project" />
    <orderEntry type="library" name="Maven: org.springframework.amqp:spring-rabbit:2.2.5.RELEASE" level="project" />
    <orderEntry type="library" name="Maven: com.rabbitmq:amqp-client:5.7.3" level="project" />
    <orderEntry type="library" name="Maven: org.springframework.amqp:spring-amqp:2.2.5.RELEASE" level="project" />
    <orderEntry type="library" name="Maven: org.springframework.retry:spring-retry:1.2.5.RELEASE" level="project" />
  </component>
</module>