sunqing 4 years ago
parent
commit
850ee849f5

+ 901 - 0
src/main/java/com/minpay/common/constant/Constant.java

@@ -0,0 +1,901 @@
+package com.minpay.common.constant;
+
+import com.minpay.common.service.IPropertiesService;
+import com.startup.minpay.frame.constant.IMINBusinessConstant;
+import com.startup.minpay.frame.service.base.Service;
+
+import java.util.ArrayList;
+import java.util.List;
+
+
+/**
+ * 通用常量类,对应数据库中的PUB_SYSPAR表
+ * @author qijia
+ *
+ */
+public class Constant implements IMINBusinessConstant {
+	
+	static public List<String> USE_SEQ = new ArrayList<String>();
+	/**
+	 *管理系统号
+	 */
+	static final public String ADMINISTRATION_SYSTEM_NUMBER = "88888888";
+
+	//个人客户状态
+	/**
+	*正常
+	*/
+	static final public String PB_CST_STT_NORMAL = "0";
+	/**
+	*暂时冻结
+	*/
+	static final public String PB_CST_STT_TEMP_FREEZE = "1";
+	/**
+	*冻结
+	*/
+	static final public String PB_CST_STT_FREEZE = "2";
+	/**
+	*注销
+	*/
+	static final public String PB_CST_STT_LOGOUT = "3";
+	
+	
+	
+	//内管用户状态
+	/**
+	*正常
+	*/
+	static final public String IM_USER_STT_NORMAL = "0";
+	/**
+	*暂时冻结
+	*/
+	static final public String IM_USER_STT_TEMP_FREEZE = "2";
+	/**
+	*用户停用
+	*/
+	static final public String IM_USER_STT_STOP = "3";
+	/**
+	*永久冻结
+	*/
+	static final public String IM_USER_STT_FREEZE = "4";
+	/**
+	*注销
+	*/
+	static final public String IM_USER_STT_CANCEL = "5";
+	//日志信息
+	/**
+	*日志数据信息
+	*/
+	static final public String LOG_BEAN = "logBean";
+	/**
+	*交易代码
+	*/
+	static final public String LOG_BUSINESSCODE = "businessCode";	
+	/**
+	*用户对象
+	*/
+	static final public String LOG_USER = "user";	
+	
+	/**
+	*初始化角色名称
+	*/
+	static final public String ROLE_NAME = "初始化管理员";
+	/**
+	*系统管理员
+	*/
+	static final public String ROLE_NAME_SYS = "系统管理员";
+	/**
+	*初始化角色说明
+	*/
+	static final public String ROLE_DESC = "用于新建角色和管理员";
+	/**
+	*信息管理模块编码
+	*/
+	static final public String ARTICLE_MODULE_CODE = "ARTICLE_MODULE";
+	/**
+	*权限控制表,权限类型:模块权限
+	*/
+	static final public String MODULE_AUTH_CODE = "01";
+	/**
+	*权限控制表,权限类型:功能权限
+	*/
+	static final public String FUNCTION_AUTH_CODE = "02";
+	/**
+	 * 文件服务器访问地址
+	 */
+	static final public String FILE_SERVER_PATH = "http://101.201.144.102/";	
+	
+	/**
+	 * excel 文件
+	 */
+	static final public String FILE_TYPE_XLS = "xls";
+	/**
+	 * pdf文件
+	 */
+	static final public String FILE_TYPE_PDF = "pdf";
+	/**
+	 * xml文件
+	 */
+	static final public String FILE_TYPE_XML = "xml";
+	/**
+	 * CSV文件
+	 */
+	static final public String FILE_TYPE_CSV = "csv";
+	/**
+	 * 文件类型存放路径-图片
+	 */
+	static final public String FILE_PATH_IMG = "00";
+	/**
+	 * 文件类型存放路径-文档
+	 */
+	static final public String FILE_PATH_DOC = "01";
+	/**
+	 * 文件类型存放路径-视频
+	 */
+	static final public String FILE_PATH_VIDEO = "02";
+	/**
+	 * 文件类型存放路径-客户端
+	 */
+	static final public String FILE_PATH_APP = "03";
+	/**
+	 * 文件类型存放路径-订单合同
+	 */
+	static final public String FILE_PATH_ORDER = "04";
+	/**
+	 * 文件类型存放路径-采购单合同
+	 */
+	static final public String FILE_PATH_PURCHASE = "05";
+	
+	
+	/**
+	 * 应用参数同步的系统
+	 */
+	static final public String APPPARSYNCH_SYSTEMS = "APPParSynchSystems";
+	/**
+	 * 系统参数同步的系统
+	 */
+	static final public String SYSPARSYNCH_SYSTEMS = "SYSParSynchSystems";
+
+	/**
+	 * 发送短信测试模式
+	 */
+	public static final String SEND_MSG_TEST_MODEL = "SEND_MSG_TEST_MODEL";
+	/**
+	 * 发送短信测试模式-开启
+	 */
+	public static final String SEND_MSG_TEST_MODEL_OPEN = "0";
+	/**
+	 * 发送短信测试模式-关闭
+	 */
+	public static final String SEND_MSG_TEST_MODEL_CLOSE = "1";
+	/**
+	 * 请求返回码 200
+	 */
+	static final public String RES_CODE_200	= "200";
+	/**
+	 * 应用类型 APP
+	 */
+	static final public String SYS_APP = "APP";
+	/**
+	 * 应用类型 ADM
+	 */
+	static final public String SYS_ADM = "ADM";
+	
+	
+	/**
+	 * 平台手机验证码开关
+	 */
+	static final public String P_MOBILEVALIDATECODE = "PAYMENTMobileValidateCode";
+	
+	/**
+	 * 部门状态 0正常
+	 */
+	static final public String DEPT_STT_NORMAL = "0";
+	/**
+	 * 部门状态 1冻结
+	 */
+	static final public String DEPT_STT_FREEZE = "1";
+	/**
+	 * 部门状态 2删除
+	 */
+	static final public String DEPT_STT_DEL = "2";
+	
+	/**
+	 * 语音保存路径地址
+	 */
+	static final public String voiceSrc = Service.lookup(IPropertiesService.class).getSystemProperties().get("LOCAL_SAVEPATH_VOICE").getKey();
+	/**
+	 * 语音访问路径地址
+	 */
+	static final public String voiceHttpSrc = Service.lookup(IPropertiesService.class).getSystemProperties().get("FILE_URL_PREFIX_VOICE").getKey();
+	/**
+	 * 语音访问路径地址
+	 */
+	static final public String repairSrc = Service.lookup(IPropertiesService.class).getSystemProperties().get("REPAIR_DIR").getKey();
+	
+	/**
+	*机构级别 系统级
+	*/
+	static final public String BRANCH_LEVEL_SYS = "1";	
+	/**
+	 * 初始化机构菜单模板
+	 */
+	static final public String[] BRANCH_ITEM = {"010002","010003","240001"};
+	/**
+	 * 图片保存路径地址
+	 */
+
+	static final public String photoSrc = Service.lookup(IPropertiesService.class).getSystemProperties().get("LOCAL_SAVEPATH_IMAGE").getKey();
+
+	/**
+	 * 图片访问路径地址
+	 */
+	static final public String photoHttpSrc = Service.lookup(IPropertiesService.class).getSystemProperties().get("FILE_URL_PREFIX_IMAGE").getKey();
+	
+	/**
+	*是否是我的客户 00我的客户
+	*/
+	static final public String MY_CUSTOMER = "00";	
+	
+	/**
+	 * 是否是我的报价 00我的报价单
+	 */
+	static final public String MY_QUOTE = "00";
+	/**
+	 * 产品类目:一级 1,二级 2 ,三级 3, 四级 4
+	 */
+	static final public String GOODS_CAT_LEVEL_ONE = "1";	
+	/**
+	 * 产品类目:一级 1,二级 2 ,三级 3, 四级 4
+	 */
+	static final public String GOODS_CAT_LEVEL_TWO = "2";	
+	/**
+	 * 产品类目:一级 1,二级 2 ,三级 3, 四级 4
+	 */
+	static final public String GOODS_CAT_LEVEL_THREE = "3";	
+	/**
+	 * 产品类目:一级 1,二级 2 ,三级 3, 四级 4
+	 */
+	static final public String GOODS_CAT_LEVEL_FOUR = "4";	
+	
+	/**
+	 *询价单产品状态 0:已删除
+	 */
+	static final public String ENQDETAIL_STATUS_DELETE = "0";	
+	/**
+	 *询价单产品状态 1:未删除
+	 */
+	static final public String ENQDETAIL_STATUS_NOT_DELETE = "1";	
+	
+	/**
+	 *询价单状态 0:未提交
+	 */
+	static final public String ENQUIRY_STATUS_NOT_SUBMIT = "0";
+	/**
+	 *询价单状态 1:已提交
+	 */
+	static final public String ENQUIRY_STATUS_SUBMIT = "1";
+	/**
+	 * 询价单状态4:删除
+	 */
+	static final public String ENQUIRY_STATUS_DELETE = "4";
+	/**
+	 *报价单状态 0:待审核
+	 */
+	static final public String QUOTATION_STATUS_WAIT = "0";
+	/**
+	 *报价单状态 1:已通过
+	 */
+	static final public String QUOTATION_STATUS_PASS = "1";
+	/**
+	 *报价单状态 2:未通过
+	 */
+	static final public String QUOTATION_STATUS_NOT_PASS = "2";
+	/**
+	 *报价单状态 3:未申领
+	 */
+	static final public String QUOTATION_STATUS_NOT_SUBMIT = "3";
+	/**
+	 *报价单状态 4:全部报价未提交
+	 */
+	static final public String QUOTATION_STATUS_NOT_SUBMIT2 = "4";
+	/**
+	 *报价单状态5: 已转为订单
+	 */
+	static final public String QUOTATION_STATUS_TO_ORDER = "5";
+	/**
+	 *报价单状态6: 未报价
+	 */
+	static final public String QUOTATION_STATUS_NOT_QUOTED = "6";
+	/**
+	 *报价单状态7:部分报价
+	 */
+	static final public String QUOTATION_STATUS_COMPLETELY_QUOTED = "7";
+	/**
+	 *报价单状态8:未通过(售价)
+	 */
+	static final public String QUOTATION_STATUS_SALE_FAIL = "8";
+	/**
+	 *报价单状态9:已通过(售价)
+	 */
+	static final public String QUOTATION_STATUS_SALE_SUBMIT = "9";
+	/**
+	 *报价单状态10:申请中(售价)
+	 */
+	static final public String QUOTATION_STATUS_SALE_LOADING = "10";
+	
+	
+	/**
+	 *报价单产品状态 0:未报价
+	 */
+	static final public String QUOTATION_DETAIL_STATUS_ZERO = "0";
+	/**
+	 *报价单产品状态 1:已报价
+	 */
+	static final public String QUOTATION_DETAIL_STATUS_ONE = "1";
+	/**
+	 *报价单产品状态2:已删除
+	 */
+	static final public String QUOTATION_DETAIL_STATUS_DELETE = "2";
+	
+	/**
+	 * 类目常量
+	 */
+	static final public String HC_CATEGORY_LEVEL_ONE = "1";
+	/**
+	 * 小组状态 0正常 1删除
+	 */
+	static final public String GROUP_STATE = "0";
+	/**
+	 * 小组状态 0正常 1删除
+	 */
+	static final public String GROUP_STATE_DELE = "1";
+	
+	/**
+	 * 小组人员身份 1组长 2组员
+	 */
+	static final public String GROUP_PEOPLE_IDENTITY = "2";
+	/**
+	 * 小组人员身份 1组长 2组员
+	 */
+	static final public String GROUP_PEOPLE_IDENTITY_LEADER = "1";
+	/**
+	 * 信用 客户类型  0客户1供应商
+	 */
+	static final public String CUSTOMER_TYPE = "0";
+	/**
+	 * 信用 客户类型  0客户1供应商
+	 */
+	static final public String SUPPLIER_TYPE = "1";
+	/**
+	 * 账户类型00信用账户01
+	 */
+	static final public String ACCOUNT_TYPE = "00";
+	/**
+	 * 文件类型--文件类型00图片
+	 */
+	static final public String FRS_TYPE="00";
+	/**
+	 * 文件类型--文件类型01文档
+	 */
+	static final public String FRS_TYPE_ONE="01";
+	/**
+	 * 文件类型--文件类型02视频
+	 */
+	static final public String FRS_TYPE_TWO="02";
+	/**
+	 * 文件类型--文件类型03音频
+	 */
+	static final public String FRS_TYPE_THREE="03";
+	/**
+	 * 文件类型--文件类型04订单合同
+	 */
+	static final public String FRS_TYPE_FOUR="04";
+	/**
+	 * 文件类型--文件类型05采购单合同
+	 */
+	static final public String FRS_TYPE_FIVE="05";
+	
+	/**
+	 *发票类型 0不开发票 1普通发票  2增值税  
+	 */
+	static final public String INVOICE_TYPE = "2";
+	
+	/**
+	 * 资源类型00客户01产品02供应商04进项票
+	 */
+	static final public String RESOURCE_TYPE_CST="00";
+	static final public String RESOURCE_TYPE_CST_ONE="01";
+	static final public String RESOURCE_TYPE_CST_FOUR="04";
+	/**
+	 * 资源类型00客户01产品02供应商
+	 */
+	static final public String RESOURCE_TYPE_HGI="01";
+	/**
+	 * 资源类型00客户01产品02供应商
+	 */
+	static final public String RESOURCE_TYPE_SUPPLIER="02";
+	
+	/*图片 sta*/
+	/**
+	 * 图片上传大小 B 5242880
+	 */
+	static final public String IMG_UPLOAD_MAX = "5242880";
+	
+	/**
+	 * 图片上传最大宽度
+	 */
+	static final public String IMG_MAX_WIDTH = "800";
+	/**
+	 * 图片上传最大高度
+	 */
+	static final public String IMG_MAX_HEIGH = "400";
+	/*图片end*/
+	
+	/**
+	 * 信息状态--启用
+	 */
+	static final public String NEWS_STATUS = "0";
+	/**
+	 * 信息状态--停用
+	 */
+	static final public String NEWS_STATUS_STOP = "1";
+	/**
+	 * 日志状态--正常
+	 */
+	static final public String WORKLOG_STATUS_NORMAL = "0";
+	/**
+	 * 日志状态--停已删除
+	 */
+	static final public String WORKLOG_STATUS_DELETE = "1";
+	
+	/**
+	 * 报价方式0:自动报价
+	 */
+	static final public String QUOTATION_TYPE_AUTO = "0";
+	/**
+	 * 报价方式1:手动报价
+	 */
+	static final public String QUOTATION_TYPE_REFER = "1";
+	
+	/**
+	 * 售后状态: 0未审核1一审核通过2一审核驳回  3二审通过 4二审驳回
+	 */
+	static final public String SERVICE_STATE = "0";
+	/**
+	 * 售后状态:0未审核1一审核通过2一审核驳回  3二审通过 4二审驳回
+	 */
+	static final public String SERVICE_STATE_YES = "1";
+	
+	/**
+	 * 售后状态:  0未审核1一审核通过2一审核驳回  3二审通过 4二审驳回 
+	 */
+	static final public String SERVICE_STATE_NO = "2";
+	/**
+	 * 售后状态: 0未审核1一审核通过2一审核驳回  3二审通过 4二审驳回
+	 */
+	static final public String SERVICE_STATE_YESTWO = "3";
+	/**
+	 * 售后状态: 0未审核1一审核通过2一审核驳回  3二审通过 4二审驳回
+	 */
+	static final public String SERVICE_STATE_NOTWO = "4";
+	
+	
+	/**
+	 * 付款方式 :全款
+	 */
+	static final public String QUOTATION_PAY_TYPE_ZERO = "0";
+	/**
+	 * 付款方式:预付
+	 */
+	static final public String QUOTATION_PAY_TYPE_ONE = "1";
+	/**
+	 * 付款方式:账期
+	 */
+	static final public String QUOTATION_PAY_TYPE_TWO = "2";
+	
+	/**
+	 * 是否开票:不开票
+	 */
+	static final public String QUOTATION_INVOICE_TYPE_ZERO = "0";
+	
+	
+	/**
+	 * 是否开票:小规模
+	 */
+	static final public String QUOTATION_INVOICE_TYPE_ONE = "1";
+	/**
+	 * 是否开票:增值税
+	 */
+	static final public String QUOTATION_INVOICE_TYPE_TWO = "2";
+	
+	/**
+	 * 是否包含运费:不含
+	 */
+	static final public String QUOTATION_TRANS_FARE_ZERO = "0";
+	/**
+	 * 是否包含运费:含(物流点自提)
+	 */
+	static final public String QUOTATION_TRANS_FARE_ONE = "1";
+	/**
+	 * 是否包含运费:含(送货到门)
+	 */
+	static final public String QUOTATION_TRANS_FARE_TWO = "2";
+	
+	/**
+	 * 乙方公司  
+	 */
+	static final public String HC_B_COMPANY_TYPE_ONE = "0000000000";
+	/**
+	 * 乙方公司  
+	 */
+	static final public String HC_B_COMPANY_TYPE_TWO = "0000000001";
+
+	/**
+	 * 供应商状态: 0未认证1已认证2待审核  
+	 */
+	static final public String ATTESTATION_STATUS_NOT = "0";
+	/**
+	 * 供应商状态: 0未认证1已认证2待审核  
+	 */
+	static final public String ATTESTATION_STATUS_ALREADY = "1";
+	/**
+	 * 供应商状态: 0未认证1已认证2待审核  
+	 */
+	static final public String ATTESTATION_STATUS_WAIT = "2";
+
+	/**
+	 * 银行账号信息表状态 0:正常
+	 */
+	static final public String BANK_ACCOUNT_STATE_ZERO = "0";
+	/**
+	 * 银行账号信息表状态 1:已删除
+	 */
+	static final public String BANK_ACCOUNT_STATE_ONE = "1";
+	
+	/**
+	 * 部门状态-正常
+	 */
+	static final public String IM_BRANCH_STATE = "0";
+	
+	/**
+	 * 出库
+	 */
+	static final public String GSK_STOCK_TYPE_OUT = "01";
+	/**
+	 * 入库
+	 */
+	static final public String GSK_STOCK_TYPE_IN = "00";
+	/**
+	 * 未入库
+	 */
+	static final public String STOCK_STATE ="00";
+	
+	/**
+	 * 已入库
+	 */
+	static final public String STOCK_STATE_IN = "01";
+	/**
+	 * 部分入库
+	 */
+	static final public String STOCK_STATE_PARTIN = "02";
+	/**
+	 * 未出库
+	 */
+	static final public String OUT_STATE ="00";
+	/**
+	 * 已出库
+	 */
+	static final public String OUT_STATE_OUT = "01";
+	/**
+	 * 仓库状态--正常
+	 */
+	static final public String STORE_STATE_NORMAL = "0";
+	/**
+	 * 仓库状态--删除
+	 */
+	static final public String STORE_STATE = "1";
+	/**
+	 * 订单状态00:初始化
+	 */
+	static final public String ORDER_STATUS_ZERO= "00";
+	/**
+	 * 订单状态01:已提交
+	 */
+	static final public String ORDER_STATUS_ONE = "01";
+	/**
+	 * 订单状态02:未通过
+	 */
+	static final public String ORDER_STATUS_TWO= "02";
+	/**
+	 * 订单状态03:转财务
+	 */
+	static final public String ORDER_STATUS_THREE = "03";
+	/**
+	 * 订单状态04:财务拒绝
+	 */
+	static final public String ORDER_STATUS_FOUR = "04";
+	/**
+	 * 订单状态05:生效
+	 */
+	static final public String ORDER_STATUS_FIVE = "05";
+	/**
+	 * 订单状态06:作废
+	 */
+	static final public String ORDER_STATUS_SIX = "06";
+	/**
+	 * 订单状态07:完成
+	 */
+	static final public String ORDER_STATUS_SEVEN = "07";
+
+	/**
+	 * 采购单状态-00初始化
+	 */
+	static final public String PURCHASE_STATE_INIT = "00";
+	/**
+	 * 采购单状态-01已提交
+	 */
+	static final public String PURCHASE_STATE_SUBMIT = "01";
+	/**
+	 * 采购单状态-02未通过
+	 */
+	static final public String PURCHASE_STATE_BACK = "02";
+	/**
+	 * 采购单状态-03审核通过
+	 */
+	static final public String PURCHASE_STATE_AUDIT = "03";
+	/**
+	 * 采购单状态-04转财务
+	 */
+	static final public String PURCHASE_STATE_FINACE  = "04";
+	
+	/**
+	 * 采购单状态-05财务拒绝
+	 */
+	
+	static final public String PURCHASE_STATE_FINANCE_BACK = "05";
+	
+	/**
+	 * 采购单状态-06财务通过
+	 */
+	static final public String PURCHASE_STATE_FINANCE_PASS = "06";
+	
+	/**
+	 * 采购单状态-10完成
+	 */
+	static final public String PURCHASE_STATE_FINISH = "10";
+	/**
+	 * 付款单状态-0-未审核
+	 */
+	static final public String PAYBILL_STATE_UNREVIEWED = "0";
+	/**
+	 * 付款单状态-1-审核通过
+	 */
+	static final public String PAYBILL_STATE_REVIEWED = "1";
+	/**
+	 * 付款单状态-2-审核驳回
+	 */
+	static final public String PAYBILL_STATE_NOTREVIEWED = "2";
+	/**
+	 * 付款单状态-3-付款完成
+	 */
+	static final public String PAYBILL_STATE_FINISH = "3";
+	/**
+	 * 售后服务单类型-0-订单售后
+	 */
+	static final public String SERVICE_TYPE_ORDER = "0";
+	/**
+	 * 售后服务单类型-1-采购单售后
+	 */
+	static final public String SERVICE_TYPE_PURCHASE = "1";
+	
+	/**
+	 * 前缀:操作员U
+	 */
+	static final public String PREFIX_USER = "U";
+	/**
+	 * 前缀:客户P
+	 */
+	static final public String PREFIX_CST = "P";
+	/**
+	 * 前缀:供应商S
+	 */
+	static final public String PREFIX_SUP = "S";
+	/**前缀:
+	 * 产品G
+	 */
+	static final public String PREFIX_GOODS = "G";
+	/**
+	 * 前缀: 询价单E
+	 */
+	static final public String PREFIX_ENQUIRY = "E";
+	/**
+	 * 前缀:报价单Q,
+	 */
+	static final public String PREFIX_QUOTATION = "Q";
+	/**
+	 * 前缀:订单O
+	 */
+	static final public String PREFIX_ORDER = "O";
+	
+	/**
+	 * 前缀:采购单P
+	 */
+	static final public String PREFIX_PURCHASE = "P";
+	
+	/**
+	 * 前缀:付款单B
+	 */
+	static final public String PREFIX_BILL = "B";
+	/**
+	 * 品牌状态正常
+	 */
+	static final public String HBF_STATE_NORMAL = "0";
+	/**
+	 * 品牌状态删除
+	 */
+	static final public String HBF_STATE_DELETE = "1";
+	/**
+	 * 规格状态---正常
+	 * 
+	 */
+	static final public String CST_STATE_NORMAL = "0";
+	/**
+	 * 规格状态---删除
+	 */
+	static final public String CST_STATE_DELETE = "1";
+	
+	/**
+	 * 开票
+	 */
+	static final public String APPLY_INVOICE_APPLACTION = "01";
+	/**
+	 * 客户付款方式 3账期
+	 */
+	static final public String PAY_TYPE_ACCOUNT = "3";
+	/**
+	 * 账期状态0申请中1审批通过2审批拒绝
+	 */
+	static final public String PAY_PERIOD_STT = "0";
+	
+
+	
+	/**
+	 * 客户分配类型 00创建
+	 */
+	static final public String CST_DIST_ADD = "00";
+	/**
+	 * 客户分配类型 01分配
+	 */
+	static final public String CST_DIST_DIS = "01";
+	/**
+	 * 客户分配类型 02回收公海
+	 */
+	static final public String CST_DIST_RECOVERY = "02";
+	/**
+	 * 客户分配类型 02申领
+	 */
+	static final public String CST_DIST_APPLY = "03";
+	/**
+	 * 是否公海客户1 是
+	 */
+	static final public String IS_UNASSIGNED = "1";
+	/**
+	 * 是否已报价 是00
+	 */
+	//static final public String QUOTED = "0";
+	
+	/** 连接 **/
+	public static final String LINK = "-";
+
+	/**
+	 * 渠道:平台M00
+	 */
+	public static final String CHANNEL_ADMIN = "M00";
+	
+	/**
+	 * im_user表身份类型 00:普通用户
+	 */
+	public static final String ADM_USER_TYPE_00 = "00";
+	/**
+	 * im_user表身份类型 01:客户经理
+	 */
+	public static final String ADM_USER_TYPE_01 = "01";
+	/**
+	 * im_user表身份类型 03:物流商
+	 */
+	public static final String ADM_USER_TYPE_02 = "02";
+	
+	/**
+	 * 授信申请审批人类型 00:风控
+	 */
+	public static final String APPROVER_TYPE_00 = "00";
+	/**
+	 * 授信申请审批人类型 01:部门经理
+	 */
+	public static final String APPROVER_TYPE_01 = "01";
+	/**
+	 * 授信申请审批人类型 02:部门总监
+	 */
+	public static final String APPROVER_TYPE_02 = "02";
+	
+	/**
+	 * 授信申请状态 00:已申请
+	 */
+	public static final String APPROVER_STT_00 = "00";
+	/**
+	 * 授信申请状态 01:已提交
+	 */
+	public static final String APPROVER_STT_01 = "01";
+	/**
+	 * 授信申请状态 02:审批中
+	 */
+	public static final String APPROVER_STT_02 = "02";
+	/**
+	 * 授信申请状态 03:审批通过(完全通过)
+	 */
+	public static final String APPROVER_STT_03 = "03";
+	/**
+	 * 授信申请状态 04:审批拒绝
+	 */
+	public static final String APPROVER_STT_04 = "04";
+	
+	/**
+	 * 审批结果 0:通过
+	 */
+	public static final String APPROVER_RESULT_0 = "0";
+	/**
+	 * 审批结果 1:不通过
+	 */
+	public static final String APPROVER_RESULT_1 = "1";
+	/**
+	 * 信息表名
+	 */
+	public static final String TP_ARTICLE_INF = "TP_ARTICLE_INF";
+	/**
+	 * 03系统消息时,消息归属企业编号
+	 */
+	public static final String ARTICLE_OWNER_MODULE = "03";
+	/**
+	 * 是否显示标图0有1无
+	 */
+	public static final String ARTICLE_IMAGE_NO = "1";
+	/**
+	 * 是否显示标图0有1无
+	 */
+	public static final String ARTICLE_IMAGE_SHOW = "0";
+	/**
+	 * 企业信息变更标题
+	 */
+	public static final String ARTICLE_BUSINESS_TITLE = "企业信息变更";
+	/**
+	 * 客户经理菜单
+	 */
+	public static final String CUSTOMER_MANAGER_MENU = "313001";
+	/**
+	 * 默认机构号
+	 */
+	public static final String DEFAULT_INSTITUTIONS = "88888888";
+	/**
+	 * 用户类型
+	 */
+	public static final String USER_TYPE_0 = "0";
+	/**
+	 * 默认修改密码
+	 */
+	public static final String DEFAULT_PASSWORD_STATUE = "0";
+	/*
+	货道状态
+	 */
+	public static final String PROEQUREL_STT_00 = "00";
+	public static final String PROEQUREL_STT_01 = "01";
+	public static final String PROEQUREL_STT_02 = "02";
+	public static final String EQUIPMENT_STT_03= "03";
+}
+
+
+
+
+
+
+

