Explorar el Código

Merge remote-tracking branch 'origin/test'

Conflicts:
	src/main/java/com/goafanti/common/controller/PortalController.java
limin hace 7 años
padre
commit
e9da03c34d

+ 1 - 2
GeneratorConfig.xml

@@ -10,7 +10,6 @@
    <javaModelGenerator targetPackage="com.goafanti.common.model" targetProject="jitao-server" />
    <sqlMapGenerator targetPackage="com.goafanti.common.mapper" targetProject="jitao-server" />
    <javaClientGenerator targetPackage="com.goafanti.common.dao" targetProject="jitao-server" type="XMLMAPPER" />
-   <table schema="aft" tableName="jt_voucher"/>
-   <table schema="aft" tableName="jt_voucher_detail"/>
+   <table schema="aft" tableName="jt_video"/>
   </context>
 </generatorConfiguration>

+ 3 - 0
src/main/java/com/goafanti/admin/controller/AdminApiController.java

@@ -440,4 +440,7 @@ public class AdminApiController extends CertifyApiController {
 		res.setData(userService.getUserInfo(user, pageNo, pageSize));
 		return res;
 	}
+	
+	
+	
 }

+ 0 - 1
src/main/java/com/goafanti/app/controller/AppDiscoveryController.java

@@ -10,7 +10,6 @@ import com.goafanti.achievement.service.AchievementInterestService;
 import com.goafanti.achievement.service.AchievementService;
 import com.goafanti.common.bo.Result;
 import com.goafanti.common.constant.ErrorConstants;
-import com.goafanti.common.controller.BaseApiController;
 import com.goafanti.common.controller.CertifyApiController;
 import com.goafanti.common.utils.StringUtils;
 import com.goafanti.demand.service.DemandService;

+ 1 - 8
src/main/java/com/goafanti/app/controller/AppUserController.java

@@ -45,7 +45,6 @@ import com.goafanti.common.model.User;
 import com.goafanti.common.service.FieldGlossoryService;
 import com.goafanti.common.utils.DateUtils;
 import com.goafanti.common.utils.PasswordUtil;
-import com.goafanti.common.utils.VerifyCodeUtils;
 import com.goafanti.core.mybatis.page.Pagination;
 import com.goafanti.core.shiro.token.TokenManager;
 import com.goafanti.demand.bo.InputDemand;
@@ -609,13 +608,7 @@ public class AppUserController extends CertifyApiController {
 		
 	}
 	
