Selaa lähdekoodia

Merge branch 'test' of ssh://anderx@git.jishutao.com:55555/jishutao/jitao-server.git into test

anderx 7 vuotta sitten
vanhempi
commit
b7e5b23fec

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

@@ -421,6 +421,10 @@ public class AdminApiController extends CertifyApiController {
 	@RequestMapping(value="/user/info", method = RequestMethod.GET)
 	public Result userInfo(User user, Integer pageNo, Integer pageSize){
 		Result res = new Result();
+		//默认注册的正常用户
+		if(null == user.getSource()) user.setSource(0);
+		if(null == user.getStatus()) user.setStatus(0);
+		res.setData(userService.getUserInfo(user, pageNo, pageSize));
 		return res;
 	}
 }

+ 52 - 0
src/main/java/com/goafanti/common/mapper/UserMapper.xml

@@ -1189,5 +1189,57 @@
 	<select id="getAllUser" resultMap="regUserMap">
 	 select id from user where status = 0 and source = 0 
 	</select>
+	
+	<!-- 获得用户数据  -->
+	<select id="getUserInfoList" parameterType="Map" resultType="com.goafanti.common.model.User">
+		select 
+			id, mobile,  nickname, email, type, 
+    		source,  username, create_time as createTime 
+		from `user` 
+		where 1 = 1
+		<if test="user.status != null">
+		and status = #{user.status,jdbcType=INTEGER}
+		</if>
+		<if test="user.source != null">
+		and source = #{user.source,jdbcType=INTEGER}
+		</if>
+		<if test="user.type != null">
+		and `type` = #{user.type,jdbcType=INTEGER}
+		</if>
+		<if test="user.mobile != null">
+		<bind name="m" value="'%' + user.mobile + '%'"/>
+		and mobile like #{m,jdbcType=VARCHAR}
+		</if>
+		<if test="user.username != null">
+		<bind name="u" value="'%' + user.username + '%'"/>
+		and username like #{u,jdbcType=VARCHAR}
+		</if>
+		order by create_time desc
+		<if test="page_sql != null">
+			${page_sql}
+		</if>
+	</select>
+	<select id="getUserInfoCount" parameterType="Map" resultType="java.lang.Integer">
+		select count(0)
+		from `user` 
+		where 1 = 1
+		<if test="user.status != null">
+		and status = #{user.status,jdbcType=INTEGER}
+		</if>
+		<if test="user.source != null">
+		and source = #{user.source,jdbcType=INTEGER}
+		</if>
+		<if test="user.type != null">
+		and `type` = #{user.type,jdbcType=INTEGER}
+		</if>
+		<if test="user.mobile != null">
+		<bind name="m" value="'%' + user.mobile + '%'"/>
+		and mobile like #{m,jdbcType=VARCHAR}
+		</if>
+		<if test="user.username != null">
+		<bind name="u" value="'%' + user.username + '%'"/>
+		and username like #{u,jdbcType=VARCHAR}
+		</if>
+	</select>
 
 </mapper>

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

@@ -61,7 +61,7 @@ public interface UserService {
 
 	
 	
-	Pagination<User> userInfo(User user, Integer pageNo, Integer pageSize);
+	Pagination<User> getUserInfo(User user, Integer pageNo, Integer pageSize);
 	
 	
 }

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

@@ -223,16 +223,11 @@ public class UserServiceImpl extends BaseMybatisDao<UserMapper> implements UserS
 	public Integer selectByMobieAndTypeCount(String mobile ) {
 		return userMapper.selectByMobieAndTypeCount(mobile);
 	}
+	@SuppressWarnings("unchecked")
 	@Override
-	public Pagination<User> userInfo(User user, Integer pageNo, Integer pageSize) {
-		Map<String,Object> map = new HashMap<String, Object>();
-		map.put("username", "");
-		map.put("mobile", "");
-		map.put("type", "");
-		return null;
+	public Pagination<User> getUserInfo(User user, Integer pageNo, Integer pageSize) {
+		Map<String,Object> params = new HashMap<String, Object>();
+		params.put("user", user);
+		return  (Pagination<User>) findPage("getUserInfoList", "getUserInfoCount", params, pageNo, pageSize);
 	}
-
-
-	
-	
 }

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1 - 1
src/main/webapp/WEB-INF/views/portal/service/patent.html


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1 - 1
src/main/webapp/WEB-INF/views/portal/service/serviceIndex.html


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

@@ -70,7 +70,7 @@
         </div>
     </div>
     <!-- banner -->
-  <div class="carousel">
+  <div id="myCarousel" class="carousel slide">
         <img th:src="${portalHost+'/img/technology_trading_banner01.jpg'}" alt="First slide">
     </div>
     <!-- 主体内容区域 -->

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

@@ -68,7 +68,7 @@
 	</div>
 	<!-- banner -->
 
-	<div class="carousel">
+	<div id="myCarousel" class="carousel slide">
         <img th:src="${portalHost+'/img/technology_trading_banner01.jpg'}" alt="First slide">
     </div>
 	<!-- 主体内容区域 -->

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1 - 1
src/main/webapp/WEB-INF/views/portal/technologyTrading/tradingIndex.html