+ 17 - 0
src/main/java/com/minpay/db/table/own/mapper/CategoryManageMapper.java

@@ -0,0 +1,17 @@
+package com.minpay.db.table.own.mapper;
+
+import com.startup.minpay.frame.jdbc.IMINMybatisEntityMapper;
+import com.startup.minpay.frame.jdbc.MINRowBounds;
+
+import java.util.List;
+import java.util.Map;
+
+
+public interface CategoryManageMapper extends IMINMybatisEntityMapper {
+	
+	/**查询类目列表*/
+	List<Map<String, Object>> queryCategoryList(Map<String, String> map, MINRowBounds rows);
+
+	/**查询分类--添加/修改商品选择时用*/
+	List<Map<String, String>> queryCategoryForProduct(Map<String, String> map, MINRowBounds rows);
+}

+ 27 - 0
src/main/java/com/minpay/db/table/own/mapper/ProductManageMapper.java

@@ -0,0 +1,27 @@
+package com.minpay.db.table.own.mapper;
+
+import com.startup.minpay.frame.jdbc.IMINMybatisEntityMapper;
+import com.startup.minpay.frame.jdbc.MINRowBounds;
+
+import java.util.List;
+import java.util.Map;
+
+public interface ProductManageMapper extends IMINMybatisEntityMapper {
+	
+	/**查看商品信息*/
+	List<Map<String, String>> queryProductInf(Map<String, String> map, MINRowBounds row);
+	
+	/**查看商品规格详情(依据商品主键)*/
+	List<Map<String,String>> querySpecByProid(Map<String, String> map);
+	
+	/** 查询正常状态下的商品,用于开启或修改团购*/
+	List<Map<String, String>> queryProductForGroup(Map<String, String> map, MINRowBounds row);
+	
+	/** 查看团购商品子信息*/
+	List<Map<String, String>> queryProductSku(Map<String, String> map);
+	
+	/** 查看团购商品详细规格参数*/
+	List<Map<String, String>> queryProduct(Map<String, String> map);
+	/**查看正常状态商品信息*/
+	List<Map<String, String>> queryProductz(Map<String, String> map, MINRowBounds rows);
+}

