Bläddra i källkod

活动落地页页面开发

anderx 7 år sedan
förälder
incheckning
c27f6bfd41

+ 37 - 4
src/main/java/com/goafanti/common/controller/PortalController.java

@@ -13,15 +13,20 @@ import org.springframework.web.bind.annotation.ResponseBody;
 import org.springframework.web.servlet.ModelAndView;
 import org.springframework.web.servlet.view.RedirectView;
 
+import com.alibaba.fastjson.JSON;
 import com.goafanti.achievement.bo.AchievementPartnerListBo;
 import com.goafanti.achievement.service.AchievementService;
+import com.goafanti.business.bo.JtBusinessProjectResult;
 import com.goafanti.business.service.JtBusinessService;
 import com.goafanti.common.bo.Result;
 import com.goafanti.common.enums.AchievementMaturity;
+import com.goafanti.common.model.JtBusinessProject;
+import com.goafanti.common.model.JtVoucher;
 import com.goafanti.common.model.UserInterest;
 import com.goafanti.common.service.DistrictGlossoryService;
 import com.goafanti.common.service.FieldGlossoryService;
 import com.goafanti.common.utils.StringUtils;
+import com.goafanti.core.mybatis.page.Pagination;
 import com.goafanti.core.shiro.token.TokenManager;
 import com.goafanti.demand.service.DemandInterestService;
 import com.goafanti.demand.service.DemandService;
@@ -30,6 +35,8 @@ import com.goafanti.user.bo.UserPartnerDetailBo;
 import com.goafanti.user.service.UserIdentityService;
 import com.goafanti.user.service.UserInterestService;
 import com.goafanti.user.service.UserService;