-	private void cleanCodeSession() {
-		VerifyCodeUtils.clearResetCode();
-		VerifyCodeUtils.clearResetCodeTime();
-		VerifyCodeUtils.clearMobileCode();
-		VerifyCodeUtils.clearMobileCodeTime();
-	}
-	
+
 	/*APP我的订单列表
 	 * userType-----0-购买者   1-出售者  2-管理员
 	 * 

+ 0 - 1
src/main/java/com/goafanti/app/controller/OpenAppHomeController.java

@@ -19,7 +19,6 @@ import com.goafanti.comment.service.CommentService;
 import com.goafanti.common.bo.Result;
 import com.goafanti.common.constant.ErrorConstants;
 import com.goafanti.common.controller.BaseApiController;
-import com.goafanti.common.model.JtBusinessCategory;
 import com.goafanti.common.service.GlobalSearchService;
 import com.goafanti.common.utils.StringUtils;
 import com.goafanti.demand.service.DemandService;

+ 0 - 1
src/main/java/com/goafanti/common/controller/BaseApiController.java

@@ -3,7 +3,6 @@ package com.goafanti.common.controller;
 import java.io.File;
 import java.io.FileOutputStream;
 import java.io.IOException;
-import java.io.InputStream;
 import java.io.OutputStream;
 import java.util.ArrayList;
 import java.util.Iterator;

+ 2 - 1
src/main/java/com/goafanti/common/controller/PortalController.java

@@ -222,7 +222,7 @@ public class PortalController extends BaseController {
 		
 		return modelAndView;
 	}
-	
+	
 	@RequestMapping(value="/portal/video",method = RequestMethod.GET)
 	public ModelAndView video(ModelAndView modelAndView){
 		modelAndView.setViewName("/portal/video/video");
@@ -237,4 +237,5 @@ public class PortalController extends BaseController {
 		result.setData(adminVideoService.getVideoList(video, pageNo, pageSize,2));
 		return result;
 	}
+
 }

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

@@ -6,7 +6,9 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
 import java.util.Date;
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 import java.util.UUID;
 
 import javax.annotation.Resource;
@@ -21,6 +23,7 @@ import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.servlet.ModelAndView;
 
 import com.goafanti.achievement.service.AchievementService;
 import com.goafanti.business.bo.JtBusinessProjectResult;
@@ -32,6 +35,7 @@ import com.goafanti.comment.service.CommentService;
 import com.goafanti.common.bo.Result;
 import com.goafanti.common.constant.ErrorConstants;
 import com.goafanti.common.enums.UserType;
+import com.goafanti.common.model.JtBusinessProject;
 import com.goafanti.common.model.JtVoucherDetail;
 import com.goafanti.common.model.User;
 import com.goafanti.common.service.DistrictGlossoryService;
@@ -814,4 +818,79 @@ public class PublicController extends BaseController {
 		res.data(voucherDetailService.saveUserGetVoucher(uid,vid));
 		return res;
 	}
+	
+	/**
+	 * 服务商列表
+	 * @param user
+	 * @param pageNo
+	 * @param pageSize
+	 * @return
+	 */
+	@RequestMapping(value="/organizationList", method = RequestMethod.GET)
+	@ResponseBody
+	public Result organizationList(User user, Integer pageNo, Integer pageSize){
+		Result res = new Result();
+		res.setData(userService.selectOrganizationList(user, pageNo, pageSize));
+		return res;
+	}
+	
+	@SuppressWarnings("unchecked")
+	@RequestMapping(value="/invRegister",method = RequestMethod.GET)
+	@ResponseBody
+	public Result portalActivityDetails(){
+		Result res = new Result();
+		Map<String, Object> map =new HashMap<>();
+		//获得项目抵用券
+		List<JtVoucherListBo> vlist=voucherService.selectActivityVoucher();
+		for (JtVoucherListBo j : vlist) {
+			if (j!=null&&j.getName().length()>12) {
+				j.setName(j.getName().substring(0, 11)+"…");
+			}
+		}
+		map.put("vouchers",vlist);
+		//高企服务
+		List<JtBusinessProject> glist=jtBusinessService.getKJListByIds(2, 0, 2);
+		for (JtBusinessProject j : glist) {
+			if (j.getName().length()>5) {
+				j.setName(j.getName().substring(0, 4)+"…");
+			}
+		}
+		map.put( "gqfw",glist);
+		//随机热门项目
+		Pagination<JtBusinessProjectResult> p=jtBusinessService.getProjects(null,null,null,null, 3,1,null,2,null,1,null,null,null);
+		List<JtBusinessProjectResult> plist=(List<JtBusinessProjectResult>) p.getList();
+		for (JtBusinessProjectResult j : plist) {
+			if (j.getName().length()>8) {
+				j.setName(j.getName().substring(0, 7)+"…");
+			}
+		}
+		map.put("hotProject",plist);
+		//军民融合
+		List<JtBusinessProject> jlist=jtBusinessService.getKJListByIds(3, 0, 3);
+		for (JtBusinessProject j : jlist) {
+			if (j.getName().length()>12) {
+				j.setName(j.getName().substring(0, 11)+"…");
+			}
+		}
+		map.put( "jmrh",jlist);
+		//知识产权
+		List<JtBusinessProject> zlist=jtBusinessService.getKJListByIds(1, 0, 3);
+		for (JtBusinessProject j : zlist) {
+			if (j.getName().length()>8) {
+				j.setName(j.getName().substring(0, 7)+"…");
+			}
+		}
+		map.put( "zscq",zlist);
+		//政府扶持
+		List<JtBusinessProject> zfList=jtBusinessService.getProjectByTag("政府扶持", 4);
+		for (JtBusinessProject j : zlist) {
+			if (j.getName().length()>11) {
+				j.setName(j.getName().substring(0, 10)+"…");
+			}
+		}
+		map.put( "zffc",zfList);
+		
+		
+		return res.data(map);
+	}
 }

