Merge remote-tracking branch 'origin/zcc'
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
package com.peanut.common.utils;
|
||||
|
||||
import com.sun.mail.util.MailSSLSocketFactory;
|
||||
|
||||
import javax.mail.Authenticator;
|
||||
import javax.mail.Session;
|
||||
import javax.mail.Transport;
|
||||
@@ -17,9 +19,16 @@ public class MailUtil {
|
||||
//smtp服务器
|
||||
Properties pros=new Properties();
|
||||
pros.put("mail.smtp.host", "smtp.163.com");//主机名
|
||||
pros.put("mail.smtp.port", "25");//主机端口号
|
||||
pros.put("mail.smtp.port", "465");//主机端口号
|
||||
pros.put("mail.smtp.auth", "true");//是否需要用户认证
|
||||
pros.put("mail.smtp.starttls.enable", "true");//启用TLS加密
|
||||
// SSL加密
|
||||
MailSSLSocketFactory sf = null;
|
||||
sf = new MailSSLSocketFactory();
|
||||
// 设置信任所有的主机 - 解决Linux无法发送邮箱的问题
|
||||
sf.setTrustAllHosts(true);
|
||||
pros.put("mail.smtp.ssl.enable", "true");
|
||||
pros.put("mail.smtp.ssl.socketFactory", sf);
|
||||
//创建会话
|
||||
Session session=Session.getInstance(pros,new Authenticator(){
|
||||
@Override
|
||||
|
||||
@@ -110,6 +110,7 @@ public class ShopProductLabelController {
|
||||
shopProductEntityMPJLambdaWrapper.eq(ShopProductToLabelEntity::getSplId,splId);
|
||||
shopProductEntityMPJLambdaWrapper.eq(ShopProductToLabelEntity::getDelFlag,0);
|
||||
shopProductEntityMPJLambdaWrapper.eq(ShopProduct::getDelFlag,0);
|
||||
shopProductEntityMPJLambdaWrapper.gt(ShopProduct::getProductStock,0);
|
||||
Page<ShopProduct> shopProductEntityPage = shopProductToLabelDao.selectJoinPage(new Page<ShopProduct>(page, limit), ShopProduct.class, shopProductEntityMPJLambdaWrapper);
|
||||
|
||||
return R.ok().put("page",shopProductEntityPage);
|
||||
|
||||
@@ -60,7 +60,9 @@ public class ShopProductServiceImpl extends ServiceImpl<ShopProductDao, ShopProd
|
||||
Object name = params.get("name");
|
||||
IPage<ShopProduct> page = this.page(
|
||||
new Query<ShopProduct>().getPage(params),
|
||||
new ExcludeEmptyQueryWrapper<ShopProduct>().like("product_name", params.get("key"))
|
||||
new ExcludeEmptyQueryWrapper<ShopProduct>()
|
||||
.gt("product_stock",0)
|
||||
.like("product_name", params.get("key"))
|
||||
);
|
||||
return new PageUtils(page);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user