+import com.goafanti.voucher.bo.JtVoucherListBo;
+import com.goafanti.voucher.service.VoucherService;
 
 @Controller
 public class PortalController extends BaseController {
@@ -50,11 +57,13 @@ public class PortalController extends BaseController {
 	@Resource
 	private DistrictGlossoryService districtglossoryservice;
 	@Resource
-	OrderService	orderService;
+	private OrderService	orderService;
 	@Resource
-	UserInterestService userInterestService;
+	private UserInterestService userInterestService;
 	@Resource
-	JtBusinessService	jtBusinessService;
+	private JtBusinessService	jtBusinessService;
+	@Resource
+	private VoucherService	voucherService;
 
 	@RequestMapping(value = "/index", method = RequestMethod.GET)
 	public ModelAndView index(HttpServletRequest request, ModelAndView modelview) {
@@ -152,5 +161,29 @@ public class PortalController extends BaseController {
 
 	}
 	
-	
+	@SuppressWarnings("unchecked")
+	@RequestMapping(value="/portal/invRegister",method = RequestMethod.GET)
+	public ModelAndView portalActivityDetails(ModelAndView modelAndView){
+		modelAndView.setViewName("/portal/invRegister");
+		//随机项目抵用券
+		List<JtVoucherListBo> list=voucherService.selectVoucherByClassify( null,null, 4);
+		for (JtVoucherListBo j : list) {
+			System.out.println(j.getMoney());
+		}
+		modelAndView.addObject("vouchers",list);
+		//高企服务
+		modelAndView.addObject( "gqfw",jtBusinessService.getKJListByIds(2, 0, 2));
+		//随机热门项目
+		Pagination<JtBusinessProjectResult> p=jtBusinessService.getProjects(null,null,null,null, 3,1,null,2,null,1,null,null,null);
+		modelAndView.addObject("hotProject", (List<JtBusinessProjectResult>) p.getList());
+		//军民融合
+		modelAndView.addObject( "jmrh",jtBusinessService.getKJListByIds(3, 0, 3));
+		//知识产权
+		modelAndView.addObject( "zscq",jtBusinessService.getKJListByIds(1, 0, 3));
+		//政府扶持
+		modelAndView.addObject( "zffc",jtBusinessService.getProjectByTag("政府扶持", 4));
+		
+		
+		return modelAndView;
 	}
+}

+ 0 - 2
src/main/java/com/goafanti/common/controller/PublicController.java

@@ -798,8 +798,6 @@ public class PublicController extends BaseController {
 			for (String s : l) {
 				if (s.equals(jt.getId())) {
 					jt.setIsGet(1);
-				}else {
-					jt.setIsGet(0);
 				}
 				
 			}

+ 4 - 0
src/main/java/com/goafanti/common/dao/JtVoucherMapper.java

@@ -2,6 +2,8 @@ package com.goafanti.common.dao;
 
 import com.goafanti.common.model.JtVoucher;
 import com.goafanti.common.model.JtVoucherExample;
+import com.goafanti.voucher.bo.JtVoucherListBo;
+
 import java.util.List;
 import org.apache.ibatis.annotations.Param;
 
@@ -74,4 +76,6 @@ public interface JtVoucherMapper {
 	int updateByPrimaryKey(JtVoucher record);
 
 	List<String> getSourceVoucher(Integer source);
+
+	List<JtVoucherListBo> selectVoucherByClassify(@Param("name")String name, @Param("isHot")Integer isHot,@Param("size")Integer size);
 }

+ 1 - 0
src/main/java/com/goafanti/common/mapper/JtBusinessProjectMapper.xml

@@ -877,6 +877,7 @@
 	  	p.name,
 	  	p.introduce,
 	  	p.min_img_url as minImgUrl,
+	  	p.price,
 	  	p.advertisement
   	from jt_business_project p
     left join jt_business_category c on p.category_id = c.id

+ 15 - 0
src/main/java/com/goafanti/common/mapper/JtVoucherMapper.xml

@@ -401,5 +401,20 @@
   <select id="getSourceVoucher" resultType="java.lang.String">
   	select id from jt_voucher where active_state=1 and source= #{source,jdbcType=INTEGER}
   </select>
+  <select id="selectVoucherByClassify" resultType="com.goafanti.voucher.bo.JtVoucherListBo">
+  select a.id,a.name,a.source,a.active_state as activeState,a.money,a.duration_day as durationDay,
+  a.granting_uid as grantingUid,a.limit_use as limitUse,a.limit_project_id as limitProjectId
+    from jt_voucher a
+    left join jt_business_project b on a.limit_project_id=b.id
+    left join jt_business_category c on b.category_id=c.id
+    where a.source=4 and a.active_state=1
+    <if test="name != null">
+    and c.name= #{name,jdbcType=VARCHAR}
+    </if>
+    <if test="isHot != null">
+    and b.is_hot= #{isHot,jdbcType=VARCHAR}
+    </if>
+    limit #{size,jdbcType=INTEGER}
+  </select>
   
 </mapper>

+ 3 - 0
src/main/java/com/goafanti/voucher/bo/JtVoucherListBo.java

@@ -30,6 +30,9 @@ public class JtVoucherListBo {
 			this.source = source;
 		}
 		public String getMoney() {
+			if (this.money != null) {
+				return money.split("\\.")[0];
+			}
 			return money;
 		}
 		public void setMoney(String money) {

+ 2 - 0
src/main/java/com/goafanti/voucher/service/VoucherService.java

@@ -19,4 +19,6 @@ public interface VoucherService {
 	
 	
 	List<String> getSourceVoucher(Integer source);
+
+	List<JtVoucherListBo> selectVoucherByClassify(String name, Integer isHot,Integer size);
 }

+ 7 - 0
src/main/java/com/goafanti/voucher/service/impl/VoucherServiceImpl.java

@@ -72,4 +72,11 @@ public class VoucherServiceImpl extends BaseMybatisDao<JtVoucherMapper> implemen
 		return jtVoucherMapper.getSourceVoucher(source);
 	}
 
+	@Override
+	public List<JtVoucherListBo> selectVoucherByClassify(String name,Integer isHot, Integer size) {
+		List<JtVoucherListBo> list=jtVoucherMapper.selectVoucherByClassify( name,  isHot, size);
+		
+		return list; 
+	}
+
 }

+ 1 - 1
src/main/webapp/WEB-INF/views/portal/facilitator.html

@@ -25,7 +25,7 @@
     		</div>
     	</div>
     	<div class="facTab">
-    		<span class="facActive">所有项目</span>
+    		<span>所有项目</span>
     		<span>主页</span>
     		<span>点我领劵</span>
     	</div>

+ 172 - 0
src/main/webapp/WEB-INF/views/portal/invRegister.html

@@ -0,0 +1,172 @@
+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml"
+	xmlns:th="http://www.thymeleaf.org"
+	xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
+<head th:replace="common::header(~{::title},~{::link})">
+    <meta charset="UTF-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <meta http-equiv="X-UA-Compatible" content="ie=edge">
+    <title>优惠活动</title>
+<link th:href="${portalHost+'/dll/dll.css'}" rel="stylesheet">
+<link th:href="${portalHost+'/vendors.css'}" rel="stylesheet">
+<link th:href="${portalHost+'/newMenu/invRegister.css'}" rel="stylesheet"></head>
+
+<body>
+	<div th:replace="common::nav('','')"></div>
+    <!-- 公共头部结束 -->
+    <div class="continueHighBanner">
+        <a href=""><img th:src="${portalHost+'/img/load/invR_banner.png'}" alt=""></a>
+    </div>
+    <div class="container invRegister">
+        <div class="topList">
+            <ul>
+                <li th:each="v:${vouchers}">
+                   <a th:href="@{'/portal/facilitatorDetails?uid='+${v.grantingUid}+'#2'}">
+                   	  
+                       <span th:text="'抵用券有效期:'+${v.durationDay}+'天'">2018.01.10-2018.02.20</span>
+                       <h1><span th:text="${v.money}">> 500</span><sup>优惠劵</sup></h1>
+                       <p  th:text="${v.name}"></p>
+                   </a>    
+                </li>
+            </ul>
+        </div>   
+        <div class="invTitle">
+            <h2>企业必备</h2>
+        </div>
+        <div class="inVqiY">
+            <div th:each="g:${gqfw}">
+                <h3>2019</h3>
+                <h1 th:text="${g.name}"></h1>
+                <p th:text="${g.advertisement}"></p>
+                <span>¥<span th:text="${g.price}"></span> 起</span><br />
+                <a th:href="@{/portal/service/serviceDetail?(id=${g.id})}">立即办理</a>
+            </div>
+        </div>
+    </div>
+    <div class="invR_gaoQ">
+        <div>
+            <img src="http://192.168.0.188/portal/1.0.1/img/load/invR_55.png" alt="">
+        </div>
+    </div>
+    <div class="container">
+        <div class="invTitle">
+            <h2>热门项目</h2>
+        </div>
+        <div class="hot_InvR">
+            <ul>
+                <li  th:each="p:${hotProject}">
+                    <a th:href="@{/portal/service/patentDetail?(id=${p.id})}">
+                        <div>
+                            <p  th:text="${p.name}">一句话营销营销</p>
+                        </div>
+                        <p th:text="${p.advertisement}">一句话营销</p>
+                        <h4>¥<span th:text="${p.price}">2000</span>起</h4>
+                    </a>
+                </li>
+            </ul>
+        </div>
+        <div class="invTitle">
+            <h2>军民融合</h2>
+        </div>
+    </div>
+    <div class="civilian">
+            <div class="hot_InvR invR_junM container">
+                <ul>
+                    <li th:each="jm:${jmrh}">
+                        <a th:href="@{/portal/service/serviceDetail?(id=${jm.id})}">
+                            <div>
+                                <p th:text="${jm.name}">武器装备科研生产保密资格认证</p>
+                            </div>
+                            <p th:text="${jm.advertisement}">一句话营销</p>
+                            <h4>¥<span th:text="${jm.price}">2000</span>起</h4>
+                        </a>
+                    </li>
+                </ul>
+        </div>
+    </div>
+    <div class="container">
+        <div class="invTitle">
+            <h2>知识产权</h2>
+        </div>
+        <div class="hot_InvR">
+            <ul>
+                <li th:each="zs:${zscq}">
+                    <a th:href="@{/portal/service/patentDetail?(id=${zs.id})}">
+                        <div>
+                            <p th:text="${zs.name}">一句话营销营销</p>
+                        </div>
+                        <p th:text="${zs.advertisement}">一句话营销</p>
+                       <h4>¥<span th:text="${zs.price}">2000</span>起</h4>
+                    </a>
+                </li>
+            </ul>
+        </div>
+        <div class="invTitle invRFuC">
+            <h2>政府扶持</h2>
+        </div>
+    </div>
+    <div class="FcList_wrap">
+        <div class="FcList">
+            <ul>
+                <li th:each="zf:${zffc}">
+                     <a th:href="@{/portal/service/serviceDetail?(id=${zf.id})}">
+                        <p th:text="${zf.name}">一句话营销营销</p>
+                        <div>
+                        <span th:text="${zf.advertisement}">一句话营销</span>
+                       <h4> <img th:src="${portalHost+'/img/load/invR_rmb.png'}" alt=""><span th:text="${zf.price}">2000</span>起</h4>
+                       </div>
+                    </a>
+                </li>
+            </ul>
+        </div>
+    </div>
+    <div class="serviceW">
+        <p>我们的服务网点:</p>
+        <ul>
+            <li>北京</li>
+            <li>石家庄</li>
+            <li>郑州</li>
+            <li>济南</li>
+            <li>沈阳</li>
+            <li>大连</li>
+            <li>长春</li>
+            <li>内蒙古</li>
+            <li>南京</li>
+            <li>合肥</li>
+            <li>武汉</li>
+            <li>湖南</li>
+            <li>南昌</li>
+            <li>成都</li>
+            <li>贵州</li>
+            <li>昆明</li>
+            <li>广西</li>
+            <li>广州</li>
+            <li>福州</li>
+            <li>西藏</li>
+        </ul> 
+    </div>
+    <div class="advantage">
+        <div class="advantageTxt">
+            <p>我们的优势:</p>
+            <ul>
+                <li>A、17年信誉保证 历史通过率高达96.8%</li>
+                <li>B、全程一对一专人对接跟踪服务</li>
+                <li>C、未通过,可免费重新申请或退款</li>
+            </ul>
+        </div>
+    </div>
+    <div class="consultation">
+        <a onclick="openZoosUrl('chatwin');">立即咨询</a>
+    </div>
+    
+		<footer>
+		<div th:replace="common::copyright"></div>
+		<div th:replace="common::login"></div>
+	</footer>
+	<div th:replace="common::footer(~{::script})">
+<script type="text/javascript" th:src="${portalHost+'/dll/dll.js'}"></script>
+<script type="text/javascript" th:src="${portalHost+'/vendors.js'}"></script>
+<script type="text/javascript" th:src="${portalHost+'/newMenu/invRegister.js'}"></script>
+</div>
+</body>
+</html>