+ 366 - 0
src/main/java/com/minpay/shouhuo/productaction/CategoryManageAction.java

@@ -0,0 +1,366 @@
+package com.minpay.shouhuo.productaction;
+
+import com.min.util.CommonUtil;
+import com.min.util.DateUtil;
+import com.minpay.common.bean.TreeDto;
+import com.minpay.common.bean.User;
+import com.minpay.common.constant.Constant;
+import com.minpay.common.exception.BusinessCodeException;
+import com.minpay.common.format.IFormatService;
+import com.minpay.common.service.ILogService;
+import com.minpay.common.service.IPublicService;
+import com.minpay.db.table.mapper.VmCategoryInfMapper;
+import com.minpay.db.table.model.VmCategoryInf;
+import com.minpay.db.table.model.VmCategoryInfExample;
+import com.minpay.db.table.own.mapper.CategoryManageMapper;
+import com.startup.minpay.frame.business.IMINAction;
+import com.startup.minpay.frame.business.res.MINActionResult;
+import com.startup.minpay.frame.constant.IMINBusinessConstant;
+import com.startup.minpay.frame.data.format.MINCopyFormat;
+import com.startup.minpay.frame.exception.MINBusinessException;
+import com.startup.minpay.frame.jdbc.MINRowBounds;
+import com.startup.minpay.frame.service.base.IMINDataBaseService;
+import com.startup.minpay.frame.service.base.Service;
+import com.startup.minpay.frame.session.MINSession;
+import com.startup.minpay.frame.target.MINAction;
+import com.startup.minpay.frame.target.MINComponent;
+import com.startup.minpay.frame.target.MINParam;
+import net.sf.json.JSONArray;
+import org.apache.commons.lang.StringUtils;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 类目管理
+ * @author PJL
+ *
+ */
+
+@MINComponent
+public class CategoryManageAction implements IMINAction {
+	
+	/** 查询类目列表 */
+	public final static String	QUERY_CATEGORY_LIST	= 	"queryCategoryList";
+	
+	/** 新增类目 */
+	public final static String  ADD_CATEGORY	=	"addCategory";
+	
+	/** 修改类目 */
+	public final static String  MODIFY_CATEGORY	=	"modifyCategory";
+
+	/** 查询类目树  */
+	public final static String	SELECT_CATEGORY_TREE	=	"selectCategoryTree";
+	
+	/**查询分类--添加/修改商品选择时用**/
+	public final static String QUERY_CATEGORY_FOR_PRODUCT = "queryCategoryForProduct";
+
+	/**删除分类**/
+	public final static String DELETE_CATEGORY_ID 		= "deleteCategoryId";
+	/**
+	 * 查询列表
+	 * @param level			类目级别
+	 * @param parentCode	父级类目
+	 * @param categoryName	类目名称
+	 * @return
+	 * @throws MINBusinessException
+	 */
+	@MINAction(value = QUERY_CATEGORY_LIST )
+	public MINActionResult queryCategoryList(
+			@MINParam(key = "level")String level,
+			@MINParam(key = "dates")String dates,
+			@MINParam(key = "state")String state,
+			@MINParam(key = "createUser")String createUser,
+			@MINParam(key = "categoryName")String categoryName,
+			@MINParam(key = "parentCode") String parentCode,
+			@MINParam(key = "page", defaultValue = "1") int page,
+			@MINParam(key = "limit", defaultValue = "5") int limit,
+			MINSession session) throws MINBusinessException {
+		//创建返回值对象
+		MINActionResult res = new MINActionResult();
+		//获取操作员信息
+		User user = session.getUser();
+		//创建分页对象
+		MINRowBounds rows = new MINRowBounds(page, limit);
+		//初始化查询条件
+		Map<String,String> map = new HashMap<String,String>();
+		map.put("state", state);				//类目状态
+		map.put("dates", dates);				//创建时间
+		map.put("createUser", createUser);		//创建人
+		map.put("categoryName", categoryName);	//类目名称
+		map.put("channel", user.getChannel());	//类目渠道
+		//执行查询
+		List<Map<String, Object>> list = Service.lookup(IMINDataBaseService.class)
+						.getMybatisMapper(CategoryManageMapper.class)
+						.queryCategoryList(map, rows);
+		//格式化时间和状态
+		list = Service.lookup(IFormatService.class).formatDateTime(list, "createTime","modifyTime");
+		list = new MINCopyFormat("{state:'stateDesc'}").format(list);
+			list = Service.lookup(IFormatService.class).formatEnum(list,"{stateDesc:'CATEGORY_STATE'}");
+		//返回数据
+		res.set(IMINBusinessConstant.F_PAGING_LAY, list);
+		res.set(IMINBusinessConstant.F_PAGING_COUNT, rows.getCount());
+		return res;
+	}
+	
+	/**
+	 * 新增类目
+	 * @param sort			类目排序
+	 * @param categoryName	类目名称
+	 * @param remarks		备注
+	 * @return
+	 * @throws MINBusinessException
+	 */
+	@MINAction(value = ADD_CATEGORY )
+	public MINActionResult addCategory(
+			@MINParam(key = "sort")String sort,
+			@MINParam(key = "categoryName")String categoryName,
+			@MINParam(key = "remarks")String remarks,
+			MINSession session) throws MINBusinessException {
+		//创建返回值对象
+		MINActionResult res = new MINActionResult();
+		//获取操作员信息
+		User user = session.getUser();
+		//获取当前时间
+		String dateTime = DateUtil.getCurrentDateTimeString();
+//		//判断类目名称是否重复
+//		ZhCategoryInfExample examp = new ZhCategoryInfExample();
+//		examp.createCriteria().andNameEqualTo(categoryName);
+//		List<ZhCategoryInf> list = Service.lookup(IMINDataBaseService.class)
+//											.getMybatisMapper(ZhCategoryInfMapper.class)
+//											.selectByExample(examp);
+//		if(list.size() > 0){
+//			throw new BusinessCodeException("JINM0604");//该分类名称已经存在,请重新输入 
+//		}
+		//获取类目主键
+		String categoryId = Service.lookup(IPublicService.class).getSequence("VM_CATEGORY_ID");
+		VmCategoryInf inf = new VmCategoryInf();
+		inf.setId(categoryId);			//主键
+		inf.setCode(categoryId);		//code与id相同
+		inf.setName(categoryName);		//类目名称
+		//todo 	渠道(V01:自助售货机)
+		inf.setChannel("V01");//类目渠道
+		inf.setState("0");//默认--0正常
+		inf.setRemarks(remarks);		//备注
+		inf.setCreateUser(user.getId());//创建人
+		inf.setCreateTime(dateTime);	//创建时间
+		inf.setModifyUser(user.getId());//修改人
+		inf.setModifyTime(dateTime);	//修改时间
+		//执行添加类目
+		Service.lookup(IMINDataBaseService.class)
+				.getMybatisMapper(VmCategoryInfMapper.class)
+				.insert(inf);
+		//记录日志
+		String logInfo = "操作员:"+user.getName() +"新增类目,名称:"+ categoryName +",编号:"+ categoryId;
+		Service.lookup(ILogService.class).logging(session, logInfo);
+		return res;
+	}
+	
+	/**
+	 * 修改类目
+	 * @param categoryId	类目编号
+	 * @param sort			类目排序
+	 * @param categoryName	类目名称
+	 * @param alias			类目别名
+	 * @param initial		类目英文首字母
+	 * @param categoryState	类目状态
+	 * @param categoryImg	类目图片
+	 * @param remarks		备注
+	 * @return
+	 * @throws MINBusinessException
+	 */
+	@MINAction(value = MODIFY_CATEGORY )
+	public MINActionResult modifyCategory(
+			@MINParam(key = "categoryId")String categoryId,
+			@MINParam(key = "sort")String sort,
+			@MINParam(key = "alias")String alias,
+			@MINParam(key = "initial")String initial,
+			@MINParam(key = "categoryImg")String categoryImg,
+			@MINParam(key = "categoryName")String categoryName,
+			@MINParam(key = "categoryState")String categoryState,
+			@MINParam(key = "remarks")String remarks,
+			MINSession session) throws MINBusinessException {
+		
+		MINActionResult res = new MINActionResult();
+		//获取操作员信息
+		User user = session.getUser();
+		//获取当前时间
+		String dateTime = DateUtil.getCurrentDateTimeString();
+//		//判断类目名称是否重复(排除本条数据)
+//		ZhCategoryInfExample examp = new ZhCategoryInfExample();
+//		examp.createCriteria().andNameEqualTo(categoryName).andIdNotEqualTo(categoryId);
+//		List<ZhCategoryInf> list = Service.lookup(IMINDataBaseService.class)
+//										.getMybatisMapper(ZhCategoryInfMapper.class)
+//										.selectByExample(examp);
+//		if(list.size() > 0){
+//			throw new BusinessCodeException("JINM0604");//该分类名称已经存在,请重新输入 
+//		}
+		VmCategoryInf inf = Service.lookup(IMINDataBaseService.class)
+									.getMybatisMapper(VmCategoryInfMapper.class)
+									.selectByPrimaryKey(categoryId);
+		if(inf == null){
+			throw new BusinessCodeException("JINM0127");//当前类目不存在
+		}		
+		inf.setId(categoryId);
+		if(!CommonUtil.isEmpty(categoryName)){
+			inf.setName(categoryName);		//类目名称
+		}
+		if(!CommonUtil.isEmpty(sort)){
+			inf.setSort(StringUtils.leftPad(String.valueOf(sort), 4 ,"0"));//类目排序
+		}
+		if(!CommonUtil.isEmpty(alias)){
+			inf.setAlias(alias);			//类目别名
+		}
+		if(!CommonUtil.isEmpty(categoryState)){
+			inf.setState(categoryState);	//默认--0正常
+		}
+		if(!CommonUtil.isEmpty(initial)){
+			inf.setInitial(initial);		//类目英文首字母
+		}
+			inf.setCategoryImg(categoryImg);//类目图片
+		if(!CommonUtil.isEmpty(remarks)){
+			inf.setRemarks(remarks);		//备注
+		}
+		inf.setModifyUser(user.getId());//修改人
+		inf.setModifyTime(dateTime);	//修改时间
+		//执行修改
+		Service.lookup(IMINDataBaseService.class)
+				.getMybatisMapper(VmCategoryInfMapper.class)
+				.updateByPrimaryKeySelective(inf);
+		//记录日志信息
+		String logInfo = "操作员:"+user.getName() +"修改类目,名称:"+ categoryName +",编号: "+ categoryId;
+		Service.lookup(ILogService.class).logging(session, logInfo);
+		return res;
+	}
+
+	/**
+	 * 类目管理-查询类目树
+	 * @param parentCode  	父级类目编号
+	 * @param level 		最底层树类目级别 
+	 * @return
+	 * @throws MINBusinessException
+	 */
+	@MINAction(value = SELECT_CATEGORY_TREE )
+	public MINActionResult selectCategoryTree(
+			@MINParam(key = "parentCode")String parentCode,
+			@MINParam(key = "level")String level,
+			MINSession session) throws MINBusinessException {
+		MINActionResult res = new MINActionResult();
+		//获取操作员信息
+		User user = session.getUser();
+		//默认查询一级类目
+		if(CommonUtil.isEmpty(parentCode)){
+			parentCode = "000";
+		}
+		if(CommonUtil.isEmpty(level)){
+			level = "3";
+		}
+		VmCategoryInfExample examp = new VmCategoryInfExample();
+		examp.createCriteria().andChannelEqualTo(user.getChannel()).andStateEqualTo("0").andLevelLessThanOrEqualTo(level);
+		examp.setOrderByClause("VCI_PARENT_CODE, VCI_LEVEL,VCI_SORT");
+		List<VmCategoryInf> list = Service.lookup(IMINDataBaseService.class).selectByExample(VmCategoryInfMapper.class, examp);
+		//list转为JSON
+		JSONArray json = JSONArray.fromObject(getNextTree(list, parentCode));
+		// 需要先放入缓存服务器,如果缓存服务器有,从缓存获取
+		res.set("categoryList", json);
+		return res;
+	}
+	
+	/**
+	 * 查询分类--添加/修改商品选择时用
+	 * @param level			分类级别
+	 * @param categoryName	分类名称
+	 * @param page
+	 * @param limit
+	 * @param session
+	 * @return
+	 * @throws MINBusinessException
+	 */
+	@MINAction(value = QUERY_CATEGORY_FOR_PRODUCT)
+	public MINActionResult queryCategoryForProduct(
+			@MINParam(key = "level")String level,
+			@MINParam(key = "keyword")String keyword,
+			@MINParam(key = "categoryName")String categoryName,
+			@MINParam(key = "page", defaultValue = "1") int page,
+			@MINParam(key = "limit", defaultValue = "10") int limit,
+			MINSession session) throws MINBusinessException {
+			
+		MINActionResult res = new MINActionResult();
+		//获取用户信息
+		User user  = session.getUser();
+		//创建分页对象
+		MINRowBounds rows = new MINRowBounds(page, limit);
+		//初始化查询条件
+		Map<String, String> map = new HashMap<String, String>();
+		map.put("state","0");
+		map.put("channel", user.getChannel());
+		//默认查询3级类目
+//		if(CommonUtil.isEmpty(level)){
+//			level = "1";
+//		}
+//		map.put("level", level);
+		map.put("categoryName", keyword);
+		// map.put("categoryName", categoryName);
+		//执行查询
+		List<Map<String, String>> list = Service.lookup(IMINDataBaseService.class)
+												.getMybatisMapper(CategoryManageMapper.class)
+												.queryCategoryForProduct(map,rows);
+		// 设置返回值
+		res.set(IMINBusinessConstant.F_PAGING_LAY, list);
+		res.set(IMINBusinessConstant.F_PAGING_COUNT, rows.getCount());
+		return res;	
+	}
+	
+	private List<TreeDto> getNextTree(List<VmCategoryInf> plist, String partId) {
+		
+		List<TreeDto> rlist = new ArrayList<TreeDto>();
+		for(VmCategoryInf inf : plist) {
+			String nowPartId = inf.getParentCode();
+			
+			if(partId.equals(nowPartId)) {
+				TreeDto nowTree = new TreeDto();
+				if(!CommonUtil.isEmpty(inf.getAlias())){
+					nowTree.setAlias(inf.getAlias());
+				}else{
+					nowTree.setAlias(inf.getName());
+				}
+				nowTree.setLevel(inf.getLevel());
+				nowTree.setId(inf.getCode());
+				nowTree.setName(inf.getName());
+				nowTree.setSpread("true");//展开
+				nowTree.setChildren(getNextTree(plist, inf.getCode()));
+				rlist.add(nowTree);
+			}
+			else if(rlist.size() > 0) {
+				break;
+			}
+		}
+		return rlist;
+	}
+
+	/**
+	 * 分类删除
+	 * @param id
+	 * @param session
+	 * @return
+	 * @throws MINBusinessException
+	 */
+	@MINAction(value = DELETE_CATEGORY_ID, session = true)
+	public MINActionResult deleteCategoryId(
+			@MINParam(key = "id") String id,
+			MINSession session
+	) throws MINBusinessException {
+		MINActionResult res = new MINActionResult();
+		//状态置为停用
+		String state = Constant.NEWS_STATUS_STOP;
+		VmCategoryInf ta = new VmCategoryInf();
+		ta.setState(state);
+		ta.setId(id);
+		//更新数据
+		Service.lookup(IMINDataBaseService.class).updateByPrimaryKeySelective(VmCategoryInfMapper.class, ta);
+		Service.lookup(ILogService.class).logging(session, "删除信息id:" + id);
+		return res;
+	}
+}

+ 385 - 0
src/main/java/com/minpay/shouhuo/productaction/ProductManageAction.java

@@ -0,0 +1,385 @@
+package com.minpay.shouhuo.productaction;
+
+import com.min.util.CommonUtil;
+import com.minpay.common.bean.User;
+import com.minpay.common.exception.BusinessCodeException;
+import com.minpay.common.format.IFormatService;
+import com.minpay.common.service.ILogService;
+import com.minpay.common.service.IPublicService;
+import com.minpay.common.util.DateUtil;
+import com.minpay.db.table.mapper.VmProductInfMapper;
+import com.minpay.db.table.model.VmProductInf;
+import com.minpay.db.table.own.mapper.ProductManageMapper;
+import com.startup.minpay.frame.business.IMINAction;
+import com.startup.minpay.frame.business.res.MINActionResult;
+import com.startup.minpay.frame.constant.IMINBusinessConstant;
+import com.startup.minpay.frame.constant.IMINTransactionEnum;
+import com.startup.minpay.frame.data.format.MINCopyFormat;
+import com.startup.minpay.frame.exception.MINBusinessException;
+import com.startup.minpay.frame.jdbc.MINRowBounds;
+import com.startup.minpay.frame.service.base.IMINDataBaseService;
+import com.startup.minpay.frame.service.base.Service;
+import com.startup.minpay.frame.session.MINSession;
+import com.startup.minpay.frame.target.MINAction;
+import com.startup.minpay.frame.target.MINComponent;
+import com.startup.minpay.frame.target.MINParam;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 商品管理
+ * @author pangjl
+ *  20190325
+ */
+@MINComponent
+public class ProductManageAction implements IMINAction {
+	
+	/**查看商品*/
+	public final static String QUERY_PRODUCT_INF = "queryProductInf";
+	/**查看正常状态商品*/
+	public final static String QUERY_PRODUCTZ = "queryProductz";
+	/**查看商品规格详情(依据商品主键)*/
+	public final static String QUERY_SPEC_BY_PROID = "querySpecByProid";
+	/** 添加商品*/
+	public final static String ADD_PRODUCT_INF = "addProductInf";
+	/** 修改商品*/
+	public final static String MODIFY_PRODUCT_INF = "modifyProductInf";
+	/** 更改商品状态*/
+	public final static String MODIFY_PRODUCT_STATE = "modifyProductState";
+	private boolean contains;
+	
+	
+	/**
+	 * 查看商品
+	 * @param name            	商品名称
+	 * @param brandName		  	品牌名称
+	 * @param model				商品型号
+	 * @param createUser		添加人
+	 * @param dates				添加时间
+	 * @param page
+	 * @param limit
+	 * @return
+	 * @throws MINBusinessException
+	 */
+	@MINAction(value = QUERY_PRODUCT_INF)
+	public MINActionResult queryProductInf(
+			@MINParam(key = "name") String name,
+			@MINParam(key = "model") String model,
+			@MINParam(key = "dates")String dates,
+			@MINParam(key = "state") String state,
+			@MINParam(key = "brandName") String brandName,
+			@MINParam(key = "categoryId") String categoryId,
+			@MINParam(key = "categoryName") String categoryName,
+			@MINParam(key = "createUser") String createUser,
+			@MINParam(key = "page", defaultValue = "1") int page,
+			@MINParam(key = "limit", defaultValue = "3") int limit,
+			MINSession session) throws MINBusinessException {
+		
+		MINActionResult res = new MINActionResult();
+		User user = session.getUser();
+		Map<String, String> map = new HashMap<String, String>();
+		//按商品名称,商品品牌进行模糊查询
+		map.put("name", name);	//商品名称
+		map.put("state", state);//状态
+		map.put("model",model);
+		map.put("dates",dates);
+		map.put("brandName",brandName);
+		map.put("createUser",createUser);
+		map.put("channel", user.getChannel());//渠道号
+		map.put("category", categoryId);//分类
+		//验证操作员权限
+//		if("00".equals(user.getIdentity())){
+			map.put("userId",user.getId());
+//			map.put("roId","10000001");
+//		}
+/*		if("10000002".equals(user.getRoleId())){
+			map.put("userId",user.getId());
+		}*/
+		//分页
+		MINRowBounds rows = new MINRowBounds(page, limit);
+		//执行查询
+		List<Map<String, String>> list = Service.lookup(IMINDataBaseService.class)
+												.getMybatisMapper(ProductManageMapper.class)
+												.queryProductInf(map, rows);
+		//格式化时间和状态
+		list = Service.lookup(IFormatService.class).formatDateTime(list, "createTime","modifyTime");
+		list = new MINCopyFormat("{history:'historyDesc',state:'stateDesc',source:'sourceDesc'}").format(list);
+		list = Service.lookup(IFormatService.class).formatEnum(list,"{historyDesc:'PRODUCT_HISTORY',stateDesc:'PRODUCT_STATE',sourceDesc:'PRODUCT_SOURCE'}");
+		//返回数据
+		res.set(IMINBusinessConstant.F_PAGING_LAY, list);
+		res.set(IMINBusinessConstant.F_PAGING_COUNT,rows.getMaxRows());
+		return res;
+	}
+	
+	/**
+	 * 添加商品
+	 * @param name			商品名称
+	 * @param categoryId	分类id
+	 * @param brandId		品牌id
+	 * @param number		商品数量
+	 * @param describe		商品描述
+	 * @param piclist		多图片
+	 * @param sort			排序
+	 * @param fmpic			封面图片    
+	 * @param unit			商品单位             
+	 * @param masterMap		商品主图         
+	 * @param session
+	 * @return
+	 * @throws MINBusinessException
+	 */
+	@MINAction(value = ADD_PRODUCT_INF,transaction = IMINTransactionEnum.CMT)
+	public MINActionResult addProductInf(
+			@MINParam(key = "name") String name,
+			@MINParam(key = "categoryId") String categoryId,
+			@MINParam(key = "brandId") String brandId,
+			@MINParam(key = "number") String number,
+			@MINParam(key = "describe") String describe,
+			@MINParam(key = "piclist") String piclist,
+			@MINParam(key = "sort") String sort,
+			@MINParam(key = "address") String address,
+			@MINParam(key = "fmpic") String fmpic,
+			@MINParam(key = "unit") String unit,
+			@MINParam(key = "masterMap") String masterMap,
+			@MINParam(key = "specIds") String specIds,
+			MINSession session) throws MINBusinessException {
+		
+		MINActionResult res = new MINActionResult();
+		//获取当前时间
+		String nowTime = DateUtil.getCurrentDateTimeString();
+		// 获取操作员信息
+		User user = session.getUser();
+		// 获取商品主键
+		String id = Service.lookup(IPublicService.class).getSequence("VM_PRODUCT_ID");
+		VmProductInf pro = new VmProductInf();
+		pro.setId(id); 							// 商品id
+		pro.setName(name); 						// 商品名称
+		pro.setDescribe(describe); 				// 商品描述
+		pro.setCategoryId(categoryId); 			// 分类id
+		pro.setFmpic(fmpic); 						// 封面图片
+		pro.setState("0"); 	// 默认状态正常
+		pro.setChannel(user.getChannel()); 		// 渠道号
+		pro.setMasterMap(masterMap);              	//商品主图
+		/*String piclist2 = piclist.substring(0, piclist.length() - 1);
+		String imgss[] = piclist2.split(",");*/
+/*		// 至少上传2张图片
+		if (imgss.length < 2) {
+			throw new MINBusinessException("至少上传2张图片");
+		}
+		// 最多上传3张图片
+		else if (imgss.length > 3) {
+			throw new MINBusinessException("至多上传3张图片");
+		}*/
+		pro.setPiclist(piclist); 					// 多图片
+		pro.setCreateUser(user.getId()); 			// 创建人
+		pro.setCreateTime(nowTime); 				// 创建时间
+		pro.setModifyUser(user.getId());			//修改人
+		pro.setModifyTime(nowTime);					//修改时间
+		// 新增商品信息,执行插入数据x
+		Service.lookup(IMINDataBaseService.class)
+				.getMybatisMapper(VmProductInfMapper.class)
+				.insertSelective(pro);
+		// 记录操作日志
+		String logInfo = "操作员:" + user.getName() + "添加商品,商品编号:" + id;
+		Service.lookup(ILogService.class).logging(session, logInfo);
+		return res;
+	}
+	
+	/**
+	 * 修改商品
+	 * @param id			商品编号
+	 * @param name			商品名称
+	 * @param categoryId	分类id
+	 * @param brandId		品牌id
+	 * @param number		商品数量
+	 * @param describe		商品描述
+	 * @param piclist		多图片
+	 * @param sort			排序
+	 * @param fmpic			封面图片    
+	 * @param masterMap		商品主图
+	 * @param session
+	 * @return
+	 * @throws MINBusinessException
+	 */
+	@MINAction(value = MODIFY_PRODUCT_INF,transaction = IMINTransactionEnum.CMT)
+	public MINActionResult modifyProductInf(
+			@MINParam(key = "id") String id,
+			@MINParam(key = "name") String name,
+			@MINParam(key = "categoryId") String categoryId,
+			@MINParam(key = "brandId") String brandId,
+			@MINParam(key = "number") String number,
+			@MINParam(key = "describe") String describe,
+			@MINParam(key = "piclist") String piclist,
+			@MINParam(key = "sort") String sort,
+			@MINParam(key = "fmpic") String fmpic,
+			@MINParam(key = "masterMap") String masterMap,
+			@MINParam(key = "specIds") String specIds,
+			MINSession session) throws MINBusinessException {
+		
+		MINActionResult res = new MINActionResult();
+		//获取当前时间
+		String nowTime = DateUtil.getCurrentDateTimeString();
+		// 获取操作员信息
+		User user = session.getUser();
+		// 获取要修改的商品信息
+		VmProductInf pro = Service.lookup(IMINDataBaseService.class)
+								.getMybatisMapper(VmProductInfMapper.class)
+								.selectByPrimaryKey(id);
+		if(pro == null) {
+			throw new BusinessCodeException("JINM0121");//商品信息异常
+		}
+		pro.setId(id); 							// 商品id
+		if(!CommonUtil.isEmpty(name)){
+			pro.setName(name); 					// 商品名称
+		}
+		if(!CommonUtil.isEmpty(describe)){
+			pro.setDescribe(describe); 			// 商品描述
+		}
+		if(!CommonUtil.isEmpty(categoryId)){
+			pro.setCategoryId(categoryId); 		// 分类id
+		}
+		if(!CommonUtil.isEmpty(fmpic)){
+			pro.setFmpic(fmpic); 				// 封面图片
+		}
+		if(!CommonUtil.isEmpty(masterMap)){
+			pro.setMasterMap(masterMap);        //商品主图
+		}
+		/*String piclist2 = piclist.substring(0, piclist.length() - 1);
+		String imgss[] = piclist2.split(",");*/
+		/*// 至少上传2张图片
+		if (imgss.length < 2) {
+			throw new MINBusinessException("至少上传2张图片");
+		}
+		// 最多上传3张图片
+		else if (imgss.length > 3) {
+			throw new MINBusinessException("至多上传3张图片");
+		}
+		if(!CommonUtil.isEmpty(piclist)){
+			pro.setPiclist(piclist); 				// 多图片
+		}*/
+		pro.setModifyUser(user.getId());			//修改人
+		pro.setModifyTime(nowTime);					//修改时间
+		// 修改商品信息,执行修改
+		Service.lookup(IMINDataBaseService.class)
+				.getMybatisMapper(VmProductInfMapper.class)
+				.updateByPrimaryKeySelective(pro);
+		// 记录操作日志
+		String logInfo = "操作员:" + user.getName() + "修改商品,商品编号:" + id;
+		Service.lookup(ILogService.class).logging(session, logInfo);
+		return res;
+	}
+	
+	
+	
+	/**
+	 * 更改商品状态
+	 * @param proId		商品Id
+	 * @param proState	商品状态
+	 * @param xiaoliang	商品销量
+	 * @param session
+	 * @return
+	 * @throws MINBusinessException
+	 */
+	@MINAction(value = MODIFY_PRODUCT_STATE,transaction = IMINTransactionEnum.CMT)
+	public MINActionResult modifyProductState(
+			@MINParam(key = "proId") String proId,
+			@MINParam(key = "proState") String proState,
+			@MINParam(key = "xiaoliang") String xiaoliang,
+			MINSession session) throws MINBusinessException {
+		MINActionResult res = new MINActionResult();
+		String nowTime = DateUtil.getCurrentDateTimeString();
+		// 获取操作员信息
+		User user = session.getUser();
+		// 获取渠道
+	    String channel = user.getChannel();
+	    VmProductInf proInf = Service.lookup(IMINDataBaseService.class)
+				.getMybatisMapper(VmProductInfMapper.class).selectByPrimaryKey(proId);
+		if(proInf == null ){
+			throw new BusinessCodeException("JINM0123");//商品信息异常
+		}
+		proInf.setId(proId); 							// 商品id
+		//000-恢复,111-停售
+		if("000".equals(proState)){
+			proInf.setState("0"); 	// 商品状态:正常
+			proState = "0";
+		}else if("111".equals(proState)){
+			proInf.setState("1");//商品状态:停售
+			proState = "1";
+		}else if("222".equals(proState)){
+			proInf.setState("2");		//商品状态:删除
+			proState = "2";
+		}
+
+		proInf.setModifyUser(user.getId()); 			// 修改人
+		proInf.setModifyTime(nowTime); 					// 修改时间
+		// 执行修改
+		Service.lookup(IMINDataBaseService.class)
+				.getMybatisMapper(VmProductInfMapper.class)
+				.updateByPrimaryKeySelective(proInf);
+		// 记录操作日志
+		String logInfo = "操作员:" + user.getName() + "更改商品状态,商品编号:" + proId+",商品状态:"+proState;
+		Service.lookup(ILogService.class).logging(session, logInfo);
+		return res;
+	}
+	/**
+	 * 查看商品
+	 * @param name            	商品名称
+	 * @param brandName		  	品牌名称
+	 * @param model				商品型号
+	 * @param createUser		添加人
+	 * @param dates				添加时间
+	 * @param page
+	 * @param limit
+	 * @return
+	 * @throws MINBusinessException
+	 */
+	@MINAction(value = QUERY_PRODUCTZ)
+	public MINActionResult queryProductz(
+			@MINParam(key = "name") String name,
+			@MINParam(key = "model") String model,
+			@MINParam(key = "dates")String dates,
+			@MINParam(key = "state") String state,
+			@MINParam(key = "brandName") String brandName,
+			@MINParam(key = "categoryId") String categoryId,
+			@MINParam(key = "createUser") String createUser,
+			@MINParam(key = "page", defaultValue = "1") int page,
+			@MINParam(key = "limit", defaultValue = "3") int limit,
+			MINSession session) throws MINBusinessException {
+		
+		MINActionResult res = new MINActionResult();
+		User user = session.getUser();
+		Map<String, String> map = new HashMap<String, String>();
+		//按商品名称,商品品牌进行模糊查询
+		map.put("name", name);	//商品名称
+		map.put("state", state);//状态
+		map.put("model",model);
+		map.put("dates",dates);
+		map.put("brandName",brandName);
+		map.put("createUser",createUser);
+		map.put("channel", user.getChannel());//渠道号
+		map.put("category", categoryId);//分类
+		//验证操作员权限
+//		if("00".equals(user.getIdentity())){
+//			map.put("userId",user.getId());
+//		}
+/*		if("10000002".equals(user.getRoleId())){
+			map.put("userId",user.getId());
+		}*/
+		//分页
+		MINRowBounds rows = new MINRowBounds(page, limit);
+		//执行查询
+		List<Map<String, String>> list = Service.lookup(IMINDataBaseService.class)
+												.getMybatisMapper(ProductManageMapper.class)
+												.queryProductz(map, rows);
+		//格式化时间和状态
+		list = Service.lookup(IFormatService.class).formatDateTime(list, "createTime","modifyTime");
+		list = new MINCopyFormat("{history:'historyDesc',state:'stateDesc',source:'sourceDesc'}").format(list);
+		list = Service.lookup(IFormatService.class).formatEnum(list,"{historyDesc:'PRODUCT_HISTORY',stateDesc:'PRODUCT_STATE',sourceDesc:'PRODUCT_SOURCE'}");
+		//返回数据
+		res.set(IMINBusinessConstant.F_PAGING_LAY, list);
+		res.set(IMINBusinessConstant.F_PAGING_COUNT,rows.getMaxRows());
+		return res;
+	}
+	
+}

