Browse Source

订单评价

liliang4869 7 years ago
parent
commit
e3fa105f6e

+ 38 - 0
src/main/java/com/goafanti/comment/bo/CommentDetailResult.java

@@ -0,0 +1,38 @@
+package com.goafanti.comment.bo;
+
+import java.util.Date;
+
+import com.goafanti.common.utils.LimitLengthUtil;
+
+
+public class CommentDetailResult {
+String content;
+String commenter;
+Integer star;
+Date createTime;
+public String getContent() {
+	return content;
+}
+public void setContent(String content) {
+	this.content = content;
+}
+public String getCommenter() {
+	return commenter;
+}
+public void setCommenter(String commenter) {
+	this.commenter=LimitLengthUtil.toConceal(commenter);//脱敏
+}
+public Integer getStar() {
+	return star;
+}
+public void setStar(Integer star) {
+	this.star = star;
+}
+public Date getCreateTime() {
+	return createTime;
+}
+public void setCreateTime(Date createTime) {
+	this.createTime = createTime;
+}
+
+}

+ 33 - 0
src/main/java/com/goafanti/comment/bo/CommentInput.java

@@ -0,0 +1,33 @@
+package com.goafanti.comment.bo;
+
+public class CommentInput {
+String commodityId;
+String content;
+Integer star;
+String orderNo;
+public String getCommodityId() {
+	return commodityId;
+}
+public void setCommodityId(String commodityId) {
+	this.commodityId = commodityId;
+}
+public String getContent() {
+	return content;
+}
+public void setContent(String content) {
+	this.content = content;
+}
+public Integer getStar() {
+	return star;
+}
+public void setStar(Integer star) {
+	this.star = star;
+}
+public String getOrderNo() {
+	return orderNo;
+}
+public void setOrderNo(String orderNo) {
+	this.orderNo = orderNo;
+}
+
+}

+ 44 - 0
src/main/java/com/goafanti/comment/bo/CommentResult.java

@@ -0,0 +1,44 @@
+package com.goafanti.comment.bo;
+
+import com.goafanti.core.mybatis.page.Pagination;
+
+public class CommentResult {
+	Integer positiveCommentCount;
+	Integer	negativeCommentCount;
+	Integer ordinaryCommentCount;
+	Integer totalCommentCount;
+	Pagination<CommentDetailResult> comments;
+
+	public Integer getPositiveCommentCount() {
+		return positiveCommentCount;
+	}
+	public void setPositiveCommentCount(Integer positiveCommentCount) {
+		this.positiveCommentCount = positiveCommentCount;
+	}
+	public Integer getNegativeCommentCount() {
+		return negativeCommentCount;
+	}
+	public void setNegativeCommentCount(Integer negativeCommentCount) {
+		this.negativeCommentCount = negativeCommentCount;
+	}
+	public Integer getOrdinaryCommentCount() {
+		return ordinaryCommentCount;
+	}
+	public void setOrdinaryCommentCount(Integer ordinaryCommentCount) {
+		this.ordinaryCommentCount = ordinaryCommentCount;
+	}
+	public Integer getTotalCommentCount() {
+		return totalCommentCount;
+	}
+	public void setTotalCommentCount(Integer totalCommentCount) {
+		this.totalCommentCount = totalCommentCount;
+	}
+	public Pagination<CommentDetailResult> getComments() {
+		return comments;
+	}
+	public void setComments(Pagination<CommentDetailResult> comments) {
+		this.comments = comments;
+		setTotalCommentCount(comments.getTotalCount());
+	}
+	
+}

+ 104 - 0
src/main/java/com/goafanti/comment/controller/UserCommentController.java

@@ -0,0 +1,104 @@
+package com.goafanti.comment.controller;
+
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletRequest;
+
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
+
+import com.aliyuncs.http.HttpRequest;
+import com.goafanti.comment.bo.CommentInput;
+import com.goafanti.comment.bo.CommentResult;
+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.utils.StringUtils;
+import com.goafanti.core.mybatis.page.Pagination;
+
+
+@RestController
+@RequestMapping(value = "/api/user/comment")
+public class UserCommentController extends BaseApiController{
+	@Resource
+	CommentService commentService;
+
+	/**
+	 * 新增评价
+	 */
+	@RequestMapping(value = "/apply", method = RequestMethod.POST)
+	public Result addNewComment(HttpServletRequest request,CommentInput commentInput) {
+		Result result=new Result();
+		String ip=getClientIp(request);
+		if(StringUtils.isBlank(commentInput.getCommodityId())) {
+			result.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"商品id为空","商品id"));return result;
+		}
+		if(commentInput.getStar()==null || commentInput.getStar()<0 || commentInput.getStar()>5) {
+			result.getError().add(buildError(ErrorConstants.PARAM_ERROR,"","评分"));return result;
+		}
+		if(StringUtils.isBlank(commentInput.getOrderNo())) {
+			result.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"","订单编号"));return result;
+		}
+		if(StringUtils.isBlank(commentInput.getContent()) || commentInput.getContent().length()>512) {
+			result.getError().add(buildError(ErrorConstants.PARAM_ERROR,"","内容限制1-512字符"));return result;
+		}
+		int res=commentService.addNewComment(commentInput,ip);
+		if(res ==-1) {
+			result.getError().add(buildError(ErrorConstants.PARAM_ERROR,"","提交失败"));return result;
+		}
+		result.setData(res);
+		
+		return result;
+	}
+	
+	
+	@RequestMapping(value = "/list", method = RequestMethod.GET)
+	public Result listComment(String commodityId,Integer pageNo,Integer pageSize) {
+		Result result=new Result();
+		if(StringUtils.isBlank(commodityId)) {
+			result.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"","商品id"));
+		}
+		CommentResult commentResult=new CommentResult();
+		commentResult.setPositiveCommentCount(commentService.getCommentCount(0, commodityId));
+		commentResult.setOrdinaryCommentCount(commentService.getCommentCount(1, commodityId));
+		commentResult.setNegativeCommentCount(commentService.getCommentCount(2, commodityId));
+		commentResult.setComments(commentService.searchComment(commodityId, pageNo, pageSize));
+		result.setData(commentResult);
+		return result;
+		
+	}
+	private static String getClientIp(HttpServletRequest request) {
+		 String ip = request.getHeader("x-forwarded-for"); 
+	       if(ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) { 
+	           ip = request.getHeader("Proxy-Client-IP"); 
+	       } 
+	       if(ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) { 
+	           ip = request.getHeader("WL-Proxy-Client-IP"); 
+	       } 
+	       if(ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) { 
+	           ip = request.getRemoteAddr(); 
+	           if(ip.equals("127.0.0.1")){   
+	        	   //根据网卡取本机配置的IP   
+	        	   InetAddress inet=null;   
+		           try {   
+		        	   inet = InetAddress.getLocalHost();   
+		           } catch (UnknownHostException e) {   
+		        	   e.printStackTrace();   
+		           }   
+		           ip= inet.getHostAddress();   
+	           }
+	       } 
+	       // 对于通过多个代理的情况,第一个IP为客户端真实IP,多个IP按照','分割
+	       if(ip != null && ip.length() > 15){  
+	           if(ip.indexOf(",")>0){   
+	               ip = ip.substring(0,ip.indexOf(","));   
+	           }   
+	       }   
+	       return ip; 
+
+    }
+}

+ 14 - 0
src/main/java/com/goafanti/comment/service/CommentService.java

@@ -0,0 +1,14 @@
+package com.goafanti.comment.service;
+
+import com.goafanti.comment.bo.CommentDetailResult;
+import com.goafanti.comment.bo.CommentInput;
+import com.goafanti.core.mybatis.page.Pagination;
+
+public interface CommentService {
+	int addNewComment(CommentInput commentInput,String ip);
+	
+	Integer getCommentCount(Integer type,String commodityId); 
+	
+	Pagination<CommentDetailResult> searchComment(String commodityId,Integer pageNo,Integer pageSize);
+
+}

