Przeglądaj źródła

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

anderx 7 lat temu
rodzic
commit
582f3d6be6

+ 5 - 7
src/main/java/com/goafanti/comment/bo/CommentInput.java

@@ -5,7 +5,7 @@ public class CommentInput {
 	private String content;
 	private String content;
 	private Integer star;
 	private Integer star;
 	private String orderNo;
 	private String orderNo;
-	private Integer type;//项目 0  顾问、专家 1
+	private Integer commodityType;//0-项目,1-成果,2-需求,3-专家,4-顾问
 public String getCommodityId() {
 public String getCommodityId() {
 	return commodityId;
 	return commodityId;
 }
 }
@@ -30,12 +30,10 @@ public String getOrderNo() {
 public void setOrderNo(String orderNo) {
 public void setOrderNo(String orderNo) {
 	this.orderNo = orderNo;
 	this.orderNo = orderNo;
 }
 }
-
-public Integer getType() {
-	return type;
+public Integer getCommodityType() {
+	return commodityType;
 }
 }
-public void setType(Integer type) {
-	this.type = type;
+public void setCommodityType(Integer commodityType) {
+	this.commodityType = commodityType;
 }
 }
-
 }
 }

+ 4 - 1
src/main/java/com/goafanti/comment/service/impl/CommentServiceImpl.java

@@ -57,6 +57,7 @@ public class CommentServiceImpl extends BaseMybatisDao<JtCommodityCommentMapper>
 		jtCommodityComment.setId(id);
 		jtCommodityComment.setId(id);
 		jtCommodityComment.setIp(ip);
 		jtCommodityComment.setIp(ip);
 		jtCommodityComment.setStar(commentInput.getStar());
 		jtCommodityComment.setStar(commentInput.getStar());
+		jtCommodityComment.setCommodityType(commentInput.getCommodityType());
 		
 		
 		//用户id或者订单id如果不存在(匿名评论)
 		//用户id或者订单id如果不存在(匿名评论)
 		if(StringUtils.isBlank(commentInput.getOrderNo())){
 		if(StringUtils.isBlank(commentInput.getOrderNo())){
@@ -67,7 +68,9 @@ public class CommentServiceImpl extends BaseMybatisDao<JtCommodityCommentMapper>
 			//查看当前ip的游客名称和游客最大名称
 			//查看当前ip的游客名称和游客最大名称
 			uid = jtCommodityCommentMapper.getUidByIp(ip);
 			uid = jtCommodityCommentMapper.getUidByIp(ip);
 			if(StringUtils.isBlank(uid)){
 			if(StringUtils.isBlank(uid)){
-				int c = Integer.parseInt(jtCommodityCommentMapper.getMaxNameUid()) + 1;
+				uid = jtCommodityCommentMapper.getMaxNameUid();
+				uid = StringUtils.isBlank(uid) ? "0" : uid;//如果是第一个游客
+				int c = Integer.parseInt(uid) + 1;
 				uid = "游客" + String.format("%03d", c);
 				uid = "游客" + String.format("%03d", c);
 			}
 			}
 		}
 		}

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

@@ -701,12 +701,16 @@ public class PublicController extends BaseController {
 		if(StringUtils.isBlank(commentInput.getCommodityId())) {
 		if(StringUtils.isBlank(commentInput.getCommodityId())) {
 			result.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"商品id为空","商品id"));return result;
 			result.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"商品id为空","商品id"));return result;
 		}
 		}
-		if(commentInput.getStar()==null || commentInput.getStar()<0 || commentInput.getStar()>5) {
+		if(null == commentInput.getStar()  || commentInput.getStar()<0 || commentInput.getStar()>5) {
 			result.getError().add(buildError(ErrorConstants.PARAM_ERROR,"","评分"));return result;
 			result.getError().add(buildError(ErrorConstants.PARAM_ERROR,"","评分"));return result;
 		}
 		}
 		if(StringUtils.isBlank(commentInput.getContent()) || commentInput.getContent().length()>512) {
 		if(StringUtils.isBlank(commentInput.getContent()) || commentInput.getContent().length()>512) {
 			result.getError().add(buildError(ErrorConstants.PARAM_ERROR,"","内容限制1-512字符"));return result;
 			result.getError().add(buildError(ErrorConstants.PARAM_ERROR,"","内容限制1-512字符"));return result;
 		}
 		}
