Prechádzať zdrojové kódy

百科/文章优化part2

Aslee 3 rokov pred
rodič
commit
e4474749c0

+ 4 - 0
src/main/java/com/caimei/modules/baike/dao/CmBaikeProductDao.java

@@ -53,4 +53,8 @@ public interface CmBaikeProductDao extends CrudDao<CmBaikeProduct> {
     void auditBaike(@Param("id") String id,@Param("auditStatus") Integer auditStatus,@Param("failReason") String failReason,@Param("publishTime") Date publishTime);
 
     List<NewCmShop> findShopList();
+
+    void offline(Integer id);
+
+    void updateEmptyNum(@Param("id") String id,@Param("emptyNum") Integer emptyNum);
 }

+ 18 - 0
src/main/java/com/caimei/modules/baike/entity/CmBaikeProduct.java

@@ -46,7 +46,9 @@ public class CmBaikeProduct extends DataEntity<CmBaikeProduct> {
 	private Integer topPosition;		// 置顶位
 	private Integer status;		// 状态:0停用,1启用
 	private Integer auditStatus;	//百科审核状态:1待审核,2审核通过,3审核失败
+	private Integer onlineStatus;	//百科上线状态:1待上线,2已上线,3已下线
 	private String failReason;	//审核失败理由
+	private Integer emptyNum;	//空数据条数
 	private Date addTime;		// 添加时间
 
 
@@ -455,4 +457,20 @@ public class CmBaikeProduct extends DataEntity<CmBaikeProduct> {
 	public void setAuditFlag(Integer auditFlag) {
 		this.auditFlag = auditFlag;
 	}
+
+	public Integer getOnlineStatus() {
+		return onlineStatus;
+	}
+
+	public void setOnlineStatus(Integer onlineStatus) {
+		this.onlineStatus = onlineStatus;
+	}
+
+	public Integer getEmptyNum() {
+		return emptyNum;
+	}
+
+	public void setEmptyNum(Integer emptyNum) {
+		this.emptyNum = emptyNum;
+	}
 }

+ 86 - 0
src/main/java/com/caimei/modules/baike/service/CmBaikeProductService.java

@@ -1,5 +1,6 @@
 package com.caimei.modules.baike.service;
 
+import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
 
@@ -99,7 +100,21 @@ public class CmBaikeProductService extends CrudService<CmBaikeProductDao, CmBaik
 		}
 		// 保存上市时间和nmpa时间
 		saveTime(cmBaikeProduct);
+
+		// 管理员审核百科
+		if (null != cmBaikeProduct.getAuditFlag() && 1 == cmBaikeProduct.getAuditFlag()) {
+            cmBaikeProduct.setOnlineStatus(3);
+            if (null != cmBaikeProduct.getAuditStatus() && 2 == cmBaikeProduct.getAuditStatus()) {
+                // 审核通过
+                cmBaikeProduct.setOnlineStatus(2);
+                cmBaikeProduct.setPublishTime(new Date());
+            }
+		}
 		super.save(cmBaikeProduct);
+		if (null != cmBaikeProduct.getAuditFlag() && 1 == cmBaikeProduct.getAuditFlag()) {
+			Integer emptyNum = checkComplete(cmBaikeProduct);
+			cmBaikeProductDao.updateEmptyNum(cmBaikeProduct.getId(), emptyNum);
+		}
 		String productId = cmBaikeProduct.getId();
 		// 保存产品认证图片
 		List<String> authImageList = cmBaikeProduct.getAuthImageList();
@@ -213,4 +228,75 @@ public class CmBaikeProductService extends CrudService<CmBaikeProductDao, CmBaik
 		}
 		cmBaikeProductDao.auditBaike(cmBaikeProduct.getId(), cmBaikeProduct.getAuditStatus(), cmBaikeProduct.getFailReason(), publishTime);
 	}
+
+    @Transactional(readOnly = false)
+    public void offlineInfo(Integer id) {
+        cmBaikeProductDao.offline(id);
+    }
+
+	public Integer checkComplete(CmBaikeProduct product) {
+		String productId = product.getId();
+		// 参数列表
+		List<CmBaikeProductParam> paramList = cmBaikeProductDao.findParamList(productId);
+		// 产品/仪器认证图片列表
+		List<String> authImageList = cmBaikeProductDao.findImageList(productId, 1);
+		// 效果展示图片列表
+		List<String> displayImageList = cmBaikeProductDao.findImageList(productId, 2);
+		// 问题列表
+		List<CmBaikeProductQuestion> questionList = cmBaikeProductDao.findQuestionList(productId);
+		Integer emptyNum = 0;
+		List<String> propertyList1 = new ArrayList<>();
+		List<Integer> propertyList2 = new ArrayList<>();
+		propertyList1.add(product.getName());
+		propertyList1.add(product.getAlias());
+		propertyList1.add(product.getDiscription());
+		propertyList1.add(product.getProductLink());
+		propertyList1.add(product.getImage());
+		if (2 == product.getCommodityType()) {
+			propertyList1.add(product.getAuthLink());
+			propertyList1.add(product.getAuthQrCode());
+		}
+		propertyList1.add(product.getAdvantage());
+		propertyList1.add(product.getDisadvantage());
+		propertyList1.add(product.getPrinciple());
+		propertyList1.add(product.getSeoKeyword());
+		propertyList1.add(product.getBrand());
+		propertyList1.add(product.getProducePlace());
+		propertyList1.add(product.getMarketTime());
+		propertyList1.add(product.getCompany());
+		propertyList1.add(product.getNmpaTime());
+		propertyList1.add(product.getAdaptiveMan());
+		propertyList1.add(product.getUnAdaptiveMan());
+		propertyList1.add(product.getAroundOperation());
+
+		propertyList2.add(product.getShopId());
+		propertyList2.add(product.getBasePv());
+		propertyList2.add(product.getTypeId());
+		for (String property : propertyList1) {
+			if (StringUtils.isEmpty(property)) {
+				emptyNum++;
+			}
+		}
+		for (Integer property : propertyList2) {
+			if (null == property) {
+				emptyNum++;
+			}
+		}
+		if (null == product.getPublishTime()) {
+			emptyNum++;
+		}
+		if (0 == paramList.size()) {
+			emptyNum++;
+		}
+		if (0 == authImageList.size()) {
+			emptyNum++;
+		}
+		if (0 == displayImageList.size()) {
+			emptyNum++;
+		}
+		if (0 == questionList.size()) {
+			emptyNum++;
+		}
+		return emptyNum;
+	}
 }

