Prechádzať zdrojové kódy

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

zhengjinyi 1 rok pred
rodič
commit
93a4ef76e5

+ 8 - 0
src/main/java/com/caimei/www/controller/RedirectController.java

@@ -129,6 +129,14 @@ public class RedirectController {
     public String activityTopics3(@PathVariable("id") Integer id) {
         return "redirect:/product/beauty-" + id + ".html";
     }
+    /**
+     * 快捷运营
+     */
+    @GetMapping("/cmpage/info-9-{id}.html")
+    public String activityTopics9(@PathVariable("id") Integer id) {
+        return "redirect:/quickOperation/operation-" + id + ".html";
+    }
+
 
     /**
      * 专题活动列表页【旧】

+ 10 - 0
src/main/java/com/caimei/www/controller/unlimited/ProductController.java

@@ -369,6 +369,16 @@ public class ProductController extends BaseController {
         model.addAttribute("pageId", id);
         return CLOUD_BEAUTY_PATH;
     }
+    @GetMapping("/quickOperation/operation-{id}.html")
+    public String quickOperation(final Model model, @PathVariable("id") Integer id) {
+        // 活动专题页
+        Integer pageId = singlePageService.getBeautyPageIdById(id);
+        if (pageId == null) {
+            return super.errorPath();
+        }
+        model.addAttribute("pageId", id);
+        return CLOUD_BEAUTY_PATH;
+    }
 
     /**
      * 优惠券说明页

+ 1 - 1
src/main/java/com/caimei/www/mapper/BaseDao.java

@@ -24,7 +24,7 @@ public interface BaseDao {
     /**
      * 获取头部菜单
      */
-    List<TopMenu> getTopMenus();
+    List<TopMenu> getTopMenus(@Param("type") Integer type);
 
     /**
      * 获取底部链接分类

+ 1 - 1
src/main/java/com/caimei/www/service/page/impl/BaseServiceImpl.java

@@ -58,7 +58,7 @@ public class BaseServiceImpl implements BaseService {
     @Override
     @Cacheable(value = "getNavMenu", key="'www'", unless="#result == null")
     public List<TopMenu> getNavMenu() {
-        List<TopMenu> menuList = baseDao.getTopMenus();
+        List<TopMenu> menuList = baseDao.getTopMenus(0);
 //        menuList.forEach(item -> {
 //            String link = item.getLink();
 //            if (!StringUtils.isEmpty(link)) {

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

@@ -18,6 +18,10 @@
             sort
 		from new_page_first_navigation
 		where wwwEnabledStatus='1' and delFlag = 0
+        <if test="type != null and type != ''">
+            <if test="type == 0 and type ==0">and (type = 0 or type is null )</if>
+            <if test="type != 0 and type !=0">and type = #{type}</if>
+        </if>
 		order by sort asc,createDate desc
 		limit 8
     </select>

+ 1 - 1
src/main/resources/mapper/SinglePageMapper.xml

@@ -122,7 +122,7 @@
     <select id="getBeautyPageIdById" resultType="java.lang.Integer">
         select id
         from cm_page a
-        where a.type = 7
+        where (a.type = 7 or a.type = 9)
           and a.enabledStatus = 1
           and a.id = #{id}
     </select>