mall
mall copied to clipboard
mall项目是一套电商系统,包括前台商城系统及后台管理系统,基于SpringBoot+MyBatis实现,采用Docker容器化部署。 前台商城系统包含首页门户、商品推荐、商品搜索、商品展示、购物车、订单流程、会员中心、客户服务...
`private void calcPerCouponAmount(List orderItemList, SmsCoupon coupon) { BigDecimal totalAmount = calcTotalAmount(orderItemList); for (OmsOrderItem orderItem : orderItemList) { //(商品价格/可用商品总价)*优惠券面额 BigDecimal couponAmount = orderItem.getProductPrice().divide(totalAmount, 3, RoundingMode.HALF_EVEN).multiply(coupon.getAmount()); orderItem.setCouponAmount(couponAmount); ` 在calcTotalAmount中计算总价时,算的是商品单价*商品数量 得出所有总价, 那在计算优惠分摊的时候, 是不是也需要乘以商品数量。...
Format code
Recently, our team found an arbitrary order detail access vulnerability in the latest version of the project. The vulnerability logic is present in the file: https://github.com/macrozheng/mall/blob/master/mall-portal/src/main/java/com/macro/mall/portal/service/impl/OmsPortalOrderServiceImpl.java#L390 The developer failed to...
关于按钮权限控制
文档有介绍ums_permission表已经不再使用,但为什么不再使用,用什么方式替代实现按钮权限控制,mall里现在有实现吗
https://github.com/macrozheng/mall/blob/81ff4e32d1900c1d35a9511a02f93457461d8c3c/mall-security/src/main/java/com/macro/mall/security/component/DynamicSecurityMetadataSource.java#L44
问题: 用户添加时(/admin/register)后端没有接收status参数并固定将status设置为1 解决: 在响应的dto中添加了status字段 , 并将固定设置1的操作删除
在开启debug日志的时候就会发现任何请求super.beforeInvocation(fi)这个方法都会执行两次,导致执行请求一次会打两份日志,配置逻辑存在问题 ![image](https://user-images.githubusercontent.com/37618101/212551232-c05b922d-39ab-4543-b937-dd984d7e74cd.png) 具体位置在这里,也就是说一次请求会进行两次权限校验。 ![image](https://user-images.githubusercontent.com/37618101/212551655-12bcc990-e4d7-4fa5-8ab2-525db4286610.png)
在mall-search/src/main/java/com/macro/mall/search/service/impl/EsProductServiceImpl.java中 如果当 /search/relate 请求参数为空的时候, 会直接导致((ParsedTerms) ((ParsedFilter) ((ParsedNested) productAttrs).getAggregations().get("productAttrs")).getAggregations().get("attrIds")).getBuckets() 类型为ParsedStringTerms 而非 ParsedLongTerms , 进而导致强转失败 现将ParsedLongTerms 使用父类ParsedTerms 强转,就可以避免类型问题了
我看了一下,项目里是基于url的动态权限规则,但只是到菜单级别的权限,是否有按钮级别权限功能?