+ 21 - 62
src/main/java/com/caimei/modules/baike/web/CmBaikeProductController.java

@@ -120,6 +120,7 @@ public class CmBaikeProductController extends BaseController {
 		if (!beanValidator(model, cmBaikeProduct)){
 			return form(cmBaikeProduct, model);
 		}
+		if (null != cmBaikeProduct.getAuditStatus())
 		cmBaikeProductService.save(cmBaikeProduct);
         String commodityType = cmBaikeProduct.getCommodityType() == 1 ? "产品" : "仪器";
         addMessage(redirectAttributes, "保存" + commodityType + "成功");
@@ -199,6 +200,12 @@ public class CmBaikeProductController extends BaseController {
 //		generateUtils.generateBaikePage(2);
 	}
 
+	/**
+	 * 查看页面
+	 * @param cmBaikeProduct
+	 * @param model
+	 * @return
+	 */
 	@RequestMapping(value = "check")
 	public String checkInfo(CmBaikeProduct cmBaikeProduct,Model model) {
 		model.addAttribute("cmBaikeProduct", cmBaikeProduct);
@@ -228,70 +235,15 @@ public class CmBaikeProductController extends BaseController {
 	@RequestMapping(value = "checkComplete")
 	@ResponseBody
 	public Integer checkComplete(CmBaikeProduct product) {
-		// 参数列表
-		List<CmBaikeProductParam> paramList = cmBaikeProductDao.findParamList(product.getId());
-		// 产品/仪器认证图片列表
-		List<String> authImageList = cmBaikeProductDao.findImageList(product.getId(), 1);
-		// 效果展示图片列表
-		List<String> displayImageList = cmBaikeProductDao.findImageList(product.getId(), 2);
-		// 问题列表
-		List<CmBaikeProductQuestion> questionList = cmBaikeProductDao.findQuestionList(product.getId());
-		Integer emptyNum = 0;
-		List<String> propertyList1 = new ArrayList<>();
-		List<Integer> propertyList2 = new ArrayList<>();
-		propertyList1.add(product.getName());
-		propertyList1.add(product.getAlias());
-		propertyList1.add(product.getDiscription());
-		propertyList1.add(product.getProductLink());
-		propertyList1.add(product.getImage());
-		if (2 == product.getCommodityType()) {
-			propertyList1.add(product.getAuthLink());
-			propertyList1.add(product.getAuthQrCode());
-		}
-		propertyList1.add(product.getAdvantage());
-		propertyList1.add(product.getDisadvantage());
-		propertyList1.add(product.getPrinciple());
-		propertyList1.add(product.getSeoKeyword());
-		propertyList1.add(product.getBrand());
-		propertyList1.add(product.getProducePlace());
-		propertyList1.add(product.getMarketTime());
-		propertyList1.add(product.getCompany());
-		propertyList1.add(product.getNmpaTime());
-		propertyList1.add(product.getAdaptiveMan());
-		propertyList1.add(product.getUnAdaptiveMan());
-		propertyList1.add(product.getAroundOperation());
-
-		propertyList2.add(product.getShopId());
-		propertyList2.add(product.getBasePv());
-		propertyList2.add(product.getTypeId());
-		for (String property : propertyList1) {
-			if (StringUtils.isEmpty(property)) {
-				emptyNum++;
-			}
-		}
-		for (Integer property : propertyList2) {
-			if (null == property) {
-				emptyNum++;
-			}
-		}
-		if (null == product.getPublishTime()) {
-			emptyNum++;
-		}
-		if (0 == paramList.size()) {
-			emptyNum++;
-		}
-		if (0 == authImageList.size()) {
-			emptyNum++;
-		}
-		if (0 == displayImageList.size()) {
-			emptyNum++;
-		}
-		if (0 == questionList.size()) {
-			emptyNum++;
-		}
-		return emptyNum;
+		return cmBaikeProductService.checkComplete(product);
 	}
 
+	/**
+	 * 审核页面
+	 * @param cmBaikeProduct
+	 * @param model
+	 * @return
+	 */
 	@RequestMapping(value = "toAuditPage")
 	public String toAuditPage(CmBaikeProduct cmBaikeProduct,Model model) {
         model.addAttribute("cmBaikeProduct", cmBaikeProduct);
@@ -325,4 +277,11 @@ public class CmBaikeProductController extends BaseController {
 		cmBaikeProductService.auditBaike(cmBaikeProduct);
 		return true;
 	}
+
+    @RequestMapping(value = "offline")
+    @ResponseBody
+    public Boolean offline(Integer id) {
+        cmBaikeProductService.offlineInfo(id);
+        return true;
+    }
 }

+ 2 - 0
src/main/java/com/caimei/modules/info/dao/InfoDao.java

@@ -33,4 +33,6 @@ public interface InfoDao extends CrudDao<Info> {
 	int updateReplaceByLabel(String label, String reLabel);
 
 	void auditInfo(@Param("id") String id, @Param("auditStatus") Integer auditStatus, @Param("failReason") String failReason, @Param("pubdate") Date pubdate);
+
+    void offlineInfo(Integer id);
 }

+ 18 - 0
src/main/java/com/caimei/modules/info/entity/Info.java

@@ -33,6 +33,7 @@ public class Info extends DataEntity<Info> {
 	private Long pv;		// 阅读总量
 	private Long priorityIndex;//优先级
 	private Integer auditStatus;	//供应商文章审核状态:1待审核,2审核通过,3审核失败
+    private Integer onlineStatus;   //文章上线状态:1待上线,2已上线,3已下线
 	private String failReason;	//审核失败理由
 	private String topPosition;	//置顶位
 	private String topFlag;	//虚拟字段,是否置顶标识:0否,1是
@@ -40,6 +41,7 @@ public class Info extends DataEntity<Info> {
 	private String shopName;	// 供应商名称
 	private String startPubDate;		// 发布时间
 	private String endPubDate;		// 发布时间
+	private Integer auditFlag;		// 是否审核保存,1是
 
 	public Info() {
 		super();
@@ -265,4 +267,20 @@ public class Info extends DataEntity<Info> {
 	public void setEndPubDate(String endPubDate) {
 		this.endPubDate = endPubDate;
 	}
+
+	public Integer getAuditFlag() {
+		return auditFlag;
+	}
+
+	public void setAuditFlag(Integer auditFlag) {
+		this.auditFlag = auditFlag;
+	}
+
+	public Integer getOnlineStatus() {
+		return onlineStatus;
+	}
+
+	public void setOnlineStatus(Integer onlineStatus) {
+		this.onlineStatus = onlineStatus;
+	}
 }

+ 15 - 0
src/main/java/com/caimei/modules/info/service/InfoService.java

@@ -160,6 +160,16 @@ public class InfoService extends CrudService<InfoDao, Info> {
 		if (StringUtils.isBlank(info.getId())) {
 			flg = true;
 		}
+
+		// 管理员审核文章
+		if (null != info.getAuditFlag() && 1 == info.getAuditFlag()) {
+			info.setOnlineStatus(3);
+			if(null != info.getAuditStatus() && 2 == info.getAuditStatus()){
+				// 审核通过
+				info.setPubdate(new Date());
+				info.setOnlineStatus(2);
+			}
+		}
 		super.save(info);
 
 		if (flg) {
@@ -250,4 +260,9 @@ public class InfoService extends CrudService<InfoDao, Info> {
 		}
 		infoDao.auditInfo(info.getId(), info.getAuditStatus(), info.getFailReason(), pubdate);
     }
+
+	@Transactional(readOnly = false)
+    public void offlineInfo(Integer id) {
+        infoDao.offlineInfo(id);
+    }
 }

+ 19 - 3
src/main/java/com/caimei/modules/info/web/InfoController.java

@@ -180,7 +180,8 @@ public class InfoController extends BaseController {
 		if(StringUtils.equals("1", ltype)) {
 			return "redirect:"+Global.getAdminPath()+"/info/infoLabel/list";
 		}
-		return "redirect:"+Global.getAdminPath()+"/info/info/list?repage&publishSource=1";
+		info.setPublishSource(null == info.getPublishSource() ? 1 : info.getPublishSource());
+		return "redirect:" + Global.getAdminPath() + "/info/info/list?repage&publishSource=" + info.getPublishSource();
 	}
 
 	@RequiresPermissions("info:info:delete")
@@ -298,8 +299,16 @@ public class InfoController extends BaseController {
 
     @RequestMapping(value = "toAuditPage")
     public String toAuditPage(Info info,Model model) {
-        model.addAttribute("info", info);
-        return "modules/info/auditInfo";
+		if(StringUtils.isBlank(info.getId())){
+			info.setRecommendStatus("0");
+			info.setEnabledStatus("1");
+			info.setPubdate(new Date());
+		}
+		InfoType infoType = new InfoType();
+		List<InfoType> typeList = infoTypeService.findList(infoType);
+		model.addAttribute("typeList", typeList);
+		model.addAttribute("info", info);
+		return "modules/info/auditInfoPage";
     }
 
     @RequestMapping(value = "auditInfo")
@@ -309,4 +318,11 @@ public class InfoController extends BaseController {
         return true;
     }
 
+    @RequestMapping(value = "offline")
+	@ResponseBody
+    public Boolean offline(Integer id) {
+		infoService.offlineInfo(id);
+        return true;
+    }
+
 }

+ 30 - 6
src/main/resources/mappings/modules/baike/CmBaikeProductMapper.xml

@@ -34,6 +34,7 @@
 		a.topPosition AS "topPosition",
 		a.status AS "status",
 		a.auditStatus,
+        a.onlineStatus,
 		a.failReason,
 		a.addTime AS "addTime",
 		cbt.name as "typeName"
@@ -93,6 +94,15 @@
 			<if test="publishSource != null">
 				and a.publishSource = #{publishSource}
 			</if>
+            <if test="auditStatus != null">
+                and a.auditStatus = #{auditStatus}
+            </if>
+            <if test="onlineStatus != null">
+                and a.onlineStatus = #{onlineStatus}
+            </if>
+            <if test="shopName != null and shopName != ''">
+                AND s.name LIKE concat('%',#{shopName},'%')
+            </if>
 		</where>
 		<choose>
 			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
@@ -166,6 +176,7 @@
 			basePv,
 			actualPv,
 			typeId,
+			emptyNum,
 			status,
 			addTime
 		) VALUES (
@@ -194,6 +205,7 @@
 			#{basePv},
 			0,
 			#{typeId},
+			#{emptyNum},
 			#{status},
 			NOW()
 		)
@@ -236,12 +248,18 @@
 			publishTime = #{publishTime},
 			basePv = #{basePv},
 			typeId = #{typeId},
-            <if test="auditStatus != null">
-                auditStatus = #{auditStatus},
-            </if>
-            <if test="failReason != null and failReason != ''">
-                failReason = #{failReason},
-            </if>
+			emptyNum = #{emptyNum},
+			<if test="auditFlag != null and auditFlag == 1">
+				<if test="auditStatus != null">
+					auditStatus = #{auditStatus},
+				</if>
+				<if test="onlineStatus != null">
+					onlineStatus = #{onlineStatus},
+				</if>
+				<if test="failReason != null and failReason != ''">
+					failReason = #{failReason},
+				</if>
+			</if>
 			status = #{status}
 		WHERE id = #{id}
 	</update>
@@ -260,6 +278,12 @@
 		</if>
 		where id = #{id}
 	</update>
+	<update id="offline">
+		update cm_baike_product set onlineStatus = 3 where id = #{id}
+	</update>
+	<update id="updateEmptyNum">
+		update cm_baike_product set emptyNum = #{emptyNum} where id = #{id}
+	</update>
 
 	<delete id="delete">
 		DELETE FROM cm_baike_product

+ 18 - 0
src/main/resources/mappings/modules/info/InfoMapper.xml

@@ -23,6 +23,7 @@
 		a.basePv AS "basePv",
 		a.priorityIndex AS "priorityIndex",
 		a.auditStatus,
+        a.onlineStatus,
 		a.failReason,
 		c.num AS "realPraise",
 		c.pv AS "pv",
@@ -110,6 +111,9 @@
 			<if test="auditStatus != null">
 				and a.auditStatus = #{auditStatus}
 			</if>
+			<if test="onlineStatus != null">
+				and a.onlineStatus = #{onlineStatus}
+			</if>
 			<if test="shopName != null and shopName != ''">
 				AND s.name LIKE concat('%',#{shopName},'%')
 			</if>
@@ -214,6 +218,17 @@
 			basePv = #{basePv},
 			updateBy = #{updateBy.id},
 			updateDate = #{updateDate},
+		    <if test="auditFlag != null and auditFlag == 1">
+				<if test="auditStatus != null">
+					auditStatus = #{auditStatus},
+				</if>
+				<if test="onlineStatus != null">
+					onlineStatus = #{onlineStatus},
+				</if>
+				<if test="failReason != null and failReason != ''">
+					failReason = #{failReason},
+				</if>
+			</if>
 			topPosition = #{topPosition}
 		WHERE id = #{id}
 	</update>
@@ -277,5 +292,8 @@
 			</if>
 		where id = #{id}
 	</update>
+	<update id="offlineInfo">
+		update info set onlineStatus = 3 where id = #{id}
+	</update>
 
 </mapper>

+ 12 - 10
src/main/webapp/WEB-INF/views/modules/baike/auditBaikeProductPage.jsp

@@ -178,10 +178,9 @@
 		<li><a href="${ctx}/baike/cmBaikeProduct/?commodityType=${cmBaikeProduct.commodityType}">${commodityType}</a></li>
 		<li class="active"><a href="${ctx}/baike/cmBaikeProduct/toAuditPage?id=${cmBaikeProduct.id}&commodityType=${cmBaikeProduct.commodityType}">审核</a></li>
 	</ul><br/>
-	<form:form id="inputForm" modelAttribute="cmBaikeProduct" action="${ctx}/baike/cmBaikeProduct/save" method="post" class="form-horizontal">
+	<form:form id="inputForm" modelAttribute="cmBaikeProduct" action="${ctx}/baike/cmBaikeProduct/save?auditFlag=1" method="post" class="form-horizontal">
 		<form:hidden path="id"/>
 		<form:hidden path="commodityType"/>
-		<form:hidden path="auditFlag"/>
 		<form:hidden path="shopId"/>
 		<sys:message content="${message}"/>
 		<div class="control-group">
@@ -474,14 +473,16 @@
 		<div class="control-group">
 			<label class="control-label keyClass">发布时间:</label>
 			<div class="controls">
-				<input name="publishTime" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate "
-					value="<fmt:formatDate value="${cmBaikeProduct.publishTime}" pattern="yyyy-MM-dd HH:mm:ss"/>"/>
+				<%--<input name="publishTime" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate "
+					value="<fmt:formatDate value="${cmBaikeProduct.publishTime}" pattern="yyyy-MM-dd HH:mm:ss"/>"/>--%>
+				<fmt:formatDate value="${cmBaikeProduct.publishTime}" pattern="yyyy-MM-dd HH:mm:ss"/>
 			</div>
 		</div>
 		<div class="control-group">
 			<label class="control-label keyClass">基础浏览量:</label>
 			<div class="controls">
-				<form:input path="basePv" htmlEscape="false" onkeyup="onlynum(this)" readonly="true" class="input-xlarge  digits "/>
+				${empty cmBaikeProduct.basePv?0:(cmBaikeProduct.basePv)}
+<%--				<form:input path="basePv" htmlEscape="false" onkeyup="onlynum(this)" readonly="true" class="input-xlarge  digits "/>--%>
 			</div>
 		</div>
 		<div class="control-group">
@@ -495,14 +496,15 @@
 		<div class="control-group">
 			<label class="control-label keyClass">添加时间:</label>
 			<div class="controls">
-				<input name="addTime" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate "
-					   value="<fmt:formatDate value="${cmBaikeProduct.addTime}" pattern="yyyy-MM-dd HH:mm:ss"/>"/>
+				<%--<input name="addTime" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate "
+					   value="<fmt:formatDate value="${cmBaikeProduct.addTime}" pattern="yyyy-MM-dd HH:mm:ss"/>"/>--%>
+				<fmt:formatDate value="${cmBaikeProduct.addTime}" pattern="yyyy-MM-dd HH:mm:ss"/>
 			</div>
 		</div>
 		<div class="control-group">
 			<label class="control-label keyClass">供应商:</label>
 			<div class="controls">
-				<form:input path="shopName" htmlEscape="false" readonly="true" class="input-xlarge "/>
+				${cmBaikeProduct.shopName}
 			</div>
 		</div>
 		<div class="control-group">
@@ -513,9 +515,9 @@
 			</div>
 		</div>
 		<div class="control-group" id="failReasonDiv" style="${empty cmBaikeProduct.auditStatus or cmBaikeProduct.auditStatus eq 1?'display: none':''}">
-			<label class="control-label">失败原因</label>
+			<label class="control-label"><font color="red">*</font>失败原因</label>
 			<div class="controls">
-				<textarea type="text" id="failReason" name="failReason" style="width: 400px;height: 90px">${cmBaikeProduct.failReason}</textarea>
+				<textarea type="text" id="failReason" name="failReason" required style="width: 400px;height: 90px">${cmBaikeProduct.failReason}</textarea>
 			</div>
 		</div>
 		<div class="form-actions">

+ 75 - 76
src/main/webapp/WEB-INF/views/modules/baike/cmBaikeProductForm.jsp

@@ -159,84 +159,82 @@
 				submitHandler: function(form){
 					var status = $("#status").val();
 					var commodityType = $("#commodityType").val();
-					if (1 == status) {
-						var propertyArr = [];
-						var name = $("#name").val();
-						var alias = $("#alias").val();
-						var discription = $("#discription").val();
-						var shopId = $("#shopId").val();
-						var productLink = $("#productLink").val();
-						var image = $("#image").val();
-						var authLink = $("#authLink").val();
-						var authQrCode = $("#authQrCode").val();
-						var param0 = $('input[name="paramList[0].name"]').val();
-						var advantage = $("#advantage").val();
-						var disadvantage = $("#disadvantage").val();
-						var principle = $("#principle").val();
-						var seoKeyword = $("#seoKeyword").val();
-						var brand = $("#brand").val();
-						var producePlace = $("#producePlace").val();
-						var marketYear = $("#marketYear").val();
-						var company = $("#company").val();
-						var nmpaYear = $("#nmpaYear").val();
-						var authImage0 = $("#authImage0").val();
-						var adaptiveMan = $("#adaptiveMan").val();
-						var unAdaptiveMan = $("#unAdaptiveMan").val();
-						var aroundOperation = $("#aroundOperation").val();
-						var displayImage0 = $("#displayImage0").val();
-						var question0 = $('input[name="questionList[0].question"]').val();
-						var publishTime = $('input[name="publishTime"]').val();
-						var basePv = $("#basePv").val();
-						var typeId = $("#typeId").val();
-						propertyArr[0] = name;
-						propertyArr[1] = alias;
-						propertyArr[2] = discription;
-						propertyArr[3] = shopId;
-						propertyArr[4] = productLink;
-						propertyArr[5] = param0;
-						propertyArr[6] = advantage;
-						propertyArr[7] = disadvantage;
-						propertyArr[8] = principle;
-						propertyArr[9] = seoKeyword;
-						propertyArr[10] = brand;
-						propertyArr[11] = producePlace;
-						propertyArr[12] = marketYear;
-						propertyArr[13] = company;
-						propertyArr[14] = nmpaYear;
-						propertyArr[15] = authImage0;
-						propertyArr[16] = adaptiveMan;
-						propertyArr[17] = unAdaptiveMan;
-						propertyArr[18] = aroundOperation;
-						propertyArr[19] = displayImage0;
-						propertyArr[20] = question0;
-						propertyArr[21] = publishTime;
-						propertyArr[22] = basePv;
-						propertyArr[23] = typeId;
-						propertyArr[24] = image;
-						if (2 === commodityType) {
-							propertyArr[25] = authLink;
-							propertyArr[26] = authQrCode;
+					// 计算空数据条数
+
+					var propertyArr = [];
+					var name = $("#name").val();
+					var alias = $("#alias").val();
+					var discription = $("#discription").val();
+					var shopId = $("#shopId").val();
+					var productLink = $("#productLink").val();
+					var image = $("#image").val();
+					var authLink = $("#authLink").val();
+					var authQrCode = $("#authQrCode").val();
+					var param0 = $('input[name="paramList[0].name"]').val();
+					var advantage = $("#advantage").val();
+					var disadvantage = $("#disadvantage").val();
+					var principle = $("#principle").val();
+					var seoKeyword = $("#seoKeyword").val();
+					var brand = $("#brand").val();
+					var producePlace = $("#producePlace").val();
+					var marketYear = $("#marketYear").val();
+					var company = $("#company").val();
+					var nmpaYear = $("#nmpaYear").val();
+					var authImage0 = $("#authImage0").val();
+					var adaptiveMan = $("#adaptiveMan").val();
+					var unAdaptiveMan = $("#unAdaptiveMan").val();
+					var aroundOperation = $("#aroundOperation").val();
+					var displayImage0 = $("#displayImage0").val();
+					var question0 = $('input[name="questionList[0].question"]').val();
+					var publishTime = $('input[name="publishTime"]').val();
+					var basePv = $("#basePv").val();
+					var typeId = $("#typeId").val();
+					propertyArr[0] = name;
+					propertyArr[1] = alias;
+					propertyArr[2] = discription;
+					propertyArr[3] = shopId;
+					propertyArr[4] = productLink;
+					propertyArr[5] = param0;
+					propertyArr[6] = advantage;
+					propertyArr[7] = disadvantage;
+					propertyArr[8] = principle;
+					propertyArr[9] = seoKeyword;
+					propertyArr[10] = brand;
+					propertyArr[11] = producePlace;
+					propertyArr[12] = marketYear;
+					propertyArr[13] = company;
+					propertyArr[14] = nmpaYear;
+					propertyArr[15] = authImage0;
+					propertyArr[16] = adaptiveMan;
+					propertyArr[17] = unAdaptiveMan;
+					propertyArr[18] = aroundOperation;
+					propertyArr[19] = displayImage0;
+					propertyArr[20] = question0;
+					propertyArr[21] = publishTime;
+					propertyArr[22] = basePv;
+					propertyArr[23] = typeId;
+					propertyArr[24] = image;
+					if (2 === commodityType) {
+						propertyArr[25] = authLink;
+						propertyArr[26] = authQrCode;
+					}
+					var emptyNum = 0;
+					for (var i = 0; i < propertyArr.length; i++) {
+						var property = propertyArr[i].trim();
+						if ("" === property) {
+							emptyNum++;
 						}
-						var emptyNum = 0;
-						for (var i = 0; i < propertyArr.length; i++) {
-							var property = propertyArr[i].trim();
-							if ("" === property) {
-								emptyNum++;
+					}
+					$("#emptyNum").val(emptyNum);
+					if (1 == status && emptyNum > 0) {
+						var msg = "您还剩余" + emptyNum + "项未完善,将会导致用户对您产品/仪器的认识度不够,确认是否提交?";
+						top.$.jBox.confirm(msg, '系统提示', function (v, h, f) {
+							if (v == 'ok') {
+								loading('正在提交,请稍等...');
+								form.submit();
 							}
-						}
-						if (emptyNum > 0) {
-							var msg = "您还剩余" + emptyNum + "项未完善,将会导致用户对您产品/仪器的认识度不够,确认是否提交?";
-							top.$.jBox.confirm(msg, '系统提示', function (v, h, f) {
-								if (v == 'ok') {
-									loading('正在提交,请稍等...');
-									form.submit();
-								}
-							}, {buttonsFocus: 1, persistent: true});
-						} else {
-							loading('正在提交,请稍等...');
-							form.submit();
-						}
-					}else {
+						}, {buttonsFocus: 1, persistent: true});
+					} else {
 						loading('正在提交,请稍等...');
 						form.submit();
 					}
@@ -262,6 +260,7 @@
 	<form:form id="inputForm" modelAttribute="cmBaikeProduct" action="${ctx}/baike/cmBaikeProduct/save" method="post" class="form-horizontal">
 		<form:hidden path="id"/>
 		<form:hidden path="commodityType"/>
+		<form:hidden path="emptyNum"/>
 		<sys:message content="${message}"/>
 		<div class="control-group">
 			<label class="control-label titleClass">${commodityType}简述</label>

+ 27 - 0
src/main/webapp/WEB-INF/views/modules/baike/shopBaikeProductList.jsp

@@ -53,6 +53,15 @@
 					<form:option value="2" label="审核通过"/>
 					<form:option value="3" label="审核失败"/>
 				</form:select>
+			<label>供应商:</label>
+				<form:input path="shopName" htmlEscape="false" maxlength="50" class="input-medium"/>
+			<label>上线状态:</label>
+				<form:select path="onlineStatus" class="input-mini">
+					<form:option value="" label="全部"/>
+					<form:option value="1" label="待上线"/>
+					<form:option value="2" label="已上线"/>
+					<form:option value="3" label="已下线"/>
+				</form:select>
 			&nbsp;&nbsp;<input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
 			<div class="clearfix"></div>
 		</div>
@@ -66,6 +75,7 @@
 				<th>${commodityType}分类</th>
 				<th>浏览量</th>
 				<th>审核状态</th>
+				<th>上线状态</th>
 				<th>发布时间</th>
 				<th>供应商</th>
 				<th>添加时间</th>
@@ -90,6 +100,9 @@
 				<td>
 					<font color="${cmBaikeProduct.auditStatus eq 1?'black':cmBaikeProduct.auditStatus eq 2?'#2FA4E7':cmBaikeProduct.auditStatus eq 3?'red':'#2FA4E7'}"> ${cmBaikeProduct.auditStatus eq 1?'待审核':cmBaikeProduct.auditStatus eq 2?'审核通过':cmBaikeProduct.auditStatus eq 3?'审核失败':'审核通过'}</font>
 				</td>
+				<td>
+					<font color="${cmBaikeProduct.onlineStatus eq 1?'black':cmBaikeProduct.onlineStatus eq 2?'#2FA4E7':cmBaikeProduct.onlineStatus eq 3?'red':'#2FA4E7'}"> ${cmBaikeProduct.onlineStatus eq 1?'待上线':cmBaikeProduct.onlineStatus eq 2?'已上线':cmBaikeProduct.onlineStatus eq 3?'已下线':'已上线'}</font>
+				</td>
 				<td>
 					<c:if test="${cmBaikeProduct.auditStatus eq 2}">
 						<fmt:formatDate value="${cmBaikeProduct.publishTime}" pattern="yyyy-MM-dd HH:mm"/>
@@ -109,6 +122,9 @@
 					   style="display: ${cmBaikeProduct.auditStatus eq 1 or cmBaikeProduct.auditStatus eq 3?'':'none'}">审核</a>
 					<a href="${ctx}/baike/cmBaikeProduct/check?id=${cmBaikeProduct.id}
 					&commodityType=${cmBaikeProduct.commodityType}&publishSource=2">查看</a>
+					<c:if test="${cmBaikeProduct.onlineStatus eq 2}">
+						<a href="javascript:;" onclick="offline(${cmBaikeProduct.id})">下线</a>
+					</c:if>
 				</td>
 			</tr>
 		</c:forEach>
@@ -157,6 +173,17 @@
 			}
 		});
 	}
+
+	function offline(id) {
+		$.post("${ctx}/baike/cmBaikeProduct/offline?id=" + id, function(data) {
+			if(true==data){
+				$.jBox.tip("下线成功", 'cmBaikeProduct');
+				$("#searchForm").submit();
+			} else {
+				$.jBox.tip("下线失败",'error');
+			}
+		},"JSON");//这里返回的类型有:json,html,xml,text
+	}
 </script>
 </body>
 </html>

+ 336 - 0
src/main/webapp/WEB-INF/views/modules/info/auditInfoPage.jsp

@@ -0,0 +1,336 @@
+<%@ page import="com.thinkgem.jeesite.common.config.Global" %>
+<%@ taglib prefix="input" uri="/struts-tags" %>
+<%@ page contentType="text/html;charset=UTF-8" language="java" %>
+<%@ include file="/WEB-INF/views/include/taglib.jsp" %>
+<html>
+<head>
+	<title>编辑文章</title>
+	<meta name="decorator" content="default"/>
+	<style>
+		.red{color:red}
+		#inputForm{max-width:1200px;width:100%}
+		#inputForm table{width:100%;line-height:18px;margin-bottom:50px}
+		#inputForm th,#inputForm td{font-weight:normal;text-align:left;padding:8px 5px;border-bottom:1px solid rgb(238,238,238)}
+		#inputForm th{width:15%;text-align:right;white-space:nowrap;font-weight:bold}
+		#inputForm td input[type="text"]{width:320px;height:16px;line-height:16px}
+		.init-label label{margin:5px 10px;color:gray}
+	</style>
+</head>
+<body>
+<ul class="nav nav-tabs">
+	<li><a href="${ctx}/info/info/?publishSource=2">文章列表</a></li>
+	<li class="active"><a href="${ctx}/info/info/toAuditPage?id=${info.id}">审核</a></li>
+</ul>
+<form:form id="inputForm" modelAttribute="info" action="${ctx}/info/info/save?ltype=2&publishSource=2&auditFlag=1" method="post" class="form-horizontal">
+	<form:hidden path="id"/>
+	<sys:message content="${message}"/>
+	<table border="0" cellspacing="0" cellpadding="0" width="100%">
+		<tr>
+			<th><span class="red">*</span>文章标题:</th>
+			<td colspan="3"><form:input path="title" htmlEscape="false" maxlength="100" class="input-xxlarge required"/></td>
+		</tr>
+		<tr>
+			<th><span class="red">*</span>文章标签:</th>
+			<td colspan="3">
+				<form:input path="label" htmlEscape="false" maxlength="100" class="input-xxlarge required"/>
+				<span class="help-inline">多个标签之间请用逗号分隔开</span>
+				<div class="init-label"></div>
+				<input id="labelName" type="text" placeholder="在此处输入标签,将自动关联到文章标签" class="input-xlarge"/>
+				<a href="javascript:addLeable();">添加</a>
+			</td>
+		</tr>
+		<tr>
+			<th><span class="red">*</span>SEO关键词:</th>
+			<td colspan="3"><form:input path="keyword" htmlEscape="false" maxlength="50" class="input-xxlarge required"/></td>
+		</tr>
+		<tr>
+			<th><span class="red">*</span>发布人:</th>
+			<td colspan="3"><form:input path="publisher" htmlEscape="false" maxlength="50" class="input-xxlarge required"/></td>
+		</tr>
+		<tr>
+			<th><span class="red">*</span>来源:</th>
+			<td colspan="3"><form:input path="source" htmlEscape="false" maxlength="50" class="input-xlarge"/></td>
+		</tr>
+		<tr>
+			<th><span class="red">*</span>推荐语(描述):</th>
+			<td colspan="3"><form:textarea path="recommendContent" htmlEscape="false" maxlength="1000" class="input-xxlarge required"/></td>
+		</tr>
+		<tr>
+			<th><span class="red">*</span>文章内容:</th>
+			<td colspan="3">
+				<div class="detailInfoEditor" style="width:760px;">
+					<form:textarea path="infoContent" class="input-xlarge hide"/>
+					<!-- 富文本编辑器 -->
+					<div id="infoDetailEditor">${info.infoContent}</div>
+				</div>
+			</td>
+		</tr>
+		<tr>
+			<th><span class="red">*</span>文章分类:</th>
+			<td colspan="3">
+				<form:select path="infoType.id" class="input-small required">
+					<form:options items="${typeList}" itemLabel="name" itemValue="id" htmlEscape="false"/>
+				</form:select>
+			</td>
+		</tr>
+		<tr>
+			<th><span class="red">*</span>引导图:</th>
+			<td colspan="3">
+				<form:hidden id="nameImage" path="guidanceImage" htmlEscape="false" class="input-xlarge required"/>
+				<sys:ckfinder input="nameImage" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
+			</td>
+		</tr>
+		<tr>
+			<th>商城首页图:</th>
+			<td colspan="3">
+				<form:hidden id="homePageImage" path="homePageImage" htmlEscape="false" maxlength="255" class="input-xlarge"/>
+				<sys:ckfinder input="homePageImage" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
+				<label style="margin-left: 20px">建议图片分辨率252px*252px</label>
+			</td>
+		</tr>
+		<tr>
+			<th><span class="red">*</span>发布时间:</th>
+			<td colspan="3">
+				<fmt:formatDate value="${info.pubdate}" pattern="yyyy-MM-dd HH:mm:ss"/>
+			</td>
+		</tr>
+		<tr>
+			<th>审核状态:</th>
+			<td colspan="3">
+				${info.auditStatus eq 1?'待审核':info.auditStatus eq 2?'审核通过':'审核失败'}
+			</td>
+		</tr>
+		<tr>
+			<th>供应商:</th>
+			<td colspan="3">
+				${info.shopName}
+			</td>
+		</tr>
+		<tr>
+			<th>供应商:</th>
+			<td colspan="3">
+				${info.shopName}
+			</td>
+		</tr>
+		<tr>
+			<th>添加时间:</th>
+			<td colspan="3">
+				<fmt:formatDate value="${info.createDate}" pattern="yyyy-MM-dd HH:mm"/>
+			</td>
+		</tr>
+		<c:if test="${not empty info.id}">
+			<tr>
+				<th><span class="red">*</span>实际点赞:</th>
+				<td colspan="3">
+						${empty info.realPraise?0:(info.realPraise)}
+				</td>
+			</tr>
+		</c:if>
+		<c:if test="${not empty info.id}">
+			<tr>
+				<th><span class="red">*</span>实际浏览量:</th>
+				<td colspan="3">
+						${empty info.pv?0:(info.pv)}
+				</td>
+			</tr>
+		</c:if>
+		<tr>
+			<th><span class="red"></span>审核:</th>
+			<td colspan="3">
+				<input type="radio" name="auditStatus" value="2" onclick="updateAuditStatus(2)" ${empty info.auditStatus?'checked=checked':info.auditStatus eq 1?'checked=checked':''}> 审核通过
+				<input type="radio" name="auditStatus" value="3" onclick="updateAuditStatus(3)" ${info.auditStatus eq 3?'checked=checked':''}> 审核失败
+			</td>
+		</tr>
+		<tr id="failReasonDiv" style="${empty info.auditStatus or info.auditStatus ne 3?'display: none':''}">
+			<th><span class="red">*</span>失败原因:</th>
+			<td colspan="3">
+				<textarea type="text" id="failReason" name="failReason" required style="width: 400px;height: 90px">${info.failReason}</textarea>
+			</td>
+		</tr>
+		<tr>
+			<td colspan="4" style="text-align:center;">
+				<shiro:hasPermission name="info:info:edit">
+					<input id="btnSave" class="btn btn-primary" type="submit" value="保 存" onclick="checkInfo()"/>
+				</shiro:hasPermission>
+				<input id="btnCancel" class="btn" type="button" value="返 回" onclick="history.go(-1)"/>
+			</td>
+		</tr>
+	</table>
+</form:form>
+<!-- 富文本编辑器 -->
+
+<% request.setAttribute("caimeiCore", Global.getConfig("caimei.core"));%>
+<%--<script src="https://cdn.bootcdn.net/ajax/libs/jquery-validate/1.19.3/jquery.validate.min.js"></script>--%>
+<script type="text/javascript" src="${ctxStatic}/jquery-validation/1.19.3/jquery.validate.js"></script>
+<script type="text/javascript" src="${ctxStatic}/ckeditor5-new/ckeditor.js"></script>
+<script type="text/javascript">
+	$(document).ready(function() {
+		//$("#name").focus();
+		$("#inputForm").validate({
+			ignore:"",
+			submitHandler: function(form){
+				if ($("#title").val() == '') {
+					alertx("请输入文章标题");
+					return false;
+				}
+				if ($("#label").val() == '') {
+					alertx("请输入文章标签");
+					return false;
+				}
+				if ($("#keyword").val() == '') {
+					alertx("请输入SEO关键词");
+					return false;
+				}
+				if ($("#publisher").val() == '') {
+					alertx("请输入发布人");
+					return false;
+				}
+				if ($("#pubdate").val() == '') {
+					alertx("请输入发布时间");
+					return false;
+				}
+				if ($("#recommendContent").val() == '') {
+					alertx("请输入推荐语(描述)");
+					return false;
+				}
+				if ($("#infoContent").val() == '') {
+					alertx("请输入文章内容");
+					return false;
+				}
+				if ($("#guidanceImage").val() == '') {
+					alertx("请上传引导图");
+					return false;
+				}
+				if ($("#basePraise").val() == '') {
+					alertx("请输入基础点赞");
+					return false;
+				}
+				if ($("#basePv").val() == '') {
+					alertx("请输入基础浏览量");
+					return false;
+				}
+				loading('正在提交,请稍等...');
+				form.submit();
+			},
+			errorContainer: "#messageBox",
+			errorPlacement: function(error, element) {
+				$("#messageBox").text("输入有误,请先更正。");
+				if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+					error.appendTo(element.parent().parent());
+				} else {
+					error.insertAfter(element);
+				}
+			}
+		});
+	});
+	//初始化标签
+	$(function () {
+		$(".init-label label").bind("click",function(){
+			var label=$(this).text();
+			var label1=label+",";
+			var _label=$("#label").val()+",";
+			if(_label.indexOf(label1)>-1){
+				alert("文章标签中已包含该标签!!");
+			}else{
+				setLabel(label);
+			}
+		});
+	});
+
+	function updateAuditStatus(auditStatus) {
+		var elementById = document.getElementById("failReasonDiv");
+		if (auditStatus === 2) {
+			elementById.style.cssText = "display:none";
+		} else {
+			elementById.style.cssText = "";
+		}
+	}
+
+	$(window).load(function () {
+		LabelInit();
+	});
+
+	//富文本框编辑
+	function checkInfo() {
+		var infoContent = infoDetailEditor.getData();
+		$("#infoContent").val(infoContent);
+		console.log(infoContent);
+	}
+
+	$(document).ready(function () {
+		//富文本框
+		ClassicEditor.create(document.querySelector('#infoDetailEditor'), {
+			ckfinder: {
+				uploadUrl: '${caimeiCore}/tools/image/upload/ckeditor'
+			}
+		}).then(function(editor) {
+			window.infoDetailEditor = editor;
+		}).catch(function(error){
+			console.log(error);
+		});
+	});
+
+	function LabelInit(){
+		var items="${fns:getDictValue('label','sys_config','')}"+",";
+		/* var _labels="${info.label}";
+			var _label=_labels.split(",");
+			for (var i = 0; i < _label.length; i++) {
+				items=items.replace(_label[i]+",","");
+			} */
+		/* var items="美白,祛斑,祛痘,补水,瘦脸,去皱,缩毛孔,减肥瘦身,提拉紧致,嫩肤,去眼袋,去法令纹,脱毛,纹眉,去黑眼圈,美白嫩肤,面部提升,祛斑祛痣,除皱,去红血丝,祛疤,祛妊娠纹,纹身,纤体塑性,纹眉"; */
+		var info=items.split(",");
+		var html='';
+		for (var i = 0; i < info.length; i++) {
+			if(''!=info[i]){
+				html+="<label>"+info[i]+"</label>";
+				if((i+1)%9==0){
+					html+="<br>";
+				}
+			}
+		}
+		$(".init-label").append(html);
+
+
+		$("#labelName").typeahead({
+			property : 'name',
+			source:function(typeahead, query){
+				query = $.trim(query);
+				if(''==query){return;}
+				$.ajax({
+					type:"POST", dataType:"JSON", async:false,
+					url: "${ctx}/info/infoLabel/findByName",
+					data:{name: query},
+					success:function(data){
+						typeahead.process(data);
+					}
+				});
+			},
+			onselect : function(data) {
+				setLabel(data.name);
+				$("#labelName").focus(); //选择完后 回到当前输入框以便下一个动作的验证
+			}
+		});
+	}
+	function setLabel(name){
+		if(name!=''){
+			var label=$("#label").val();
+			if(label==''){
+				label=name;
+			}else{
+				label=label+","+name;
+			}
+			$("#label").val(label);
+			$("#labelName").val("");
+		}
+	}
+	function addLeable(){
+		var label=$("#labelName").val();
+		if(''==label){
+			$.jBox.tip('添加的标签不能为空!','error');
+		}else{
+			setLabel(label);
+		}
+	}
+</script>
+</body>
+</html>

+ 6 - 0
src/main/webapp/WEB-INF/views/modules/info/checkInfoPage.jsp

@@ -90,6 +90,12 @@
 				${info.shopName}
 			</div>
 		</div>
+		<div class="control-group">
+			<label class="control-label"><span class="help-inline"></span>添加时间:</label>
+			<div class="controls">
+				<fmt:formatDate value="${info.createDate}" pattern="yyyy-MM-dd HH:mm"/>
+			</div>
+		</div>
 		<div class="control-group">
 			<label class="control-label">实际点赞:</label>
 			<div class="controls">

+ 25 - 2
src/main/webapp/WEB-INF/views/modules/info/shopInfoList.jsp

@@ -120,6 +120,13 @@
 					<form:option value="2" label="审核通过"/>
 					<form:option value="3" label="审核失败"/>
 				</form:select>
+			 <label>上线状态:</label>
+			 	<form:select path="onlineStatus" class="input-mini">
+					<form:option value="" label="全部"/>
+					<form:option value="1" label="待上线"/>
+					<form:option value="2" label="已上线"/>
+					<form:option value="3" label="已下线"/>
+				</form:select>
 			&nbsp;&nbsp;<input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
 			<div class="clearfix"></div>
 		</div>
@@ -135,6 +142,7 @@
 				<th>实际点赞</th>
 				<th>实际阅读量</th>
 				<th>审核状态</th>
+				<th>上线状态</th>
 				<th>发布时间</th>
 				<th>发布人</th>
 				<th>供应商</th>
@@ -156,6 +164,7 @@
 				<td>${empty info.realPraise?0:(info.realPraise)}</td>
 				<td>${empty info.pv?0:(info.pv)}</td>
 				<td><font color="${info.auditStatus eq 1?'black':info.auditStatus eq 2?'#2FA4E7':info.auditStatus eq 3?'red':'#2FA4E7'}"> ${info.auditStatus eq 1?'待审核':info.auditStatus eq 2?'审核通过':info.auditStatus eq 3?'审核失败':'审核通过'}</font></td>
+				<td><font color="${info.onlineStatus eq 1?'black':info.onlineStatus eq 2?'#2FA4E7':info.onlineStatus eq 3?'red':'#2FA4E7'}"> ${info.onlineStatus eq 1?'待上线':info.onlineStatus eq 2?'已上线':info.onlineStatus eq 3?'已下线':'已上线'}</font></td>
 				<td>
                     <c:if test="${info.auditStatus eq 2}">
                         <fmt:formatDate value="${info.pubdate}" pattern="yyyy-MM-dd HH:mm"/>
@@ -175,9 +184,12 @@
                     <label id="homePageImage${index.index}">${info.homePageImage}</label>
                 </td>
 				<shiro:hasPermission name="info:info:edit"><td style="width: 150px">
-                    <a href="javascript:;" style="display: ${info.auditStatus eq 1 or info.auditStatus eq 3?'':'none'}"
-					   onclick="auditInfo(${info.id})">审核</a>
+                    <a href="${ctx}/info/info/toAuditPage?id=${info.id}"
+					   style="display: ${info.auditStatus eq 1 or info.auditStatus eq 3?'':'none'}">审核</a>
                     <a href="${ctx}/info/info/check?id=${info.id}&publishSource=2">查看</a>
+					<c:if test="${info.onlineStatus eq 2}">
+						<a href="javascript:;" onclick="offline(${info.id})">下线</a>
+					</c:if>
                     <a href="javascript:void(0);" onclick="updateIndex('${info.id}');">更新索引</a>
 				</td></shiro:hasPermission>
             </tr>
@@ -227,6 +239,17 @@
 			}
 		});
 	}
+
+	function offline(infoId) {
+		$.post("${ctx}/info/info/offline?id=" + infoId, function(data) {
+			if(true==data){
+				$.jBox.tip("下线成功", 'info');
+				$("#searchForm").submit();
+			} else {
+				$.jBox.tip("下线失败",'error');
+			}
+		},"JSON");//这里返回的类型有:json,html,xml,text
+	}
 </script>
 </body>
 </html>