+		if(null == commentInput.getCommodityType() || commentInput.getCommodityType()<0 || commentInput.getCommodityType() > 4) {
+			result.getError().add(buildError(ErrorConstants.PARAM_ERROR,"","产品类型"));return result;
+		}
+		
 		int res=commentService.addNewComment(commentInput,ip);
 		int res=commentService.addNewComment(commentInput,ip);
 		if(res ==-1) {
 		if(res ==-1) {
 			result.getError().add(buildError(ErrorConstants.PARAM_ERROR,"","提交失败"));return result;
 			result.getError().add(buildError(ErrorConstants.PARAM_ERROR,"","提交失败"));return result;

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

@@ -845,7 +845,8 @@
 	    p.id,
 	    p.id,
 	  	p.name,
 	  	p.name,
 	  	p.introduce,
 	  	p.introduce,
-	  	p.min_img_url as minImgUrl
+	  	p.min_img_url as minImgUrl,
+	  	p.advertisement
   	from jt_business_project p
   	from jt_business_project p
     left join jt_business_category c on p.category_id = c.id
     left join jt_business_category c on p.category_id = c.id
     where c.module = #{module} 
     where c.module = #{module} 

+ 20 - 5
src/main/java/com/goafanti/common/mapper/JtCommodityCommentMapper.xml

@@ -15,6 +15,7 @@
     <result column="star" jdbcType="INTEGER" property="star" />
     <result column="star" jdbcType="INTEGER" property="star" />
     <result column="ip" jdbcType="VARCHAR" property="ip" />
     <result column="ip" jdbcType="VARCHAR" property="ip" />
     <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
     <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
+    <result column="commodity_type" jdbcType="INTEGER" property="commodityType" />
   </resultMap>
   </resultMap>
   <sql id="Example_Where_Clause">
   <sql id="Example_Where_Clause">
     <!--
     <!--
@@ -90,7 +91,7 @@
       This element is automatically generated by MyBatis Generator, do not modify.
       This element is automatically generated by MyBatis Generator, do not modify.
       This element was generated on Thu Jul 19 10:59:39 CST 2018.
       This element was generated on Thu Jul 19 10:59:39 CST 2018.
     -->
     -->
-    id, commodity_id, uid, order_no, content, star, ip, create_time
+    id, commodity_id, uid, order_no, content, star, ip, create_time, commodity_type
   </sql>
   </sql>
   <select id="selectByExample" parameterType="com.goafanti.common.model.JtCommodityCommentExample" resultMap="BaseResultMap">
   <select id="selectByExample" parameterType="com.goafanti.common.model.JtCommodityCommentExample" resultMap="BaseResultMap">
     <!--
     <!--
@@ -150,10 +151,10 @@
     -->
     -->
     insert into jt_commodity_comment (id, commodity_id, uid, 
     insert into jt_commodity_comment (id, commodity_id, uid, 
       order_no, content, star, 
       order_no, content, star, 
-      ip, create_time)
+      ip, create_time, commodity_type)
     values (#{id,jdbcType=VARCHAR}, #{commodityId,jdbcType=VARCHAR}, #{uid,jdbcType=VARCHAR}, 
     values (#{id,jdbcType=VARCHAR}, #{commodityId,jdbcType=VARCHAR}, #{uid,jdbcType=VARCHAR}, 
       #{orderNo,jdbcType=VARCHAR}, #{content,jdbcType=VARCHAR}, #{star,jdbcType=INTEGER}, 
       #{orderNo,jdbcType=VARCHAR}, #{content,jdbcType=VARCHAR}, #{star,jdbcType=INTEGER}, 
-      #{ip,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP})
+      #{ip,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{commodityType,jdbcType=INTEGER})
   </insert>
   </insert>
   <insert id="insertSelective" parameterType="com.goafanti.common.model.JtCommodityComment">
   <insert id="insertSelective" parameterType="com.goafanti.common.model.JtCommodityComment">
     <!--
     <!--
@@ -187,6 +188,9 @@
       <if test="createTime != null">
       <if test="createTime != null">
         create_time,
         create_time,
       </if>
       </if>
+      <if test="commodityType != null">
+        commodity_type,
+      </if>
     </trim>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="id != null">
       <if test="id != null">
@@ -213,6 +217,9 @@
       <if test="createTime != null">
       <if test="createTime != null">
         #{createTime,jdbcType=TIMESTAMP},
         #{createTime,jdbcType=TIMESTAMP},
       </if>
       </if>
+      <if test="commodityType != null">
+        #{commodityType,jdbcType=INTEGER},
+      </if>
     </trim>
     </trim>
   </insert>
   </insert>
   <select id="countByExample" parameterType="com.goafanti.common.model.JtCommodityCommentExample" resultType="java.lang.Long">
   <select id="countByExample" parameterType="com.goafanti.common.model.JtCommodityCommentExample" resultType="java.lang.Long">
@@ -258,6 +265,9 @@
       <if test="record.createTime != null">
       <if test="record.createTime != null">
         create_time = #{record.createTime,jdbcType=TIMESTAMP},
         create_time = #{record.createTime,jdbcType=TIMESTAMP},
       </if>
       </if>
+      <if test="record.commodityType != null">
+        commodity_type = #{record.commodityType,jdbcType=INTEGER},
+      </if>
     </set>
     </set>
     <if test="_parameter != null">
     <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
       <include refid="Update_By_Example_Where_Clause" />
@@ -277,7 +287,8 @@
       content = #{record.content,jdbcType=VARCHAR},
       content = #{record.content,jdbcType=VARCHAR},
       star = #{record.star,jdbcType=INTEGER},
       star = #{record.star,jdbcType=INTEGER},
       ip = #{record.ip,jdbcType=VARCHAR},
       ip = #{record.ip,jdbcType=VARCHAR},
-      create_time = #{record.createTime,jdbcType=TIMESTAMP}
+      create_time = #{record.createTime,jdbcType=TIMESTAMP},
+      commodity_type = #{record.commodityType,jdbcType=INTEGER}
     <if test="_parameter != null">
     <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
       <include refid="Update_By_Example_Where_Clause" />
     </if>
     </if>
@@ -311,6 +322,9 @@
       <if test="createTime != null">
       <if test="createTime != null">
         create_time = #{createTime,jdbcType=TIMESTAMP},
         create_time = #{createTime,jdbcType=TIMESTAMP},
       </if>
       </if>
+      <if test="commodityType != null">
+        commodity_type = #{commodityType,jdbcType=INTEGER},
+      </if>
     </set>
     </set>
     where id = #{id,jdbcType=VARCHAR}
     where id = #{id,jdbcType=VARCHAR}
   </update>
   </update>
@@ -327,7 +341,8 @@
       content = #{content,jdbcType=VARCHAR},
       content = #{content,jdbcType=VARCHAR},
       star = #{star,jdbcType=INTEGER},
       star = #{star,jdbcType=INTEGER},
       ip = #{ip,jdbcType=VARCHAR},
       ip = #{ip,jdbcType=VARCHAR},
-      create_time = #{createTime,jdbcType=TIMESTAMP}
+      create_time = #{createTime,jdbcType=TIMESTAMP},
+      commodity_type = #{commodityType,jdbcType=INTEGER}
     where id = #{id,jdbcType=VARCHAR}
     where id = #{id,jdbcType=VARCHAR}
   </update>
   </update>
   <select id="getCommentCount" resultType="java.lang.Integer">
   <select id="getCommentCount" resultType="java.lang.Integer">

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

@@ -188,4 +188,15 @@ public class JtCommodityComment {
 	public void setCreateTime(Date createTime) {
 	public void setCreateTime(Date createTime) {
 		this.createTime = createTime;
 		this.createTime = createTime;
 	}
 	}
+	
+	private Integer commodityType;
+
+	public Integer getCommodityType() {
+		return commodityType;
+	}
+
+	public void setCommodityType(Integer commodityType) {
+		this.commodityType = commodityType;
+	}
+	
 }
 }

+ 0 - 2
src/main/webapp/WEB-INF/views/portal/index.html

@@ -177,7 +177,6 @@
 		</div>
 		</div>
 	</div>
 	</div>
 	<!-- banner -->
 	<!-- banner -->
-	<div class="bannerList">
 		<div id="myCarousel" class="carousel" th:if="${#lists.size(bannerlist) eq 1}">
 		<div id="myCarousel" class="carousel" th:if="${#lists.size(bannerlist) eq 1}">
 			<!-- 轮播(Carousel)项目 -->
 			<!-- 轮播(Carousel)项目 -->
 			<div class="carousel-inner" th:each="banner,bStatus:${bannerlist}">
 			<div class="carousel-inner" th:each="banner,bStatus:${bannerlist}">
@@ -231,7 +230,6 @@
 			</div>
 			</div>
 			<!-- <span class="apply head_login">申请会员</span> -->
 			<!-- <span class="apply head_login">申请会员</span> -->
 		</div>
 		</div>
-	</div>
 
 
 	<!-- 主体内容区域 -->
 	<!-- 主体内容区域 -->
 	<div class="container">
 	<div class="container">

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

@@ -141,7 +141,7 @@
 	</footer>
 	</footer>
 	<div th:replace="common::footer(~{::script})">
 	<div th:replace="common::footer(~{::script})">
 		<script type="text/javascript" th:src="${portalHost + '/vendors.js'}"></script>
 		<script type="text/javascript" th:src="${portalHost + '/vendors.js'}"></script>
-		<script type="text/javascript" th:src="${portalHost+'/newMenu/services.js'}"></script>
+		<script type="text/javascript" th:src="${portalHost+'/newMenu/safeguarding.js'}"></script>
 	</div>
 	</div>
 </body>
 </body>
 </html>
 </html>

Plik diff jest za duży
+ 1 - 1
src/main/webapp/WEB-INF/views/portal/service/serviceDetails.html


Plik diff jest za duży
+ 1 - 1
src/main/webapp/WEB-INF/views/portal/service/serviceIndex.html