首页
学习
活动
专区
圈层
工具
发布
    • 综合排序
    • 最热优先
    • 最新优先
    时间不限
  • 来自专栏zinyan

    Groovy 语法 promotion提升和coercion强制转换学习

    Promotion和coercion) 学习在Groovy中的各种数据类型的各种强制转换和类型变换。 Documentation (groovy-lang.org)](http://docs.groovy-lang.org/docs/groovy-4.0.6/html/documentation/#_promotion_and_coercion

    1.1K10编辑于 2023-02-23
  • 来自专栏全栈程序员必看

    E-commerce 中促销系统的设计

    对于有需要的促销,可以为促销设计聚合页面/详情页/宣传页/推广页,然后将相应的链接和封面添加到promotion.asset_url和promotion.cover中保存即可. 代码逻辑 订单对促销的判断的逻辑的laravel伪代码 // 获取平台所有有效的促销 $promotions = Promotion::active()->get(); // 通过rule过滤promotion $promotions = $promotions->filter(function ($promotion) { $rules = $promotion->rules $order $promotion->each(function ($promotion) { $actions = $promotion->actions; $order = $this->getOrder php namespace Promotion\Actions; use Promotion\Helpers\CreateAdjustment; use Promotion\Helpers\Distribute

    5.1K50编辑于 2022-07-08
  • 来自专栏快乐阿超

    activeError: error:0308010C:digital envelope routines::unsupported

    苛求君子,宽纵小人,自以为明察秋毫,而实则反助小人张目——鲁迅 昨天遇到这个报错了: PS D:\project\promotion\vue\gridsome-starter-default-master :417:16) at handleParseError (D:\project\promotion\vue\gridsome-starter-default-master\node_modules \webpack\lib\NormalModule.js:471:10) at D:\project\promotion\vue\gridsome-starter-default-master\ \node_modules\loader-runner\lib\LoaderRunner.js:373:3 at iterateNormalLoaders (D:\project\promotion <anonymous> (D:\project\promotion\vue\gridsome-starter-default-master\node_modules\loader-runner\lib\

    1K10编辑于 2022-11-16
  • 来自专栏Java技术栈

    设计模式都没用过,好意思出去面试?

    先拿到需求的时候,也不用去想那么多,挽起袖子就是一通操作: public class OrderPromotion { public BigDecimal promotion(Order order , int[] promotions){ for(int promotion:promotions){ switch (promotion){ int promotion:promotions){ switch (promotion){ case 1: for(int promotion:promotions){ switch (promotion){ case 1: ){ for(int promotion:promotions){ PromotionFactory.getPromotionCalculate(promotion

    63020发布于 2019-10-14
  • 来自专栏sktj

    python 装饰器 策略模式

    strategy_best4.py Strategy pattern -- function-based implementation selecting best promotion from list =None): self.customer = customer self.cart = list(cart) self.promotion = promotion def total __total def due(self): if self.promotion is None: discount = 0 else: discount = self.promotion(self) return self.total() - discount def __repr__(self): fmt = '<Order total (promo_func): # <2> promos.append(promo_func) return promo_func @promotion # <3> def fidelity(order

    55020发布于 2019-08-02
  • 来自专栏Java架构筑基

    如何在代码中应用设计模式

    先拿到需求的时候,也不用去想那么多,挽起袖子就是一通操作: public class OrderPromotion { public BigDecimal promotion(Order order , int[] promotions){ for (int promotion:promotions){ switch (promotion){ for (int promotion:promotions){ switch (promotion){ case 1: for (int promotion:promotions){ switch (promotion){ case 1: ){ for (int promotion:promotions){ PromotionFactory.getPromotionCalculate(promotion

    1.5K20发布于 2019-04-24
  • 来自专栏mall学习教程

    营销模块数据库表解析:限时购功能

    create table sms_flash_promotion_session ( id bigint not null auto_increment comment , flash_promotion_id bigint comment '限时购id', flash_promotion_session_id bigint comment '编号', product_id bigint comment '商品价格', flash_promotion_price decimal(10,2) comment '限时购价格' , flash_promotion_count int comment '限时购数量', flash_promotion_limit int comment '每人限购数量', sort 注意:添加到限时购的商品需要修改 pms_product表的 promotion_type为5,优惠计算规则也应该改成使用限时购的优惠。 编辑限时购商品信息 ? 移动端展现 已开抢的限时购 ?

    1.8K20发布于 2019-08-06
  • 企业微信接口在行业解决方案中的架构应用与实践

    ,store_ids):"""执行限时抢购活动协同"""#1.获取活动详情promotion=promotion_service.get_promotion(promotion_id)#2.并行执行门店准备 =self.launch_realtime_dashboard(promotion_id)#5.推送监控链接到管理群self.wecom_bot.send_to_management(f"促销活动{promotion ""#锁定活动库存inventory_client.reserve_for_promotion(store_id,promotion['sku_list'],promotion['reserve_quantity '])#更新门店价签系统price_tag_client.update_promotion_price(store_id,promotion['sku_price_map'])#返回准备结果return :store_id,'tags':promotion['target_tags'],'purchase_history':promotion.get('history_filters',{}),'location_radius

    18110编辑于 2026-01-19
  • 来自专栏盛开在夏天的太阳

    23种设计模式(二)---策略设计模式

    IPromotionStrategy { /** * 促销 * * 入参是原价, 出参是促销价格 * @return */ Double promotion ; public MallPromotion(IPromotionStrategy promotion) { this.promotion = promotion; } public Double activityPromotion(PromotionVo promotionVo) throws Exception { return this.promotion.promotion ; public MallPromotionContext(IPromotionStrategy promotion) { this.promotion = promotion public Double activityPromotion(PromotionVo promotionVo) throws Exception { return this.promotion.promotion

    77040发布于 2021-06-23
  • 来自专栏Hadoop数据仓库

    基于Hadoop生态圈的数据仓库实践 —— 进阶技术(二)

    PROMOTION CODE,PROMOTION NAME,START DATE,END DATE SO,Special Offer,2016-04-01,2016-04-10 DP,Disk Promotion ,2016-05-05,2016-05-20 MS,Month Special,2016-06-01,2016-06-30 MP,Monitor Promotion,2016-07-10,2016-07 promotion_name varchar(50) comment '促销期名称', start_date date comment '促销期开始日期', end_date date comment '促销期截止日期', primary key (promotion_code) ); -- 添加促销期数据 insert into promo_schedule values ( use rds; create table promo_schedule ( promotion_code varchar(10) comment 'promotion code', promotion_name

    74910发布于 2019-05-25
  • 来自专栏磐创AI技术团队的专栏

    三个你应该注意的错误

    你只需要使用groupby函数: promotion.groupby("promotion_code").agg( total_promo_sales = ("sales_qty", promotion_sales = promotion.groupby("promotion_code").agg( total_promo_sales = ("sales_qty", "sum ") ) promotion_sales.total_promo_sales.sum() # output 394 promotion.sales_qty.sum() # output 466 这个差异的原因是缺少促销代码值 promotion.groupby("promotion_code", dropna=False).agg( total_promo_sales = ("sales_qty", "sum 这是如何使用iloc方法来执行的: promotion.iloc[:4, :] # output promotion_code sales_qty price 0 A2

    80410编辑于 2024-03-12
  • 来自专栏Linyb极客之路

    如何在代码中应用设计模式

    先拿到需求的时候,也不用去想那么多,挽起袖子就是一通操作: public class OrderPromotion { public BigDecimal promotion(Order order , int[] promotions){ for(int promotion:promotions){ switch (promotion){ int promotion:promotions){ switch (promotion){ case 1: for(int promotion:promotions){ switch (promotion){ case 1: ){ for(int promotion:promotions){ PromotionFactory.getPromotionCalculate(promotion

    1.4K20发布于 2019-11-22
  • 来自专栏程序员的知识天地

    【经典案例】Python详解设计模式:策略模式

    =None): self.cart = [] self.customer = customer self.promotion = promotion : discount = 0 else: discount = self.promotion.discount(self) from abc import ABC, abstractmethod class Promotion(ABC): @abstractmethod def discount(self, order): pass class FidelityPromo(Promotion): ''' 如果积分满1000分,就可以兑换10元现金券 ''' class BulkItemPromo(Promotion): ''' 如果单项商品购买10件,即可9折。

    1.1K30发布于 2019-05-10
  • 来自专栏前端小菜鸡yym

    vue3+elemenuPlus 面包屑

    management</el-breadcrumb-item > <el-breadcrumb-item>promotion list</el-breadcrumb-item> <el-breadcrumb-item>promotion detail</el-breadcrumb-item> </el-breadcrumb> </template> 图标面包屑 将 >promotion detail</el-breadcrumb-item> </el-breadcrumb> </template> <script lang="ts" setup> import >promotion detail</el-breadcrumb-item> </el-breadcrumb> </template> <script lang="ts" setup> import >promotion detail</el-breadcrumb-item> </el-breadcrumb> </template> <script lang="ts" setup> import

    2K31编辑于 2023-01-12
  • 来自专栏设计模式系列

    抽象工厂模式(Abstract Factory Pattern)-23种常用设计模式快速入门教程

    */ public abstract Coupon createCoupon(); /** * 创建活动 */ public abstract Promotion useCoupon() { System.out.println("使用新用户优惠券"); } } /** * 活动类 */ public abstract class Promotion public abstract void startPromotion(); } /** * 双十一活动 */ public class DoubleElevenPromotion extends Promotion promotion = factory.createPromotion(); coupon.useCoupon(); promotion.startPromotion( 然后,我们定义了具体的优惠券类 Coupon 和活动类 Promotion,并实现了它们的具体行为。

    40510编辑于 2025-04-05
  • 来自专栏腾讯社交用户体验设计

    WEE &SEE角色设定

    01_Character Promotion 角色宣传 Character promotion is important as it stimulates user emotion to make them 05_Promotion  活力派超有趣 It is a promotion method that allows us to interact and communicate with users at 06_Promotion  NBA总冠军 We designed the character to fit the concept of the collaboration brand. 07_Promotion Solo跳舞宣传活动 We found music that users would be interested in, and added dance to it. 08_Promotion 角色身份预告片 This is a teaser video to announce the birth of the Wee&See characters.

    1K30发布于 2018-06-29
  • 来自专栏全栈程序员必看

    javascript获取url参数_正在获取网络参数一直不出来

    promotion_code=ZB06AKXFSR&sku=100 要获取url中的参数的值,则 console.log( getParmeter(‘promotion_code‘) ) [1]; // 这里query的结果是: promotion_code=ZB06AKXFSR&sku=100 let vars = query.split(‘&’); // 这里vars的结果是: [“promotion_code=ZB06AKXFSR”, “sku=100”] for (let i = 0; i < vars.length //然后循环 let pair = vars[i].split(‘=’); // 循环第一次结果pair [“promotion_code

    66740编辑于 2022-09-20
  • 来自专栏测试游记

    《流畅的Python》第六章学习笔记

    =None): """ :param customer: 顾客 :param cart: 选购清单 :param promotion: 折扣策略 """ self.customer = customer self.cart = list(cart) self.promotion = promotion def total(self): """ 计算总价 :return: """ if not is None: discount = 0 # 没有任何优惠 else: discount = self.promotion.discount Order类可以通过传入不同的promotion来实现不同的折扣策略 inspect 检查对象 官方文档:https://docs.python.org/zh-cn/3/library/inspect.html

    77240发布于 2020-12-24
  • 来自专栏微观技术

    Spring Boot 集成 Mybatis

    @Mapper public interface PromotionShopMapper { String PROMOTION_SHOP_RESULT_MAP = "promotionShopResultMap "; @Insert({ "insert into promotion_shop (promotion_id,shop_id,shop_type,create_time where promotion_id = #{promotionId} and is_deleted = 0") @Results(id = PROMOTION_SHOP_RESULT_MAP , value = { @Result(column = "id", property = "id"), @Result(column = "promotion_id " + " (" + " promotion_id,shop_id,shop_type,create_time,update_time,is_deleted

    98010发布于 2021-03-11
  • 来自专栏学无止境

    Python 中的设计模式详解之:策略模式

    =None):         self.customer = customer         self.cart = list(cart)         self.promotion = promotion __total     def due(self):         if self.promotion is None:             discount = 0         else:             discount = self.promotion.discount(self)         return self.total() - discount     def =None):         self.customer = customer         self.cart = list(cart)         self.promotion = promotion __total     def due(self):         if self.promotion is None:             discount = 0         else:

    88020发布于 2019-05-05
领券