+ 75 - 0
src/main/java/com/goafanti/comment/service/impl/CommentServiceImpl.java

@@ -0,0 +1,75 @@
+package com.goafanti.comment.service.impl;
+
+
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import com.goafanti.comment.bo.CommentDetailResult;
+import com.goafanti.comment.bo.CommentInput;
+import com.goafanti.comment.service.CommentService;
+import com.goafanti.common.dao.JtCommodityCommentMapper;
+import com.goafanti.common.dao.JtOrderMapper;
+import com.goafanti.common.model.JtCommodityComment;
+import com.goafanti.common.model.JtOrder;
+import com.goafanti.core.mybatis.BaseMybatisDao;
+import com.goafanti.core.mybatis.page.Pagination;
+import com.goafanti.core.shiro.token.TokenManager;
+
+@Service
+public class CommentServiceImpl extends BaseMybatisDao<JtCommodityCommentMapper> implements CommentService{
+	@Autowired
+	JtCommodityCommentMapper jtCommodityCommentMapper;
+	@Autowired
+	JtOrderMapper jtOrderMapper;
+
+	@Override
+	public int addNewComment(CommentInput commentInput, String ip) {
+		// TODO Auto-generated method stub
+		String id=UUID.randomUUID().toString();
+//		String uid=TokenManager.getUserId();
+		String uid="1180fa62-7c42-44be-bc41-5583814d69f4";
+		JtOrder jtOrder=jtOrderMapper.selectByPrimaryKey(commentInput.getOrderNo());
+		if(jtOrder==null || jtOrder.getBuyerId()==null || !jtOrder.getBuyerId().equals(uid))return -1;
+		JtCommodityComment jtCommodityComment=new JtCommodityComment();
+		jtCommodityComment.setCommodityId(commentInput.getCommodityId());
+		jtCommodityComment.setContent(commentInput.getContent());
+		jtCommodityComment.setCreateTime(new Date());
+		jtCommodityComment.setId(id);
+		jtCommodityComment.setIp(ip);
+		jtCommodityComment.setOrderNo(commentInput.getOrderNo());
+		jtCommodityComment.setStar(commentInput.getStar());
+		jtCommodityComment.setUid(uid);
+		jtCommodityCommentMapper.insert(jtCommodityComment);
+		return 0;
+	}
+
+	/*
+	 * 0-好评  1-中评 2-差评
+	 * */
+	@Override
+	public Integer getCommentCount(Integer type,String commodityId) {
+		// TODO Auto-generated method stub
+		return jtCommodityCommentMapper.getCommentCount( type, commodityId);
+	}
+
+	@SuppressWarnings("unchecked")
+	@Override
+	public Pagination<CommentDetailResult> searchComment(String commodityId,Integer pageNo,Integer pageSize) {
+		// TODO Auto-generated method stub
+		Map<String, Object>params=new HashMap<>();
+		if(pageNo==null || pageNo<1)pageNo=1;
+		if(pageSize == null || pageSize <1)pageSize=10;
+		params.put("commodityId", commodityId);
+		return (Pagination<CommentDetailResult>) findPage("searchCommentByCommodityId", "searchCommentCountByCommodityId", params, pageNo, pageSize);
+	}
+	
+	
+	
+	
+	
+}

+ 79 - 0
src/main/java/com/goafanti/common/dao/JtCommodityCommentMapper.java