+ 1 - 1
src/main/java/com/goafanti/common/controller/WebpageController.java

@@ -850,7 +850,7 @@ public class WebpageController extends BaseController {
 		modelview.addObject("news", newsList);//资讯
 		//
 		List<News> subscriptions = (List<News>) newsService
-				.listNews(99, null, null, null, null, null, null, 1, 4, "2", null, null,null).getList();
+				.listNews(99, null, null, null, null, null, null, 1, 8, "2", null, null,null).getList();
 		modelview.addObject("subscription", subscriptions);//技淘观点精选
 
 		if (subscriptions != null && subscriptions.size() > 0 && subscriptions.get(0).getSourceUrl() != null

+ 19 - 1
src/main/java/com/goafanti/common/mapper/UserMapper.xml

@@ -1280,6 +1280,7 @@
 	<!-- 验证手机号码是否重复 -->
 	<select id="getCountByMobile" parameterType="com.goafanti.common.model.User" resultType="java.lang.Integer">
 		select count(0) from user where mobile = #{mobile,jdbcType=VARCHAR} 
+		and source=0
 		<if test="type != null">
 		and type= #{type,jdbcType=INTEGER}
 		</if>
@@ -1298,5 +1299,22 @@
 	<include refid="Base_Column_List" />
 	from `user` where to_invite_code= #{toInviteCode,jdbcType=VARCHAR}
 	</select>
-
+	
+	<select id="selectOrganizationList" resultType="com.goafanti.common.model.User">
+	SELECT 
+	<include refid="Base_Column_List" />
+	FROM user
+   where status=0 and source=0
+   and `type`=1
+   <if test="page_sql != null">
+			${page_sql}
+		</if>
+	</select>
+	<select id="selectOrganizationCount" resultType="java.lang.Integer">
+	SELECT 
+	count(*)
+	FROM user
+   where status=0 and source=0
+   and `type`=1
+	</select>
 </mapper>

+ 0 - 1
src/main/java/com/goafanti/common/service/GlobalSearchService.java

@@ -2,7 +2,6 @@ package com.goafanti.common.service;
 
 
 import java.util.HashMap;
-import java.util.List;
 import java.util.Map;
 
 import org.springframework.stereotype.Service;

+ 0 - 1
src/main/java/com/goafanti/core/mybatis/BaseMybatisDao.java

@@ -193,7 +193,6 @@ public class BaseMybatisDao<T> extends SqlSessionDaoSupport {
 			List<?> resultList = this.getSqlSession().selectList(sqlId, params);
 
 			page.setList(resultList);
-
 			page.setTotalCount(this.getSqlSession().selectOne(countId, params));
 
 		} catch (Exception e) {

+ 4 - 0
src/main/java/com/goafanti/user/controller/UserApiController.java

@@ -700,6 +700,9 @@ public class UserApiController extends BaseApiController {
 				||StringUtils.isBlank(nickname)){
 			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"用户信息不全"));
 		}
+		if (nickname.length()>6) {
+			res.getError().add(buildError("昵称长度必须小于6","昵称长度必须小于6"));
+		}
 		User user = new User();
 		user.setId(TokenManager.getUserId());
 		user.setIdentifyName(identifyName);
@@ -1022,6 +1025,7 @@ public class UserApiController extends BaseApiController {
 		return res;
 	}
 	
+	
 
 
 }

+ 2 - 0
src/main/java/com/goafanti/user/service/UserService.java

@@ -75,5 +75,7 @@ public interface UserService {
 	void saveVoucher(User us);
 
 	boolean checkeToInviteCode(String beInviteCode);
+
+	Pagination<User> selectOrganizationList(User user, Integer pageNo, Integer pageSize);
 	
 }

+ 10 - 0
src/main/java/com/goafanti/user/service/impl/UserServiceImpl.java

@@ -317,4 +317,14 @@ public class UserServiceImpl extends BaseMybatisDao<UserMapper> implements UserS
 		return false;
 		
 	}
