Browse Source

采美百科产品/仪器part1

Aslee 3 năm trước cách đây
mục cha
commit
64684e270f

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

@@ -0,0 +1,15 @@
+package com.caimei.modules.baike.dao;
+
+import com.thinkgem.jeesite.common.persistence.CrudDao;
+import com.thinkgem.jeesite.common.persistence.annotation.MyBatisDao;
+import com.caimei.modules.baike.entity.CmBaikeProduct;
+
+/**
+ * 采美百科产品/仪器DAO接口
+ * @author Aslee
+ * @version 2021-11-19
+ */
+@MyBatisDao
+public interface CmBaikeProductDao extends CrudDao<CmBaikeProduct> {
+	
+}

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

@@ -0,0 +1,249 @@
+package com.caimei.modules.baike.entity;
+
+import org.hibernate.validator.constraints.Length;
+import java.util.Date;
+import com.fasterxml.jackson.annotation.JsonFormat;
+
+import com.thinkgem.jeesite.common.persistence.DataEntity;
+
+/**
+ * 采美百科产品/仪器Entity
+ * @author Aslee
+ * @version 2021-11-19
+ */
+public class CmBaikeProduct extends DataEntity<CmBaikeProduct> {
+	
+	private static final long serialVersionUID = 1L;
+	private Integer classify;		// 分类:1产品,2仪器
+	private String name;		// 名称
+	private String alias;		// 别名
+	private String discription;		// 描述
+	private String image;		// 图片
+	private String advantage;		// 优点
+	private String disadvantage;		// 缺点
+	private String principle;		// 原理
+	private String brand;		// 品牌
+	private String producePlace;		// 产地
+	private Date marketTime;		// 上市时间
+	private String company;		// 公司/供应商
+	private Date nmpaTime;		// NMPA认证时间
+	private String adaptiveMan;		// 适应人群
+	private String unAdaptiveMan;		// 不适应人群
+	private String aroundOperation;		// 术前术后
+	private Date publishTime;		// 发布时间
+	private Integer basePv;		// 基础浏览量
+	private Integer actualPv;		// 实际浏览量
+	private Integer typeId;		// 分类id
+	private Integer topPosition;		// 置顶位
+	private Integer status;		// 状态:0停用,1启用
+	private Date addTime;		// 添加时间
+	
+	public CmBaikeProduct() {
+		super();
+	}
+
+	public CmBaikeProduct(String id){
+		super(id);
+	}
+
+	public Integer getClassify() {
+		return classify;
+	}
+
+	public void setClassify(Integer classify) {
+		this.classify = classify;
+	}
+	
+	@Length(min=0, max=50, message="名称长度必须介于 0 和 50 之间")
+	public String getName() {
+		return name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+	
+	@Length(min=0, max=50, message="别名长度必须介于 0 和 50 之间")
+	public String getAlias() {
+		return alias;
+	}
+
+	public void setAlias(String alias) {
+		this.alias = alias;
+	}
+	
+	@Length(min=0, max=300, message="描述长度必须介于 0 和 300 之间")
+	public String getDiscription() {
+		return discription;
+	}
+
+	public void setDiscription(String discription) {
+		this.discription = discription;
+	}
+	
+	public String getImage() {
+		return image;
+	}
+
+	public void setImage(String image) {
+		this.image = image;
+	}
+	
+	@Length(min=0, max=500, message="优点长度必须介于 0 和 500 之间")
+	public String getAdvantage() {
+		return advantage;
+	}
+
+	public void setAdvantage(String advantage) {
+		this.advantage = advantage;
+	}
+	
+	@Length(min=0, max=500, message="缺点长度必须介于 0 和 500 之间")
+	public String getDisadvantage() {
+		return disadvantage;
+	}
+
+	public void setDisadvantage(String disadvantage) {
+		this.disadvantage = disadvantage;
+	}
+	
+	@Length(min=0, max=500, message="原理长度必须介于 0 和 500 之间")
+	public String getPrinciple() {
+		return principle;
+	}
+
+	public void setPrinciple(String principle) {
+		this.principle = principle;
+	}
+	
+	@Length(min=0, max=50, message="品牌长度必须介于 0 和 50 之间")
+	public String getBrand() {
+		return brand;
+	}
+
+	public void setBrand(String brand) {
+		this.brand = brand;
+	}
+	
+	@Length(min=0, max=50, message="产地长度必须介于 0 和 50 之间")
+	public String getProducePlace() {
+		return producePlace;
+	}
+
+	public void setProducePlace(String producePlace) {
+		this.producePlace = producePlace;
+	}
+	
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+	public Date getMarketTime() {
+		return marketTime;
+	}
+
+	public void setMarketTime(Date marketTime) {
+		this.marketTime = marketTime;
+	}
+	
+	@Length(min=0, max=50, message="公司/供应商长度必须介于 0 和 50 之间")
+	public String getCompany() {
+		return company;
+	}
+
+	public void setCompany(String company) {
+		this.company = company;
+	}
+	
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+	public Date getNmpaTime() {
+		return nmpaTime;
+	}
+
+	public void setNmpaTime(Date nmpaTime) {
+		this.nmpaTime = nmpaTime;
+	}
+	
+	@Length(min=0, max=500, message="适应人群长度必须介于 0 和 500 之间")
+	public String getAdaptiveMan() {
+		return adaptiveMan;
+	}
+
+	public void setAdaptiveMan(String adaptiveMan) {
+		this.adaptiveMan = adaptiveMan;
+	}
+	
+	@Length(min=0, max=500, message="不适应人群长度必须介于 0 和 500 之间")
+	public String getUnAdaptiveMan() {
+		return unAdaptiveMan;
+	}
+
+	public void setUnAdaptiveMan(String unAdaptiveMan) {
+		this.unAdaptiveMan = unAdaptiveMan;
+	}
+	
+	@Length(min=0, max=500, message="术前术后长度必须介于 0 和 500 之间")
+	public String getAroundOperation() {
+		return aroundOperation;
+	}
+
+	public void setAroundOperation(String aroundOperation) {
+		this.aroundOperation = aroundOperation;
+	}
+	
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+	public Date getPublishTime() {
+		return publishTime;
+	}
+
+	public void setPublishTime(Date publishTime) {
+		this.publishTime = publishTime;
+	}
+	
+	public Integer getBasePv() {
+		return basePv;
+	}
+
+	public void setBasePv(Integer basePv) {
+		this.basePv = basePv;
+	}
+	
+	public Integer getActualPv() {
+		return actualPv;
+	}
+
+	public void setActualPv(Integer actualPv) {
+		this.actualPv = actualPv;
+	}
+	
+	public Integer getTypeId() {
+		return typeId;
+	}
+
+	public void setTypeId(Integer typeId) {
+		this.typeId = typeId;
+	}
+	
+	public Integer getTopPosition() {
+		return topPosition;
+	}
+
+	public void setTopPosition(Integer topPosition) {
+		this.topPosition = topPosition;
+	}
+	
+	public Integer getStatus() {
+		return status;
+	}
+
+	public void setStatus(Integer status) {
+		this.status = status;
+	}
+	
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+	public Date getAddTime() {
+		return addTime;
+	}
+
+	public void setAddTime(Date addTime) {
+		this.addTime = addTime;
+	}
+	
+}

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

@@ -0,0 +1,44 @@
+package com.caimei.modules.baike.service;
+
+import java.util.List;
+
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import com.thinkgem.jeesite.common.persistence.Page;
+import com.thinkgem.jeesite.common.service.CrudService;
+import com.caimei.modules.baike.entity.CmBaikeProduct;
+import com.caimei.modules.baike.dao.CmBaikeProductDao;
+
+/**
+ * 采美百科产品/仪器Service
+ * @author Aslee
+ * @version 2021-11-19
+ */
+@Service
+@Transactional(readOnly = true)
+public class CmBaikeProductService extends CrudService<CmBaikeProductDao, CmBaikeProduct> {
+
+	public CmBaikeProduct get(String id) {
+		return super.get(id);
+	}
+	
+	public List<CmBaikeProduct> findList(CmBaikeProduct cmBaikeProduct) {
+		return super.findList(cmBaikeProduct);
+	}
+	
+	public Page<CmBaikeProduct> findPage(Page<CmBaikeProduct> page, CmBaikeProduct cmBaikeProduct) {
+		return super.findPage(page, cmBaikeProduct);
+	}
+	
+	@Transactional(readOnly = false)
+	public void save(CmBaikeProduct cmBaikeProduct) {
+		super.save(cmBaikeProduct);
+	}
+	
+	@Transactional(readOnly = false)
+	public void delete(CmBaikeProduct cmBaikeProduct) {
+		super.delete(cmBaikeProduct);
+	}
+	
+}

+ 76 - 0
src/main/java/com/caimei/modules/baike/web/CmBaikeProductController.java

@@ -0,0 +1,76 @@
+package com.caimei.modules.baike.web;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.Model;
+import org.springframework.web.bind.annotation.ModelAttribute;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.servlet.mvc.support.RedirectAttributes;
+
+import com.thinkgem.jeesite.common.config.Global;
+import com.thinkgem.jeesite.common.persistence.Page;
+import com.thinkgem.jeesite.common.web.BaseController;
+import com.thinkgem.jeesite.common.utils.StringUtils;
+import com.caimei.modules.baike.entity.CmBaikeProduct;
+import com.caimei.modules.baike.service.CmBaikeProductService;
+
+/**
+ * 采美百科产品/仪器Controller
+ * @author Aslee
+ * @version 2021-11-19
+ */
+@Controller
+@RequestMapping(value = "${adminPath}/baike/cmBaikeProduct")
+public class CmBaikeProductController extends BaseController {
+
+	@Autowired
+	private CmBaikeProductService cmBaikeProductService;
+	
+	@ModelAttribute
+	public CmBaikeProduct get(@RequestParam(required=false) String id) {
+		CmBaikeProduct entity = null;
+		if (StringUtils.isNotBlank(id)){
+			entity = cmBaikeProductService.get(id);
+		}
+		if (entity == null){
+			entity = new CmBaikeProduct();
+		}
+		return entity;
+	}
+	
+	@RequestMapping(value = {"list", ""})
+	public String list(CmBaikeProduct cmBaikeProduct, HttpServletRequest request, HttpServletResponse response, Model model) {
+		Page<CmBaikeProduct> page = cmBaikeProductService.findPage(new Page<CmBaikeProduct>(request, response), cmBaikeProduct); 
+		model.addAttribute("page", page);
+		return "modules/baike/cmBaikeProductList";
+	}
+
+	@RequestMapping(value = "form")
+	public String form(CmBaikeProduct cmBaikeProduct, Model model) {
+		model.addAttribute("cmBaikeProduct", cmBaikeProduct);
+		return "modules/baike/cmBaikeProductForm";
+	}
+
+	@RequestMapping(value = "save")
+	public String save(CmBaikeProduct cmBaikeProduct, Model model, RedirectAttributes redirectAttributes) {
+		if (!beanValidator(model, cmBaikeProduct)){
+			return form(cmBaikeProduct, model);
+		}
+		cmBaikeProductService.save(cmBaikeProduct);
+		addMessage(redirectAttributes, "保存产品成功");
+		return "redirect:"+Global.getAdminPath()+"/baike/cmBaikeProduct/?repage";
+	}
+	
+	@RequestMapping(value = "delete")
+	public String delete(CmBaikeProduct cmBaikeProduct, RedirectAttributes redirectAttributes) {
+		cmBaikeProductService.delete(cmBaikeProduct);
+		addMessage(redirectAttributes, "删除产品成功");
+		return "redirect:"+Global.getAdminPath()+"/baike/cmBaikeProduct/?repage";
+	}
+
+}

+ 174 - 0
src/main/resources/mappings/modules/baike/CmBaikeProductMapper.xml

@@ -0,0 +1,174 @@
+<?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.caimei.modules.baike.dao.CmBaikeProductDao">
+    
+	<sql id="cmBaikeProductColumns">
+		a.id AS "id",
+		a.classify AS "classify",
+		a.name AS "name",
+		a.alias AS "alias",
+		a.discription AS "discription",
+		a.image AS "image",
+		a.advantage AS "advantage",
+		a.disadvantage AS "disadvantage",
+		a.principle AS "principle",
+		a.brand AS "brand",
+		a.producePlace AS "producePlace",
+		a.marketTime AS "marketTime",
+		a.company AS "company",
+		a.nmpaTime AS "nmpaTime",
+		a.adaptiveMan AS "adaptiveMan",
+		a.unAdaptiveMan AS "unAdaptiveMan",
+		a.aroundOperation AS "aroundOperation",
+		a.publishTime AS "publishTime",
+		a.basePv AS "basePv",
+		a.actualPv AS "actualPv",
+		a.typeId AS "typeId",
+		a.topPosition AS "topPosition",
+		a.status AS "status",
+		a.addTime AS "addTime"
+	</sql>
+	
+	<sql id="cmBaikeProductJoins">
+	</sql>
+    
+	<select id="get" resultType="CmBaikeProduct">
+		SELECT 
+			<include refid="cmBaikeProductColumns"/>
+		FROM cm_baike_product a
+		<include refid="cmBaikeProductJoins"/>
+		WHERE a.id = #{id}
+	</select>
+	
+	<select id="findList" resultType="CmBaikeProduct">
+		SELECT 
+			<include refid="cmBaikeProductColumns"/>
+		FROM cm_baike_product a
+		<include refid="cmBaikeProductJoins"/>
+		<where>
+			
+			<if test="id != null and id != ''">
+				AND a.id = #{id}
+			</if>
+			<if test="name != null and name != ''">
+				AND a.name LIKE 
+					<if test="dbName == 'oracle'">'%'||#{name}||'%'</if>
+					<if test="dbName == 'mssql'">'%'+#{name}+'%'</if>
+					<if test="dbName == 'mysql'">concat('%',#{name},'%')</if>
+			</if>
+			<if test="typeId != null and typeId != ''">
+				AND a.typeId = #{typeId}
+			</if>
+			<if test="topPosition != null and topPosition != ''">
+				AND a.topPosition = #{topPosition}
+			</if>
+			<if test="status != null and status != ''">
+				AND a.status = #{status}
+			</if>
+		</where>
+		<choose>
+			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
+				ORDER BY ${page.orderBy}
+			</when>
+			<otherwise>
+			</otherwise>
+		</choose>
+	</select>
+	
+	<select id="findAllList" resultType="CmBaikeProduct">
+		SELECT 
+			<include refid="cmBaikeProductColumns"/>
+		FROM cm_baike_product a
+		<include refid="cmBaikeProductJoins"/>
+		<where>
+			
+		</where>		
+		<choose>
+			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
+				ORDER BY ${page.orderBy}
+			</when>
+			<otherwise>
+			</otherwise>
+		</choose>
+	</select>
+	
+	<insert id="insert" parameterType="CmBaikeProduct"  keyProperty="id" useGeneratedKeys="true">
+		INSERT INTO cm_baike_product(
+			classify,
+			name,
+			alias,
+			discription,
+			image,
+			advantage,
+			disadvantage,
+			principle,
+			brand,
+			producePlace,
+			marketTime,
+			company,
+			nmpaTime,
+			adaptiveMan,
+			unAdaptiveMan,
+			aroundOperation,
+			publishTime,
+			basePv,
+			actualPv,
+			typeId,
+			status,
+			addTime
+		) VALUES (
+			#{classify},
+			#{name},
+			#{alias},
+			#{discription},
+			#{image},
+			#{advantage},
+			#{disadvantage},
+			#{principle},
+			#{brand},
+			#{producePlace},
+			#{marketTime},
+			#{company},
+			#{nmpaTime},
+			#{adaptiveMan},
+			#{unAdaptiveMan},
+			#{aroundOperation},
+			#{publishTime},
+			#{basePv},
+			#{actualPv},
+			#{typeId},
+			#{status},
+			#{addTime}
+		)
+	</insert>
+	
+	<update id="update">
+		UPDATE cm_baike_product SET 	
+			name = #{name},
+			alias = #{alias},
+			discription = #{discription},
+			image = #{image},
+			advantage = #{advantage},
+			disadvantage = #{disadvantage},
+			principle = #{principle},
+			brand = #{brand},
+			producePlace = #{producePlace},
+			marketTime = #{marketTime},
+			company = #{company},
+			nmpaTime = #{nmpaTime},
+			adaptiveMan = #{adaptiveMan},
+			unAdaptiveMan = #{unAdaptiveMan},
+			aroundOperation = #{aroundOperation},
+			publishTime = #{publishTime},
+			basePv = #{basePv},
+			typeId = #{typeId},
+			status = #{status}
+		WHERE id = #{id}
+	</update>
+	
+	<delete id="delete">
+		DELETE FROM cm_baike_product
+		WHERE id = #{id}
+	</delete>
+	
+</mapper>

+ 168 - 0
src/main/webapp/WEB-INF/views/modules/baike/cmBaikeProductForm.jsp

@@ -0,0 +1,168 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
+<html>
+<head>
+	<title>产品管理</title>
+	<meta name="decorator" content="default"/>
+	<script type="text/javascript">
+		$(document).ready(function() {
+			//$("#name").focus();
+			$("#inputForm").validate({
+				submitHandler: function(form){
+					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);
+					}
+				}
+			});
+		});
+	</script>
+</head>
+<body>
+	<ul class="nav nav-tabs">
+		<li><a href="${ctx}/baike/cmBaikeProduct/">产品列表</a></li>
+		<li class="active"><a href="${ctx}/baike/cmBaikeProduct/form?id=${cmBaikeProduct.id}">产品${not empty cmBaikeProduct.id?'编辑':'添加'}查看</a></li>
+	</ul><br/>
+	<form:form id="inputForm" modelAttribute="cmBaikeProduct" action="${ctx}/baike/cmBaikeProduct/save" method="post" class="form-horizontal">
+		<form:hidden path="id"/>
+		<sys:message content="${message}"/>		
+		<div class="control-group">
+			<label class="control-label">名称:</label>
+			<div class="controls">
+				<form:input path="name" htmlEscape="false" maxlength="50" class="input-xlarge "/>
+			</div>
+		</div>
+		<div class="control-group">
+			<label class="control-label">别名:</label>
+			<div class="controls">
+				<form:input path="alias" htmlEscape="false" maxlength="50" class="input-xlarge "/>
+			</div>
+		</div>
+		<div class="control-group">
+			<label class="control-label">描述:</label>
+			<div class="controls">
+				<form:input path="discription" htmlEscape="false" maxlength="300" class="input-xlarge "/>
+			</div>
+		</div>
+		<div class="control-group">
+			<label class="control-label">图片:</label>
+			<div class="controls">
+				<form:input path="image" htmlEscape="false" class="input-xlarge "/>
+			</div>
+		</div>
+		<div class="control-group">
+			<label class="control-label">优点:</label>
+			<div class="controls">
+				<form:input path="advantage" htmlEscape="false" maxlength="500" class="input-xlarge "/>
+			</div>
+		</div>
+		<div class="control-group">
+			<label class="control-label">缺点:</label>
+			<div class="controls">
+				<form:input path="disadvantage" htmlEscape="false" maxlength="500" class="input-xlarge "/>
+			</div>
+		</div>
+		<div class="control-group">
+			<label class="control-label">原理:</label>
+			<div class="controls">
+				<form:input path="principle" htmlEscape="false" maxlength="500" class="input-xlarge "/>
+			</div>
+		</div>
+		<div class="control-group">
+			<label class="control-label">品牌:</label>
+			<div class="controls">
+				<form:input path="brand" htmlEscape="false" maxlength="50" class="input-xlarge "/>
+			</div>
+		</div>
+		<div class="control-group">
+			<label class="control-label">产地:</label>
+			<div class="controls">
+				<form:input path="producePlace" htmlEscape="false" maxlength="50" class="input-xlarge "/>
+			</div>
+		</div>
+		<div class="control-group">
+			<label class="control-label">上市时间:</label>
+			<div class="controls">
+				<input name="marketTime" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate "
+					value="<fmt:formatDate value="${cmBaikeProduct.marketTime}" pattern="yyyy-MM-dd HH:mm:ss"/>"
+					onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:false});"/>
+			</div>
+		</div>
+		<div class="control-group">
+			<label class="control-label">公司/供应商:</label>
+			<div class="controls">
+				<form:input path="company" htmlEscape="false" maxlength="50" class="input-xlarge "/>
+			</div>
+		</div>
+		<div class="control-group">
+			<label class="control-label">NMPA认证时间:</label>
+			<div class="controls">
+				<input name="nmpaTime" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate "
+					value="<fmt:formatDate value="${cmBaikeProduct.nmpaTime}" pattern="yyyy-MM-dd HH:mm:ss"/>"
+					onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:false});"/>
+			</div>
+		</div>
+		<div class="control-group">
+			<label class="control-label">适应人群:</label>
+			<div class="controls">
+				<form:input path="adaptiveMan" htmlEscape="false" maxlength="500" class="input-xlarge "/>
+			</div>
+		</div>
+		<div class="control-group">
+			<label class="control-label">不适应人群:</label>
+			<div class="controls">
+				<form:input path="unAdaptiveMan" htmlEscape="false" maxlength="500" class="input-xlarge "/>
+			</div>
+		</div>
+		<div class="control-group">
+			<label class="control-label">术前术后:</label>
+			<div class="controls">
+				<form:input path="aroundOperation" htmlEscape="false" maxlength="500" class="input-xlarge "/>
+			</div>
+		</div>
+		<div class="control-group">
+			<label class="control-label">发布时间:</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"/>"
+					onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:false});"/>
+			</div>
+		</div>
+		<div class="control-group">
+			<label class="control-label">基础浏览量:</label>
+			<div class="controls">
+				<form:input path="basePv" htmlEscape="false" class="input-xlarge  digits"/>
+			</div>
+		</div>
+		<div class="control-group">
+			<label class="control-label">分类id:</label>
+			<div class="controls">
+				<form:select path="typeId" class="input-xlarge ">
+					<form:option value="" label=""/>
+					<form:options items="${fns:getDictList('')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+				</form:select>
+			</div>
+		</div>
+		<div class="control-group">
+			<label class="control-label">状态:0停用,1启用:</label>
+			<div class="controls">
+				<form:select path="status" class="input-xlarge ">
+					<form:option value="" label=""/>
+					<form:options items="${fns:getDictList('')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+				</form:select>
+			</div>
+		</div>
+		<div class="form-actions">
+			<input id="btnSubmit" class="btn btn-primary" type="submit" value="保 存"/>&nbsp;
+			<input id="btnCancel" class="btn" type="button" value="返 回" onclick="history.go(-1)"/>
+		</div>
+	</form:form>
+</body>
+</html>