+ 73 - 0
src/main/resources/com/minpay/db/table/own/mapper/CategoryManageMapper.xml

@@ -0,0 +1,73 @@
+<?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.minpay.db.table.own.mapper.CategoryManageMapper">
+	<!-- 添加商品查询分类专用 -->
+	<select id="queryCategoryForProduct" resultType="hashmap" parameterType="java.util.Map">
+    	SELECT
+			z.VCI_ID        		'categoryId',
+			z.VCI_NAME    		  	'categoryName'
+     	FROM vm_category_inf  z
+     	WHERE 1 = 1
+			<if test=" level != null and level != ''"> 
+			    and z.VCI_LEVEL = #{level,jdbcType=VARCHAR}
+			</if>
+			<if test=" state != null and state != ''"> 
+			    and z.VCI_STATE = #{state,jdbcType=VARCHAR}
+			</if>
+			<if test=" channel != null and channel != ''"> 
+			    and z.VCI_CHANNEL = #{channel,jdbcType=VARCHAR}
+			</if>
+			<if test=" categoryName != null and categoryName != ''"> 
+			    and z.VCI_NAME like CONCAT('%', #{categoryName,jdbcType=VARCHAR}, '%')
+			</if>
+     	ORDER BY  z.VCI_CREATE_TIME  DESC
+	</select>
+	<!-- 查询类目列表 -->
+	<select id="queryCategoryList" resultType="hashmap" parameterType="java.util.Map">
+	    SELECT
+	    	z.VCI_ID        		'categoryId',
+			z.VCI_NAME    		  	'categoryName',
+			z.VCI_STATE   			'state',
+			z.VCI_SORT              'sort',
+			z.VCI_ALIAS				'alias',
+			z.VCI_INITIAL			'initial',
+			z.VCI_CODE				'code',
+			z.VCI_PARENT_CODE		'parentCode',
+			z.VCI_LEVEL				'level',
+			z.VCI_CATEGORY_IMG		'categoryImg',
+			z.VCI_REMARKS			'remarks',
+			IFNULL(c.VCI_NAME,'无')	'parentName',
+			u.USR_NAME     			'createUser',
+			z.VCI_CREATE_TIME     	'createTime',
+			i.USR_NAME     			'modifyUser',
+			z.VCI_MODIFY_TIME     	'modifyTime'
+	    FROM vm_category_inf  z
+     		LEFT JOIN vm_category_inf 	c on z.VCI_PARENT_CODE = c.VCI_ID 
+     			AND c.VCI_CHANNEL = z.VCI_CHANNEL
+     		LEFT JOIN im_user 	u on u.USR_ID = z.VCI_CREATE_USER
+     			AND u.USR_CHANNEL = z.VCI_CHANNEL
+     		LEFT JOIN  im_user i on i.USR_ID = z.VCI_MODIFY_USER
+     			AND I.USR_CHANNEL = z.VCI_CHANNEL
+	    WHERE 1=1
+			<if test="parentCode != null and parentCode != ''"> 
+			    AND z.VCI_PARENT_CODE = #{parentCode,jdbcType = VARCHAR}
+			</if>
+			<if test="categoryName != null and categoryName != ''">
+				AND z.VCI_NAME like CONCAT('%', #{categoryName,jdbcType = VARCHAR}, '%')
+			</if>
+			<if test="level != null and level != ''"> 
+			    AND z.VCI_LEVEL = #{level,jdbcType = VARCHAR}
+			</if>
+			<if test="state!= null and state!= ''"> 
+		   	 	AND z.VCI_STATE = #{state,jdbcType=VARCHAR}
+			</if>
+			<if test="createUser != null and createUser != ''"> 
+		    	AND u.USR_NAME like CONCAT('%', #{createUser,jdbcType=VARCHAR}, '%')
+			</if>
+			<if test="dates!=null and dates!= ''">
+		    	AND SUBSTR(z.VCI_CREATE_TIME,1,8) BETWEEN SUBSTR((#{dates, jdbcType=VARCHAR}),1,8)
+		       			AND substr((#{dates, jdbcType=VARCHAR}),12,19)
+		    </if>
+	 	ORDER BY z.VCI_SORT ASC ,z.VCI_CREATE_TIME ,z.VCI_STATE ="0" DESC
+	</select>
+</mapper>

+ 155 - 0
src/main/resources/com/minpay/db/table/own/mapper/ProductManageMapper.xml

@@ -0,0 +1,155 @@
+<?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.minpay.db.table.own.mapper.ProductManageMapper">
+	<!-- 查询商品信息 -->
+	<select id="queryProductInf" resultType="hashmap" parameterType="java.util.Map">
+    	SELECT
+			p.PRT_ID        	'id',
+			p.PRT_NAME      	'name',
+			p.PRT_DESCRIBE      'discribe',
+			p.PRT_STATE         'state',
+			p.PRT_SORT          'sort',
+			p.PRT_PICLIST       'picList',
+			p.PRT_FMPIC          'fmPic',
+			p.PRT_MASTER_MAP    'masterMap',
+			p.PRT_CATEGORY_ID   'categoryId',
+			c.VCI_NAME          'categoryName',
+			p.PRT_CREATE_USER	'userId',
+			u.USR_NAME          'createUser',
+			p.PRT_CREATE_TIME   'createTime',
+			e.USR_NAME          'modifyUser',
+			p.PRT_MODIFY_TIME   'modifyTime'
+     	FROM vm_product_inf  p
+     		LEFT JOIN 	im_user u ON u.USR_ID = p.PRT_CREATE_USER
+     			AND u.USR_CHANNEL = p.PRT_CHANNEL
+     		LEFT JOIN im_user e on e.USR_ID = p.PRT_MODIFY_USER
+     			AND e.USR_CHANNEL = p.PRT_CHANNEL
+     		LEFT JOIN im_user_role_rel rel on rel.URR_USERID = u.USR_ID
+     		LEFT JOIN vm_category_inf c ON c.VCI_ID = p.PRT_CATEGORY_ID
+     			AND c.VCI_CHANNEL = p.PRT_CHANNEL
+     	WHERE p.PRT_CHANNEL =  #{channel,jdbcType=VARCHAR}
+     	AND p.PRT_STATE != '2'
+		<if test="category != null and category != ''">
+			AND c.VCI_ID = #{category,jdbcType=VARCHAR}
+		</if>
+		<if test="name != null and name != ''">
+			AND p.PRT_NAME like CONCAT('%', #{name,jdbcType=VARCHAR}, '%')
+		</if>
+		<if test="state != null and state != ''"> 
+		 	AND p.PRT_STATE = #{state,jdbcType=VARCHAR}
+		</if>
+		<if test="createUser != null and createUser != ''"> 
+		 	AND u.USR_NAME like CONCAT('%', #{createUser,jdbcType=VARCHAR}, '%')
+		</if>
+		<if test=" userId != null and userId != ''"> 
+		 	AND (p.PRT_CREATE_USER = #{userId,jdbcType=VARCHAR} or rel.URR_ROLEID = #{roId,jdbcType=VARCHAR})
+		</if>
+		<if test=" categoryName != null and categoryName != ''"> 
+			    and c.VCI_NAME like CONCAT('%', #{categoryName,jdbcType=VARCHAR}, '%')
+			</if>
+		<if test="dates!=null and dates!= ''">
+	    	AND SUBSTR(p.PRT_CREATE_TIME,1,8) BETWEEN SUBSTR((#{dates, jdbcType=VARCHAR}),1,8)
+	       		AND SUBSTR((#{dates, jdbcType=VARCHAR}),12,19)
+	    </if>
+      	ORDER BY p.PRT_STATE ASC,p.PRT_CREATE_TIME  DESC
+	</select>
+	<!-- 查询正常状态下的商品 -->
+   	<select id="queryProductz" resultType="hashmap" parameterType="java.util.Map">
+    	SELECT
+			p.PRT_ID        	'id',
+			p.PRT_NAME      	'name',
+			p.PRT_DESCRIBE      'discribe',
+			p.PRT_STATE         'state',
+			p.PRT_SORT          'sort',
+			p.PRT_PICLIST       'picList',
+			p.PRT_FMPIC          'fmPic',
+			p.PRT_MASTER_MAP    'masterMap',
+			p.PRT_CATEGORY_ID   'categoryId',
+			c.VCI_NAME          'categoryName',
+			p.PRT_CREATE_USER	'userId',
+			u.USR_NAME          'createUser',
+			p.PRT_CREATE_TIME   'createTime',
+			e.USR_NAME          'modifyUser',
+			p.PRT_MODIFY_TIME   'modifyTime'
+     	FROM vm_product_inf  p
+     		LEFT JOIN 	im_user u ON u.USR_ID = p.PRT_CREATE_USER
+     			AND u.USR_CHANNEL = p.PRT_CHANNEL
+     		LEFT JOIN im_user e on e.USR_ID = p.PRT_MODIFY_USER
+     			AND e.USR_CHANNEL = p.PRT_CHANNEL
+     		LEFT JOIN vm_category_inf c ON c.VCI_ID = p.PRT_CATEGORY_ID
+     			AND c.VCI_CHANNEL = p.PRT_CHANNEL
+     	WHERE p.PRT_CHANNEL =  #{channel,jdbcType=VARCHAR}
+     	      AND  p.PRT_STATE = "0"
+		<if test="category != null and category != ''">
+			AND c.VCI_ID = #{category,jdbcType=VARCHAR}
+		</if>
+		<if test="name != null and name != ''">
+			AND p.PRT_NAME like CONCAT('%', #{name,jdbcType=VARCHAR}, '%')
+		</if>
+		<if test="state!= null and state!= ''"> 
+		 	AND p.PRT_STATE = #{state,jdbcType=VARCHAR}
+		</if>
+		<if test="createUser != null and createUser != ''"> 
+		 	AND u.USR_NAME like CONCAT('%', #{createUser,jdbcType=VARCHAR}, '%')
+		</if>
+		<if test=" userId != null and userId != ''"> 
+		 	AND p.PRT_CREATE_USER = #{userId,jdbcType=VARCHAR}
+		</if>
+		<if test="dates!=null and dates!= ''">
+	    	AND SUBSTR(p.PRT_CREATE_TIME,1,8) BETWEEN SUBSTR((#{dates, jdbcType=VARCHAR}),1,8)
+	       		AND SUBSTR((#{dates, jdbcType=VARCHAR}),12,19)
+	    </if>
+      	ORDER BY p.PRT_STATE ASC,p.PRT_CREATE_TIME  DESC
+	</select>
+	<!-- 查看团购商品子信息 -->
+	<select id="queryProductSku" resultType="hashmap" parameterType="java.util.Map">
+    	SELECT
+			p.PRT_ID        	'id',
+			p.PRT_NAME      	'name',
+			p.PRT_PRICE      	'price',
+			p.PRT_NUMBER   		'number',
+			b.ZBF_NAME 			'brandName',
+			c.ZCI_NAME          'categoryName'
+     	FROM zh_product  p
+     		LEFT JOIN zh_category_inf c ON c.ZCI_ID = p.PRT_CATEGORY_ID
+     			AND c.ZCI_CHANNEL = p.PRT_CHANNEL
+     		LEFT JOIN zh_brand_inf b ON b.ZBF_ID = p.PRT_RELATED_BRAND
+     			AND b.ZBF_CHANNEL = p.PRT_CHANNEL
+     	WHERE  1=1
+		<if test="proName != null and proName != ''">
+			and p.PRT_NAME like CONCAT('%', #{proName,jdbcType=VARCHAR}, '%')
+		</if>
+		<if test="state!= null and state!= ''"> 
+			and p.PRT_STATE = #{state,jdbcType=VARCHAR}
+		</if>
+		<if test="userId != null and userId != ''"> 
+		 	and p.PRT_CREATE_USER = #{userId,jdbcType=VARCHAR}
+		</if>
+		<if test="channel != null and channel != ''"> 
+		 	and p.PRT_CHANNEL = #{channel,jdbcType=VARCHAR}
+		</if>
+  		ORDER BY p.PRT_SORT  ASC
+	</select>
+	<!-- 查看团购商品详细规格参数 -->
+	<select id="queryProduct" resultType="hashmap" parameterType="java.util.Map">
+    	SELECT
+			p.CSR_PRODUCT_ID    'productId',
+			p.CSR_SPEC_NO      	'specno',
+			p.CSR_CHANNEL      	'channel',
+			c.PRT_ID   		    'prtid',
+			d.CSI_CAT_CODE      'code',
+			d.CSI_NAME          'name',
+			e.CSD_NO            'csdno',
+			e.CSD_VALUE         'value'
+     	FROM zh_product_spec_rel  p
+     		LEFT JOIN zh_product c  ON c.PRT_ID = p.CSR_PRODUCT_ID
+     		LEFT JOIN zh_cat_spec_inf d  ON d.CSI_SPEC_NO = p.CSR_SPEC_NO
+     		LEFT JOIN zh_cat_spec_detail e  ON e.CSD_SPEC_NO = d.CSI_SPEC_NO
+     	    	AND p.CSR_CHANNEL = c.PRT_CHANNEL
+     	WHERE  1=1
+		<if test="productId != null and productId != ''"> 
+		 	and p.CSR_PRODUCT_ID = #{productId,jdbcType=VARCHAR}
+		</if>
+  		ORDER BY p.CSR_PRODUCT_ID  ASC
+	</select>
+</mapper>