Merge branch 'master' of https://github.com/YunaiV/ruoyi-vue-pro
This commit is contained in:
commit
8d138cd1e9
|
@ -28,7 +28,7 @@ public class AreaUtilsTest {
|
|||
|
||||
@Test
|
||||
public void testFormat() {
|
||||
assertEquals(AreaUtils.format(110105), "北京 北京市 朝阳区");
|
||||
assertEquals(AreaUtils.format(110105), "北京市 北京市 朝阳区");
|
||||
assertEquals(AreaUtils.format(1), "中国");
|
||||
assertEquals(AreaUtils.format(2), "蒙古");
|
||||
}
|
||||
|
|
|
@ -140,7 +140,7 @@ public class ErpPurchaseInServiceImpl implements ErpPurchaseInService {
|
|||
purchaseIn.setDiscountPercent(BigDecimal.ZERO);
|
||||
}
|
||||
purchaseIn.setDiscountPrice(MoneyUtils.priceMultiplyPercent(purchaseIn.getTotalPrice(), purchaseIn.getDiscountPercent()));
|
||||
purchaseIn.setTotalPrice(purchaseIn.getTotalPrice().subtract(purchaseIn.getDiscountPrice().add(purchaseIn.getOtherPrice())));
|
||||
purchaseIn.setTotalPrice(purchaseIn.getTotalPrice().subtract(purchaseIn.getDiscountPrice()).add(purchaseIn.getOtherPrice()));
|
||||
}
|
||||
|
||||
private void updatePurchaseOrderInCount(Long orderId) {
|
||||
|
|
|
@ -136,7 +136,7 @@ public class ErpPurchaseReturnServiceImpl implements ErpPurchaseReturnService {
|
|||
purchaseReturn.setDiscountPercent(BigDecimal.ZERO);
|
||||
}
|
||||
purchaseReturn.setDiscountPrice(MoneyUtils.priceMultiplyPercent(purchaseReturn.getTotalPrice(), purchaseReturn.getDiscountPercent()));
|
||||
purchaseReturn.setTotalPrice(purchaseReturn.getTotalPrice().subtract(purchaseReturn.getDiscountPrice().add(purchaseReturn.getOtherPrice())));
|
||||
purchaseReturn.setTotalPrice(purchaseReturn.getTotalPrice().subtract(purchaseReturn.getDiscountPrice()).add(purchaseReturn.getOtherPrice()));
|
||||
}
|
||||
|
||||
private void updatePurchaseOrderReturnCount(Long orderId) {
|
||||
|
|
|
@ -4,7 +4,6 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
|||
import lombok.*;
|
||||
import java.util.*;
|
||||
## 处理 BigDecimal 字段的引入
|
||||
import java.util.*;
|
||||
#foreach ($column in $columns)
|
||||
#if (${column.javaType} == "BigDecimal")
|
||||
import java.math.BigDecimal;
|
||||
|
|
|
@ -29,6 +29,12 @@ public interface ${subTable.className}Mapper extends BaseMapperX<${subTable.clas
|
|||
.orderByDesc(${subTable.className}DO::getId));## 大多数情况下,id 倒序
|
||||
|
||||
}
|
||||
## 主表与子表是一对一时
|
||||
#if (!$subTable.subJoinMany)
|
||||
default ${subTable.className}DO selectBy${SubJoinColumnName}(${subJoinColumn.javaType} ${subJoinColumn.javaField}) {
|
||||
return selectOne(${subTable.className}DO::get${SubJoinColumnName}, ${subJoinColumn.javaField});
|
||||
}
|
||||
#end
|
||||
|
||||
## 情况二:非 MASTER_ERP 时,需要列表查询子表
|
||||
#else
|
||||
|
|
|
@ -22,7 +22,7 @@ public enum OAuth2GrantTypeEnum {
|
|||
|
||||
private final String grantType;
|
||||
|
||||
public static OAuth2GrantTypeEnum getByGranType(String grantType) {
|
||||
public static OAuth2GrantTypeEnum getByGrantType(String grantType) {
|
||||
return ArrayUtil.firstMatch(o -> o.getGrantType().equals(grantType), values());
|
||||
}
|
||||
|
||||
|
|
|
@ -105,7 +105,7 @@ public class OAuth2OpenController {
|
|||
@RequestParam(value = "refresh_token", required = false) String refreshToken) { // 刷新模式
|
||||
List<String> scopes = OAuth2Utils.buildScopes(scope);
|
||||
// 1.1 校验授权类型
|
||||
OAuth2GrantTypeEnum grantTypeEnum = OAuth2GrantTypeEnum.getByGranType(grantType);
|
||||
OAuth2GrantTypeEnum grantTypeEnum = OAuth2GrantTypeEnum.getByGrantType(grantType);
|
||||
if (grantTypeEnum == null) {
|
||||
throw exception0(BAD_REQUEST.getCode(), StrUtil.format("未知授权类型({})", grantType));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue