fix: 调整充值限额并规范日志目录
This commit is contained in:
@@ -25,11 +25,14 @@ FROM --platform=$TARGETPLATFORM eclipse-temurin:11-jre AS runtime
|
||||
RUN groupadd -g 1001 appgroup && useradd -u 1001 -g appgroup -m -s /usr/sbin/nologin appuser
|
||||
WORKDIR /app
|
||||
|
||||
RUN mkdir -p /app/log
|
||||
|
||||
COPY --from=build /workspace/play-admin/target/*.jar /app/app.jar
|
||||
RUN chown -R appuser:appgroup /app
|
||||
USER appuser
|
||||
|
||||
ENV JAVA_OPTS="-Xms2g -Xmx2g" \
|
||||
LOG_DIR="/app/log" \
|
||||
SPRING_PROFILES_ACTIVE="test" \
|
||||
TZ="Asia/Shanghai" \
|
||||
LANG="C.UTF-8"
|
||||
|
||||
@@ -158,15 +158,15 @@ public class WxPlayController {
|
||||
|
||||
@ApiOperation(value = "创建充值订单", notes = "创建微信支付充值订单")
|
||||
@ApiImplicitParam(name = "money", value = "充值金额", required = true, dataType = "String", paramType = "query")
|
||||
@ApiResponses({@ApiResponse(code = 200, message = "操作成功"), @ApiResponse(code = 500, message = "请求参数错误,money不能为空"), @ApiResponse(code = 500, message = "充值金额不能小于10元"), @ApiResponse(code = 500, message = "系统错误,租户ID获取失败")})
|
||||
@ApiResponses({@ApiResponse(code = 200, message = "操作成功"), @ApiResponse(code = 500, message = "请求参数错误,money不能为空"), @ApiResponse(code = 500, message = "充值金额不能小于1元"), @ApiResponse(code = 500, message = "系统错误,租户ID获取失败")})
|
||||
@CustomUserLogin
|
||||
@GetMapping("/custom/createOrder")
|
||||
public R createOrder(@RequestParam("money") String money) {
|
||||
if (StringUtils.isEmpty(money)) {
|
||||
throw new CustomException("请求参数错误,money不能为空");
|
||||
}
|
||||
if (new BigDecimal(money).compareTo(new BigDecimal("10")) < 0) {
|
||||
throw new CustomException("充值金额不能小于10元");
|
||||
if (new BigDecimal(money).compareTo(new BigDecimal("1")) < 0) {
|
||||
throw new CustomException("充值金额不能小于1元");
|
||||
}
|
||||
String tenantId = SecurityUtils.getTenantId();
|
||||
if (StrUtil.isBlankIfStr(tenantId)) {
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
|
||||
<contextName>logback</contextName>
|
||||
<!-- name的值是变量的名称,value的值时变量定义的值。通过定义的值会被插入到logger上下文中。定义变量后,可以使“${}”来使用变量。 -->
|
||||
<property name="log.path" value="./logs"/>
|
||||
<springProperty scope="context" name="LOG_DIR" source="LOG_DIR" defaultValue="./logs"/>
|
||||
<property name="log.path" value="${LOG_DIR}"/>
|
||||
<property name="version" value="1.0"/>
|
||||
|
||||
<!-- 彩色日志 -->
|
||||
|
||||
Reference in New Issue
Block a user