')).parent().on("click",function(){b.input.focus()}),b.values.length&&a.each(b.values,function(){b.createBadge(this)}),b.input=a('
').attr("placeholder",b.options.placeholder).insertAfter(b.element).on("focus",function(){b.element.parent().addClass("tags-hover")}).on("blur",function(){b.skip||(b.process(),b.element.parent().removeClass("tags-hover"),b.element.siblings(".tag").removeClass("tag-important")),b.skip=!1}).on("keydown",function(c){if(188==c.keyCode||13==c.keyCode||9==c.keyCode)!a.trim(a(this).val())||b.element.siblings(".typeahead").length&&!b.element.siblings(".typeahead").is(":hidden")?188==c.keyCode&&(!b.element.siblings(".typeahead").length||b.element.siblings(".typeahead").is(":hidden")?c.preventDefault():(b.input.data("typeahead").select(),c.stopPropagation(),c.preventDefault())):(9!=c.keyCode&&c.preventDefault(),b.process());else if(a.trim(a(this).val())||8!=c.keyCode)b.element.siblings(".tag").removeClass("tag-important");else{var d=b.element.siblings(".tag").length;if(d){var e=b.element.siblings(".tag:eq("+(d-1)+")");e.hasClass("tag-important")?b.remove(d-1):e.addClass("tag-important")}}}).bs_typeahead({source:b.options.source,matcher:function(a){return~a.toLowerCase().indexOf(this.query.toLowerCase())&&(-1==b.inValues(a)||b.options.allowDuplicates)},updater:a.proxy(b.add,b)}),a(b.input.data("bs_typeahead").$menu).on("mousedown",function(){b.skip=!0}),this.element.trigger("shown")},inValues:function(b){if(this.options.caseInsensitive){var c=-1;return a.each(this.values,function(a,d){return d.toLowerCase()==b.toLowerCase()?(c=a,!1):void 0}),c}return a.inArray(b,this.values)},createBadge:function(b){var c=this;a("
",{"class":"tag"}).text(b).append(a('
').on("click",function(){c.remove(c.element.siblings(".tag").index(a(this).closest(".tag")))})).insertBefore(c.element)},add:function(b){var c=this;if(!c.options.allowDuplicates){var d=c.inValues(b);if(-1!=d){var e=c.element.siblings(".tag:eq("+d+")");return e.addClass("tag-warning"),void setTimeout(function(){a(e).removeClass("tag-warning")},500)}}this.values.push(b),this.createBadge(b),this.element.val(this.values.join(", ")),this.element.trigger("added",[b])},remove:function(a){if(a>=0){var b=this.values.splice(a,1);this.element.siblings(".tag:eq("+a+")").remove(),this.element.val(this.values.join(", ")),this.element.trigger("removed",[b])}},process:function(){var b=a.grep(a.map(this.input.val().split(","),a.trim),function(a){return a.length>0}),c=this;a.each(b,function(){c.add(this)}),this.input.val("")},skip:!1};var c=a.fn.tag;a.fn.tag=function(c){return this.each(function(){var d=a(this),e=d.data("tag"),f="object"==typeof c&&c;e||d.data("tag",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.tag.defaults={allowDuplicates:!1,caseInsensitive:!0,placeholder:"",source:[]},a.fn.tag.Constructor=b,a.fn.tag.noConflict=function(){return a.fn.tag=c,this},a(window).on("load",function(){a('[data-provide="tag"]').each(function(){var b=a(this);b.data("tag")||b.tag(b.data())})})}(window.jQuery);
--------------------------------------------------------------------------------
/source/shop/shop-goods/shop-goods-web/src/main/webapp/WEB-INF/web.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 | shop-goods-web
8 | shop-goods-web
9 |
10 |
11 |
12 | contextConfigLocation
13 | classpath:applicationContext.xml
14 |
15 |
16 | log4jConfiguration
17 | file:///${user.dir}/config/log/log4j2.xml
18 |
19 |
20 |
21 | com.wxx.shop.listener.DefaultInitListener
22 |
23 |
24 |
25 | org.springframework.web.context.ContextLoaderListener
26 |
27 |
28 |
29 |
47 |
48 |
49 |
50 | SpringEncodingFilter
51 | org.springframework.web.filter.CharacterEncodingFilter
52 |
53 | encoding
54 | UTF-8
55 |
56 |
57 | forceEncoding
58 | true
59 |
60 |
61 |
62 | SpringEncodingFilter
63 | /*
64 |
65 |
66 |
67 |
68 | spring
69 | org.springframework.web.servlet.DispatcherServlet
70 |
71 | contextConfigLocation
72 | classpath:spring-mvc.xml
73 |
74 | 2
75 |
76 |
77 | spring
78 | *.ajax
79 |
80 |
81 |
82 | pages/shop/search.shtml
83 |
84 |
85 |
86 |
87 |
88 | 404
89 | /pages/error/404.jsp
90 |
91 |
92 |
93 | 405
94 | /pages/error/405.jsp
95 |
96 |
97 |
98 | 500
99 | /pages/error/500.jsp
100 |
101 |
102 |
103 |
--------------------------------------------------------------------------------
/source/shop/shop-goods/shop-goods-web/src/main/assembly/db/mysql/create_tables.sql:
--------------------------------------------------------------------------------
1 | DROP TABLE IF EXISTS `goods`;
2 | CREATE TABLE `goods` (
3 | `goods_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id自增',
4 | `goods_no` varchar(16) DEFAULT NULL COMMENT '商品编号',
5 | `goods_name` varchar(255) DEFAULT NULL COMMENT '商品名称',
6 | `goods_py_name` varchar(255) DEFAULT NULL COMMENT '拼音',
7 | `goods_short_py_name` varchar(255) DEFAULT NULL COMMENT '拼音简写',
8 | `create_time` date DEFAULT NULL COMMENT '创建时间',
9 | `creator` varchar(255) DEFAULT NULL COMMENT '创建人',
10 | `update_time` date DEFAULT NULL COMMENT '修改时间',
11 | `updater` varchar(255) DEFAULT NULL COMMENT '修改人',
12 | PRIMARY KEY (`goods_id`)
13 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
14 |
15 | DROP TABLE IF EXISTS `goods_price`;
16 | CREATE TABLE `goods_price` (
17 | `price_id` int NOT NULL AUTO_INCREMENT ,
18 | `goods_id` int NULL ,
19 | `brand_id` int NULL ,
20 | `price` decimal(10,2) NULL,
21 | `create_time` date DEFAULT NULL COMMENT '创建时间',
22 | `creator` varchar(255) DEFAULT NULL COMMENT '创建人',
23 | `update_time` date DEFAULT NULL COMMENT '修改时间',
24 | `updater` varchar(255) DEFAULT NULL COMMENT '修改人',
25 | PRIMARY KEY (`price_id`)
26 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
27 |
28 | DROP TABLE IF EXISTS `goods_brand`;
29 | CREATE TABLE `goods_brand` (
30 | `brand_id` int NOT NULL AUTO_INCREMENT ,
31 | `brand_name` varchar(255) NULL ,
32 | `create_time` date DEFAULT NULL COMMENT '创建时间',
33 | `creator` varchar(255) DEFAULT NULL COMMENT '创建人',
34 | `update_time` date DEFAULT NULL COMMENT '修改时间',
35 | `updater` varchar(255) DEFAULT NULL COMMENT '修改人',
36 | PRIMARY KEY (`brand_id`)
37 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
38 |
39 | DROP TABLE IF EXISTS `income_log`;
40 | CREATE TABLE `income_log` (
41 | `income_log_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id,自增',
42 | `goods_id` varchar(16) DEFAULT NULL COMMENT '商品id',
43 | `income_time` date DEFAULT NULL COMMENT '进货时间',
44 | `income_quantity` int(11) DEFAULT NULL COMMENT '进货数量',
45 | `quantity_unit` varchar(16) DEFAULT NULL COMMENT '数量单位',
46 | `product_time` date DEFAULT NULL COMMENT '生产时间',
47 | `expire_time` date DEFAULT NULL COMMENT '过期时间',
48 | `suplier_id` varchar(16) DEFAULT NULL COMMENT '供应商id',
49 | `create_time` date DEFAULT NULL COMMENT '创建时间',
50 | `update_time` date DEFAULT NULL COMMENT '更新时间',
51 | `remark` varchar(1024) DEFAULT NULL COMMENT '备注',
52 | `quality_time` int(11) DEFAULT NULL COMMENT '保质期,单位天',
53 | PRIMARY KEY (`income_log_id`)
54 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
55 |
56 | DROP TABLE IF EXISTS `price_change_log`;
57 | CREATE TABLE `price_change_log` (
58 | `price_change_log_id` int(11) NOT NULL COMMENT 'id字段,自增',
59 | `goods_id` varchar(16) DEFAULT NULL COMMENT '商品id',
60 | `price` int(11) DEFAULT NULL COMMENT '最新的价格',
61 | `create_time` date DEFAULT NULL COMMENT '创建时间',
62 | `update_time` date DEFAULT NULL COMMENT '修改时间',
63 | `remark` varchar(1024) DEFAULT NULL COMMENT '备注',
64 | PRIMARY KEY (`price_change_log_id`)
65 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
66 |
67 | DROP TABLE IF EXISTS `user`;
68 | CREATE TABLE `user` (
69 | `user_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id自增',
70 | `username` varchar(32) DEFAULT NULL COMMENT '用户名',
71 | `password` varchar(32) DEFAULT NULL COMMENT '密码',
72 | `nickname` varchar(128) DEFAULT NULL COMMENT '昵称',
73 | `create_time` date DEFAULT NULL COMMENT '创建时间',
74 | `update_time` date DEFAULT NULL COMMENT '修改时间',
75 | PRIMARY KEY (`user_id`)
76 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
77 |
78 |
--------------------------------------------------------------------------------
/source/shop/shop-cache/src/main/java/com/wxx/shop/cache/cluster/impl/RedisClusterServiceImpl.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2017 Aspire Tech,Inc. All rights reserved.
3 | */
4 | package com.wxx.shop.cache.cluster.impl;
5 |
6 | import com.wxx.shop.cache.cluster.RedisClusterService;
7 | import org.apache.commons.pool2.impl.GenericObjectPoolConfig;
8 | import redis.clients.jedis.HostAndPort;
9 | import redis.clients.jedis.JedisCluster;
10 |
11 | import java.util.HashSet;
12 | import java.util.Set;
13 |
14 | /**
15 | * redis集群客户端
16 | *
17 | * @author wangxiaoxian
18 | * @version $v:1.0.0, $time:2017-04-20, $id:RedisClusterServiceImpl.java, Exp $
19 | */
20 | public class RedisClusterServiceImpl implements RedisClusterService {
21 |
22 | private JedisCluster jedisCluster;
23 | private String hostPortList;
24 | private int connectionTimeout;
25 | private int soTimeout;
26 | private int maxRedirections;
27 | private GenericObjectPoolConfig poolConfig;
28 |
29 | public void init() {
30 | Set
hostPortSet = convert2Set(hostPortList);
31 | jedisCluster = new JedisCluster(hostPortSet, connectionTimeout, soTimeout, maxRedirections, poolConfig);
32 | }
33 |
34 | /**
35 | * 将字符串格式的主机转化为集合类型
36 | * @param hostPortList 字符串格式的主机
37 | * @return Set
38 | */
39 | private Set convert2Set(String hostPortList) {
40 | String[] hostPortArray = hostPortList.split(",");
41 | Set hostAndPortSet = new HashSet<>();
42 | for (String hostPort : hostPortArray) {
43 | hostAndPortSet.add(parseHostAndPort(hostPort));
44 | }
45 | return hostAndPortSet;
46 | }
47 |
48 | /**
49 | * 从 主机:端口 格式获取HostAndPort对象
50 | * @param hostPortStr 主机:端口 格式的字符串
51 | * @return HostAndPort对象
52 | */
53 | private HostAndPort parseHostAndPort(String hostPortStr) {
54 | String[] hostPort = hostPortStr.split(":");
55 | HostAndPort hostAndPort = new HostAndPort(hostPort[0],
56 | Integer.valueOf(hostPort[1]));
57 | return hostAndPort;
58 | }
59 |
60 | @Override
61 | public JedisCluster getJedisCluster() {
62 | return jedisCluster;
63 | }
64 |
65 | public void setJedisCluster(JedisCluster jedisCluster) {
66 | this.jedisCluster = jedisCluster;
67 | }
68 |
69 | public String getHostPortList() {
70 | return hostPortList;
71 | }
72 |
73 | public void setHostPortList(String hostPortList) {
74 | this.hostPortList = hostPortList;
75 | }
76 |
77 | public int getConnectionTimeout() {
78 | return connectionTimeout;
79 | }
80 |
81 | public void setConnectionTimeout(int connectionTimeout) {
82 | this.connectionTimeout = connectionTimeout;
83 | }
84 |
85 | public int getSoTimeout() {
86 | return soTimeout;
87 | }
88 |
89 | public void setSoTimeout(int soTimeout) {
90 | this.soTimeout = soTimeout;
91 | }
92 |
93 | public int getMaxRedirections() {
94 | return maxRedirections;
95 | }
96 |
97 | public void setMaxRedirections(int maxRedirections) {
98 | this.maxRedirections = maxRedirections;
99 | }
100 |
101 | public GenericObjectPoolConfig getPoolConfig() {
102 | return poolConfig;
103 | }
104 |
105 | public void setPoolConfig(GenericObjectPoolConfig poolConfig) {
106 | this.poolConfig = poolConfig;
107 | }
108 | }
--------------------------------------------------------------------------------
/source/shop/shop-goods/shop-goods-web/src/main/assembly/config/log/log4j2.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | %date{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %logger{70}#%method:%L [%-5level]- %msg%xEx%n
6 | ${sys:user.dir}/logs
7 | %d{yyyy-MM-dd}-%i.log
8 | 100MB
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
19 |
20 |
21 |
22 |
24 |
25 |
26 |
27 |
29 |
30 |
31 |
32 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
--------------------------------------------------------------------------------
/source/shop/shop-goods/shop-goods-web/src/main/webapp/common/ace-admin/assets/js/bootstrap-wysiwyg.min.js:
--------------------------------------------------------------------------------
1 | !function(a){"use strict";var b=function(b){var c=a.Deferred(),d=new FileReader;return d.onload=function(a){c.resolve(a.target.result)},d.onerror=c.reject,d.onprogress=c.notify,d.readAsDataURL(b),c.promise()};a.fn.cleanHtml=function(){var b=a(this).html();return b&&b.replace(/(
|\s|<\/div>| )*$/,"")},a.fn.wysiwyg=function(c){var d,e,f,g=this,h=function(){e.activeToolbarClass&&a(e.toolbarSelector).find(f).each(function(){try{var b=a(this).data(e.commandRole);document.queryCommandState(b)?a(this).addClass(e.activeToolbarClass):a(this).removeClass(e.activeToolbarClass)}catch(c){}})},i=function(a,b){var c=a.split(" "),d=c.shift(),e=c.join(" ")+(b||"");document.execCommand(d,0,e),h()},j=function(b){a.each(b,function(a,b){g.keydown(a,function(a){g.attr("contenteditable")&&g.is(":visible")&&(a.preventDefault(),a.stopPropagation(),i(b))}).keyup(a,function(a){g.attr("contenteditable")&&g.is(":visible")&&(a.preventDefault(),a.stopPropagation())})})},k=function(){try{var a=window.getSelection();if(a.getRangeAt&&a.rangeCount)return a.getRangeAt(0)}catch(b){}},l=function(){d=k()},m=function(){try{var a=window.getSelection();if(d){try{a.removeAllRanges()}catch(b){document.body.createTextRange().select(),document.selection.empty()}a.addRange(d)}}catch(c){}},n=function(c){g.focus(),a.each(c,function(c,d){/^image\//.test(d.type)?a.when(b(d)).done(function(a){i("insertimage",a)}).fail(function(a){e.fileUploadError("file-reader",a)}):e.fileUploadError("unsupported-file-type",d.type)})},o=function(a,b){m(),document.queryCommandSupported("hiliteColor")&&document.execCommand("hiliteColor",0,b||"transparent"),l(),a.data(e.selectionMarker,b)},p=function(b,c){b.find(f).click(function(){m(),g.focus(),i(a(this).data(c.commandRole)),l()}),b.find("[data-toggle=dropdown]").click(m);var d=!!window.navigator.msPointerEnabled||!!document.all&&!!document.addEventListener;b.find("input[type=text][data-"+c.commandRole+"]").on("webkitspeechchange change",function(){var b=this.value;this.value="",m(),b&&(g.focus(),i(a(this).data(c.commandRole),b)),l()}).on("focus",function(){if(!d){var b=a(this);b.data(c.selectionMarker)||(o(b,c.selectionColor),b.focus())}}).on("blur",function(){if(!d){var b=a(this);b.data(c.selectionMarker)&&o(b,!1)}}),b.find("input[type=file][data-"+c.commandRole+"]").change(function(){m(),"file"===this.type&&this.files&&this.files.length>0&&n(this.files),l(),this.value=""})},q=function(){g.on("dragenter dragover",!1).on("drop",function(a){var b=a.originalEvent.dataTransfer;a.stopPropagation(),a.preventDefault(),b&&b.files&&b.files.length>0&&n(b.files)})};return e=a.extend({},a.fn.wysiwyg.defaults,c),f="a[data-"+e.commandRole+"],button[data-"+e.commandRole+"],input[type=button][data-"+e.commandRole+"]",j(e.hotKeys),e.dragAndDropImages&&q(),p(a(e.toolbarSelector),e),g.attr("contenteditable",!0).on("mouseup keyup mouseout",function(){l(),h()}),a(window).bind("touchend",function(a){var b=g.is(a.target)||g.has(a.target).length>0,c=k(),d=c&&c.startContainer===c.endContainer&&c.startOffset===c.endOffset;(!d||b)&&(l(),h())}),this},a.fn.wysiwyg.defaults={hotKeys:{"ctrl+b meta+b":"bold","ctrl+i meta+i":"italic","ctrl+u meta+u":"underline","ctrl+z meta+z":"undo","ctrl+y meta+y meta+shift+z":"redo","ctrl+l meta+l":"justifyleft","ctrl+r meta+r":"justifyright","ctrl+e meta+e":"justifycenter","ctrl+j meta+j":"justifyfull","shift+tab":"outdent",tab:"indent"},toolbarSelector:"[data-role=editor-toolbar]",commandRole:"edit",activeToolbarClass:"btn-info",selectionMarker:"edit-focus-marker",selectionColor:"darkgrey",dragAndDropImages:!0,fileUploadError:function(a,b){console.log("File upload error",a,b)}}}(window.jQuery);
--------------------------------------------------------------------------------
/source/shop/shop-goods/shop-goods-web/src/main/webapp/common/ace-admin/assets/js/jquery.dataTables.bootstrap.min.js:
--------------------------------------------------------------------------------
1 | $.extend(!0,$.fn.dataTable.defaults,{sDom:"<'row'<'col-xs-6'l><'col-xs-6'f>r>t<'row'<'col-xs-6'i><'col-xs-6'p>>",oLanguage:{sLengthMenu:"Display _MENU_ records"}}),$.extend($.fn.dataTableExt.oStdClasses,{sWrapper:"dataTables_wrapper form-inline",sFilterInput:"form-control input-sm",sLengthSelect:"form-control input-sm"}),$.fn.dataTable.Api?($.fn.dataTable.defaults.renderer="bootstrap",$.fn.dataTable.ext.renderer.pageButton.bootstrap=function(a,b,c,d,e,f){var g,h,i=new $.fn.dataTable.Api(a),j=a.oClasses,k=a.oLanguage.oPaginate,l=function(b,d){var m,n,o,p,q=function(a){a.preventDefault(),"ellipsis"!==a.data.action&&i.page(a.data.action).draw(!1)};for(m=0,n=d.length;n>m;m++)if(p=d[m],$.isArray(p))l(b,p);else{switch(g="",h="",p){case"ellipsis":g="…",h="disabled";break;case"first":g=k.sFirst,h=p+(e>0?"":" disabled");break;case"previous":g=k.sPrevious,h=p+(e>0?"":" disabled");break;case"next":g=k.sNext,h=p+(f-1>e?"":" disabled");break;case"last":g=k.sLast,h=p+(f-1>e?"":" disabled");break;default:g=p+1,h=e===p?"active":""}g&&(o=$("
",{"class":j.sPageButton+" "+h,"aria-controls":a.sTableId,tabindex:a.iTabIndex,id:0===c&&"string"==typeof p?a.sTableId+"_"+p:null}).append($("",{href:"#"}).html(g)).appendTo(b),a.oApi._fnBindAction(o,{action:p},q))}};l($(b).empty().html('').children("ul"),d)}):($.fn.dataTable.defaults.sPaginationType="bootstrap",$.fn.dataTableExt.oApi.fnPagingInfo=function(a){return{iStart:a._iDisplayStart,iEnd:a.fnDisplayEnd(),iLength:a._iDisplayLength,iTotal:a.fnRecordsTotal(),iFilteredTotal:a.fnRecordsDisplay(),iPage:-1===a._iDisplayLength?0:Math.ceil(a._iDisplayStart/a._iDisplayLength),iTotalPages:-1===a._iDisplayLength?0:Math.ceil(a.fnRecordsDisplay()/a._iDisplayLength)}},$.extend($.fn.dataTableExt.oPagination,{bootstrap:{fnInit:function(a,b,c){var d=(a.oLanguage.oPaginate,function(b){b.preventDefault(),a.oApi._fnPageChange(a,b.data.action)&&c(a)});$(b).append('');var e=$("a",b);$(e[0]).bind("click.DT",{action:"first"},d),$(e[1]).bind("click.DT",{action:"previous"},d),$(e[2]).bind("click.DT",{action:"next"},d),$(e[3]).bind("click.DT",{action:"last"},d)},fnUpdate:function(a,b){var c,d,e,f,g,h,i=5,j=a.oInstance.fnPagingInfo(),k=a.aanFeatures.p,l=Math.floor(i/2);for(j.iTotalPages=j.iTotalPages-l?(g=j.iTotalPages-i+1,h=j.iTotalPages):(g=j.iPage-l+1,h=g+i-1),c=0,d=k.length;d>c;c++){for($("li:gt(0)",k[c]).filter(":not(.next,.prev)").remove(),e=g;h>=e;e++)f=e==j.iPage+1?'class="active"':"",$("'+e+"").insertBefore($("li.next:eq(0)",k[c])[0]).bind("click",function(c){c.preventDefault(),a._iDisplayStart=(parseInt($("a",this).text(),10)-1)*j.iLength,b(a)});0===j.iPage?$("li.prev",k[c]).addClass("disabled"):$("li.prev",k[c]).removeClass("disabled"),j.iPage===j.iTotalPages-1||0===j.iTotalPages?$("li.next",k[c]).addClass("disabled"):$("li.next",k[c]).removeClass("disabled")}}}})),$.fn.DataTable.TableTools&&($.extend(!0,$.fn.DataTable.TableTools.classes,{container:"DTTT btn-group",buttons:{normal:"btn btn-default",disabled:"disabled"},collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:"disabled"}},print:{info:"DTTT_print_info modal"},select:{row:"active"}}),$.extend(!0,$.fn.DataTable.TableTools.DEFAULTS.oTags,{collection:{container:"ul",button:"li",liner:"a"}}));
--------------------------------------------------------------------------------
/source/shop/shop-goods/shop-goods-web/src/main/webapp/common/ace-admin/assets/js/jquery.easypiechart.min.js:
--------------------------------------------------------------------------------
1 | /**!
2 | * easyPieChart
3 | * Lightweight plugin to render simple, animated and retina optimized pie charts
4 | *
5 | * @license
6 | * @author Robert Fleischmann (http://robert-fleischmann.de)
7 | * @version 2.1.5
8 | **/
9 | !function(a,b){"object"==typeof exports?module.exports=b(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],b):b(a.jQuery)}(this,function(a){var b=function(a,b){var c,d=document.createElement("canvas");a.appendChild(d),"undefined"!=typeof G_vmlCanvasManager&&G_vmlCanvasManager.initElement(d);var e=d.getContext("2d");d.width=d.height=b.size;var f=1;window.devicePixelRatio>1&&(f=window.devicePixelRatio,d.style.width=d.style.height=[b.size,"px"].join(""),d.width=d.height=b.size*f,e.scale(f,f)),e.translate(b.size/2,b.size/2),e.rotate((-0.5+b.rotate/180)*Math.PI);var g=(b.size-b.lineWidth)/2;b.scaleColor&&b.scaleLength&&(g-=b.scaleLength+2),Date.now=Date.now||function(){return+new Date};var h=function(a,b,c){c=Math.min(Math.max(-1,c||0),1);var d=0>=c?!0:!1;e.beginPath(),e.arc(0,0,g,0,2*Math.PI*c,d),e.strokeStyle=a,e.lineWidth=b,e.stroke()},i=function(){var a,c;e.lineWidth=1,e.fillStyle=b.scaleColor,e.save();for(var d=24;d>0;--d)d%6===0?(c=b.scaleLength,a=0):(c=.6*b.scaleLength,a=b.scaleLength-c),e.fillRect(-b.size/2+a,0,c,1),e.rotate(Math.PI/12);e.restore()},j=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(a){window.setTimeout(a,1e3/60)}}(),k=function(){b.scaleColor&&i(),b.trackColor&&h(b.trackColor,b.lineWidth,1)};this.getCanvas=function(){return d},this.getCtx=function(){return e},this.clear=function(){e.clearRect(b.size/-2,b.size/-2,b.size,b.size)},this.draw=function(a){b.scaleColor||b.trackColor?e.getImageData&&e.putImageData?c?e.putImageData(c,0,0):(k(),c=e.getImageData(0,0,b.size*f,b.size*f)):(this.clear(),k()):this.clear(),e.lineCap=b.lineCap;var d;d="function"==typeof b.barColor?b.barColor(a):b.barColor,h(d,b.lineWidth,a/100)}.bind(this),this.animate=function(a,c){var d=Date.now();b.onStart(a,c);var e=function(){var f=Math.min(Date.now()-d,b.animate.duration),g=b.easing(this,f,a,c-a,b.animate.duration);this.draw(g),b.onStep(a,c,g),f>=b.animate.duration?b.onStop(a,c):j(e)}.bind(this);j(e)}.bind(this)},c=function(a,c){var d={barColor:"#ef1e25",trackColor:"#f9f9f9",scaleColor:"#dfe0e0",scaleLength:5,lineCap:"round",lineWidth:3,size:110,rotate:0,animate:{duration:1e3,enabled:!0},easing:function(a,b,c,d,e){return b/=e/2,1>b?d/2*b*b+c:-d/2*(--b*(b-2)-1)+c},onStart:function(){},onStep:function(){},onStop:function(){}};if("undefined"!=typeof b)d.renderer=b;else{if("undefined"==typeof SVGRenderer)throw new Error("Please load either the SVG- or the CanvasRenderer");d.renderer=SVGRenderer}var e={},f=0,g=function(){this.el=a,this.options=e;for(var b in d)d.hasOwnProperty(b)&&(e[b]=c&&"undefined"!=typeof c[b]?c[b]:d[b],"function"==typeof e[b]&&(e[b]=e[b].bind(this)));e.easing="string"==typeof e.easing&&"undefined"!=typeof jQuery&&jQuery.isFunction(jQuery.easing[e.easing])?jQuery.easing[e.easing]:d.easing,"number"==typeof e.animate&&(e.animate={duration:e.animate,enabled:!0}),"boolean"!=typeof e.animate||e.animate||(e.animate={duration:1e3,enabled:e.animate}),this.renderer=new e.renderer(a,e),this.renderer.draw(f),a.dataset&&a.dataset.percent?this.update(parseFloat(a.dataset.percent)):a.getAttribute&&a.getAttribute("data-percent")&&this.update(parseFloat(a.getAttribute("data-percent"))),a.style.width=a.style.height=e.size+"px",a.style.lineHeight=e.size-1+"px"}.bind(this);this.update=function(a){return a=parseFloat(a),e.animate.enabled?this.renderer.animate(f,a):this.renderer.draw(a),f=a,this}.bind(this),this.disableAnimation=function(){return e.animate.enabled=!1,this},this.enableAnimation=function(){return e.animate.enabled=!0,this},g()};a.fn.easyPieChart=function(b){return this.each(function(){var d;a.data(this,"easyPieChart")||(d=a.extend({},b,a(this).data()),a.data(this,"easyPieChart",new c(this,d)))})}});
--------------------------------------------------------------------------------
/source/shop/shop-goods/shop-goods-web/src/main/webapp/common/ace-admin/assets/js/jquery.maskedinput.min.js:
--------------------------------------------------------------------------------
1 | !function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):jQuery)}(function(a){var b,c=navigator.userAgent,d=/iphone/i.test(c),e=/chrome/i.test(c),f=/android/i.test(c);a.mask={definitions:{9:"[0-9]",a:"[A-Za-z]","*":"[A-Za-z0-9]"},autoclear:!0,dataName:"rawMaskFn",placeholder:"_"},a.fn.extend({caret:function(a,b){var c;return 0===this.length||this.is(":hidden")?void 0:"number"==typeof a?(b="number"==typeof b?b:a,this.each(function(){this.setSelectionRange?this.setSelectionRange(a,b):this.createTextRange&&(c=this.createTextRange(),c.collapse(!0),c.moveEnd("character",b),c.moveStart("character",a),c.select())})):(this[0].setSelectionRange?(a=this[0].selectionStart,b=this[0].selectionEnd):document.selection&&document.selection.createRange&&(c=document.selection.createRange(),a=0-c.duplicate().moveStart("character",-1e5),b=a+c.text.length),{begin:a,end:b})},unmask:function(){return this.trigger("unmask")},mask:function(c,g){var h,i,j,k,l,m,n,o;if(!c&&this.length>0){h=a(this[0]);var p=h.data(a.mask.dataName);return p?p():void 0}return g=a.extend({autoclear:a.mask.autoclear,placeholder:a.mask.placeholder,completed:null},g),i=a.mask.definitions,j=[],k=n=c.length,l=null,a.each(c.split(""),function(a,b){"?"==b?(n--,k=a):i[b]?(j.push(new RegExp(i[b])),null===l&&(l=j.length-1),k>a&&(m=j.length-1)):j.push(null)}),this.trigger("unmask").each(function(){function h(){if(g.completed){for(var a=l;m>=a;a++)if(j[a]&&C[a]===p(a))return;g.completed.call(B)}}function p(a){return g.placeholder.charAt(a=0&&!j[a];);return a}function s(a,b){var c,d;if(!(0>a)){for(c=a,d=q(b);n>c;c++)if(j[c]){if(!(n>d&&j[c].test(C[d])))break;C[c]=C[d],C[d]=p(d),d=q(d)}z(),B.caret(Math.max(l,a))}}function t(a){var b,c,d,e;for(b=a,c=p(a);n>b;b++)if(j[b]){if(d=q(b),e=C[b],C[b]=c,!(n>d&&j[d].test(e)))break;c=e}}function u(){var a=B.val(),b=B.caret();if(a.length0&&!j[b.begin-1];)b.begin--;if(0===b.begin)for(;b.beging)&&g&&13!==g){if(i.end-i.begin!==0&&(y(i.begin,i.end),s(i.begin,i.end-1)),c=q(i.begin-1),n>c&&(d=String.fromCharCode(g),j[c].test(d))){if(t(c),C[c]=d,z(),e=q(c),f){var k=function(){a.proxy(a.fn.caret,B,e)()};setTimeout(k,0)}else B.caret(e);i.begin<=m&&h()}b.preventDefault()}}}function y(a,b){var c;for(c=a;b>c&&n>c;c++)j[c]&&(C[c]=p(c))}function z(){B.val(C.join(""))}function A(a){var b,c,d,e=B.val(),f=-1;for(b=0,d=0;n>b;b++)if(j[b]){for(C[b]=p(b);d++e.length){y(b+1,n);break}}else C[b]===e.charAt(d)&&d++,k>b&&(f=b);return a?z():k>f+1?g.autoclear||C.join("")===D?(B.val()&&B.val(""),y(0,n)):z():(z(),B.val(B.val().substring(0,f+1))),k?b:l}var B=a(this),C=a.map(c.split(""),function(a,b){return"?"!=a?i[a]?p(b):a:void 0}),D=C.join(""),E=B.val();B.data(a.mask.dataName,function(){return a.map(C,function(a,b){return j[b]&&a!=p(b)?a:null}).join("")}),B.one("unmask",function(){B.off(".mask").removeData(a.mask.dataName)}).on("focus.mask",function(){if(!B.prop("readonly")){clearTimeout(b);var a;E=B.val(),a=A(),b=setTimeout(function(){z(),a==c.replace("?","").length?B.caret(0,a):B.caret(a)},10)}}).on("blur.mask",v).on("keydown.mask",w).on("keypress.mask",x).on("input.mask paste.mask",function(){B.prop("readonly")||setTimeout(function(){var a=A(!0);B.caret(a),h()},0)}),e&&f&&B.off("input.mask").on("input.mask",u),A()})}})});
--------------------------------------------------------------------------------
/source/shop/shop-goods/shop-goods-web/src/main/webapp/common/ace-admin/assets/js/spin.min.js:
--------------------------------------------------------------------------------
1 | !function(a,b){"object"==typeof exports?module.exports=b():"function"==typeof define&&define.amd?define(b):a.Spinner=b()}(this,function(){"use strict";function a(a,b){var c,d=document.createElement(a||"div");for(c in b)d[c]=b[c];return d}function b(a){for(var b=1,c=arguments.length;c>b;b++)a.appendChild(arguments[b]);return a}function c(a,b,c,d){var e=["opacity",b,~~(100*a),c,d].join("-"),f=.01+c/d*100,g=Math.max(1-(1-a)/b*(100-f),a),h=j.substring(0,j.indexOf("Animation")).toLowerCase(),i=h&&"-"+h+"-"||"";return l[e]||(m.insertRule("@"+i+"keyframes "+e+"{0%{opacity:"+g+"}"+f+"%{opacity:"+a+"}"+(f+.01)+"%{opacity:1}"+(f+b)%100+"%{opacity:"+a+"}100%{opacity:"+g+"}}",m.cssRules.length),l[e]=1),e}function d(a,b){var c,d,e=a.style;for(b=b.charAt(0).toUpperCase()+b.slice(1),d=0;d',c)}m.addRule(".spin-vml","behavior:url(#default#VML)"),h.prototype.lines=function(a,d){function f(){return e(c("group",{coordsize:k+" "+k,coordorigin:-j+" "+-j}),{width:k,height:k})}function h(a,h,i){b(m,b(e(f(),{rotation:360/d.lines*a+"deg",left:~~h}),b(e(c("roundrect",{arcsize:d.corners}),{width:j,height:d.width,left:d.radius,top:-d.width>>1,filter:i}),c("fill",{color:g(d.color,a),opacity:d.opacity}),c("stroke",{opacity:0}))))}var i,j=d.length+d.width,k=2*j,l=2*-(d.width+d.length)+"px",m=e(f(),{position:"absolute",top:l,left:l});if(d.shadow)for(i=1;i<=d.lines;i++)h(i,-2,"progid:DXImageTransform.Microsoft.Blur(pixelradius=2,makeshadow=1,shadowopacity=.3)");for(i=1;i<=d.lines;i++)h(i);return b(a,m)},h.prototype.opacity=function(a,b,c,d){var e=a.firstChild;d=d.shadow&&d.lines||0,e&&b+d>1)+"px"})}for(var i,k=0,l=(f.lines-1)*(1-f.direction)/2;k ',_tpl_title:'[[title]]',_tpl_item:'',_tpl_wrap:'',add:function(c){if("string"==typeof c&&(c={text:c}),null===c.text)throw'You must supply "text" parameter.';this._is_setup||this._runSetup();var d=c.title,e=c.text,f=c.image||"",g=c.sticky||!1,h=c.class_name||a.gritter.options.class_name,i=a.gritter.options.position,j=c.time||"";this._verifyWrapper(),this._item_count++;var k=this._item_count,l=this._tpl_item;a(["before_open","after_open","before_close","after_close"]).each(function(d,e){b["_"+e+"_"+k]=a.isFunction(c[e])?c[e]:function(){}}),this._custom_timer=0,j&&(this._custom_timer=j);var m=""!=f?'
':"",n=""!=f?"gritter-with-image":"gritter-without-image";if(d=d?this._str_replace("[[title]]",d,this._tpl_title):"",l=this._str_replace(["[[title]]","[[text]]","[[close]]","[[image]]","[[number]]","[[class_name]]","[[item_class]]"],[d,e,this._tpl_close,m,this._item_count,n,h],l),this["_before_open_"+k]()===!1)return!1;a("#gritter-notice-wrapper").addClass(i).append(l);var o=a("#gritter-item-"+this._item_count);return o.fadeIn(this.fade_in_speed,function(){b["_after_open_"+k](a(this))}),g||this._setFadeTimer(o,k),a(o).bind("mouseenter mouseleave",function(c){"mouseenter"==c.type?g||b._restoreItemIfFading(a(this),k):g||b._setFadeTimer(a(this),k),b._hoverState(a(this),c.type)}),a(o).find(".gritter-close").click(function(){b.removeSpecific(k,{},null,!0)}),k},_countRemoveWrapper:function(b,c,d){c.remove(),this["_after_close_"+b](c,d),0==a(".gritter-item-wrapper").length&&a("#gritter-notice-wrapper").remove()},_fade:function(a,c,d,e){var d=d||{},f="undefined"!=typeof d.fade?d.fade:!0,g=d.speed||this.fade_out_speed,h=e;this["_before_close_"+c](a,h),e&&a.unbind("mouseenter mouseleave"),f?a.animate({opacity:0},g,function(){a.animate({height:0},300,function(){b._countRemoveWrapper(c,a,h)})}):this._countRemoveWrapper(c,a)},_hoverState:function(a,b){"mouseenter"==b?(a.addClass("hover"),a.find(".gritter-close").show()):(a.removeClass("hover"),a.find(".gritter-close").hide())},removeSpecific:function(b,c,d,e){if(!d)var d=a("#gritter-item-"+b);this._fade(d,b,c||{},e)},_restoreItemIfFading:function(a,b){clearTimeout(this["_int_id_"+b]),a.stop().css({opacity:"",height:""})},_runSetup:function(){for(opt in a.gritter.options)this[opt]=a.gritter.options[opt];this._is_setup=1},_setFadeTimer:function(a,c){var d=this._custom_timer?this._custom_timer:this.time;this["_int_id_"+c]=setTimeout(function(){b._fade(a,c)},d)},stop:function(b){var c=a.isFunction(b.before_close)?b.before_close:function(){},d=a.isFunction(b.after_close)?b.after_close:function(){},e=a("#gritter-notice-wrapper");c(e),e.fadeOut(function(){a(this).remove(),d()})},_str_replace:function(a,b,c,d){var e=0,f=0,g="",h="",i=0,j=0,k=[].concat(a),l=[].concat(b),m=c,n=l instanceof Array,o=m instanceof Array;for(m=[].concat(m),d&&(this.window[d]=0),e=0,i=m.length;i>e;e++)if(""!==m[e])for(f=0,j=k.length;j>f;f++)g=m[e]+"",h=n?void 0!==l[f]?l[f]:"":l[0],m[e]=g.split(k[f]).join(h),d&&m[e]!==g&&(this.window[d]+=(g.length-m[e].length)/k[f].length);return o?m:m[0]},_verifyWrapper:function(){0==a("#gritter-notice-wrapper").length&&a("body").append(this._tpl_wrap)}}}(jQuery);
--------------------------------------------------------------------------------
/source/shop/shop-goods/shop-goods-web/src/main/resources/applicationContext.xml:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
17 |
18 |
19 |
23 |
24 |
25 |
26 |
27 |
28 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
60 |
61 |
62 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
--------------------------------------------------------------------------------
/source/shop/shop-goods/shop-goods-web/src/main/java/com/wxx/shop/filter/QueryGoodsNameInterceptor.java:
--------------------------------------------------------------------------------
1 | package com.wxx.shop.filter;
2 |
3 | import com.wxx.shop.cache.cluster.RedisClusterService;
4 | import com.wxx.shop.dao.GoodsDao;
5 | import com.wxx.shop.constenum.GoodsChannelEnum;
6 | import com.wxx.shop.model.Goods;
7 | import com.wxx.shop.service.impl.GoodsServiceImpl;
8 | import org.aopalliance.intercept.MethodInterceptor;
9 | import org.aopalliance.intercept.MethodInvocation;
10 | import org.slf4j.Logger;
11 | import org.slf4j.LoggerFactory;
12 | import org.springframework.beans.factory.annotation.Autowired;
13 | import org.springframework.beans.factory.annotation.Qualifier;
14 | import org.springframework.beans.factory.annotation.Value;
15 |
16 | import com.wxx.shop.cache.RedisUtil;
17 | import org.springframework.integration.support.MessageBuilder;
18 | import org.springframework.kafka.support.KafkaHeaders;
19 | import org.springframework.messaging.MessageChannel;
20 | import org.springframework.stereotype.Component;
21 | import org.springframework.util.CollectionUtils;
22 | import redis.clients.jedis.JedisCluster;
23 |
24 | import java.math.BigDecimal;
25 | import java.util.List;
26 |
27 | /**
28 | * 给不同的方法来加入判断如果缓存存在数据,从缓存取数据。否则第一次从数据库取,并将结果保存到缓存 中去
29 | * Created by wangxiaoxian on 2017/4/11.
30 | */
31 | @Component("queryGoodsNameInterceptor")
32 | public class QueryGoodsNameInterceptor implements MethodInterceptor {
33 | private static final Logger LOGGER = LoggerFactory.getLogger(QueryGoodsNameInterceptor.class);
34 |
35 | private static final Long EXPIRE_TIME = 6000L;//过期时间,单位秒
36 |
37 | @Autowired
38 | private GoodsDao goodsDao;
39 | // @Autowired
40 | // private RedisUtil redisUtil;
41 | @Autowired
42 | RedisClusterService redisClusterService;
43 | @Autowired
44 | @Qualifier(GoodsChannelEnum.GOODS_CHANNEL_PRODUCER)
45 | private MessageChannel messageChannel;
46 |
47 | @Override
48 | public Object invoke(MethodInvocation invocation) throws Throwable {
49 |
50 | String queryParam = invocation.getArguments()[0].toString();
51 | String key = GoodsServiceImpl.QUERY_GOODS_NAME_KEY_PREFIX + queryParam;
52 |
53 | logQueryParam(queryParam);
54 |
55 | // if (redisUtil.exists(key)) {
56 | // LOGGER.info("找到缓存数据");
57 | // return invocation.proceed();
58 | // }
59 | JedisCluster jedisCluster = redisClusterService.getJedisCluster();
60 | if (jedisCluster.exists(key)) {
61 | LOGGER.info("找到缓存数据");
62 | return invocation.proceed();
63 | }
64 |
65 | LOGGER.info("根据key={}找不到缓存数据,开始查询数据库", key);
66 | List goodsList = goodsDao.queryByName(queryParam);
67 | Long result = set2Redis(invocation.getArguments()[0].toString(), goodsList);
68 | LOGGER.info("缓存设置结果{}", result);
69 |
70 | return invocation.proceed();
71 | }
72 |
73 | private void logQueryParam(String goodsSearchName) {
74 | // header中的key值决定对应消息存放在topic的哪个partition中,
75 | // key的计算方式实现类默认为org.apache.kafka.clients.producer.internals.DefaultPartitioner
76 | for (int i = 0; i < 10; i ++) {
77 | messageChannel.send(MessageBuilder.withPayload(goodsSearchName).setHeader(KafkaHeaders.MESSAGE_KEY, "key" + i)
78 | .setHeader(KafkaHeaders.TOPIC, "goods").build());
79 | }
80 | }
81 |
82 | private Long set2Redis(String queryParam, List goodsList) {
83 | if (CollectionUtils.isEmpty(goodsList)) {
84 | LOGGER.info("数据库找不到查询结果,无法缓存");
85 | return 0L;
86 | }
87 | StringBuffer value = new StringBuffer();
88 | for (Goods goods : goodsList) {
89 | value.append(goods.getGoodsName())
90 | .append("(=")
91 | .append(goods.getPrice() == null ? new BigDecimal(0) : goods.getPrice())
92 | .append("元/斤)")
93 | .append(",");
94 | }
95 | value.substring(0, value.length() - 1);
96 | // return redisUtil.set(GoodsServiceImpl.QUERY_GOODS_NAME_KEY_PREFIX + queryParam, value.toString(), EXPIRE_TIME);
97 | return redisClusterService.getJedisCluster().setnx(GoodsServiceImpl.QUERY_GOODS_NAME_KEY_PREFIX + queryParam, value.toString());
98 | }
99 | }
100 |
--------------------------------------------------------------------------------
/source/shop/shop-goods/shop-goods-web/src/main/webapp/login.shtml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | 用户登录
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |

17 |
18 |
阿卿小卖部管理平台
19 |
20 |
21 |
22 |
23 |
24 |
89 |
90 |
91 |
92 |
93 |
98 |
99 |
136 |
137 |
--------------------------------------------------------------------------------
/source/shop/shop-goods/shop-goods-web/src/main/webapp/pages/common/common.js:
--------------------------------------------------------------------------------
1 | /**
2 | * 组件包
3 | */
4 |
5 | define(function (require, exports, module) {
6 | 'use strict';
7 |
8 | if (typeof jQuery === 'undefined') {
9 | throw new Error('JavaScript requires jQuery');
10 | }
11 |
12 | module.exports= {
13 | confirm: function(title, content, callback, yes, no) {
14 | var opt = {
15 | "title": title || "提示",
16 | "content": content,
17 | "yes": yes || "确定",
18 | "no": no || "取消",
19 | };
20 |
21 | $("#pop_win .no").show();
22 | $("#pop_win .yes").text(opt.yes);
23 | $("#pop_win .no").text(opt.no);
24 | $("#pop_win .title").text(opt.title);
25 | $("#pop_win .content").text(opt.content);
26 |
27 | $("#pop_win .yes").off("click");
28 | $("#pop_win .no").off("click");
29 | $("#pop_win .pop_close").off("click");
30 |
31 | $('#pop_win .pop_close').on("click", close);
32 | $("#pop_win .no").on("click", function() {
33 | close();
34 | if(opt.callback) {
35 | opt.callback(false);
36 | }
37 | });
38 | $("#pop_win .yes").on("click", function() {
39 | close();
40 | if(opt.callback) {
41 | opt.callback(true);
42 | }
43 | });
44 | $('#pop_win .pop_inner').hide().show();
45 | $('#pop_win').popupOpen();
46 |
47 | function close() {
48 | $('#pop_win').hide();
49 | $('#pop_win').popupClose();
50 | }
51 | },
52 | info: function(title, content, callback, yes) {
53 | var opt = {
54 | "title": title || "提示",
55 | "content": content,
56 | "yes": yes || "确定"
57 | };
58 |
59 | $("#pop_win .yes").text(opt.yes);
60 | $("#pop_win .title").text(opt.title);
61 | $("#pop_win .content").text(opt.content);
62 |
63 | $("#pop_win .yes").off("click");
64 | $("#pop_win .pop_close").off("click");
65 |
66 | $('#pop_win .pop_close').on("click", close);
67 | $("#pop_win .yes").on("click", function() {
68 | close();
69 | if(opt.callback) {
70 | opt.callback();
71 | }
72 | });
73 | $('#pop_win .pop_inner').hide().show();
74 | $('#pop_win').popupOpen();
75 |
76 | function close() {
77 | $('#pop_win').hide();
78 | $('#pop_win').popupClose();
79 | }
80 | },
81 | sendAjax: function(custOpt) {
82 | var opt = {
83 | "type": "POST",
84 | "dataType":"json",
85 | };
86 | $.extend(opt, custOpt);
87 | $.ajax(opt);
88 | },
89 | serializeObject: function (obj) {
90 | $.fn.serializeJson = function () {
91 | var serializeObj = {};
92 | var array = this.serializeArray();
93 | $(array).each(function () {
94 | if (serializeObj[this.name]) {
95 | if ($.isArray(serializeObj[this.name])) {
96 | serializeObj[this.name].push(this.value);
97 | } else {
98 | serializeObj[this.name] = [serializeObj[this.name], this.value];
99 | }
100 | } else {
101 | serializeObj[this.name] = this.value;
102 | }
103 | });
104 | return serializeObj;
105 | };
106 | return obj.serializeJson();
107 | },
108 | wrapData2Form: function (data, seletor) {
109 | if (!data) {
110 | return;
111 | }
112 | for (var attr in data) {
113 | $(seletor + " [name='" + attr + "']").val(data[attr]);
114 | }
115 | },
116 |
117 | /* ========================================================================
118 | * getUrlVal
119 | * 获取url传递的参数
120 | * http://www.XXXX.com?{name}="123"&{name}="123123"
121 | * ======================================================================== */
122 | getUrlParam:function(name){
123 | var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
124 | var r = window.location.search.substr(1).match(reg);
125 | if(r!=null)return decodeURIComponent(r[2]); return null;
126 | }
127 | };
128 | });
129 |
--------------------------------------------------------------------------------
/source/shop/shop-goods/shop-goods-web/src/main/webapp/common/ace-admin/assets/js/respond.min.js:
--------------------------------------------------------------------------------
1 | /*! matchMedia() polyfill - Test a CSS media type/query in JS. Authors & copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas. Dual MIT/BSD license */
2 | /*! NOTE: If you're already including a window.matchMedia polyfill via Modernizr or otherwise, you don't need this part */
3 | !function(a){"use strict";a.matchMedia=a.matchMedia||function(a){var b,c=a.documentElement,d=c.firstElementChild||c.firstChild,e=a.createElement("body"),f=a.createElement("div");return f.id="mq-test-1",f.style.cssText="position:absolute;top:-100em",e.style.background="none",e.appendChild(f),function(a){return f.innerHTML='',c.insertBefore(e,d),b=42===f.offsetWidth,c.removeChild(e),{matches:b,media:a}}}(a.document)}(this),/*! Respond.js v1.4.0: min/max-width media query polyfill. (c) Scott Jehl. MIT Lic. j.mp/respondjs */
4 | function(a){"use strict";function b(){u(!0)}var c={};a.respond=c,c.update=function(){};var d=[],e=function(){var b=!1;try{b=new a.XMLHttpRequest}catch(c){b=new a.ActiveXObject("Microsoft.XMLHTTP")}return function(){return b}}(),f=function(a,b){var c=e();c&&(c.open("GET",a,!0),c.onreadystatechange=function(){4!==c.readyState||200!==c.status&&304!==c.status||b(c.responseText)},4!==c.readyState&&c.send(null))};if(c.ajax=f,c.queue=d,c.regex={media:/@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi,keyframes:/@(?:\-(?:o|moz|webkit)\-)?keyframes[^\{]+\{(?:[^\{\}]*\{[^\}\{]*\})+[^\}]*\}/gi,urls:/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,findStyles:/@media *([^\{]+)\{([\S\s]+?)$/,only:/(only\s+)?([a-zA-Z]+)\s?/,minw:/\([\s]*min\-width\s*:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/,maxw:/\([\s]*max\-width\s*:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/},c.mediaQueriesSupported=a.matchMedia&&null!==a.matchMedia("only all")&&a.matchMedia("only all").matches,!c.mediaQueriesSupported){var g,h,i,j=a.document,k=j.documentElement,l=[],m=[],n=[],o={},p=30,q=j.getElementsByTagName("head")[0]||k,r=j.getElementsByTagName("base")[0],s=q.getElementsByTagName("link"),t=function(){var a,b=j.createElement("div"),c=j.body,d=k.style.fontSize,e=c&&c.style.fontSize,f=!1;return b.style.cssText="position:absolute;font-size:1em;width:1em",c||(c=f=j.createElement("body"),c.style.background="none"),k.style.fontSize="100%",c.style.fontSize="100%",c.appendChild(b),f&&k.insertBefore(c,k.firstChild),a=b.offsetWidth,f?k.removeChild(c):c.removeChild(b),k.style.fontSize=d,e&&(c.style.fontSize=e),a=i=parseFloat(a)},u=function(b){var c="clientWidth",d=k[c],e="CSS1Compat"===j.compatMode&&d||j.body[c]||d,f={},o=s[s.length-1],r=(new Date).getTime();if(b&&g&&p>r-g)return a.clearTimeout(h),void(h=a.setTimeout(u,p));g=r;for(var v in l)if(l.hasOwnProperty(v)){var w=l[v],x=w.minw,y=w.maxw,z=null===x,A=null===y,B="em";x&&(x=parseFloat(x)*(x.indexOf(B)>-1?i||t():1)),y&&(y=parseFloat(y)*(y.indexOf(B)>-1?i||t():1)),w.hasquery&&(z&&A||!(z||e>=x)||!(A||y>=e))||(f[w.media]||(f[w.media]=[]),f[w.media].push(m[w.rules]))}for(var C in n)n.hasOwnProperty(C)&&n[C]&&n[C].parentNode===q&&q.removeChild(n[C]);n.length=0;for(var D in f)if(f.hasOwnProperty(D)){var E=j.createElement("style"),F=f[D].join("\n");E.type="text/css",E.media=D,q.insertBefore(E,o.nextSibling),E.styleSheet?E.styleSheet.cssText=F:E.appendChild(j.createTextNode(F)),n.push(E)}},v=function(a,b,d){var e=a.replace(c.regex.keyframes,"").match(c.regex.media),f=e&&e.length||0;b=b.substring(0,b.lastIndexOf("/"));var g=function(a){return a.replace(c.regex.urls,"$1"+b+"$2$3")},h=!f&&d;b.length&&(b+="/"),h&&(f=1);for(var i=0;f>i;i++){var j,k,n,o;h?(j=d,m.push(g(a))):(j=e[i].match(c.regex.findStyles)&&RegExp.$1,m.push(RegExp.$2&&g(RegExp.$2))),n=j.split(","),o=n.length;for(var p=0;o>p;p++)k=n[p],l.push({media:k.split("(")[0].match(c.regex.only)&&RegExp.$2||"all",rules:m.length-1,hasquery:k.indexOf("(")>-1,minw:k.match(c.regex.minw)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:k.match(c.regex.maxw)&&parseFloat(RegExp.$1)+(RegExp.$2||"")})}u()},w=function(){if(d.length){var b=d.shift();f(b.href,function(c){v(c,b.href,b.media),o[b.href]=!0,a.setTimeout(function(){w()},0)})}},x=function(){for(var b=0;b=b.outerHeight()?k=!0:(c.stop(!0,!0).fadeIn("fast"),a.railVisible&&h.stop(!0,!0).fadeIn("fast"))}function p(){a.alwaysVisible||(A=setTimeout(function(){a.disableFadeOut&&r||x||y||(c.fadeOut("slow"),h.fadeOut("slow"))},1E3))}var r,x,y,A,z,s,l,B,D=30,k=!1,b=f(this);if(b.parent().hasClass(a.wrapperClass)){var n=b.scrollTop(),c=b.parent().find("."+a.barClass),h=b.parent().find("."+
12 | a.railClass);w();if(f.isPlainObject(g)){if("height"in g&&"auto"==g.height){b.parent().css("height","auto");b.css("height","auto");var q=b.parent().parent().height();b.parent().css("height",q);b.css("height",q)}if("scrollTo"in g)n=parseInt(a.scrollTo);else if("scrollBy"in g)n+=parseInt(a.scrollBy);else if("destroy"in g){c.remove();h.remove();b.unwrap();return}m(n,!1,!0)}}else{a.height="auto"==g.height?b.parent().height():g.height;n=f("").addClass(a.wrapperClass).css({position:"relative",
13 | overflow:"hidden",width:a.width,height:a.height});b.css({overflow:"hidden",width:a.width,height:a.height});var h=f("").addClass(a.railClass).css({width:a.size,height:"100%",position:"absolute",top:0,display:a.alwaysVisible&&a.railVisible?"block":"none","border-radius":a.railBorderRadius,background:a.railColor,opacity:a.railOpacity,zIndex:90}),c=f("").addClass(a.barClass).css({background:a.color,width:a.size,position:"absolute",top:0,opacity:a.opacity,display:a.alwaysVisible?
14 | "block":"none","border-radius":a.borderRadius,BorderRadius:a.borderRadius,MozBorderRadius:a.borderRadius,WebkitBorderRadius:a.borderRadius,zIndex:99}),q="right"==a.position?{right:a.distance}:{left:a.distance};h.css(q);c.css(q);b.wrap(n);b.parent().append(c);b.parent().append(h);a.railDraggable&&c.bind("mousedown",function(a){var b=f(document);y=!0;t=parseFloat(c.css("top"));pageY=a.pageY;b.bind("mousemove.slimscroll",function(a){currTop=t+a.pageY-pageY;c.css("top",currTop);m(0,c.position().top,!1)});
15 | b.bind("mouseup.slimscroll",function(a){y=!1;p();b.unbind(".slimscroll")});return!1}).bind("selectstart.slimscroll",function(a){a.stopPropagation();a.preventDefault();return!1});h.hover(function(){v()},function(){p()});c.hover(function(){x=!0},function(){x=!1});b.hover(function(){r=!0;v();p()},function(){r=!1;p()});b.bind("touchstart",function(a,b){a.originalEvent.touches.length&&(z=a.originalEvent.touches[0].pageY)});b.bind("touchmove",function(b){k||b.originalEvent.preventDefault();b.originalEvent.touches.length&&
16 | (m((z-b.originalEvent.touches[0].pageY)/a.touchScrollStep,!0),z=b.originalEvent.touches[0].pageY)});w();"bottom"===a.start?(c.css({top:b.outerHeight()-c.outerHeight()}),m(0,!0)):"top"!==a.start&&(m(f(a.start).position().top,null,!0),a.alwaysVisible||c.hide());C()}});return this}});jQuery.fn.extend({slimscroll:jQuery.fn.slimScroll})})(jQuery);
--------------------------------------------------------------------------------
/source/shop/shop-goods/shop-goods-web/src/main/webapp/common/ace-admin/assets/css/bootstrap-datetimepicker.min.css:
--------------------------------------------------------------------------------
1 | /*!
2 | * Datetimepicker for Bootstrap v3
3 | //! version : 3.1.3
4 | * https://github.com/Eonasdan/bootstrap-datetimepicker/
5 | */.bootstrap-datetimepicker-widget{top:0;left:0;width:250px;padding:4px;margin-top:1px;z-index:99999!important;border-radius:4px}.bootstrap-datetimepicker-widget.timepicker-sbs{width:600px}.bootstrap-datetimepicker-widget.bottom:before{content:'';display:inline-block;border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid #ccc;border-bottom-color:rgba(0,0,0,.2);position:absolute;top:-7px;left:7px}.bootstrap-datetimepicker-widget.bottom:after{content:'';display:inline-block;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #fff;position:absolute;top:-6px;left:8px}.bootstrap-datetimepicker-widget.top:before{content:'';display:inline-block;border-left:7px solid transparent;border-right:7px solid transparent;border-top:7px solid #ccc;border-top-color:rgba(0,0,0,.2);position:absolute;bottom:-7px;left:6px}.bootstrap-datetimepicker-widget.top:after{content:'';display:inline-block;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #fff;position:absolute;bottom:-6px;left:7px}.bootstrap-datetimepicker-widget .dow{width:14.2857%}.bootstrap-datetimepicker-widget.pull-right:before{left:auto;right:6px}.bootstrap-datetimepicker-widget.pull-right:after{left:auto;right:7px}.bootstrap-datetimepicker-widget>ul{list-style-type:none;margin:0}.bootstrap-datetimepicker-widget a[data-action]{padding:6px 0}.bootstrap-datetimepicker-widget a[data-action]:active{box-shadow:none}.bootstrap-datetimepicker-widget .timepicker-hour,.bootstrap-datetimepicker-widget .timepicker-minute,.bootstrap-datetimepicker-widget .timepicker-second{width:54px;font-weight:700;font-size:1.2em;margin:0}.bootstrap-datetimepicker-widget button[data-action]{padding:6px}.bootstrap-datetimepicker-widget table[data-hour-format="12"] .separator{width:4px;padding:0;margin:0}.bootstrap-datetimepicker-widget .datepicker>div{display:none}.bootstrap-datetimepicker-widget .picker-switch{text-align:center}.bootstrap-datetimepicker-widget table{width:100%;margin:0}.bootstrap-datetimepicker-widget td,.bootstrap-datetimepicker-widget th{text-align:center;border-radius:4px}.bootstrap-datetimepicker-widget td{height:54px;line-height:54px;width:54px}.bootstrap-datetimepicker-widget td.cw{font-size:10px;height:20px;line-height:20px;color:#777}.bootstrap-datetimepicker-widget td.day{height:20px;line-height:20px;width:20px}.bootstrap-datetimepicker-widget td.day:hover,.bootstrap-datetimepicker-widget td.hour:hover,.bootstrap-datetimepicker-widget td.minute:hover,.bootstrap-datetimepicker-widget td.second:hover{background:#eee;cursor:pointer}.bootstrap-datetimepicker-widget td.old,.bootstrap-datetimepicker-widget td.new{color:#777}.bootstrap-datetimepicker-widget td.today{position:relative}.bootstrap-datetimepicker-widget td.today:before{content:'';display:inline-block;border-left:7px solid transparent;border-bottom:7px solid #428bca;border-top-color:rgba(0,0,0,.2);position:absolute;bottom:4px;right:4px}.bootstrap-datetimepicker-widget td.active,.bootstrap-datetimepicker-widget td.active:hover{background-color:#428bca;color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25)}.bootstrap-datetimepicker-widget td.active.today:before{border-bottom-color:#fff}.bootstrap-datetimepicker-widget td.disabled,.bootstrap-datetimepicker-widget td.disabled:hover{background:0 0;color:#777;cursor:not-allowed}.bootstrap-datetimepicker-widget td span{display:inline-block;width:54px;height:54px;line-height:54px;margin:2px 1.5px;cursor:pointer;border-radius:4px}.bootstrap-datetimepicker-widget td span:hover{background:#eee}.bootstrap-datetimepicker-widget td span.active{background-color:#428bca;color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25)}.bootstrap-datetimepicker-widget td span.old{color:#777}.bootstrap-datetimepicker-widget td span.disabled,.bootstrap-datetimepicker-widget td span.disabled:hover{background:0 0;color:#777;cursor:not-allowed}.bootstrap-datetimepicker-widget th{height:20px;line-height:20px;width:20px}.bootstrap-datetimepicker-widget th.picker-switch{width:145px}.bootstrap-datetimepicker-widget th.next,.bootstrap-datetimepicker-widget th.prev{font-size:21px}.bootstrap-datetimepicker-widget th.disabled,.bootstrap-datetimepicker-widget th.disabled:hover{background:0 0;color:#777;cursor:not-allowed}.bootstrap-datetimepicker-widget thead tr:first-child th{cursor:pointer}.bootstrap-datetimepicker-widget thead tr:first-child th:hover{background:#eee}.input-group.date .input-group-addon span{display:block;cursor:pointer;width:16px;height:16px}.bootstrap-datetimepicker-widget.left-oriented:before{left:auto;right:6px}.bootstrap-datetimepicker-widget.left-oriented:after{left:auto;right:7px}.bootstrap-datetimepicker-widget ul.list-unstyled li div.timepicker div.timepicker-picker table.table-condensed tbody>tr>td{padding:0!important}@media screen and (max-width:767px){.bootstrap-datetimepicker-widget.timepicker-sbs{width:283px}}
--------------------------------------------------------------------------------