+
+	@SuppressWarnings("unchecked")
+	@Override
+	public Pagination<User> selectOrganizationList(User user, Integer pageNo, Integer pageSize) {
+		Map<String, Object> params=new HashMap<>();
+		if(pageNo==null||pageNo<0)pageNo=1;
+		if(pageSize==null || pageSize<0)pageSize=10;
+		
+		return  (Pagination<User>) findPage("selectOrganizationList", "selectOrganizationCount", params, pageNo, pageSize);
+	}
 }

+ 3 - 1
src/main/resources/log4j.properties

@@ -1,5 +1,7 @@
-log4j.rootLogger=ERROR,Console
+log4j.rootLogger=ERROR,Console,INFO
 log4j.appender.Console=org.apache.log4j.ConsoleAppender
+
+org.slf4j.Logger=INFO
 log4j.appender.Console.Target=System.out
 log4j.appender.Console.layout=org.apache.log4j.PatternLayout
 log4j.appender.Console.layout.ConversionPattern=[%p][%d{yyyy-MM-dd HH\:mm\:ss,SSS}][%c]%m%n

+ 7 - 0
src/main/webapp/WEB-INF/views/common.html

@@ -537,6 +537,13 @@
 				<button class="btn btn-default">返回</button>
 			</div>
 		</div>
+		<div class="initModel">
+				<div>
+				<span class="glyphicon glyphicon-remove"></span>
+				<a th:href="@{/portal/invitation}" class="moreActive">了解活动规则详情 >></a>
+				<a th:href="@{/user/signIn}" class="ljZhuCe">立即注册 >></a>
+			</div>
+		</div>
 	</th:block>
 
 	<th:block th:fragment="footer(scripts)">

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

@@ -25,8 +25,8 @@
     		</div>
     	</div>
     	<div class="facTab">
-    		<span>所有项目</span>
     		<span>主页</span>
+    		<span>所有项目</span>
     		<span>点我领币</span>
     	</div>
     	<div class="facJuan">

+ 14 - 5
src/main/webapp/WEB-INF/views/portal/index.html

@@ -144,8 +144,17 @@
 				<img th:src="${portalHost+'/img/indedImg/inded4.png'}" alt="" />
 			</div>
 			<div class="wield_cont">
+				<div class="video">
+					<video id="video1" controls>
+						<source src="http://118.190.205.7:8000/Pear-Demo-Yosemite_National_Park.mp4 " type="video/mp4">
+						您的浏览器不支持 HTML5 video 标签。
+					</video>
+				</div>
 				<img th:src="${portalHost+'/img/indedImg/inded5.png'}" alt="" />
 			</div>
+				<div class="moreVideo">
+				<a href="">查看更多视频 >></a>
+			</div>
 		</div>
 		<div class="brands">
 			<a th:href="@{/portal/service/brandBuild}">
@@ -242,15 +251,15 @@
 			<h2>技淘观点精选</h2>
 			<span></span>
 		</div>
-		<div class="view">
-			<h4>观点
+		<!-- <div class="view">
+			<h4>
 				<a th:href="@{/portal/thinkTank/policyList?type=99}"><span class="line"></span><span>></span></a>
 			</h4>
-		</div>
+		</div> -->
 		<div class="publicNumber">
-			<div class="video" >
+			<!-- <div class="video" >
 				<iframe frameborder="0" width="565" height="320" th:src="${videoUrl}==null?'https://v.qq.com/iframe/player.html?vid=y0721rsmr4r&tiny=0&auto=0':${videoUrl}" allowfullscreen></iframe>
-			</div>
+			</div> -->
 			<ul>
 				
 				<li th:each="sc:${subscription}">

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 1 - 1
src/main/webapp/WEB-INF/views/portal/technologyTrading/shopList.html


+ 1 - 1
src/main/webapp/WEB-INF/views/user/signIn.html

@@ -52,7 +52,7 @@
 					</div>
 					<div class="zhuce_input">
 						<img th:src="${portalHost+'/img/indedImg/enroll3.png'}" alt=""/>
-						<input type="text" name="userName" placeholder="请输入用户名"  id="username" autocomplete="off"/>
+						<input type="text" name="userName" placeholder="请输入昵称"  id="username" autocomplete="off"/>
 						<span class="star"> * </span>
 						<span class="Tips"></span>
 					</div>