From c6c68c331b46338b36125859a31b20001292f101 Mon Sep 17 00:00:00 2001 From: cailu <627223423@qq.com> Date: Sun, 10 Mar 2019 21:05:32 +0800 Subject: [PATCH 01/32] =?UTF-8?q?=E5=90=8C=E6=97=B6=E6=94=AF=E6=8C=81http?= =?UTF-8?q?=E5=92=8Chttps=E4=B8=A4=E7=A7=8D=E8=AE=BF=E9=97=AE=E6=96=B9?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../org/linlinjava/litemall/Application.java | 17 +++++++++++++++++ .../src/main/resources/application.yml | 10 +++++++++- litemall-all/src/main/resources/keystore.p12 | Bin 0 -> 2532 bytes 3 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 litemall-all/src/main/resources/keystore.p12 diff --git a/litemall-all/src/main/java/org/linlinjava/litemall/Application.java b/litemall-all/src/main/java/org/linlinjava/litemall/Application.java index fe5ef3fd..5d3db551 100644 --- a/litemall-all/src/main/java/org/linlinjava/litemall/Application.java +++ b/litemall-all/src/main/java/org/linlinjava/litemall/Application.java @@ -1,8 +1,13 @@ package org.linlinjava.litemall; +import org.apache.catalina.connector.Connector; import org.mybatis.spring.annotation.MapperScan; +import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory; +import org.springframework.boot.web.servlet.server.ServletWebServerFactory; +import org.springframework.context.annotation.Bean; import org.springframework.scheduling.annotation.EnableScheduling; import org.springframework.transaction.annotation.EnableTransactionManagement; @@ -16,4 +21,16 @@ public class Application { SpringApplication.run(Application.class, args); } + @Value("${http.port}") + private Integer port; + + @Bean + public ServletWebServerFactory servletContainer() { + TomcatServletWebServerFactory tomcat = new TomcatServletWebServerFactory(); + Connector connector = new Connector("org.apache.coyote.http11.Http11NioProtocol"); + connector.setPort(port); + tomcat.addAdditionalTomcatConnectors(connector); // 添加http + return tomcat; + } + } \ No newline at end of file diff --git a/litemall-all/src/main/resources/application.yml b/litemall-all/src/main/resources/application.yml index cbd57d79..c3f6f365 100644 --- a/litemall-all/src/main/resources/application.yml +++ b/litemall-all/src/main/resources/application.yml @@ -4,9 +4,17 @@ spring: messages: encoding: UTF-8 -server: +http: port: 8080 +server: + port: 443 + ssl: + key-store: classpath:keystore.p12 + key-store-type: PKCS12 + key-alias: tomcat + key-store-password: 123456 + logging: level: root: ERROR diff --git a/litemall-all/src/main/resources/keystore.p12 b/litemall-all/src/main/resources/keystore.p12 new file mode 100644 index 0000000000000000000000000000000000000000..91e60f964f0cd89d843e3324324a5097379c4870 GIT binary patch literal 2532 zcmY+EXE+;*8h|5-*rm4EdlMswy^6+4t!uB)S}8S(+Nr(Oo-tahR+Ul?MV+b@J6f|& zQL6T+Sy!Lu-gBPw^U_ub`|KpqIP%!;YF3@@@zx4BQ z8NiBh7R79Q7OM>ef&pMG_+zErQ;{4Dw~EGE9&T4*kKt0EIp$ZT$j>D$6llkp@oAhk zCw!V`7+CYh&by%^+_@u_zPCtI2UoIXKt0iQiB=7lGy;dVwbWOAWx0-6%kA^mSobvy zt0a7TC;;jpvbvjPirmN^iwuS7#4fLph{!3sR+>aPtc!(Vw#_6C>lH)OXbF_##!%vD^vYX1pY?|}X&Li9jJ?UM zbUVyhnUbjCCx3psq(;jeiLJoTr}*6m2 za(}6?{Mkw-*F_zi+Ffv_bWsNoQRIKpcu&m|dh+#Eh0LB<#SXPQO~@OEr2!$ly=^TiBv{p-dry@JE>o1Vr=f6~1>W1G$n!?NDhB{*E!9(@@iZ+Bz1!XP8Z*Y9!mv zR2=aas(3`=G|o+$L=rq+=ND#<)BN*RHjmLqvC#%qk6)7jnN%%r*6aKIw}hR+$e&=X zTMdh&79&AX(ljm8ncWtBXvBkUwi;h(c0GR1ScWD>nPog*&+G07)v1xm`5Mt0#{vgC z(D3x*EA2R}p7|r(*n;++cpU9Ol&xdc5zV(lG1*ud&Ej41AYb?pI93^oU#g6QZ0#um zQ63fkfwgg@v{~H3v$sn}a-DcI#k!^@Pu#(XeztElgy*SbKC4kSaz@3Gv@{um=S(4!#7fEHm_%SMNgU;BC zape6}BrSpW(y=QV`xKM6^klo*Z%+K&D@)YRxl4ZR$FDHCE>wyELZD`@h;Z#A>QVy6Zu%bc3H9T!ljPl6y)hH zx8<}A?7kk)#ZPN#oTM}b3%K@}OUJQdNLQ>U bL+;-Bn-OLP3=10kZ-f$-;dA9;n z8#`mJZWBIvBHHcFTpDo6`OsSptm*-E4ud~cE={^kRQwRzv?x>5&)N4!cKIya5;h8sG%*hjITS8KmgJv}W!YS1u_yTv{3?F9U}mq-Af~N%!{>3FIcH;2Q)0 z5&>XX(AhtR=wE?_{0{7iF5se$ZJtxYmRBK4|5nKtgvpcNfsMq1dLW+5IJd}iS^a@Cqo9tXmY>&&S=CI?l7yB8C;{|KVN@Z$k5x~qJ$_j_ z$$+iYD)>o`z1rcIW5tD(NefDkE ze#$Y3?ghd?HG5c~P$5XTv~!+et6QzdZkn=TysQkGq8ox-hH&aJSVq$rmeiet_HlTbb*xOBd<|WTUwu*esb+!MFk?q*cTv(56$ni ziBoxf6uUN!tJtnuF_1vDfrrs`zGq0q%!RZ`af-JEp*h`phN}KcyLO4^N=c55_JiM6 z?)Tu_nho34X7d)AaK(eI=}Jp&?PcvuPq||x( z!MaL`g~iwG#Z^SfbZ%=dWDK1Fo}pjW-V==Dtzd#XbF@Q`Fh(zOTxdVFS%}!4u-nbP zgqwz9VCv&OmW`e4%~^BDmG5?z=r5;3k`}L=?tQ&4u<^X#or2?4rZT5U#L47Kee0n> zh**#1(w)lZZUGxfbu^qMeQ@{7!o5UR9s(lyE31jbQ0=y=`2^Ji`SDsPbAw`Ue`qN$ zUVHYVYI&2=@<^)|6Jqd*=m&p&=HoTn?Bk(J736B-_apyJdna_ugm)uvT^ z&QXBG*q{xCd!|R3bCdQu3&5P}D6Th_wLZTIg}&l2Oe+^5zS??K1XK=Lt#RdAtbSePhUAd?1p3dsSz25T0@YaxMKgKD^nR1RWYNz1-*eh`gDMZ$T+3hRXeilbhTo>_e@P)hAg+o44)I1Y!HET)R%U)LDE!dL z#Fx|Ixlhh>C69a-JvhdIeSJ3{!X5C1Z>d6N4|KmVLzFES?5OUYRBq?XzA>g)3I6 zR}{OKGMS`)kTc%M%YdoCxM5@vV$oY5Ae0yYrnmW&jy*u Date: Tue, 12 Mar 2019 15:44:39 +0800 Subject: [PATCH 02/32] =?UTF-8?q?=E8=AF=B4=E6=98=8E=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...4\346\217\217\350\277\260\344\277\241\346\201\257.txt" | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 "\351\241\271\347\233\256\345\237\272\346\234\254\346\217\217\350\277\260\344\277\241\346\201\257.txt" diff --git "a/\351\241\271\347\233\256\345\237\272\346\234\254\346\217\217\350\277\260\344\277\241\346\201\257.txt" "b/\351\241\271\347\233\256\345\237\272\346\234\254\346\217\217\350\277\260\344\277\241\346\201\257.txt" new file mode 100644 index 00000000..6da2ea0c --- /dev/null +++ "b/\351\241\271\347\233\256\345\237\272\346\234\254\346\217\217\350\277\260\344\277\241\346\201\257.txt" @@ -0,0 +1,8 @@ +接口 +http://193.112.181.174:8080/wx/auth/login +https://193.112.181.174/wx/auth/login + +https://www.ylznai.com/wx/auth/login + +后台管理系统 +http://webadmin.ylznai.com/ \ No newline at end of file -- Gitee From 52bd241f71479b239bcc6f2b6a4105495bea630d Mon Sep 17 00:00:00 2001 From: lw Date: Wed, 13 Mar 2019 08:59:15 +0800 Subject: [PATCH 03/32] =?UTF-8?q?=E3=80=9020190313=E3=80=91=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E5=9B=BE=E7=89=87=E5=A4=84=E7=90=86=E5=B7=A5=E5=85=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../qrcode/BufferedImageLuminanceSource.java | 91 ++++++++ .../admin/util/qrcode/QRCodeUtil.java | 207 ++++++++++++++++++ 2 files changed, 298 insertions(+) create mode 100644 litemall-admin-api/src/main/java/org/linlinjava/litemall/admin/util/qrcode/BufferedImageLuminanceSource.java create mode 100644 litemall-admin-api/src/main/java/org/linlinjava/litemall/admin/util/qrcode/QRCodeUtil.java diff --git a/litemall-admin-api/src/main/java/org/linlinjava/litemall/admin/util/qrcode/BufferedImageLuminanceSource.java b/litemall-admin-api/src/main/java/org/linlinjava/litemall/admin/util/qrcode/BufferedImageLuminanceSource.java new file mode 100644 index 00000000..6eddf95a --- /dev/null +++ b/litemall-admin-api/src/main/java/org/linlinjava/litemall/admin/util/qrcode/BufferedImageLuminanceSource.java @@ -0,0 +1,91 @@ +package org.linlinjava.litemall.admin.util.qrcode; + +import com.google.zxing.LuminanceSource; + +import java.awt.*; +import java.awt.geom.AffineTransform; +import java.awt.image.BufferedImage; + +/** + * @author lw + * @className BufferedImageLuminanceSource + * @description TODO + * @create 2019-03-12 8:33 + */ +public class BufferedImageLuminanceSource extends LuminanceSource { + private final BufferedImage image; + private final int left; + private final int top; + + public BufferedImageLuminanceSource(BufferedImage image) { + this(image, 0, 0, image.getWidth(), image.getHeight()); + } + + public BufferedImageLuminanceSource(BufferedImage image, int left, int top, int width, int height) { + super(width, height); + + int sourceWidth = image.getWidth(); + int sourceHeight = image.getHeight(); + if (left + width > sourceWidth || top + height > sourceHeight) { + throw new IllegalArgumentException("Crop rectangle does not fit within image data."); + } + + for (int y = top; y < top + height; y++) { + for (int x = left; x < left + width; x++) { + if ((image.getRGB(x, y) & 0xFF000000) == 0) { + image.setRGB(x, y, 0xFFFFFFFF); // = white + } + } + } + + this.image = new BufferedImage(sourceWidth, sourceHeight, BufferedImage.TYPE_BYTE_GRAY); + this.image.getGraphics().drawImage(image, 0, 0, null); + this.left = left; + this.top = top; + } + + public byte[] getRow(int y, byte[] row) { + if (y < 0 || y >= getHeight()) { + throw new IllegalArgumentException("Requested row is outside the image: " + y); + } + int width = getWidth(); + if (row == null || row.length < width) { + row = new byte[width]; + } + image.getRaster().getDataElements(left, top + y, width, 1, row); + return row; + } + + public byte[] getMatrix() { + int width = getWidth(); + int height = getHeight(); + int area = width * height; + byte[] matrix = new byte[area]; + image.getRaster().getDataElements(left, top, width, height, matrix); + return matrix; + } + + public boolean isCropSupported() { + return true; + } + + public LuminanceSource crop(int left, int top, int width, int height) { + return new BufferedImageLuminanceSource(image, this.left + left, this.top + top, width, height); + } + + public boolean isRotateSupported() { + return true; + } + + public LuminanceSource rotateCounterClockwise() { + int sourceWidth = image.getWidth(); + int sourceHeight = image.getHeight(); + AffineTransform transform = new AffineTransform(0.0, -1.0, 1.0, 0.0, 0.0, sourceWidth); + BufferedImage rotatedImage = new BufferedImage(sourceHeight, sourceWidth, BufferedImage.TYPE_BYTE_GRAY); + Graphics2D g = rotatedImage.createGraphics(); + g.drawImage(image, transform, null); + g.dispose(); + int width = getWidth(); + return new BufferedImageLuminanceSource(rotatedImage, top, sourceWidth - (left + width), getHeight(), width); + } +} diff --git a/litemall-admin-api/src/main/java/org/linlinjava/litemall/admin/util/qrcode/QRCodeUtil.java b/litemall-admin-api/src/main/java/org/linlinjava/litemall/admin/util/qrcode/QRCodeUtil.java new file mode 100644 index 00000000..ad7a0c6a --- /dev/null +++ b/litemall-admin-api/src/main/java/org/linlinjava/litemall/admin/util/qrcode/QRCodeUtil.java @@ -0,0 +1,207 @@ +package org.linlinjava.litemall.admin.util.qrcode; + +import com.google.zxing.*; +import com.google.zxing.common.BitMatrix; +import com.google.zxing.common.HybridBinarizer; +import com.google.zxing.qrcode.decoder.ErrorCorrectionLevel; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.linlinjava.litemall.admin.service.AdminGoodsService; + +import javax.imageio.ImageIO; +import java.awt.*; +import java.awt.geom.RoundRectangle2D; +import java.awt.image.BufferedImage; +import java.io.File; +import java.io.OutputStream; +import java.util.Hashtable; + +/** + * @author lw + * @className QRCodeUtil + * @description 二维码生成工具 + * @create 2019-03-12 8:34 + */ +public class QRCodeUtil { + private static final Log logger = LogFactory.getLog(AdminGoodsService.class); + + // 编码格式 + private static final String CHARSET = "utf-8"; + // 生成文件类型 + private static final String FORMAT_NAME = "JPG"; + // 二维码尺寸【宽、高】 + private static final int QRCODE_SIZE = 300; + // LOGO宽度 + private static final int WIDTH = 60; + // LOGO高度 + private static final int HEIGHT = 60; + + // 二维码填充颜色【黑色】 + private static Integer COLOR_BLACK = 0XFF000000; + // 二维码填充颜色【白色 0xFF是补码】 + private static Integer COLOR_WHITE = 0XFFFFFFFF; + + //二维码空白边距的宽度 + private static Integer MARGIN = 1; + + private static BufferedImage createImage(String content, String imgPath, boolean needCompress) throws Exception { + Hashtable hints = new Hashtable(); + //设置二维码的纠错级别【M、A、P】 + hints.put(EncodeHintType.ERROR_CORRECTION, ErrorCorrectionLevel.H); + //设置二维码的字符编码 + hints.put(EncodeHintType.CHARACTER_SET, CHARSET); + //设置二维码空白边距的宽度【默认是4】 + hints.put(EncodeHintType.MARGIN, MARGIN); + + //1、生成二维码 + BitMatrix bitMatrix = new MultiFormatWriter().encode(content, BarcodeFormat.QR_CODE, QRCODE_SIZE, QRCODE_SIZE, + hints); + //2、获取二维码宽高 + int width = bitMatrix.getWidth(); + int height = bitMatrix.getHeight(); + + //3、将二维码放入缓冲流 + BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB); + + for (int x = 0; x < width; x++) { + for (int y = 0; y < height; y++) { + // 4、循环将二维码内容定入图片 + //判断 BitMatrix 是否存在像素 + image.setRGB(x, y, bitMatrix.get(x, y) ? COLOR_BLACK : COLOR_WHITE); + } + } + + //判断是否需要写入logo图片 + if (imgPath == null || "".equals(imgPath)) { + return image; + } + // 插入图片 + QRCodeUtil.insertImage(image, imgPath, needCompress); + + return image; + } + + private static void insertImage(BufferedImage source, String imgPath, boolean needCompress) throws Exception { + File file = new File(imgPath); + if (!file.exists()) { + logger.error(imgPath+" 该文件不存在!"); + return; + } + + Image src = ImageIO.read(new File(imgPath)); + int width = src.getWidth(null); + int height = src.getHeight(null); + + if (needCompress) { // 压缩LOGO + if (width > WIDTH) { + width = WIDTH; + } + if (height > HEIGHT) { + height = HEIGHT; + } + + Image image = src.getScaledInstance(width, height, Image.SCALE_SMOOTH); + BufferedImage tag = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB); + Graphics g = tag.getGraphics(); + g.drawImage(image, 0, 0, null); // 绘制缩小后的图 + g.dispose(); + src = image; + } + // 插入LOGO + Graphics2D graph = source.createGraphics(); + + //设定在图片中间 + int x = (QRCODE_SIZE - width) / 2; + int y = (QRCODE_SIZE - height) / 2; + + // 开始绘制图片 + graph.drawImage(src, x, y, width, height, null); + //边框宽度 + graph.setStroke(new BasicStroke(3f)); + //绘制圆角矩形 + Shape shape = new RoundRectangle2D.Float(x, y, width, width, 6, 6); + graph.draw(shape); + //释放图像资源 + graph.dispose(); + } + + public static void encode(String content, String imgPath, String destPath, boolean needCompress) throws Exception { + BufferedImage image = QRCodeUtil.createImage(content, imgPath, needCompress); + mkdirs(destPath); + // String file = new Random().nextInt(99999999)+".jpg"; + // ImageIO.write(image, FORMAT_NAME, new File(destPath+"/"+file)); + ImageIO.write(image, FORMAT_NAME, new File(destPath)); + } + + public static BufferedImage encode(String content, String imgPath, boolean needCompress) throws Exception { + BufferedImage image = QRCodeUtil.createImage(content, imgPath, needCompress); + return image; + } + + public static void mkdirs(String destPath) { + File file = new File(destPath); + // 当文件夹不存在时,mkdirs会自动创建多层目录,区别于mkdir.(mkdir如果父目录不存在则会抛出异常) + if (!file.exists() && !file.isDirectory()) { + file.mkdirs(); + } + } + + public static void encode(String content, String imgPath, String destPath) throws Exception { + QRCodeUtil.encode(content, imgPath, destPath, false); + } + // 被注释的方法 + /* + * public static void encode(String content, String destPath, boolean + * needCompress) throws Exception { QRCodeUtil.encode(content, null, destPath, + * needCompress); } + */ + + public static void encode(String content, String destPath) throws Exception { + QRCodeUtil.encode(content, null, destPath, false); + } + + public static void encode(String content, String imgPath, OutputStream output, boolean needCompress) + throws Exception { + BufferedImage image = QRCodeUtil.createImage(content, imgPath, needCompress); + ImageIO.write(image, FORMAT_NAME, output); + } + + public static void encode(String content, OutputStream output) throws Exception { + QRCodeUtil.encode(content, null, output, false); + } + + public static String decode(File file) throws Exception { + BufferedImage image; + image = ImageIO.read(file); + if (image == null) { + return null; + } + BufferedImageLuminanceSource source = new BufferedImageLuminanceSource(image); + BinaryBitmap bitmap = new BinaryBitmap(new HybridBinarizer(source)); + Result result; + Hashtable hints = new Hashtable(); + hints.put(DecodeHintType.CHARACTER_SET, CHARSET); + result = new MultiFormatReader().decode(bitmap, hints); + String resultStr = result.getText(); + return resultStr; + } + + public static String decode(String path) throws Exception { + return QRCodeUtil.decode(new File(path)); + } + + public static void main(String[] args) throws Exception { + // 存放在二维码中的内容 + String text = "http://www.baidu.com"; + // 嵌入二维码的图片路径 + String imgPath = "D:/csz.png"; + // 生成的二维码的路径及名称 + String destPath = "D:/jam3.jpg"; + //生成二维码 + QRCodeUtil.encode(text, imgPath, destPath, true); + // 解析二维码 + String str = QRCodeUtil.decode(destPath); + // 打印出解析出的内容 + System.out.println(str); + } +} -- Gitee From cf61cfc584231e43f7d7c49dbd890ee157570a42 Mon Sep 17 00:00:00 2001 From: cailu <627223423@qq.com> Date: Wed, 13 Mar 2019 14:19:06 +0800 Subject: [PATCH 04/32] =?UTF-8?q?=E4=B8=8D=E5=9C=A8=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E4=B8=AD=E5=8A=A0https=E6=94=AF=E6=8C=81=EF=BC=8C=E8=80=8C?= =?UTF-8?q?=E6=98=AF=E6=94=B9=E4=B8=BAnginx=E6=96=B9=E5=BC=8F=E6=94=AF?= =?UTF-8?q?=E6=8C=81https?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../org/linlinjava/litemall/Application.java | 17 ----------------- litemall-all/src/main/resources/application.yml | 10 +--------- 2 files changed, 1 insertion(+), 26 deletions(-) diff --git a/litemall-all/src/main/java/org/linlinjava/litemall/Application.java b/litemall-all/src/main/java/org/linlinjava/litemall/Application.java index 5d3db551..fe5ef3fd 100644 --- a/litemall-all/src/main/java/org/linlinjava/litemall/Application.java +++ b/litemall-all/src/main/java/org/linlinjava/litemall/Application.java @@ -1,13 +1,8 @@ package org.linlinjava.litemall; -import org.apache.catalina.connector.Connector; import org.mybatis.spring.annotation.MapperScan; -import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory; -import org.springframework.boot.web.servlet.server.ServletWebServerFactory; -import org.springframework.context.annotation.Bean; import org.springframework.scheduling.annotation.EnableScheduling; import org.springframework.transaction.annotation.EnableTransactionManagement; @@ -21,16 +16,4 @@ public class Application { SpringApplication.run(Application.class, args); } - @Value("${http.port}") - private Integer port; - - @Bean - public ServletWebServerFactory servletContainer() { - TomcatServletWebServerFactory tomcat = new TomcatServletWebServerFactory(); - Connector connector = new Connector("org.apache.coyote.http11.Http11NioProtocol"); - connector.setPort(port); - tomcat.addAdditionalTomcatConnectors(connector); // 添加http - return tomcat; - } - } \ No newline at end of file diff --git a/litemall-all/src/main/resources/application.yml b/litemall-all/src/main/resources/application.yml index c3f6f365..cbd57d79 100644 --- a/litemall-all/src/main/resources/application.yml +++ b/litemall-all/src/main/resources/application.yml @@ -4,16 +4,8 @@ spring: messages: encoding: UTF-8 -http: - port: 8080 - server: - port: 443 - ssl: - key-store: classpath:keystore.p12 - key-store-type: PKCS12 - key-alias: tomcat - key-store-password: 123456 + port: 8080 logging: level: -- Gitee From 88c7b3b26b9eae26e2c4840ae32b1fb593df34e9 Mon Sep 17 00:00:00 2001 From: cailu <627223423@qq.com> Date: Wed, 13 Mar 2019 21:23:16 +0800 Subject: [PATCH 05/32] =?UTF-8?q?=E5=92=8C=E5=B0=8F=E7=A8=8B=E5=BA=8F?= =?UTF-8?q?=E8=A6=81=E4=BF=9D=E6=8C=81=E4=B8=80=E8=87=B4=E7=9A=84=E9=85=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- litemall-core/src/main/resources/application-core.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/litemall-core/src/main/resources/application-core.yml b/litemall-core/src/main/resources/application-core.yml index 9240ce12..8298961a 100644 --- a/litemall-core/src/main/resources/application-core.yml +++ b/litemall-core/src/main/resources/application-core.yml @@ -1,8 +1,8 @@ litemall: # 开发者应该设置成自己的wx相关信息 wx: - app-id: wxa5b486c6b918ecfb - app-secret: e04004829d4c383b4db7769d88dfbca1 + app-id: wx1983a2e14e5d5e78 + app-secret: 893a5469079408304c4715a079cb8ef5 mch-id: 111111 mch-key: xxxxxx notify-url: http://www.example.com/wx/order/pay-notify -- Gitee From 4f211af7df8c4bb0c80b28c8f315de582860babd Mon Sep 17 00:00:00 2001 From: victory Date: Thu, 14 Mar 2019 00:51:11 +0800 Subject: [PATCH 06/32] =?UTF-8?q?[20190314]=E6=96=B0=E5=A2=9Elogback?= =?UTF-8?q?=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- litemall-all/src/main/resources/logback.xml | 87 +++++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 litemall-all/src/main/resources/logback.xml diff --git a/litemall-all/src/main/resources/logback.xml b/litemall-all/src/main/resources/logback.xml new file mode 100644 index 00000000..51eb1761 --- /dev/null +++ b/litemall-all/src/main/resources/logback.xml @@ -0,0 +1,87 @@ + + + + + + + + + + ${LOG_PATH}/error.log + + + + ${LOG_PATH}/error-%d{yyyy-MM-dd}.%i.log + + + + 10MB + + + + true + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg %n + utf-8 + + + + error + ACCEPT + DENY + + + + + ${LOG_PATH}/info.log + + ${LOG_PATH}/info-%d{yyyy-MM-dd}.%i.log + + + 10MB + + + true + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg %n + utf-8 + + + + INFO + + + + + + + + + + -- Gitee From dffa2e69d4582462a53a31796a87ba3567614bf4 Mon Sep 17 00:00:00 2001 From: victory Date: Thu, 14 Mar 2019 09:22:14 +0800 Subject: [PATCH 07/32] =?UTF-8?q?[20190314]=E4=BF=AE=E6=94=B9logback?= =?UTF-8?q?=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- litemall-all/src/main/resources/logback.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/litemall-all/src/main/resources/logback.xml b/litemall-all/src/main/resources/logback.xml index 51eb1761..20861106 100644 --- a/litemall-all/src/main/resources/logback.xml +++ b/litemall-all/src/main/resources/logback.xml @@ -3,7 +3,7 @@ - + -- Gitee From 9d0048dc3765a6b08587b5e41dbb8c4e6564a3b0 Mon Sep 17 00:00:00 2001 From: r111 <1111> Date: Thu, 14 Mar 2019 22:33:15 +0800 Subject: [PATCH 08/32] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=BA=93=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- litemall-all/src/main/resources/logback.xml | 2 +- litemall-db/src/main/resources/application-db.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/litemall-all/src/main/resources/logback.xml b/litemall-all/src/main/resources/logback.xml index 20861106..e5abee19 100644 --- a/litemall-all/src/main/resources/logback.xml +++ b/litemall-all/src/main/resources/logback.xml @@ -3,7 +3,7 @@ - + diff --git a/litemall-db/src/main/resources/application-db.yml b/litemall-db/src/main/resources/application-db.yml index ef526211..6c3120c6 100644 --- a/litemall-db/src/main/resources/application-db.yml +++ b/litemall-db/src/main/resources/application-db.yml @@ -7,7 +7,7 @@ pagehelper: spring: datasource: druid: - url: jdbc:mysql://localhost:3306/litemall?useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC&allowPublicKeyRetrieval=true&verifyServerCertificate=false&useSSL=false + url: jdbc:mysql://193.112.181.174:3306/litemall?useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC&allowPublicKeyRetrieval=true&verifyServerCertificate=false&useSSL=false driver-class-name: com.mysql.jdbc.Driver username: litemall password: litemall123456 -- Gitee From 33d8ef01f6f9da627feb5ef0f48eda74a65f3c57 Mon Sep 17 00:00:00 2001 From: victory Date: Sat, 16 Mar 2019 19:14:39 +0800 Subject: [PATCH 09/32] =?UTF-8?q?[20190316]=E5=9F=BA=E4=BA=8E=E9=A3=8E?= =?UTF-8?q?=E6=8E=A7=E8=80=83=E8=99=91=EF=BC=8C=E8=B4=AD=E7=89=A9=E8=BD=A6?= =?UTF-8?q?=E4=B8=AD=E5=95=86=E5=93=81=E4=BB=B7=E6=A0=BC=E3=80=81=E5=90=8D?= =?UTF-8?q?=E7=A7=B0=E3=80=81=E5=9B=BE=E7=89=87=E9=87=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../db/dao/LitemallGoodsProductMapper.java | 15 +++++ .../db/domain/LitemallGoodsProductUnion.java | 57 +++++++++++++++++++ .../service/LitemallGoodsProductService.java | 9 +++ .../src/main/resources/application-db.yml | 1 + .../db/dao/LitemallGoodsProductMapper.xml | 40 +++++++++++++ .../litemall/wx/web/WxCartController.java | 32 +++++++++++ 6 files changed, 154 insertions(+) create mode 100644 litemall-db/src/main/java/org/linlinjava/litemall/db/domain/LitemallGoodsProductUnion.java diff --git a/litemall-db/src/main/java/org/linlinjava/litemall/db/dao/LitemallGoodsProductMapper.java b/litemall-db/src/main/java/org/linlinjava/litemall/db/dao/LitemallGoodsProductMapper.java index e05616d8..5e0708f0 100644 --- a/litemall-db/src/main/java/org/linlinjava/litemall/db/dao/LitemallGoodsProductMapper.java +++ b/litemall-db/src/main/java/org/linlinjava/litemall/db/dao/LitemallGoodsProductMapper.java @@ -4,6 +4,7 @@ import java.util.List; import org.apache.ibatis.annotations.Param; import org.linlinjava.litemall.db.domain.LitemallGoodsProduct; import org.linlinjava.litemall.db.domain.LitemallGoodsProductExample; +import org.linlinjava.litemall.db.domain.LitemallGoodsProductUnion; public interface LitemallGoodsProductMapper { /** @@ -98,6 +99,20 @@ public interface LitemallGoodsProductMapper { */ LitemallGoodsProduct selectByPrimaryKey(Integer id); + /** + * 根据主键ID集合获取GoodsProduct集合 + * @param ids + * @return + */ + List selectByPrimaryKeyList(List ids); + + /** + * 根据主键ID集合获取LitemallGoodsProductUnion集合 + * @param ids + * @return + */ + List selectGoodsProductUnionByPrimaryKeyList(List ids); + /** * This method was generated by MyBatis Generator. * This method corresponds to the database table litemall_goods_product diff --git a/litemall-db/src/main/java/org/linlinjava/litemall/db/domain/LitemallGoodsProductUnion.java b/litemall-db/src/main/java/org/linlinjava/litemall/db/domain/LitemallGoodsProductUnion.java new file mode 100644 index 00000000..10c285e8 --- /dev/null +++ b/litemall-db/src/main/java/org/linlinjava/litemall/db/domain/LitemallGoodsProductUnion.java @@ -0,0 +1,57 @@ +package org.linlinjava.litemall.db.domain; + +import java.math.BigDecimal; +import java.time.LocalDateTime; +import java.util.ArrayList; +import java.util.Arrays; + +public class LitemallGoodsProductUnion { + /** + * 货品ID + */ + private Integer id; + /** + * 货品价格 + */ + private BigDecimal price; + /** + * 商品名称 + */ + private String name; + /** + * 商品图片 + */ + private String picUrl; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public BigDecimal getPrice() { + return price; + } + + public void setPrice(BigDecimal price) { + this.price = price; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getPicUrl() { + return picUrl; + } + + public void setPicUrl(String picUrl) { + this.picUrl = picUrl; + } +} \ No newline at end of file diff --git a/litemall-db/src/main/java/org/linlinjava/litemall/db/service/LitemallGoodsProductService.java b/litemall-db/src/main/java/org/linlinjava/litemall/db/service/LitemallGoodsProductService.java index 6d061b8a..bbb9f03a 100644 --- a/litemall-db/src/main/java/org/linlinjava/litemall/db/service/LitemallGoodsProductService.java +++ b/litemall-db/src/main/java/org/linlinjava/litemall/db/service/LitemallGoodsProductService.java @@ -5,6 +5,7 @@ import org.linlinjava.litemall.db.dao.GoodsProductMapper; import org.linlinjava.litemall.db.dao.LitemallGoodsProductMapper; import org.linlinjava.litemall.db.domain.LitemallGoodsProduct; import org.linlinjava.litemall.db.domain.LitemallGoodsProductExample; +import org.linlinjava.litemall.db.domain.LitemallGoodsProductUnion; import org.springframework.stereotype.Service; import javax.annotation.Resource; @@ -28,6 +29,14 @@ public class LitemallGoodsProductService { return litemallGoodsProductMapper.selectByPrimaryKey(id); } + public List findListByIds(List ids) { + return litemallGoodsProductMapper.selectByPrimaryKeyList(ids); + } + + public List findGoodsProductUnionListByIds(List ids) { + return litemallGoodsProductMapper.selectGoodsProductUnionByPrimaryKeyList(ids); + } + public void deleteById(Integer id) { litemallGoodsProductMapper.logicalDeleteByPrimaryKey(id); } diff --git a/litemall-db/src/main/resources/application-db.yml b/litemall-db/src/main/resources/application-db.yml index 6c3120c6..f22ecd75 100644 --- a/litemall-db/src/main/resources/application-db.yml +++ b/litemall-db/src/main/resources/application-db.yml @@ -7,6 +7,7 @@ pagehelper: spring: datasource: druid: +# url: jdbc:mysql://localhost:3306/litemall?useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC&allowPublicKeyRetrieval=true&verifyServerCertificate=false&useSSL=false url: jdbc:mysql://193.112.181.174:3306/litemall?useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC&allowPublicKeyRetrieval=true&verifyServerCertificate=false&useSSL=false driver-class-name: com.mysql.jdbc.Driver username: litemall diff --git a/litemall-db/src/main/resources/org/linlinjava/litemall/db/dao/LitemallGoodsProductMapper.xml b/litemall-db/src/main/resources/org/linlinjava/litemall/db/dao/LitemallGoodsProductMapper.xml index 3fd5a5e6..ebdf11b8 100644 --- a/litemall-db/src/main/resources/org/linlinjava/litemall/db/dao/LitemallGoodsProductMapper.xml +++ b/litemall-db/src/main/resources/org/linlinjava/litemall/db/dao/LitemallGoodsProductMapper.xml @@ -16,6 +16,18 @@ + + + + + + + + + id, goods_sn, `name`, category_id, brand_id, gallery, keywords, brief, is_on_sale, - sort_order, pic_url, share_url, is_new, is_hot, unit, counter_price, retail_price, + sort_order, pic_url, share_url, is_goods, is_online, unit, counter_price, retail_price, add_time, update_time, deleted @@ -210,7 +210,7 @@ id, goods_sn, `name`, category_id, brand_id, gallery, keywords, brief, is_on_sale, - sort_order, pic_url, share_url, is_new, is_hot, unit, counter_price, retail_price, + sort_order, pic_url, share_url, is_goods, is_online, unit, counter_price, retail_price, add_time, update_time, deleted, detail @@ -275,7 +275,7 @@ id, goods_sn, `name`, category_id, brand_id, gallery, keywords, brief, is_on_sale, - sort_order, pic_url, share_url, is_new, is_hot, unit, counter_price, retail_price, + sort_order, pic_url, share_url, is_goods, is_online, unit, counter_price, retail_price, add_time, update_time, deleted, detail @@ -312,14 +312,14 @@ brand_id, gallery, keywords, brief, is_on_sale, sort_order, pic_url, share_url, - is_new, is_hot, unit, counter_price, + is_goods, is_online, unit, counter_price, retail_price, add_time, update_time, deleted, detail) values (#{goodsSn,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{categoryId,jdbcType=INTEGER}, #{brandId,jdbcType=INTEGER}, #{gallery,jdbcType=VARCHAR,typeHandler=org.linlinjava.litemall.db.mybatis.JsonStringArrayTypeHandler}, #{keywords,jdbcType=VARCHAR}, #{brief,jdbcType=VARCHAR}, #{isOnSale,jdbcType=BIT}, #{sortOrder,jdbcType=SMALLINT}, #{picUrl,jdbcType=VARCHAR}, #{shareUrl,jdbcType=VARCHAR}, - #{isNew,jdbcType=BIT}, #{isHot,jdbcType=BIT}, #{unit,jdbcType=VARCHAR}, #{counterPrice,jdbcType=DECIMAL}, + #{isGoods,jdbcType=BIT}, #{isOnline,jdbcType=BIT}, #{unit,jdbcType=VARCHAR}, #{counterPrice,jdbcType=DECIMAL}, #{retailPrice,jdbcType=DECIMAL}, #{addTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{deleted,jdbcType=BIT}, #{detail,jdbcType=LONGVARCHAR}) @@ -366,11 +366,11 @@ share_url, - - is_new, + + is_goods, - - is_hot, + + is_online, unit, @@ -428,11 +428,11 @@ #{shareUrl,jdbcType=VARCHAR}, - - #{isNew,jdbcType=BIT}, + + #{isGoods,jdbcType=BIT}, - - #{isHot,jdbcType=BIT}, + + #{isOnline,jdbcType=BIT}, #{unit,jdbcType=VARCHAR}, @@ -510,11 +510,11 @@ share_url = #{record.shareUrl,jdbcType=VARCHAR}, - - is_new = #{record.isNew,jdbcType=BIT}, + + is_goods = #{record.isGoods,jdbcType=BIT}, - - is_hot = #{record.isHot,jdbcType=BIT}, + + is_online = #{record.isOnline,jdbcType=BIT}, unit = #{record.unit,jdbcType=VARCHAR}, @@ -560,8 +560,8 @@ sort_order = #{record.sortOrder,jdbcType=SMALLINT}, pic_url = #{record.picUrl,jdbcType=VARCHAR}, share_url = #{record.shareUrl,jdbcType=VARCHAR}, - is_new = #{record.isNew,jdbcType=BIT}, - is_hot = #{record.isHot,jdbcType=BIT}, + is_goods = #{record.isGoods,jdbcType=BIT}, + is_online = #{record.isOnline,jdbcType=BIT}, unit = #{record.unit,jdbcType=VARCHAR}, counter_price = #{record.counterPrice,jdbcType=DECIMAL}, retail_price = #{record.retailPrice,jdbcType=DECIMAL}, @@ -591,8 +591,8 @@ sort_order = #{record.sortOrder,jdbcType=SMALLINT}, pic_url = #{record.picUrl,jdbcType=VARCHAR}, share_url = #{record.shareUrl,jdbcType=VARCHAR}, - is_new = #{record.isNew,jdbcType=BIT}, - is_hot = #{record.isHot,jdbcType=BIT}, + is_goods = #{record.isGoods,jdbcType=BIT}, + is_online = #{record.isOnline,jdbcType=BIT}, unit = #{record.unit,jdbcType=VARCHAR}, counter_price = #{record.counterPrice,jdbcType=DECIMAL}, retail_price = #{record.retailPrice,jdbcType=DECIMAL}, @@ -643,11 +643,11 @@ share_url = #{shareUrl,jdbcType=VARCHAR}, - - is_new = #{isNew,jdbcType=BIT}, + + is_goods = #{isGoods,jdbcType=BIT}, - - is_hot = #{isHot,jdbcType=BIT}, + + is_online = #{isOnline,jdbcType=BIT}, unit = #{unit,jdbcType=VARCHAR}, @@ -690,8 +690,8 @@ sort_order = #{sortOrder,jdbcType=SMALLINT}, pic_url = #{picUrl,jdbcType=VARCHAR}, share_url = #{shareUrl,jdbcType=VARCHAR}, - is_new = #{isNew,jdbcType=BIT}, - is_hot = #{isHot,jdbcType=BIT}, + is_goods = #{isGoods,jdbcType=BIT}, + is_online = #{isOnline,jdbcType=BIT}, unit = #{unit,jdbcType=VARCHAR}, counter_price = #{counterPrice,jdbcType=DECIMAL}, retail_price = #{retailPrice,jdbcType=DECIMAL}, @@ -718,8 +718,8 @@ sort_order = #{sortOrder,jdbcType=SMALLINT}, pic_url = #{picUrl,jdbcType=VARCHAR}, share_url = #{shareUrl,jdbcType=VARCHAR}, - is_new = #{isNew,jdbcType=BIT}, - is_hot = #{isHot,jdbcType=BIT}, + is_goods = #{isGoods,jdbcType=BIT}, + is_online = #{isOnline,jdbcType=BIT}, unit = #{unit,jdbcType=VARCHAR}, counter_price = #{counterPrice,jdbcType=DECIMAL}, retail_price = #{retailPrice,jdbcType=DECIMAL}, @@ -779,7 +779,7 @@ id, goods_sn, `name`, category_id, brand_id, gallery, keywords, brief, is_on_sale, - sort_order, pic_url, share_url, is_new, is_hot, unit, counter_price, retail_price, + sort_order, pic_url, share_url, is_goods, is_online, unit, counter_price, retail_price, add_time, update_time, deleted, detail diff --git a/litemall-db/src/main/resources/org/linlinjava/litemall/db/dao/LitemallGoodsProductMapper.xml b/litemall-db/src/main/resources/org/linlinjava/litemall/db/dao/LitemallGoodsProductMapper.xml index ebdf11b8..5387a91a 100644 --- a/litemall-db/src/main/resources/org/linlinjava/litemall/db/dao/LitemallGoodsProductMapper.xml +++ b/litemall-db/src/main/resources/org/linlinjava/litemall/db/dao/LitemallGoodsProductMapper.xml @@ -548,4 +548,58 @@ update litemall_goods_product set deleted = 1 where id = #{id,jdbcType=INTEGER} + + + + + + + + \ No newline at end of file diff --git a/litemall-db/src/main/resources/org/linlinjava/litemall/db/dao/LitemallOrderMapper.xml b/litemall-db/src/main/resources/org/linlinjava/litemall/db/dao/LitemallOrderMapper.xml index fb059b9a..7e79d023 100644 --- a/litemall-db/src/main/resources/org/linlinjava/litemall/db/dao/LitemallOrderMapper.xml +++ b/litemall-db/src/main/resources/org/linlinjava/litemall/db/dao/LitemallOrderMapper.xml @@ -32,6 +32,8 @@ + + select - + ${column.escapedColumnName} @@ -380,7 +380,7 @@ --> select - + ${column.escapedColumnName} diff --git a/litemall-wx-api/src/main/java/org/linlinjava/litemall/wx/web/WxGoodsController.java b/litemall-wx-api/src/main/java/org/linlinjava/litemall/wx/web/WxGoodsController.java index 7ea96008..2ca8633b 100644 --- a/litemall-wx-api/src/main/java/org/linlinjava/litemall/wx/web/WxGoodsController.java +++ b/litemall-wx-api/src/main/java/org/linlinjava/litemall/wx/web/WxGoodsController.java @@ -1,6 +1,5 @@ package org.linlinjava.litemall.wx.web; -import com.github.pagehelper.Page; import com.github.pagehelper.PageInfo; import com.mysql.jdbc.StringUtils; import org.apache.commons.logging.Log; @@ -233,8 +232,8 @@ public class WxGoodsController { * @param categoryId 分类类目ID,可选 * @param brandId 品牌商ID,可选 * @param keyword 关键字,可选 - * @param isNew 是否新品,可选 - * @param isHot 是否热买,可选 + * @param isGoods 是否商品,可选 + * @param isOnline 是否在线商品,可选 * @param userId 用户ID * @param page 分页页数 * @param size 分页大小 @@ -247,8 +246,8 @@ public class WxGoodsController { Integer categoryId, Integer brandId, String keyword, - Boolean isNew, - Boolean isHot, + Boolean isGoods, + Boolean isOnline, @LoginUser Integer userId, @RequestParam(defaultValue = "1") Integer page, @RequestParam(defaultValue = "10") Integer size, @@ -265,10 +264,10 @@ public class WxGoodsController { } //查询列表数据 - List goodsList = goodsService.querySelective(categoryId, brandId, keyword, isHot, isNew, page, size, sort, order); + List goodsList = goodsService.querySelective(categoryId, brandId, keyword, isOnline, isGoods, page, size, sort, order); // 查询商品所属类目列表。 - List goodsCatIds = goodsService.getCatIds(brandId, keyword, isHot, isNew); + List goodsCatIds = goodsService.getCatIds(brandId, keyword, isOnline, isGoods); List categoryList = null; if (goodsCatIds.size() != 0) { categoryList = categoryService.queryL2ByIds(goodsCatIds); diff --git a/litemall-wx-api/src/main/java/org/linlinjava/litemall/wx/web/WxHomeController.java b/litemall-wx-api/src/main/java/org/linlinjava/litemall/wx/web/WxHomeController.java index 3d2941ca..01aaca3d 100644 --- a/litemall-wx-api/src/main/java/org/linlinjava/litemall/wx/web/WxHomeController.java +++ b/litemall-wx-api/src/main/java/org/linlinjava/litemall/wx/web/WxHomeController.java @@ -96,9 +96,9 @@ public class WxHomeController { } - Callable newGoodsListCallable = () -> goodsService.queryByNew(0, SystemConfig.getNewLimit()); + Callable goodsListCallable = () -> goodsService.queryByGoods(0, SystemConfig.getNewLimit()); - Callable hotGoodsListCallable = () -> goodsService.queryByHot(0, SystemConfig.getHotLimit()); + Callable onlineGoodsListCallable = () -> goodsService.queryByOnline(0, SystemConfig.getHotLimit()); Callable brandListCallable = () -> brandService.queryVO(0, SystemConfig.getBrandLimit()); @@ -112,8 +112,8 @@ public class WxHomeController { FutureTask bannerTask = new FutureTask<>(bannerListCallable); FutureTask channelTask = new FutureTask<>(channelListCallable); FutureTask couponListTask = new FutureTask<>(couponListCallable); - FutureTask newGoodsListTask = new FutureTask<>(newGoodsListCallable); - FutureTask hotGoodsListTask = new FutureTask<>(hotGoodsListCallable); + FutureTask goodsListTask = new FutureTask<>(goodsListCallable); + FutureTask onlineGoodsListTask = new FutureTask<>(onlineGoodsListCallable); FutureTask brandListTask = new FutureTask<>(brandListCallable); FutureTask topicListTask = new FutureTask<>(topicListCallable); FutureTask grouponListTask = new FutureTask<>(grouponListCallable); @@ -122,8 +122,8 @@ public class WxHomeController { executorService.submit(bannerTask); executorService.submit(channelTask); executorService.submit(couponListTask); - executorService.submit(newGoodsListTask); - executorService.submit(hotGoodsListTask); + executorService.submit(goodsListTask); + executorService.submit(onlineGoodsListTask); executorService.submit(brandListTask); executorService.submit(topicListTask); executorService.submit(grouponListTask); @@ -133,8 +133,8 @@ public class WxHomeController { data.put("banner", bannerTask.get()); data.put("channel", channelTask.get()); data.put("couponList", couponListTask.get()); - data.put("newGoodsList", newGoodsListTask.get()); - data.put("hotGoodsList", hotGoodsListTask.get()); + data.put("goodsList", goodsListTask.get()); + data.put("onlineGoodsList", onlineGoodsListTask.get()); data.put("brandList", brandListTask.get()); data.put("topicList", topicListTask.get()); data.put("grouponList", grouponListTask.get()); -- Gitee From de4da87bfddd9d032b4d44bedf3ef887dfdc2b18 Mon Sep 17 00:00:00 2001 From: cailu <627223423@qq.com> Date: Sun, 17 Mar 2019 11:43:33 +0800 Subject: [PATCH 14/32] =?UTF-8?q?=E5=AD=97=E6=AE=B5=E5=8F=98=E6=9B=B4?= =?UTF-8?q?=EF=BC=8C=E5=89=8D=E7=AB=AF=E9=A1=B5=E9=9D=A2=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=E9=9C=80=E8=A6=81=E5=90=8C=E6=AD=A5=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../db/dao/LitemallGoodsProductMapper.xml | 54 ------------------- 1 file changed, 54 deletions(-) diff --git a/litemall-db/src/main/resources/org/linlinjava/litemall/db/dao/LitemallGoodsProductMapper.xml b/litemall-db/src/main/resources/org/linlinjava/litemall/db/dao/LitemallGoodsProductMapper.xml index 5387a91a..a2fbf6fb 100644 --- a/litemall-db/src/main/resources/org/linlinjava/litemall/db/dao/LitemallGoodsProductMapper.xml +++ b/litemall-db/src/main/resources/org/linlinjava/litemall/db/dao/LitemallGoodsProductMapper.xml @@ -197,33 +197,6 @@ where id = #{id,jdbcType=INTEGER} - - - -