@@ -0,0 +1,79 @@
+package com.goafanti.common.dao;
+
+import com.goafanti.common.model.JtCommodityComment;
+import com.goafanti.common.model.JtCommodityCommentExample;
+import java.util.List;
+import org.apache.ibatis.annotations.Param;
+
+public interface JtCommodityCommentMapper {
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table jt_commodity_comment
+	 * @mbg.generated  Thu Jul 19 10:59:39 CST 2018
+	 */
+	long countByExample(JtCommodityCommentExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table jt_commodity_comment
+	 * @mbg.generated  Thu Jul 19 10:59:39 CST 2018
+	 */
+	int deleteByExample(JtCommodityCommentExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table jt_commodity_comment
+	 * @mbg.generated  Thu Jul 19 10:59:39 CST 2018
+	 */
+	int deleteByPrimaryKey(String id);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table jt_commodity_comment
+	 * @mbg.generated  Thu Jul 19 10:59:39 CST 2018
+	 */
+	int insert(JtCommodityComment record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table jt_commodity_comment
+	 * @mbg.generated  Thu Jul 19 10:59:39 CST 2018
+	 */
+	int insertSelective(JtCommodityComment record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table jt_commodity_comment
+	 * @mbg.generated  Thu Jul 19 10:59:39 CST 2018
+	 */
+	List<JtCommodityComment> selectByExample(JtCommodityCommentExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table jt_commodity_comment
+	 * @mbg.generated  Thu Jul 19 10:59:39 CST 2018
+	 */
+	JtCommodityComment selectByPrimaryKey(String id);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table jt_commodity_comment
+	 * @mbg.generated  Thu Jul 19 10:59:39 CST 2018
+	 */
+	int updateByExampleSelective(@Param("record") JtCommodityComment record,
+			@Param("example") JtCommodityCommentExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table jt_commodity_comment
+	 * @mbg.generated  Thu Jul 19 10:59:39 CST 2018
+	 */
+	int updateByExample(@Param("record") JtCommodityComment record,
+			@Param("example") JtCommodityCommentExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table jt_commodity_comment
+	 * @mbg.generated  Thu Jul 19 10:59:39 CST 2018
+	 */
+	int updateByPrimaryKeySelective(JtCommodityComment record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table jt_commodity_comment
+	 * @mbg.generated  Thu Jul 19 10:59:39 CST 2018
+	 */
+	int updateByPrimaryKey(JtCommodityComment record);
+	
+	Integer getCommentCount(Integer type,String commodityId);
+}

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

@@ -750,7 +750,7 @@
 			a.is_hot as isHot,
 			a.is_urgent as isUrgent
 		from demand a left join user b on a.employer_id = b.id 
-		where a.deleted_sign = 0
+		where  a.info_sources=1
 		<if test="employerId != null">
 			and a.employer_id = #{employerId,jdbcType=VARCHAR}
 		</if>

+ 355 - 0
src/main/java/com/goafanti/common/mapper/JtCommodityCommentMapper.xml

@@ -0,0 +1,355 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.goafanti.common.dao.JtCommodityCommentMapper">
+  <resultMap id="BaseResultMap" type="com.goafanti.common.model.JtCommodityComment">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Jul 19 10:59:39 CST 2018.
+    -->
+    <id column="id" jdbcType="VARCHAR" property="id" />
+    <result column="commodity_id" jdbcType="VARCHAR" property="commodityId" />
+    <result column="uid" jdbcType="VARCHAR" property="uid" />
+    <result column="order_no" jdbcType="VARCHAR" property="orderNo" />
+    <result column="content" jdbcType="VARCHAR" property="content" />
+    <result column="star" jdbcType="INTEGER" property="star" />
+    <result column="ip" jdbcType="VARCHAR" property="ip" />
+    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
+  </resultMap>
+  <sql id="Example_Where_Clause">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Jul 19 10:59:39 CST 2018.
+    -->
+    <where>
+      <foreach collection="oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Update_By_Example_Where_Clause">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Jul 19 10:59:39 CST 2018.
+    -->
+    <where>
+      <foreach collection="example.oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Base_Column_List">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Jul 19 10:59:39 CST 2018.
+    -->
+    id, commodity_id, uid, order_no, content, star, ip, create_time
+  </sql>
+  <select id="selectByExample" parameterType="com.goafanti.common.model.JtCommodityCommentExample" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Jul 19 10:59:39 CST 2018.
+    -->
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from jt_commodity_comment
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+  </select>
+  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Jul 19 10:59:39 CST 2018.
+    -->
+    select 
+    <include refid="Base_Column_List" />
+    from jt_commodity_comment
+    where id = #{id,jdbcType=VARCHAR}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Jul 19 10:59:39 CST 2018.
+    -->
+    delete from jt_commodity_comment
+    where id = #{id,jdbcType=VARCHAR}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.goafanti.common.model.JtCommodityCommentExample">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Jul 19 10:59:39 CST 2018.
+    -->
+    delete from jt_commodity_comment
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.goafanti.common.model.JtCommodityComment">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Jul 19 10:59:39 CST 2018.
+    -->
+    insert into jt_commodity_comment (id, commodity_id, uid, 
+      order_no, content, star, 
+      ip, create_time)
+    values (#{id,jdbcType=VARCHAR}, #{commodityId,jdbcType=VARCHAR}, #{uid,jdbcType=VARCHAR}, 
+      #{orderNo,jdbcType=VARCHAR}, #{content,jdbcType=VARCHAR}, #{star,jdbcType=INTEGER}, 
+      #{ip,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP})
+  </insert>
+  <insert id="insertSelective" parameterType="com.goafanti.common.model.JtCommodityComment">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Jul 19 10:59:39 CST 2018.
+    -->
+    insert into jt_commodity_comment
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        id,
+      </if>
+      <if test="commodityId != null">
+        commodity_id,
+      </if>
+      <if test="uid != null">
+        uid,
+      </if>
+      <if test="orderNo != null">
+        order_no,
+      </if>
+      <if test="content != null">
+        content,
+      </if>
+      <if test="star != null">
+        star,
+      </if>
+      <if test="ip != null">
+        ip,
+      </if>
+      <if test="createTime != null">
+        create_time,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=VARCHAR},
+      </if>
+      <if test="commodityId != null">
+        #{commodityId,jdbcType=VARCHAR},
+      </if>
+      <if test="uid != null">
+        #{uid,jdbcType=VARCHAR},
+      </if>
+      <if test="orderNo != null">
+        #{orderNo,jdbcType=VARCHAR},
+      </if>
+      <if test="content != null">
+        #{content,jdbcType=VARCHAR},
+      </if>
+      <if test="star != null">
+        #{star,jdbcType=INTEGER},
+      </if>
+      <if test="ip != null">
+        #{ip,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null">
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.goafanti.common.model.JtCommodityCommentExample" resultType="java.lang.Long">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Jul 19 10:59:39 CST 2018.
+    -->
+    select count(*) from jt_commodity_comment
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Jul 19 10:59:39 CST 2018.
+    -->
+    update jt_commodity_comment
+    <set>
+      <if test="record.id != null">
+        id = #{record.id,jdbcType=VARCHAR},
+      </if>
+      <if test="record.commodityId != null">
+        commodity_id = #{record.commodityId,jdbcType=VARCHAR},
+      </if>
+      <if test="record.uid != null">
+        uid = #{record.uid,jdbcType=VARCHAR},
+      </if>
+      <if test="record.orderNo != null">
+        order_no = #{record.orderNo,jdbcType=VARCHAR},
+      </if>
+      <if test="record.content != null">
+        content = #{record.content,jdbcType=VARCHAR},
+      </if>
+      <if test="record.star != null">
+        star = #{record.star,jdbcType=INTEGER},
+      </if>
+      <if test="record.ip != null">
+        ip = #{record.ip,jdbcType=VARCHAR},
+      </if>
+      <if test="record.createTime != null">
+        create_time = #{record.createTime,jdbcType=TIMESTAMP},
+      </if>
+    </set>
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Jul 19 10:59:39 CST 2018.
+    -->
+    update jt_commodity_comment
+    set id = #{record.id,jdbcType=VARCHAR},
+      commodity_id = #{record.commodityId,jdbcType=VARCHAR},
+      uid = #{record.uid,jdbcType=VARCHAR},
+      order_no = #{record.orderNo,jdbcType=VARCHAR},
+      content = #{record.content,jdbcType=VARCHAR},
+      star = #{record.star,jdbcType=INTEGER},
+      ip = #{record.ip,jdbcType=VARCHAR},
+      create_time = #{record.createTime,jdbcType=TIMESTAMP}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.JtCommodityComment">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Jul 19 10:59:39 CST 2018.
+    -->
+    update jt_commodity_comment
+    <set>
+      <if test="commodityId != null">
+        commodity_id = #{commodityId,jdbcType=VARCHAR},
+      </if>
+      <if test="uid != null">
+        uid = #{uid,jdbcType=VARCHAR},
+      </if>
+      <if test="orderNo != null">
+        order_no = #{orderNo,jdbcType=VARCHAR},
+      </if>
+      <if test="content != null">
+        content = #{content,jdbcType=VARCHAR},
+      </if>
+      <if test="star != null">
+        star = #{star,jdbcType=INTEGER},
+      </if>
+      <if test="ip != null">
+        ip = #{ip,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null">
+        create_time = #{createTime,jdbcType=TIMESTAMP},
+      </if>
+    </set>
+    where id = #{id,jdbcType=VARCHAR}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.JtCommodityComment">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Jul 19 10:59:39 CST 2018.
+    -->
+    update jt_commodity_comment
+    set commodity_id = #{commodityId,jdbcType=VARCHAR},
+      uid = #{uid,jdbcType=VARCHAR},
+      order_no = #{orderNo,jdbcType=VARCHAR},
+      content = #{content,jdbcType=VARCHAR},
+      star = #{star,jdbcType=INTEGER},
+      ip = #{ip,jdbcType=VARCHAR},
+      create_time = #{createTime,jdbcType=TIMESTAMP}
+    where id = #{id,jdbcType=VARCHAR}
+  </update>
+  <select id="getCommentCount" resultType="java.lang.Integer">
+  select count(0) from jt_commodity_comment
+  where commodity_id=#{1}
+  and ((#{0}=0 and (star =4 or star=5)) or (#{0}=1 and (star = 3)) or (#{0} =2 and (star=1 or star=2)) )
+  </select>
+  <select id="searchCommentByCommodityId" resultType="com.goafanti.comment.bo.CommentDetailResult">
+  select jcc.create_time as createTime,
+  jcc.content,jcc.star,u.identify_name as commenter
+  from jt_commodity_comment jcc
+  left join user u on jcc.uid=u.id
+  where jcc.commodity_id=#{commodityId,jdbcType=VARCHAR}
+  <if test="page_sql!=null">
+			${page_sql}
+		</if>
+  </select>
+  
+  <select id="searchCommentCountByCommodityId" resultType="java.lang.Integer">
+  select count(0)
+  from jt_commodity_comment jcc
+  left join user u on jcc.uid=u.id
+  where jcc.commodity_id=#{commodityId,jdbcType=VARCHAR}  
+  </select>
+</mapper>

+ 191 - 0
src/main/java/com/goafanti/common/model/JtCommodityComment.java

@@ -0,0 +1,191 @@
+package com.goafanti.common.model;
+
+import java.util.Date;
+
+public class JtCommodityComment {
+
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column jt_commodity_comment.id
+	 * @mbg.generated  Thu Jul 19 10:59:39 CST 2018
+	 */
+	private String id;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column jt_commodity_comment.commodity_id
+	 * @mbg.generated  Thu Jul 19 10:59:39 CST 2018
+	 */
+	private String commodityId;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column jt_commodity_comment.uid
+	 * @mbg.generated  Thu Jul 19 10:59:39 CST 2018
+	 */
+	private String uid;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column jt_commodity_comment.order_no
+	 * @mbg.generated  Thu Jul 19 10:59:39 CST 2018
+	 */
+	private String orderNo;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column jt_commodity_comment.content
+	 * @mbg.generated  Thu Jul 19 10:59:39 CST 2018
+	 */
+	private String content;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column jt_commodity_comment.star
+	 * @mbg.generated  Thu Jul 19 10:59:39 CST 2018
+	 */
+	private Integer star;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column jt_commodity_comment.ip
+	 * @mbg.generated  Thu Jul 19 10:59:39 CST 2018
+	 */
+	private String ip;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column jt_commodity_comment.create_time
+	 * @mbg.generated  Thu Jul 19 10:59:39 CST 2018
+	 */
+	private Date createTime;
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column jt_commodity_comment.id
+	 * @return  the value of jt_commodity_comment.id
+	 * @mbg.generated  Thu Jul 19 10:59:39 CST 2018
+	 */
+	public String getId() {
+		return id;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column jt_commodity_comment.id
+	 * @param id  the value for jt_commodity_comment.id
+	 * @mbg.generated  Thu Jul 19 10:59:39 CST 2018
+	 */
+	public void setId(String id) {
+		this.id = id;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column jt_commodity_comment.commodity_id
+	 * @return  the value of jt_commodity_comment.commodity_id
+	 * @mbg.generated  Thu Jul 19 10:59:39 CST 2018
+	 */
+	public String getCommodityId() {
+		return commodityId;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column jt_commodity_comment.commodity_id
+	 * @param commodityId  the value for jt_commodity_comment.commodity_id
+	 * @mbg.generated  Thu Jul 19 10:59:39 CST 2018
+	 */
+	public void setCommodityId(String commodityId) {
+		this.commodityId = commodityId;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column jt_commodity_comment.uid
+	 * @return  the value of jt_commodity_comment.uid
+	 * @mbg.generated  Thu Jul 19 10:59:39 CST 2018
+	 */
+	public String getUid() {
+		return uid;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column jt_commodity_comment.uid
+	 * @param uid  the value for jt_commodity_comment.uid
+	 * @mbg.generated  Thu Jul 19 10:59:39 CST 2018
+	 */
+	public void setUid(String uid) {
+		this.uid = uid;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column jt_commodity_comment.order_no
+	 * @return  the value of jt_commodity_comment.order_no
+	 * @mbg.generated  Thu Jul 19 10:59:39 CST 2018
+	 */
+	public String getOrderNo() {
+		return orderNo;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column jt_commodity_comment.order_no
+	 * @param orderNo  the value for jt_commodity_comment.order_no
+	 * @mbg.generated  Thu Jul 19 10:59:39 CST 2018
+	 */
+	public void setOrderNo(String orderNo) {
+		this.orderNo = orderNo;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column jt_commodity_comment.content
+	 * @return  the value of jt_commodity_comment.content
+	 * @mbg.generated  Thu Jul 19 10:59:39 CST 2018
+	 */
+	public String getContent() {
+		return content;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column jt_commodity_comment.content
+	 * @param content  the value for jt_commodity_comment.content
+	 * @mbg.generated  Thu Jul 19 10:59:39 CST 2018
+	 */
+	public void setContent(String content) {
+		this.content = content;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column jt_commodity_comment.star
+	 * @return  the value of jt_commodity_comment.star
+	 * @mbg.generated  Thu Jul 19 10:59:39 CST 2018
+	 */
+	public Integer getStar() {
+		return star;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column jt_commodity_comment.star
+	 * @param star  the value for jt_commodity_comment.star
+	 * @mbg.generated  Thu Jul 19 10:59:39 CST 2018
+	 */
+	public void setStar(Integer star) {
+		this.star = star;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column jt_commodity_comment.ip
+	 * @return  the value of jt_commodity_comment.ip
+	 * @mbg.generated  Thu Jul 19 10:59:39 CST 2018
+	 */
+	public String getIp() {
+		return ip;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column jt_commodity_comment.ip
+	 * @param ip  the value for jt_commodity_comment.ip
+	 * @mbg.generated  Thu Jul 19 10:59:39 CST 2018
+	 */
+	public void setIp(String ip) {
+		this.ip = ip;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column jt_commodity_comment.create_time
+	 * @return  the value of jt_commodity_comment.create_time
+	 * @mbg.generated  Thu Jul 19 10:59:39 CST 2018
+	 */
+	public Date getCreateTime() {
+		return createTime;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column jt_commodity_comment.create_time
+	 * @param createTime  the value for jt_commodity_comment.create_time
+	 * @mbg.generated  Thu Jul 19 10:59:39 CST 2018
+	 */
+	public void setCreateTime(Date createTime) {
+		this.createTime = createTime;
+	}
+}

+ 802 - 0
src/main/java/com/goafanti/common/model/JtCommodityCommentExample.java

@@ -0,0 +1,802 @@
+package com.goafanti.common.model;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+public class JtCommodityCommentExample {
+    /**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database table jt_commodity_comment
+	 * @mbg.generated  Thu Jul 19 10:59:39 CST 2018
+	 */
+	protected String orderByClause;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database table jt_commodity_comment
+	 * @mbg.generated  Thu Jul 19 10:59:39 CST 2018
+	 */
+	protected boolean distinct;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database table jt_commodity_comment
+	 * @mbg.generated  Thu Jul 19 10:59:39 CST 2018
+	 */
+	protected List<Criteria> oredCriteria;
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table jt_commodity_comment
+	 * @mbg.generated  Thu Jul 19 10:59:39 CST 2018
+	 */
+	public JtCommodityCommentExample() {
+		oredCriteria = new ArrayList<Criteria>();
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table jt_commodity_comment
+	 * @mbg.generated  Thu Jul 19 10:59:39 CST 2018
+	 */
+	public void setOrderByClause(String orderByClause) {
+		this.orderByClause = orderByClause;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table jt_commodity_comment
+	 * @mbg.generated  Thu Jul 19 10:59:39 CST 2018
+	 */
+	public String getOrderByClause() {
+		return orderByClause;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table jt_commodity_comment
+	 * @mbg.generated  Thu Jul 19 10:59:39 CST 2018
+	 */
+	public void setDistinct(boolean distinct) {
+		this.distinct = distinct;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table jt_commodity_comment
+	 * @mbg.generated  Thu Jul 19 10:59:39 CST 2018
+	 */
+	public boolean isDistinct() {
+		return distinct;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table jt_commodity_comment
+	 * @mbg.generated  Thu Jul 19 10:59:39 CST 2018
+	 */
+	public List<Criteria> getOredCriteria() {
+		return oredCriteria;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table jt_commodity_comment
+	 * @mbg.generated  Thu Jul 19 10:59:39 CST 2018
+	 */
+	public void or(Criteria criteria) {
+		oredCriteria.add(criteria);
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table jt_commodity_comment
+	 * @mbg.generated  Thu Jul 19 10:59:39 CST 2018
+	 */
+	public Criteria or() {
+		Criteria criteria = createCriteriaInternal();
+		oredCriteria.add(criteria);
+		return criteria;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table jt_commodity_comment
+	 * @mbg.generated  Thu Jul 19 10:59:39 CST 2018
+	 */
+	public Criteria createCriteria() {
+		Criteria criteria = createCriteriaInternal();
+		if (oredCriteria.size() == 0) {
+			oredCriteria.add(criteria);
+		}
+		return criteria;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table jt_commodity_comment
+	 * @mbg.generated  Thu Jul 19 10:59:39 CST 2018
+	 */
+	protected Criteria createCriteriaInternal() {
+		Criteria criteria = new Criteria();
+		return criteria;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table jt_commodity_comment
+	 * @mbg.generated  Thu Jul 19 10:59:39 CST 2018
+	 */
+	public void clear() {
+		oredCriteria.clear();
+		orderByClause = null;
+		distinct = false;
+	}
+
+	/**
+	 * This class was generated by MyBatis Generator. This class corresponds to the database table jt_commodity_comment
+	 * @mbg.generated  Thu Jul 19 10:59:39 CST 2018
+	 */
+	protected abstract static class GeneratedCriteria {
+		protected List<Criterion> criteria;
+
+		protected GeneratedCriteria() {
+			super();
+			criteria = new ArrayList<Criterion>();
+		}
+
+		public boolean isValid() {
+			return criteria.size() > 0;
+		}
+
+		public List<Criterion> getAllCriteria() {
+			return criteria;
+		}
+
+		public List<Criterion> getCriteria() {
+			return criteria;
+		}
+
+		protected void addCriterion(String condition) {
+			if (condition == null) {
+				throw new RuntimeException("Value for condition cannot be null");
+			}
+			criteria.add(new Criterion(condition));
+		}
+
+		protected void addCriterion(String condition, Object value, String property) {
+			if (value == null) {
+				throw new RuntimeException("Value for " + property + " cannot be null");
+			}
+			criteria.add(new Criterion(condition, value));
+		}
+
+		protected void addCriterion(String condition, Object value1, Object value2, String property) {
+			if (value1 == null || value2 == null) {
+				throw new RuntimeException("Between values for " + property + " cannot be null");
+			}
+			criteria.add(new Criterion(condition, value1, value2));
+		}
+
+		public Criteria andIdIsNull() {
+			addCriterion("id is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdIsNotNull() {
+			addCriterion("id is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdEqualTo(String value) {
+			addCriterion("id =", value, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdNotEqualTo(String value) {
+			addCriterion("id <>", value, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdGreaterThan(String value) {
+			addCriterion("id >", value, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdGreaterThanOrEqualTo(String value) {
+			addCriterion("id >=", value, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdLessThan(String value) {
+			addCriterion("id <", value, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdLessThanOrEqualTo(String value) {
+			addCriterion("id <=", value, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdLike(String value) {
+			addCriterion("id like", value, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdNotLike(String value) {
+			addCriterion("id not like", value, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdIn(List<String> values) {
+			addCriterion("id in", values, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdNotIn(List<String> values) {
+			addCriterion("id not in", values, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdBetween(String value1, String value2) {
+			addCriterion("id between", value1, value2, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdNotBetween(String value1, String value2) {
+			addCriterion("id not between", value1, value2, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andCommodityIdIsNull() {
+			addCriterion("commodity_id is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andCommodityIdIsNotNull() {
+			addCriterion("commodity_id is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andCommodityIdEqualTo(String value) {
+			addCriterion("commodity_id =", value, "commodityId");
+			return (Criteria) this;
+		}
+
+		public Criteria andCommodityIdNotEqualTo(String value) {
+			addCriterion("commodity_id <>", value, "commodityId");
+			return (Criteria) this;
+		}
+
+		public Criteria andCommodityIdGreaterThan(String value) {
+			addCriterion("commodity_id >", value, "commodityId");
+			return (Criteria) this;
+		}
+
+		public Criteria andCommodityIdGreaterThanOrEqualTo(String value) {
+			addCriterion("commodity_id >=", value, "commodityId");
+			return (Criteria) this;
+		}
+
+		public Criteria andCommodityIdLessThan(String value) {
+			addCriterion("commodity_id <", value, "commodityId");
+			return (Criteria) this;
+		}
+
+		public Criteria andCommodityIdLessThanOrEqualTo(String value) {
+			addCriterion("commodity_id <=", value, "commodityId");
+			return (Criteria) this;
+		}
+
+		public Criteria andCommodityIdLike(String value) {
+			addCriterion("commodity_id like", value, "commodityId");
+			return (Criteria) this;
+		}
+
+		public Criteria andCommodityIdNotLike(String value) {
+			addCriterion("commodity_id not like", value, "commodityId");
+			return (Criteria) this;
+		}
+
+		public Criteria andCommodityIdIn(List<String> values) {
+			addCriterion("commodity_id in", values, "commodityId");
+			return (Criteria) this;
+		}
+
+		public Criteria andCommodityIdNotIn(List<String> values) {
+			addCriterion("commodity_id not in", values, "commodityId");
+			return (Criteria) this;
+		}
+
+		public Criteria andCommodityIdBetween(String value1, String value2) {
+			addCriterion("commodity_id between", value1, value2, "commodityId");
+			return (Criteria) this;
+		}
+
+		public Criteria andCommodityIdNotBetween(String value1, String value2) {
+			addCriterion("commodity_id not between", value1, value2, "commodityId");
+			return (Criteria) this;
+		}
+
+		public Criteria andUidIsNull() {
+			addCriterion("uid is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andUidIsNotNull() {
+			addCriterion("uid is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andUidEqualTo(String value) {
+			addCriterion("uid =", value, "uid");
+			return (Criteria) this;
+		}
+
+		public Criteria andUidNotEqualTo(String value) {
+			addCriterion("uid <>", value, "uid");
+			return (Criteria) this;
+		}
+
+		public Criteria andUidGreaterThan(String value) {
+			addCriterion("uid >", value, "uid");
+			return (Criteria) this;
+		}
+
+		public Criteria andUidGreaterThanOrEqualTo(String value) {
+			addCriterion("uid >=", value, "uid");
+			return (Criteria) this;
+		}
+
+		public Criteria andUidLessThan(String value) {
+			addCriterion("uid <", value, "uid");
+			return (Criteria) this;
+		}
+
+		public Criteria andUidLessThanOrEqualTo(String value) {
+			addCriterion("uid <=", value, "uid");
+			return (Criteria) this;
+		}
+
+		public Criteria andUidLike(String value) {
+			addCriterion("uid like", value, "uid");
+			return (Criteria) this;
+		}
+
+		public Criteria andUidNotLike(String value) {
+			addCriterion("uid not like", value, "uid");
+			return (Criteria) this;
+		}
+
+		public Criteria andUidIn(List<String> values) {
+			addCriterion("uid in", values, "uid");
+			return (Criteria) this;
+		}
+
+		public Criteria andUidNotIn(List<String> values) {
+			addCriterion("uid not in", values, "uid");
+			return (Criteria) this;
+		}
+
+		public Criteria andUidBetween(String value1, String value2) {
+			addCriterion("uid between", value1, value2, "uid");
+			return (Criteria) this;
+		}
+
+		public Criteria andUidNotBetween(String value1, String value2) {
+			addCriterion("uid not between", value1, value2, "uid");
+			return (Criteria) this;
+		}
+
+		public Criteria andOrderNoIsNull() {
+			addCriterion("order_no is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andOrderNoIsNotNull() {
+			addCriterion("order_no is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andOrderNoEqualTo(String value) {
+			addCriterion("order_no =", value, "orderNo");
+			return (Criteria) this;
+		}
+
+		public Criteria andOrderNoNotEqualTo(String value) {
+			addCriterion("order_no <>", value, "orderNo");
+			return (Criteria) this;
+		}
+
+		public Criteria andOrderNoGreaterThan(String value) {
+			addCriterion("order_no >", value, "orderNo");
+			return (Criteria) this;
+		}
+
+		public Criteria andOrderNoGreaterThanOrEqualTo(String value) {
+			addCriterion("order_no >=", value, "orderNo");
+			return (Criteria) this;
+		}
+
+		public Criteria andOrderNoLessThan(String value) {
+			addCriterion("order_no <", value, "orderNo");
+			return (Criteria) this;
+		}
+
+		public Criteria andOrderNoLessThanOrEqualTo(String value) {
+			addCriterion("order_no <=", value, "orderNo");
+			return (Criteria) this;
+		}
+
+		public Criteria andOrderNoLike(String value) {
+			addCriterion("order_no like", value, "orderNo");
+			return (Criteria) this;
+		}
+
+		public Criteria andOrderNoNotLike(String value) {
+			addCriterion("order_no not like", value, "orderNo");
+			return (Criteria) this;
+		}
+
+		public Criteria andOrderNoIn(List<String> values) {
+			addCriterion("order_no in", values, "orderNo");
+			return (Criteria) this;
+		}
+
+		public Criteria andOrderNoNotIn(List<String> values) {
+			addCriterion("order_no not in", values, "orderNo");
+			return (Criteria) this;
+		}
+
+		public Criteria andOrderNoBetween(String value1, String value2) {
+			addCriterion("order_no between", value1, value2, "orderNo");
+			return (Criteria) this;
+		}
+
+		public Criteria andOrderNoNotBetween(String value1, String value2) {
+			addCriterion("order_no not between", value1, value2, "orderNo");
+			return (Criteria) this;
+		}
+
+		public Criteria andContentIsNull() {
+			addCriterion("content is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andContentIsNotNull() {
+			addCriterion("content is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andContentEqualTo(String value) {
+			addCriterion("content =", value, "content");
+			return (Criteria) this;
+		}
+
+		public Criteria andContentNotEqualTo(String value) {
+			addCriterion("content <>", value, "content");
+			return (Criteria) this;
+		}
+
+		public Criteria andContentGreaterThan(String value) {
+			addCriterion("content >", value, "content");
+			return (Criteria) this;
+		}
+
+		public Criteria andContentGreaterThanOrEqualTo(String value) {
+			addCriterion("content >=", value, "content");
+			return (Criteria) this;
+		}
+
+		public Criteria andContentLessThan(String value) {
+			addCriterion("content <", value, "content");
+			return (Criteria) this;
+		}
+
+		public Criteria andContentLessThanOrEqualTo(String value) {
+			addCriterion("content <=", value, "content");
+			return (Criteria) this;
+		}
+
+		public Criteria andContentLike(String value) {
+			addCriterion("content like", value, "content");
+			return (Criteria) this;
+		}
+
+		public Criteria andContentNotLike(String value) {
+			addCriterion("content not like", value, "content");
+			return (Criteria) this;
+		}
+
+		public Criteria andContentIn(List<String> values) {
+			addCriterion("content in", values, "content");
+			return (Criteria) this;
+		}
+
+		public Criteria andContentNotIn(List<String> values) {
+			addCriterion("content not in", values, "content");
+			return (Criteria) this;
+		}
+
+		public Criteria andContentBetween(String value1, String value2) {
+			addCriterion("content between", value1, value2, "content");
+			return (Criteria) this;
+		}
+
+		public Criteria andContentNotBetween(String value1, String value2) {
+			addCriterion("content not between", value1, value2, "content");
+			return (Criteria) this;
+		}
+
+		public Criteria andStarIsNull() {
+			addCriterion("star is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andStarIsNotNull() {
+			addCriterion("star is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andStarEqualTo(Integer value) {
+			addCriterion("star =", value, "star");
+			return (Criteria) this;
+		}
+
+		public Criteria andStarNotEqualTo(Integer value) {
+			addCriterion("star <>", value, "star");
+			return (Criteria) this;
+		}
+
+		public Criteria andStarGreaterThan(Integer value) {
+			addCriterion("star >", value, "star");
+			return (Criteria) this;
+		}
+
+		public Criteria andStarGreaterThanOrEqualTo(Integer value) {
+			addCriterion("star >=", value, "star");
+			return (Criteria) this;
+		}
+
+		public Criteria andStarLessThan(Integer value) {
+			addCriterion("star <", value, "star");
+			return (Criteria) this;
+		}
+
+		public Criteria andStarLessThanOrEqualTo(Integer value) {
+			addCriterion("star <=", value, "star");
+			return (Criteria) this;
+		}
+
+		public Criteria andStarIn(List<Integer> values) {
+			addCriterion("star in", values, "star");
+			return (Criteria) this;
+		}
+
+		public Criteria andStarNotIn(List<Integer> values) {
+			addCriterion("star not in", values, "star");
+			return (Criteria) this;
+		}
+
+		public Criteria andStarBetween(Integer value1, Integer value2) {
+			addCriterion("star between", value1, value2, "star");
+			return (Criteria) this;
+		}
+
+		public Criteria andStarNotBetween(Integer value1, Integer value2) {
+			addCriterion("star not between", value1, value2, "star");
+			return (Criteria) this;
+		}
+
+		public Criteria andIpIsNull() {
+			addCriterion("ip is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andIpIsNotNull() {
+			addCriterion("ip is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andIpEqualTo(String value) {
+			addCriterion("ip =", value, "ip");
+			return (Criteria) this;
+		}
+
+		public Criteria andIpNotEqualTo(String value) {
+			addCriterion("ip <>", value, "ip");
+			return (Criteria) this;
+		}
+
+		public Criteria andIpGreaterThan(String value) {
+			addCriterion("ip >", value, "ip");
+			return (Criteria) this;
+		}
+
+		public Criteria andIpGreaterThanOrEqualTo(String value) {
+			addCriterion("ip >=", value, "ip");
+			return (Criteria) this;
+		}
+
+		public Criteria andIpLessThan(String value) {
+			addCriterion("ip <", value, "ip");
+			return (Criteria) this;
+		}
+
+		public Criteria andIpLessThanOrEqualTo(String value) {
+			addCriterion("ip <=", value, "ip");
+			return (Criteria) this;
+		}
+
+		public Criteria andIpLike(String value) {
+			addCriterion("ip like", value, "ip");
+			return (Criteria) this;
+		}
+
+		public Criteria andIpNotLike(String value) {
+			addCriterion("ip not like", value, "ip");
+			return (Criteria) this;
+		}
+
+		public Criteria andIpIn(List<String> values) {
+			addCriterion("ip in", values, "ip");
+			return (Criteria) this;
+		}
+
+		public Criteria andIpNotIn(List<String> values) {
+			addCriterion("ip not in", values, "ip");
+			return (Criteria) this;
+		}
+
+		public Criteria andIpBetween(String value1, String value2) {
+			addCriterion("ip between", value1, value2, "ip");
+			return (Criteria) this;
+		}
+
+		public Criteria andIpNotBetween(String value1, String value2) {
+			addCriterion("ip not between", value1, value2, "ip");
+			return (Criteria) this;
+		}
+
+		public Criteria andCreateTimeIsNull() {
+			addCriterion("create_time is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andCreateTimeIsNotNull() {
+			addCriterion("create_time is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andCreateTimeEqualTo(Date value) {
+			addCriterion("create_time =", value, "createTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andCreateTimeNotEqualTo(Date value) {
+			addCriterion("create_time <>", value, "createTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andCreateTimeGreaterThan(Date value) {
+			addCriterion("create_time >", value, "createTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
+			addCriterion("create_time >=", value, "createTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andCreateTimeLessThan(Date value) {
+			addCriterion("create_time <", value, "createTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
+			addCriterion("create_time <=", value, "createTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andCreateTimeIn(List<Date> values) {
+			addCriterion("create_time in", values, "createTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andCreateTimeNotIn(List<Date> values) {
+			addCriterion("create_time not in", values, "createTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andCreateTimeBetween(Date value1, Date value2) {
+			addCriterion("create_time between", value1, value2, "createTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
+			addCriterion("create_time not between", value1, value2, "createTime");
+			return (Criteria) this;
+		}
+	}
+
+	/**
+	 * This class was generated by MyBatis Generator. This class corresponds to the database table jt_commodity_comment
+	 * @mbg.generated  Thu Jul 19 10:59:39 CST 2018
+	 */
+	public static class Criterion {
+		private String condition;
+		private Object value;
+		private Object secondValue;
+		private boolean noValue;
+		private boolean singleValue;
+		private boolean betweenValue;
+		private boolean listValue;
+		private String typeHandler;
+
+		public String getCondition() {
+			return condition;
+		}
+
+		public Object getValue() {
+			return value;
+		}
+
+		public Object getSecondValue() {
+			return secondValue;
+		}
+
+		public boolean isNoValue() {
+			return noValue;
+		}
+
+		public boolean isSingleValue() {
+			return singleValue;
+		}
+
+		public boolean isBetweenValue() {
+			return betweenValue;
+		}
+
+		public boolean isListValue() {
+			return listValue;
+		}
+
+		public String getTypeHandler() {
+			return typeHandler;
+		}
+
+		protected Criterion(String condition) {
+			super();
+			this.condition = condition;
+			this.typeHandler = null;
+			this.noValue = true;
+		}
+
+		protected Criterion(String condition, Object value, String typeHandler) {
+			super();
+			this.condition = condition;
+			this.value = value;
+			this.typeHandler = typeHandler;
+			if (value instanceof List<?>) {
+				this.listValue = true;
+			} else {
+				this.singleValue = true;
+			}
+		}
+
+		protected Criterion(String condition, Object value) {
+			this(condition, value, null);
+		}
+
+		protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
+			super();
+			this.condition = condition;
+			this.value = value;
+			this.secondValue = secondValue;
+			this.typeHandler = typeHandler;
+			this.betweenValue = true;
+		}
+
+		protected Criterion(String condition, Object value, Object secondValue) {
+			this(condition, value, secondValue, null);
+		}
+	}
+
+	/**
+     * This class was generated by MyBatis Generator.
+     * This class corresponds to the database table jt_commodity_comment
+     *
+     * @mbg.generated do_not_delete_during_merge Thu Jul 19 10:59:39 CST 2018
+     */
+    public static class Criteria extends GeneratedCriteria {
+
+        protected Criteria() {
+            super();
+        }
+    }
+}

+ 0 - 1
src/main/java/com/goafanti/demand/controller/UserDemandApiController.java

@@ -92,7 +92,6 @@ public class UserDemandApiController extends CertifyApiController {
 			@RequestParam(name = "publishPages[]", required = false) String[] publishPages,
 			String validityPeriodFormattedDate) {
 		Result res = new Result();
-		System.out.println("a1");
 		if (bindingResult.hasErrors()) {
 			res.getError().add(buildErrorByMsg(bindingResult.getFieldError().getDefaultMessage(),
 					DemandFields.getFieldDesc(bindingResult.getFieldError().getField())));

File diff suppressed because it is too large
+ 1 - 384
src/main/webapp/WEB-INF/views/portal/index.html


+ 384 - 0
src/main/webapp/WEB-INF/views/portal/indexOld.html

@@ -0,0 +1,384 @@
+<!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" />
+<link rel="icon" th:href="${portalHost+'/img/ico_logo.ico'}">
+<meta name="keywords" content="" />
+<meta name="Description" content="" />
+<meta name="viewport"
+	content="width=device-width,initial-scale=1, minimum-scale=1, maximum-scale=1,user-scalable=no">
+<meta http-equiv="x-ua-compatible" content="ie=edge">
+<title>首页</title>
+<link th:href="${portalHost+'/vendors.css'}" rel="stylesheet">
+<link th:href="${portalHost+'/index.css'}" rel="stylesheet">
+</head>
+<body>
+	
+		<div th:replace="common::nav('','')"></div>
+
+		<div class="carouselt">
+			<ul class="ct-img-big clear">
+				<li data-index=0 ><a href=""><img th:src="${portalHost+'/img/index_banner01.jpg'}" alt=""/></a></li>
+				<li data-index=1 ><a href=""><img th:src="${portalHost+'/img/index_banner02.jpg'}" alt=""/></a></li>
+				<li data-index=2 ><a href=""><img th:src="${portalHost+'/img/index_banner03.jpg'}" alt=""/></a></li>
+				<li data-index=3 ><a href=""><img th:src="${portalHost+'/img/index_banner04.jpg'}" alt=""/></a></li>
+				<li data-index=4 ><a href=""><img th:src="${portalHost+'/img/index_banner05.jpg'}" alt=""/></a></li>
+				<li data-index=5 ><a href=""><img th:src="${portalHost+'/img/index_banner06.jpg'}" alt=""/></a></li>
+			</ul>
+			<a class="btn btn-next" href="">
+				<img th:src="${portalHost+'/img/index_next.png'}" alt=""/>
+			</a>
+			<a class="btn btn-pre" href="">
+				<img th:src="${portalHost+'/img/index_pre.png'}" alt=""/>
+			</a>
+		</div>	
+		<div class="indexSeach">
+		<div id="indexSeach">
+			<div class="indexSeach_one">
+				<ul>
+					<li class="indexActive" data-val="0">成果</li>
+					<li data-val="1">需求</li>
+					<li data-val="2">政策</li>
+				</ul>
+				<div>
+					<div>
+						<input type="text" />
+					</div>
+					<img th:src="${portalHost+'/img/indexNew1.jpg'}" alt="" class="indexImg1"/>
+					<img th:src="${portalHost+'/img/indexNew2.jpg'}" alt="" class="indexImg2"/>
+				</div>
+			</div>
+			<div class="indexSeach_two">
+				<div>
+					<div class="seachTitle">
+						<div>技术成果</div>
+					</div>
+					<div id="seachCont">
+						<div class="seachCont seachCont1" clicka="0">
+							<div>
+								专利技术
+							</div>
+							<div>
+								实用技术
+							</div>
+							<div>
+							技术评估
+							</div>
+							<div>
+								发布需求
+							</div>
+							<div>
+								承接需求
+							</div>
+							
+						</div>
+					</div>
+					<div class="seachMore">
+					<a th:href="@{/portal/technologyTrading/achievement}">
+						更多></a>
+					</div>
+				</div>
+				<div>
+					<div class="seachTitle">
+						<div>技术需求</div>
+					</div>
+					<div id="seachCont">
+						<div class="seachCont seachCont4" clicka="0">
+						
+							<div>
+							产业需求
+							</div>
+							<div>
+							资金需求
+							</div>
+							<div>
+							体系认证
+							</div>
+							<div>
+								购买技术
+							</div>
+							<div>
+							发布技术
+							</div>
+							
+						</div>
+					</div>
+					
+					<div class="seachMore">
+					<a th:href="@{/portal/technologyTrading/demand}">
+						更多></a>
+					</div>
+				</div>
+				
+				<div>
+					<div class="seachTitle">
+						<div>科技服务</div>
+					</div>
+					<div id="seachCont">
+						<div class="seachCont seachCont2" clicka="0">
+							<div>
+							高企认定
+							</div>
+							<div>
+							项目申报
+							</div>
+							<div>
+							体系认证
+							</div>
+							<div>
+								产品认证
+							</div>
+							<div>
+								知识产权
+							</div>
+							<div>
+								资质认证
+							</div>
+						</div>
+					</div>
+					
+					<div class="seachMore">
+					<a th:href="@{/portal/service/serviceIndex}">
+						更多></a>
+					</div>
+				</div>
+				<div>
+					<div class="seachTitle">
+						<div>智库咨询</div>
+					</div>
+					<div id="seachCont">
+						<div class="seachCont seachCont3" clicka="0">
+							<div>
+								中央政策
+							</div>
+							<div>
+							地方政策
+							</div>
+							<div>
+								邀约专家
+							</div>
+							<div>
+							涉外专家
+							</div>
+							<div>
+								品牌打造
+							</div>
+						</div>
+					</div>
+					
+					<div class="seachMore">
+					<a th:href="@{/portal/thinkTank/index}">
+						更多></a>
+					</div>
+				</div>
+				
+			</div>
+			<div class="indexSeach_three">
+				<div class="seachTitle2">
+					<div>科技平台</div>
+				</div>
+				<div class="wit">
+					<img th:src="${portalHost+'/img/indexNewa1.jpg'}" alt="" />
+					<p>科技成果转化公共服务平台</p>
+				</div>
+				<div class="wit">
+					<img th:src="${portalHost+'/img/indexNewa2.jpg'}" alt="" />
+					<p>军民融合创新发展平台</p>
+				</div>
+				<div class="wit">
+					<img th:src="${portalHost+'/img/indexNewa3.jpg'}" alt="" />
+					<p>科技服务综合服务平台</p>
+				</div>
+				<div class="wih">
+					<img th:src="${portalHost+'/img/indexNewa4.jpg'}" alt="" />
+					<p>移动应用开发</p>
+				</div>
+				<div class="wih">
+					<img th:src="${portalHost+'/img/indexNewa5.jpg'}" alt="" />
+					<p>运营平台</p>
+				</div>
+				<div class="wih">
+					<img th:src="${portalHost+'/img/indexNewa6.jpg'}" alt="" />
+					<p>人工智能技术</p>
+				</div>
+			</div>
+		</div>
+		</div>
+		<div id="indexServe">
+			<div class="indexServe_title">
+				<img th:src="${portalHost+'/img/indexNew3.png'}" alt="热门服务" />
+				<p>关于科技&nbsp;&nbsp;&nbsp;&nbsp;我们能做得更多</p>
+			</div>
+			<div class="indexServe_cont">
+				
+				<div th:each="pj,projectStatus:${projects}" th:if="${projectStatus.index<3}">
+				<div >
+				<a></a>
+					<h2 th:text="${pj.name}"></h2>
+					<div class="indexServe_bots">
+					<div class="wrapper">
+						<h3 th:text="${'什么是'+pj.name+'?'}"></h3>
+						<p th:text="${#strings.abbreviate(pj.introduce,90)}"></p>
+						</div>
+						<img th:src="${pj.maxImgUrl}==null?${portalHost+'/img/indexNew25.jpg'}:${avatarUploadHost+pj.maxImgUrl}" alt="" />
+					</div>
+					<div class="indexServe_bot">
+						<div>认定好处</div>
+						<p th:text="${#strings.abbreviate(pj.value,90)}"></p>
+					</div>
+					<a th:href="@{/portal/service/serviceDetail(id=${pj.id})}">
+					<div class="indexServe_img">
+					<p>了解更多<span>></span></p>
+					</div>
+					</a>
+					</div>
+				</div>
+				<div class="indexServe_long indexTxt"  th:each="pj1,projectStatus:${projects}" th:if="${projectStatus.index>=3} and ${projectStatus.index<5}" >
+					<img th:src="${pj1.maxImgUrl}==null?${portalHost+'/img/initPic/serviceInit.jpg'}:${avatarUploadHost+pj1.maxImgUrl}" alt="" />
+					<div class="indexServe_bots">
+							<h3 th:text="${'什么是'+pj1.name+'?'}"></h3>
+						<p th:text="${#strings.abbreviate(pj1.introduce,90)}"></p>
+					</div>
+					<div class="indexServe_bot">
+						<div>认定好处</div>
+							<p th:text="${#strings.abbreviate(pj1.value,90)}"></p>
+							<a th:href="@{/portal/service/serviceDetail(id=${pj1.id})}">
+					<div class="indexServe_img">
+						<p>
+						了解更多
+						
+						<span >></span></p>
+					</div>
+					</a>
+					</div>
+						
+				</div>
+				
+			</div>
+			<img th:src="${portalHost+'/img/indexNew12.jpg'}" alt="" class="indexServe_right"/>
+			<img th:src="${portalHost+'/img/indexNew1300.png'}" alt="" class="indexServe_bottom"/>
+		</div>
+		<div id="indexPolicy">
+			<div class="indexServe_title">
+				<img th:src="${portalHost+'/img/indexNew4.png'}" alt="政策解析" />
+				<p>关于科技&nbsp;&nbsp;&nbsp;&nbsp;我们能做得更多</p>
+			</div>
+			<div class="fruit_h3">
+				<a th:href=@{/portal/thinkTank/policyList}><span>+</span> 更多政策</a>
+			</div>
+			<div class="policy_cont">
+				<div class="policy_img">
+					<img th:src="${portalHost+'/img/index_er3.jpg'}" alt="" />
+				</div>
+				<div class="policy_p">
+					
+					<a th:each="policy:${policys}" th:href="@{/portal/news/newsDetail(id=${policy.id},type=0)}">
+						<div >
+							<div class="policy_date">
+							<h4 th:text="${#dates.format(policy.releaseDate,'MM-dd')}"></h4>
+							<p th:text="${#dates.format(policy.releaseDate,'yyyy')}"></p>
+							</div>
+							<div class="policy_line"></div>
+							<div class="policy_p_cont">
+								<h5 th:text="${policy.title}"></h5>
+								<p th:text="${policy.summary}">解读习近平总书记在中央财经领导小组第十六次会议上关于知识产权工作的重要论述</p>
+							</div>
+						</div>
+					</a>
+				</div>
+			</div>
+		</div>
+		<div id="indexGroom">
+			<div class="indexServe_title">
+				<img th:src="${portalHost+'/img/indexNew5.png'}" alt="技淘推荐" />
+				<p>关于科技&nbsp;&nbsp;&nbsp;&nbsp;我们能做得更多</p>
+			</div>
+			<div class="indexGroom_table">
+				<div class="indexGroom_active">成果</div>
+				<div>需求</div>
+			</div>
+			<div class="indexGroom_tables chengguo" >
+			<a  th:each="a:${achievements}" th:href="@{/portal/technologyTrading/achievementDetail(id=${a.id},type=${a.dataCategory})}" >
+					<div>
+						<img th:src="${a.firstPicture}==null?${portalHost+'/img/initPic/achievementInit.jpg'}:${avatarUploadHost+a.firstPicture}" alt="" />
+						<div>
+							<h3 th:text="${a.name}"></h3>
+							<p th:text="${a.introduction}"></p>
+							<div>
+								<div th:if="${a.fieldAS}!=null" th:text="${a.fieldAS}"></div>
+								<div th:if="${a.fieldBS}!=null" th:text="${a.fieldBS}"></div>
+							</div>
+						</div>
+					</div>
+			</a>
+				
+			</div>
+			<div class="indexGroom_tables xuqiu">
+				
+				<a th:each="d:${demands}" th:href="@{/portal/technologyTrading/demandDetail(id=${d.id},type=${d.dataCategory})}">
+					<div >
+						<img th:src="${d.pictureUrl}==null?${portalHost+'/img/initPic/demandInit.jpg'}:${avatarUploadHost+d.pictureUrl}" alt="" />
+						<div>
+							<h3 th:text="${d.name}">风力发电领域内高效率变化内高效率变化</h3>
+							<p th:text="${d.problemDes}">风力发电领域内高效率变化内高效率变化风力发电领域内高效率变化内高效率变化风力发电领域内高效率变化内高效率变化</p>
+							<div>
+								<div th:if="${d.industryCategory1}!=null" th:text="${d.industryCategory1}">环保</div>
+								<div th:if="${d.industryCategory2}!=null" th:text="${d.industryCategory2}">电力</div>
+							</div>
+						</div>
+					</div>
+				</a>
+			</div>
+			<div class="indexGroom_more chengguo">
+				<a th:href="@{/portal/technologyTrading/achievement}">查看更多 ></a>
+			</div>
+			<div class="indexGroom_more xuqiu">
+				<a th:href="@{/portal/technologyTrading/demand}">查看更多 ></a>
+			</div>
+			<img th:src="${portalHost+'/img/indexNew13.jpg'}" alt="" class="indexServe_bottom"/>
+		</div>
+		<div id="indexId">
+			<div class="indexServe_title">
+				<img th:src="${portalHost+'/img/indexNew6.png'}" alt="技淘推荐" />
+				<p>关于科技&nbsp;&nbsp;&nbsp;&nbsp;我们能做得更多</p>
+			</div>
+		</div>
+		<div id="indexExpert">
+			<div class="indexExpert">
+				<div class="indexExpert_cont">
+				
+					<a  th:each="e:${experts}" th:href="@{/portal/subscriberDetail(uid=${e.uid},type=0)}" >
+						<div>
+							<img th:src="${e.headPortraitUrl}==null?${portalHost+'/img/initPic/policyInit.jpg'}:${avatarUploadHost+e.headPortraitUrl}" alt="" />
+							<div class="indexExpert_basc">
+								<h3 th:text="${e.username}">张三</h3>
+								<span>/</span>
+								<h4 th:text="${e.workUnit}">广州科技学院</h4>
+								<p th:text="${e.introduction}">从业8年,专利代理资质,很厉害的一个朋友厉害的一个朋友</p>
+							</div>
+							<div class="indexExpert_yuyue">
+								<span th:text="${e.reservationCount}"></span>次预约
+							</div>
+						</div>
+					</a>
+					
+				</div>
+				<div class="indexGroom_more">
+					<a th:href=@{/portal/thinkTank/index.html#zizone}> 查看更多 ></a>
+				</div>
+			</div>
+		</div>
+		<div id="indexWord"></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+'/vendors.js'}"></script>
+	<script type="text/javascript" th:src="${portalHost+'/index.js'}"></script>
+	</div>
+	</body>
+</html>