fix: 修改后台相关
parent
fd8d47ae81
commit
9f9cb30b03
|
@ -4,25 +4,28 @@ package cn.iocoder.yudao.module.infra.api.config;
|
||||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <pre>
|
* <pre>
|
||||||
* <b>ApiConfigApi</b>
|
* <b>ApiConfigApi</b>
|
||||||
* <b>Description:</b>
|
* <b>Description:</b>
|
||||||
* <b>@author:</b> zenghuapei
|
* <b>@author:</b> zenghuapei
|
||||||
* <b>Date:</b> 2023/4/3 10:19
|
* <b>Date:</b> 2023/4/3 10:19
|
||||||
* ----------------------------------------------------------------------
|
* ----------------------------------------------------------------------
|
||||||
* </pre>
|
* </pre>
|
||||||
**/
|
**/
|
||||||
public interface ApiConfigApi {
|
public interface ApiConfigApi {
|
||||||
/**
|
/**
|
||||||
* <pre>
|
* <pre>
|
||||||
* <b>getConfigKey</b>
|
* <b>getConfigKey</b>
|
||||||
* <b>Description:获取参数key</b>
|
* <b>Description:获取参数key</b>
|
||||||
* <b>@author:</b> zenghuapei
|
* <b>@author:</b> zenghuapei
|
||||||
* <b>@date:</b> 2023/4/3 10:21
|
* <b>@date:</b> 2023/4/3 10:21
|
||||||
* @param key:
|
* @param key:
|
||||||
* @return
|
* @return
|
||||||
* </pre>
|
* </pre>
|
||||||
*/
|
*/
|
||||||
CommonResult<String> getConfigKey( String key);
|
CommonResult<String> getConfigKey(String key);
|
||||||
String getConfigKeyValue( String key);
|
|
||||||
|
String getConfigKeyValue(String key);
|
||||||
|
|
||||||
|
String getConfigRemark(String key);
|
||||||
}
|
}
|
||||||
|
|
|
@ -62,4 +62,16 @@ public class ApiConfigImpl implements ApiConfigApi{
|
||||||
}
|
}
|
||||||
return config.getValue();
|
return config.getValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getConfigRemark(String key) {
|
||||||
|
ConfigDO config = configService.getConfigByKey(key);
|
||||||
|
if (config == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
if (!config.getVisible()) {
|
||||||
|
throw exception(ErrorCodeConstants.CONFIG_GET_VALUE_ERROR_IF_VISIBLE);
|
||||||
|
}
|
||||||
|
return config.getRemark();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -102,4 +102,5 @@ public class ConfigController {
|
||||||
ExcelUtils.write(response, "参数配置.xls", "数据", ConfigExcelVO.class, datas);
|
ExcelUtils.write(response, "参数配置.xls", "数据", ConfigExcelVO.class, datas);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,6 +23,11 @@
|
||||||
<artifactId>yudao-module-member-api</artifactId>
|
<artifactId>yudao-module-member-api</artifactId>
|
||||||
<version>${revision}</version>
|
<version>${revision}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>cn.iocoder.boot</groupId>
|
||||||
|
<artifactId>yudao-module-infra-api</artifactId>
|
||||||
|
<version>${revision}</version>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>cn.iocoder.boot</groupId>
|
<groupId>cn.iocoder.boot</groupId>
|
||||||
<artifactId>yudao-module-shop-api</artifactId>
|
<artifactId>yudao-module-shop-api</artifactId>
|
||||||
|
|
|
@ -5,6 +5,8 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||||
import cn.iocoder.yudao.framework.security.core.annotations.PreAuthenticated;
|
import cn.iocoder.yudao.framework.security.core.annotations.PreAuthenticated;
|
||||||
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
|
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
|
||||||
import cn.iocoder.yudao.framework.tenant.core.aop.TenantIgnore;
|
import cn.iocoder.yudao.framework.tenant.core.aop.TenantIgnore;
|
||||||
|
import cn.iocoder.yudao.module.infra.api.config.ApiConfigApi;
|
||||||
|
import cn.iocoder.yudao.module.infra.enums.ErrorCodeConstants;
|
||||||
import cn.iocoder.yudao.module.shop.controller.admin.recharge.vo.RechargeGearRespVO;
|
import cn.iocoder.yudao.module.shop.controller.admin.recharge.vo.RechargeGearRespVO;
|
||||||
import cn.iocoder.yudao.module.shop.controller.admin.recharge.vo.RechargeOrderPageReqVO;
|
import cn.iocoder.yudao.module.shop.controller.admin.recharge.vo.RechargeOrderPageReqVO;
|
||||||
import cn.iocoder.yudao.module.shop.controller.admin.recharge.vo.RechargeOrderRespVO;
|
import cn.iocoder.yudao.module.shop.controller.admin.recharge.vo.RechargeOrderRespVO;
|
||||||
|
@ -27,8 +29,12 @@ import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.annotation.security.PermitAll;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||||
|
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Title:MemberController
|
* @Title:MemberController
|
||||||
* @Description: 会员相关信息
|
* @Description: 会员相关信息
|
||||||
|
@ -46,6 +52,8 @@ public class MemberController {
|
||||||
private RechargeGearService rechargeGearService;
|
private RechargeGearService rechargeGearService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private RechargeOrderService rechargeOrderService;
|
private RechargeOrderService rechargeOrderService;
|
||||||
|
@Autowired
|
||||||
|
private ApiConfigApi apiConfigApi;
|
||||||
|
|
||||||
|
|
||||||
// 会员档次信息列表
|
// 会员档次信息列表
|
||||||
|
@ -123,4 +131,12 @@ public class MemberController {
|
||||||
return CommonResult.success(rechargeOrderService.memberChangeTie(changeTieRequest));
|
return CommonResult.success(rechargeOrderService.memberChangeTie(changeTieRequest));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@GetMapping(value = "/get-app_value-by-key")
|
||||||
|
@Operation(summary = "根据参数键名查询参数值", description = "不可见的配置,不允许返回给前端")
|
||||||
|
@PermitAll
|
||||||
|
@TenantIgnore
|
||||||
|
public CommonResult<String> getAppConfigKey(@RequestParam("key") String key) {
|
||||||
|
return success(apiConfigApi.getConfigRemark(key));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -806,7 +806,7 @@ public class OrderServiceImpl implements OrderService {
|
||||||
orderInfoVo.setOrderProNum(orderProNum);
|
orderInfoVo.setOrderProNum(orderProNum);
|
||||||
// 获取默认地址
|
// 获取默认地址
|
||||||
UserAddressRespDTO userAddress = userAddressApi.getDefaultByUid(user.getId());
|
UserAddressRespDTO userAddress = userAddressApi.getDefaultByUid(user.getId());
|
||||||
if (ObjectUtil.isNotNull(userAddress)) {
|
if (ObjectUtil.isNotNull(userAddress.getId())) {
|
||||||
// 计算运费
|
// 计算运费
|
||||||
getFreightFee(orderInfoVo, userAddress);
|
getFreightFee(orderInfoVo, userAddress);
|
||||||
orderInfoVo.setAddressId(userAddress.getId());
|
orderInfoVo.setAddressId(userAddress.getId());
|
||||||
|
@ -820,7 +820,7 @@ public class OrderServiceImpl implements OrderService {
|
||||||
orderInfoVo.setFreightFee(BigDecimal.ZERO);
|
orderInfoVo.setFreightFee(BigDecimal.ZERO);
|
||||||
}
|
}
|
||||||
// 实际支付金额
|
// 实际支付金额
|
||||||
orderInfoVo.setPayFee(orderInfoVo.getProTotalFee().add(BigDecimal.ZERO));
|
orderInfoVo.setPayFee(orderInfoVo.getProTotalFee().add(orderInfoVo.getProTotalFee()));
|
||||||
//用户剩余积分
|
//用户剩余积分
|
||||||
//用户剩余经验
|
//用户剩余经验
|
||||||
// 缓存订单
|
// 缓存订单
|
||||||
|
|
|
@ -103,7 +103,7 @@ public class MemberUserServiceImpl implements MemberUserService {
|
||||||
user.setMobile(mobile);
|
user.setMobile(mobile);
|
||||||
user.setNickname(realName);
|
user.setNickname(realName);
|
||||||
user.setStatus(CommonStatusEnum.ENABLE.getStatus()); // 默认开启
|
user.setStatus(CommonStatusEnum.ENABLE.getStatus()); // 默认开启
|
||||||
user.setPassword(encodePassword("123456")); // 加密密码
|
user.setPassword(encodePassword(mobile.substring(5,11))); // 加密密码
|
||||||
user.setRegisterIp(registerIp);
|
user.setRegisterIp(registerIp);
|
||||||
user.setPromoterId(promoterId);
|
user.setPromoterId(promoterId);
|
||||||
user.setTenantId(TenantContextHolder.getRequiredTenantId());
|
user.setTenantId(TenantContextHolder.getRequiredTenantId());
|
||||||
|
|
Loading…
Reference in New Issue