+ 108 - 0
src/main/webapp/WEB-INF/views/modules/baike/cmBaikeProductList.jsp

@@ -0,0 +1,108 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
+<html>
+<head>
+	<title>产品管理</title>
+	<meta name="decorator" content="default"/>
+	<style type="text/css">
+		.table th{text-align: center;}
+		.table td{text-align: center;}
+	</style>
+	<script type="text/javascript">
+		$(document).ready(function() {
+			
+		});
+		function page(n,s){
+			$("#pageNo").val(n);
+			$("#pageSize").val(s);
+			$("#searchForm").submit();
+        	return false;
+        }
+	</script>
+</head>
+<body>
+	<ul class="nav nav-tabs">
+		<li class="active"><a href="${ctx}/baike/cmBaikeProduct/">产品列表</a></li>
+		<li><a href="${ctx}/baike/cmBaikeProduct/form">产品添加</a></li>
+	</ul>
+	<form:form id="searchForm" modelAttribute="cmBaikeProduct" action="${ctx}/baike/cmBaikeProduct/" method="post" class="breadcrumb form-search">
+		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
+		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
+		<div class="ul-form">
+			 <label>id:</label>
+				<form:input path="id" htmlEscape="false" class="input-medium"/>
+			 <label>名称:</label>
+				<form:input path="name" htmlEscape="false" maxlength="50" class="input-medium"/>
+			 <label>分类id:</label>
+				<form:select path="typeId" class="input-medium">
+					<form:option value="" label=" "/>
+					<form:options items="${fns:getDictList('')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+				</form:select>
+			 <label>置顶位:</label>
+				<form:input path="topPosition" htmlEscape="false" class="input-medium"/>
+			 <label>状态:0停用,1启用:</label>
+				<form:select path="status" class="input-medium">
+					<form:option value="" label=" "/>
+					<form:options items="${fns:getDictList('')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+				</form:select>
+			&nbsp;&nbsp;<input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
+			<div class="clearfix"></div>
+		</div>
+	</form:form>
+	<sys:message content="${message}"/>
+	<table id="contentTable" class="table table-striped table-bordered table-condensed">
+		<thead>
+			<tr>
+				<th>id</th>
+				<th>分类:1产品,2仪器</th>
+				<th>名称</th>
+				<th>发布时间</th>
+				<th>基础浏览量</th>
+				<th>实际浏览量</th>
+				<th>置顶位</th>
+				<th>状态:0停用,1启用</th>
+				<th>添加时间</th>
+				<th>操作</th>
+			</tr>
+		</thead>
+		<tbody>
+		<c:forEach items="${page.list}" var="cmBaikeProduct">
+			<tr>
+				<td><a href="${ctx}/baike/cmBaikeProduct/form?id=${cmBaikeProduct.id}">
+					${cmBaikeProduct.id}
+				</a></td>
+				<td>
+					${cmBaikeProduct.classify}
+				</td>
+				<td>
+					${cmBaikeProduct.name}
+				</td>
+				<td>
+					<fmt:formatDate value="${cmBaikeProduct.publishTime}" pattern="yyyy-MM-dd HH:mm:ss"/>
+				</td>
+				<td>
+					${cmBaikeProduct.basePv}
+				</td>
+				<td>
+					${cmBaikeProduct.actualPv}
+				</td>
+				<td>
+					${cmBaikeProduct.topPosition}
+				</td>
+				<td>
+					${fns:getDictLabel(cmBaikeProduct.status, '', '')}
+				</td>
+				<td>
+					<fmt:formatDate value="${cmBaikeProduct.addTime}" pattern="yyyy-MM-dd HH:mm:ss"/>
+				</td>
+				<td>
+    				<a href="${ctx}/baike/cmBaikeProduct/form?id=${cmBaikeProduct.id}">编辑</a>
+					<a href="${ctx}/baike/cmBaikeProduct/delete?id=${cmBaikeProduct.id}" onclick="return confirmx('确认要删除该产品吗?', this.href)">删除</a>
+				</td>
+			</tr>
+		</c:forEach>
+		</tbody>
+	</table>
+	<div class="pagination">${page}</div>
+</body>
+</html>