通过外挂程序实现SBO中的价格控制策略
begin
declare @shopid nvarchar(20)
begin
--价格控制
if exists( select top 1 1 from
(select a.itemcode, b.itemName, a.Price, c.sRate from inv1 a, oitm b, u_mpcList c where a.docentry=@nEntry and a.itemcode=b.itemcode and b.u_priCType=c.priCType and b.itmsgrpcod=c.itmsgrpcod and isNull(uFlag,0)=1 and isNUll(dFlag,0)=0 and b.itmsgrpcod not in (select itmsGrpCod from uv_npclist where shopid=@shopid) and a.itemcode not in (select distinct itemcode from uv_npcitems u where shopid=@shopid and a.whscode=u.whscode and (getdate() between sdate and edate) and isnull(cFlag,0)=1 )
union all
select a.itemcode, b.itemName, a.Price, c.sRate from inv1 a, oitm b, u_mpcList c, oinv d where a.docentry=@nEntry and a.itemcode=b.itemcode and a.docEntry=d.docEntry and b.u_priCType=c.priCType and b.itmsgrpcod=c.itmsgrpcod and isNull(uFlag,0)=1 and isNUll(dFlag,0)=1 and a.docDate>=c.sdate and a.docDate<=c.edate
and b.itmsgrpcod not in (select itmsGrpCod from uv_npclist where shopid=@shopid) and a.itemcode not in (select distinct itemcode from uv_npcitems u where shopid=@shopid and a.whscode=u.whscode and (getdate() between sdate and edate) and isnull(cFlag,0)=1 ) ) a,
(select inv1.itemcode, case p1.price when 0 then oitw.avgprice*1.17 else p1.price end avgprice from inv1 inner join oitw on inv1.itemcode=oitw.itemcode and inv1.whscode=oitw.whscode inner join oitm on inv1.itemcode=oitm.itemcode left join itm1 p1 on inv1.itemcode=p1.itemcode and p1.pricelist=2 where inv1.docentry=@nEntry
and oitm.itmsgrpcod not in (select itmsGrpCod from uv_npclist where shopid=@shopid) and inv1.itemcode not in (select distinct itemcode from uv_npcitems u where shopid=@shopid and inv1.whscode=u.whscode and (getdate() between sdate and edate) and isnull(cFlag,0)=1 ) ) b
where a.itemcode=b.itemcode and cast(Price as numeric(20,0))<cast(avgprice*(1+sRate/100) as numeric(20,0)) )
begin
select '您所销售的商品低于最低限价, 销售被拒绝!'
return -1
end
end
通过外挂程序实现SBO中的价格控制策略相关推荐
- 在游戏研发中如何有效防止外挂程序
由于HTTP协议是明文传输,很容易通过抓取HTTP包获取游戏内交互的逻辑和数据,请问如何能有效地防止外挂程序? 总的说来,道高一尺魔高一丈,外挂不可能100%被杜绝,只能通过不同的手段来防止大部分的外 ...
- 用chrome的snippets片段功能创建页面js外挂程序,从控制台创建js小脚本
用chrome的snippets片段功能创建页面js外挂程序,从控制台创建js小脚本 Chrome的snippets是小脚本,还可以创作并在Chrome DevTools的来源面板中执行. 可以访问和 ...
- [转载]关于QQ游戏外挂mouse_event不起作用的原因,及我的对对碰外挂程序.
资源名称 关于QQ游戏外挂mouse_event不起作用的原因,及我的对对碰外挂程序. 作者: dongfa 适用语言: .NET 文件大小 2161 运行平台: Windows XP 上传者: sh ...
- Python 采集 Facebook 评论插件、留言外挂程序
实现时间:2021-05-30 实现难度:★★★☆☆☆ 实现目标:采集 Facebook 评论插件.留言外挂程序的所有评论. 完整代码:https://github.com/TRHX/Python3- ...
- 内存管理——程序运行过程中内存的作用以及如何与cpu、os交互
今年以来,内存条价格暴涨,已经跃升为新的新一代理财产品,所以今天就和大家讨论一下内存条的话题,主要内容就是在程序运行过程中,内存的作用以及如何与CPU,OS交互. 我们先来讨论:计算机的运行究竟是在做 ...
- 程序在内存中运行的奥秘
简介 当丰富多彩的应用程序在计算机上运行,为你每天的工作和生活带来便利时,你是否知道它们是如何在计算机中工作呢?本文用形象的图表与生动的解释,揭示了程序在计算机中运行的奥秘. 内存管理是操作系统的核心 ...
- R语言将ggplot2对象转化为plotly对象并通过shiny将可视化结果在应用程序或者网页中显示出来
R语言将ggplot2对象转化为plotly对象并通过shiny将可视化结果在应用程序或者网页中显示出来 目录
- linux更改程序启动时间,分享|如何改善应用程序在 Linux 中的启动时间
大多数 Linux 发行版在默认配置下已经足够快了.但是,我们仍然可以借助一些额外的应用程序和方法让它们启动更快一点.其中一个可用的这种应用程序就是 Preload.它监视用户使用频率比较高的应用程序 ...
- 微信小程序在开发中遇到的问题与解决方法
微信小程序在开发中遇到的问题与解决方法 参考文章: (1)微信小程序在开发中遇到的问题与解决方法 (2)https://www.cnblogs.com/zjjDaily/p/8032142.html ...
- 程序运行过程中遇到“ORA-03114: not connected to ORACLE”的问题解决
程序运行过程中遇到"ORA-03114: not connected to ORACLE"的问题解决 参考文章: (1)程序运行过程中遇到"ORA-03114: not ...
最新文章
- 青少年编程竞赛交流群周报(第035周)
- Reddit年度盘点:那些2019年最佳机器学习项目
- NodeJS、NPM安装配置步骤(windows版本)
- 2017-2018 2 20179214《网络实践攻防》第三周作业(二)
- linux6.2 网络yum,配置RHEL6.2的YUM源
- nohup xxx 后台进程关闭,可以这样避免
- Arduino笔记-使用RFID-RC522读取IC卡卡号
- centos安装stress安装失败_CentOS安装nginx
- 强制卸载kernel
- 转:在windows中将tree命令加入git-bash中
- PD虚拟机设置替代ALT+F4(关闭窗口)的快捷键的方法
- 题目98-3:围成一圈数三报数且出列——假设有10个人围成一圈,从1开始报数,数到3的人,让他出列,下一个人重新从1开始报数,数到3的人,让他出列……以此类推,把依次出列的9个人的编号打印出来
- 尚医通-OAuth2-微信登录接口开发(三十一)
- 加密软件 PGP安装教程。
- 计算机上如何转换搜狗,怎样切换输入法,搜狗输入法五笔和拼音切换
- NLP Python
- 批量打印之smsx.cab打印
- 《网络安全态势感知》读书笔记
- 5G超级上行【5G技术篇,转自微信公众号网优雇佣军】
- java Rabbitmq ssl 安全连接详细流程(附图)