Sfoglia il codice sorgente

过期代码清除

zhijiezhao 1 anno fa
parent
commit
7370f22a7f

+ 0 - 4
src/main/java/com/caimei365/user/mapper/ClubMapper.java

@@ -262,10 +262,6 @@ public interface ClubMapper {
      */
     Integer getUserCouponCount(Integer userId);
 
-    List<AdvertiseVo> getUserAdvertiseList(AdvertiseVo advertiseVo);
-
-    List<InformationVo> getInformationList(InformationVo informationVo);
-
     void insertQuestionMan(VisitorRemarkVo visitor);
 
     List<VisitorRemarkVo> getVisitorList(Integer serviceProviderId);

+ 0 - 61
src/main/java/com/caimei365/user/service/impl/ClubServiceImpl.java

@@ -1649,67 +1649,6 @@ public class ClubServiceImpl implements ClubService {
         // 6.优惠券可用数量
         Integer couponNum = clubMapper.getUserCouponCount(userId);
         result.put("couponNum", couponNum);
-        // 7.今日推荐
-        int floorId = 6;
-        int index = 1;
-        String homeAdvertiseKey = "user_advertise_" + floorId;
-        if (!redisService.exists(homeAdvertiseKey)) {
-            AdvertiseVo homePageAdvertise = new AdvertiseVo();
-            homePageAdvertise.setAdvertiseTypeId(1001);
-            homePageAdvertise.setTypeId(floorId);
-            homePageAdvertise.setValidFlag("1");
-            List<AdvertiseVo> list = clubMapper.getUserAdvertiseList(homePageAdvertise);
-            for (AdvertiseVo advertise : list) {
-                advertise.setImage(ImageUtils.getImageURL("homePageImages", advertise.getImage(), 0, wwwDomain));
-            }
-            redisService.setList(homeAdvertiseKey, list);
-        }
-        int pageSize = 4;
-        int totalRecord = (int) redisService.listSize(homeAdvertiseKey);
-        int total = totalRecord % pageSize == 0 ? totalRecord / pageSize : totalRecord / pageSize + 1;
-        if (index > total) {
-            index = index % total;
-        }
-        int begin = (index - 1) * pageSize;
-        int end = index * pageSize - 1;
-        //避免unchecked cast warning
-        List<AdvertiseVo> list = new ArrayList<>();
-        Object advertiseObj = redisService.getList(homeAdvertiseKey, begin, end);
-        if (advertiseObj instanceof ArrayList<?>) {
-            for (Object o : (List<?>) advertiseObj) {
-                list.add((AdvertiseVo) o);
-            }
-        }
-        result.put("homePageAdvertiseList", list);
-        // 8.最新动态
-        String informationKey = "home_info_" + floorId;
-        redisService.remove(informationKey);
-        if (!redisService.exists(informationKey)) {
-            InformationVo info = new InformationVo();
-            info.setInfoTypeId(1);
-            info.setValidFlag("1");
-            List<InformationVo> infoList = clubMapper.getInformationList(info);
-            infoList.forEach(information -> information.setLink("/info/detail-" + information.getInformationId() + "-1.html"));
-            redisService.setList(informationKey, infoList);
-        }
-        int infoIndex = 1;
-        int infoPageSize = 5;
-        int totalInfoRecord = (int) redisService.listSize(informationKey);
-        int totalInfo = totalInfoRecord % infoPageSize == 0 ? totalInfoRecord / infoPageSize : totalInfoRecord / infoPageSize + 1;
-        if (infoIndex > totalInfo) {
-            infoIndex = infoIndex % totalInfo;
-        }
-        int infoBegin = (infoIndex - 1) * infoPageSize;
-        int infoEnd = infoIndex * infoPageSize - 1;
-        List<InformationVo> infoList = new ArrayList<>();
-        Object infoObj = redisService.getList(informationKey, infoBegin, infoEnd);
-        if (infoObj instanceof ArrayList<?>) {
-            for (Object o : (List<?>) infoObj) {
-                infoList.add((InformationVo) o);
-            }
-        }
-        result.put("homePageInfoList", infoList);
-
         return ResponseJson.success(result);
     }
 

+ 0 - 29
src/main/resources/mapper/ClubMapper.xml

@@ -512,35 +512,6 @@
                     , DATE_ADD(a.createDate
                              , INTERVAL cc.usePeriod DAY)))
     </select>
-    <select id="getUserAdvertiseList" resultType="com.caimei365.user.model.vo.AdvertiseVo">
-        SELECT image, link, title
-        FROM c_homepageadvertise
-        <where>
-            <if test="advertiseTypeId != null">
-                AND advertiseTypeID = #{advertiseTypeId}
-            </if>
-            <if test="typeId != null">
-                AND typeID = #{typeId}
-            </if>
-            <if test="validFlag != null">
-                AND validFlag = #{validFlag}
-            </if>
-        </where>
-        ORDER BY sortIndex DESC
-    </select>
-    <select id="getInformationList" resultType="com.caimei365.user.model.vo.InformationVo">
-        SELECT informationID AS informationId, title, link, addTime
-        FROM information
-        <where>
-            <if test="infoTypeId != null">
-                AND infoTypeID = #{infoTypeId}
-            </if>
-            <if test="validFlag != null">
-                AND validFlag = #{validFlag}
-            </if>
-        </where>
-        ORDER BY informationID DESC
-    </select>
     <select id="getVisitorList" resultType="com.caimei365.user.model.vo.VisitorRemarkVo">
         SELECT questionManId, serviceProviderId, addTime as addDate, questionMan, consultType as consult
         FROM cm_visitor_remarks