一些修改

This commit is contained in:
mactj 2021-01-21 11:29:21 +08:00
parent 3f74f12301
commit db6d973592
8 changed files with 50 additions and 11 deletions

View File

@ -3,7 +3,7 @@
imageName="mall" imageName="mall"
echo "==========打包=========" echo "==========打包========="
mvn clean package -Dmaven.test.skip=true mvn clean package -P prod -Dmaven.test.skip=true
echo "==========上传服务器=========" echo "==========上传服务器========="
scp ruoyi-admin/target/ruoyi-admin.jar root@192.144.217.65:/root/mall/ scp ruoyi-admin/target/ruoyi-admin.jar root@192.144.217.65:/root/mall/
scp Dockerfile root@192.144.217.65:/root/mall/ scp Dockerfile root@192.144.217.65:/root/mall/

View File

@ -117,6 +117,11 @@ public class AppOrderController extends BaseController {
lqw.eq(AppOrder::getCancelTime, appOrder.getCancelTime()); lqw.eq(AppOrder::getCancelTime, appOrder.getCancelTime());
} }
lqw.orderByDesc(AppOrder::getCreateTime); lqw.orderByDesc(AppOrder::getCreateTime);
if (isMiniUser()) {
lqw.eq(AppOrder::getUserId, getLoginUser().getUser().getUserId());
}
List<AppOrder> list = iAppOrderService.list(lqw); List<AppOrder> list = iAppOrderService.list(lqw);
for (AppOrder order : list) { for (AppOrder order : list) {
LambdaQueryWrapper<AppOrderDetail> wrapper = new LambdaQueryWrapper<AppOrderDetail>(); LambdaQueryWrapper<AppOrderDetail> wrapper = new LambdaQueryWrapper<AppOrderDetail>();

View File

@ -4,9 +4,9 @@
* *
*/ */
export const baseUrl = 'http://36.1.50.18:18989/' // export const baseUrl = 'http://36.1.50.18:18989/'
// export const baseUrl = 'http://127.0.0.1:18989/' // export const baseUrl = 'http://127.0.0.1:18989/'
// export const baseUrl = 'https://mall.xiao4r.com/api/' export const baseUrl = 'https://mall.xiao4r.com/api/'
export const imgbaseUrl = 'https://www.xiao4r.com/xiao4rstatic/img/winery/' export const imgbaseUrl = 'https://www.xiao4r.com/xiao4rstatic/img/winery/'

View File

@ -180,7 +180,7 @@ module.exports.parseImage = parseImage;
<div v-for="(item, index) in records" style="margin: 22px 2px 0px 2px; "> <div v-for="(item, index) in records" style="margin: 22px 2px 0px 2px; ">
<div v-if="item.type" style="display: flex; align-items: center;margin-bottom: 5px;"> <div v-if="item.type !== 0" style="display: flex; align-items: center;margin-bottom: 5px;">
<van-image :src="imageDefine.HOME_WINE_LAB" height="16px" width="5px" /> <van-image :src="imageDefine.HOME_WINE_LAB" height="16px" width="5px" />
<span style="margin:0px 5px;font-weight: bold;"> {{item.type === 1 ? '每日精选' : '热门活动'}}</span> <span style="margin:0px 5px;font-weight: bold;"> {{item.type === 1 ? '每日精选' : '热门活动'}}</span>
</div> </div>

View File

@ -33,9 +33,10 @@ module.exports.parseImage = parseImage;
</block> </block>
</swiper> </swiper>
<div style="padding: 10px;display:flex;flex-direction: column;">
<van-cell :title="goodsItems.goodsName" value="特价" label="goodsItems.goodsAlias" <span style="color: #333; font-size: 16px;font-weight: bold;">{{goodsItem.goodsName}}</span>
border="{{ false }}" /> <span style="color: #999; font-size: 14px;margin-top: 3px;">{{goodsItem.goodsAlias}}</span>
</div>
<van-cell title="立即下单" is-link @tap="onShowSpec" /> <van-cell title="立即下单" is-link @tap="onShowSpec" />
<div style="margin: 10px 15px;"> <div style="margin: 10px 15px;">

View File

@ -58,13 +58,14 @@ spring:
# redis 配置 # redis 配置
redis: redis:
# 地址 # 地址
host: 175.24.17.162 host: 172.21.0.15
# 端口默认为6379 # 端口默认为6379
port: 6379 port: 6379
# 密码 # 密码
password: 26616494 password: Hopesoft
# 连接超时时间 # 连接超时时间
timeout: 10s timeout: 10s
database: 5
lettuce: lettuce:
pool: pool:
# 连接池中的最小空闲连接 # 连接池中的最小空闲连接

View File

@ -1,5 +1,6 @@
package com.ruoyi.common.utils; package com.ruoyi.common.utils;
import cn.hutool.core.util.StrUtil;
import org.springframework.security.core.Authentication; import org.springframework.security.core.Authentication;
import org.springframework.security.core.context.SecurityContextHolder; import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
@ -96,4 +97,33 @@ public class SecurityUtils {
throw new CustomException("获取用户部门信息异常", HttpStatus.UNAUTHORIZED); throw new CustomException("获取用户部门信息异常", HttpStatus.UNAUTHORIZED);
} }
} }
/**
* 如果是小程序用户
**/
public static Boolean isMiniUser() {
try {
return getLoginUser().getUsername().contains("mini-");
} catch (Exception e) {
throw new CustomException("获取用户来源异常", HttpStatus.UNAUTHORIZED);
}
}
/**
* 获取小程序openId
**/
public static String getMiniOpenId() {
try {
if (isMiniUser()) {
return getLoginUser().getUsername().split("-")[1];
} else {
return StrUtil.EMPTY;
}
} catch (Exception e) {
throw new CustomException("获取用户来源异常", HttpStatus.UNAUTHORIZED);
}
}
} }

View File

@ -129,10 +129,12 @@
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column label="订单ID" align="center" prop="id" v-if="false"/> <el-table-column label="订单ID" align="center" prop="id" v-if="false"/>
<el-table-column label="用户ID" align="center" prop="userId" /> <el-table-column label="用户ID" align="center" prop="userId" />
<el-table-column label="收货人" align="center" prop="postUser" />
<el-table-column label="收货电话" align="center" prop="postMobile" />
<el-table-column label="收货人省市区" align="center" prop="postRegion" /> <el-table-column label="收货人省市区" align="center" prop="postRegion" />
<el-table-column label="收货人地址" align="center" prop="postAddress" /> <el-table-column label="收货人地址" align="center" prop="postAddress" />
<el-table-column label="收货电话" align="center" prop="postMobile" />
<el-table-column label="收货人" align="center" prop="postName" />
<el-table-column label="总金额" align="center" prop="totalFee" /> <el-table-column label="总金额" align="center" prop="totalFee" />
<el-table-column label="运单号" align="center" prop="transportNo" /> <el-table-column label="运单号" align="center" prop="transportNo" />
<el-table-column label="订单状态" align="center" prop="status" /> <el-table-column label="订单状态" align="center" prop="status" />