Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
freemud-coupon-export
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
秦嘉祺
freemud-coupon-export
Commits
260ad5fe
Commit
260ad5fe
authored
Mar 05, 2021
by
QJQ
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增删除接口
parent
77586d02
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
91 additions
and
44 deletions
+91
-44
.gitignore
+5
-0
Freemud.Coupon.ExportCode/.gitignore
+3
-0
Freemud.Coupon.ExportCode/Controllers/CouponController.cs
+14
-0
Freemud.Coupon.ExportCode/Services/CouponService.cs
+24
-0
Freemud.Coupon.ExportCode/Web.config
+45
-44
No files found.
.gitignore
View file @
260ad5fe
/.vs
/Freemud.Coupon.ExportCode/app
/Freemud.Coupon.ExportCode/bin
bin
/Freemud.Coupon.ExportCode/obj
/Freemud.Coupon.ExportCode/log
Freemud.Coupon.ExportCode/.gitignore
0 → 100644
View file @
260ad5fe
/bin
/obj
Freemud.Coupon.ExportCode/Controllers/CouponController.cs
View file @
260ad5fe
...
...
@@ -77,5 +77,19 @@ namespace Freemud.Coupon.ExportCode.Controllers
return
Json
(
data
,
JsonRequestBehavior
.
AllowGet
);
}
/// <summary>
/// 删除导码记录
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ActionResult
DeleteExportRecord
(
int
id
)
{
CouponService
couponService
=
new
CouponService
();
var
data
=
couponService
.
DeleteCouponExportRecord
(
id
);
return
Json
(
data
,
JsonRequestBehavior
.
AllowGet
);
}
}
}
Freemud.Coupon.ExportCode/Services/CouponService.cs
View file @
260ad5fe
...
...
@@ -119,7 +119,31 @@ namespace Freemud.Coupon.ExportCode.Services
return
MessageResult
.
Fail
(
"创建失败!"
);
}
}
public
MessageResult
DeleteCouponExportRecord
(
int
id
)
{
if
(
id
<
1
)
{
return
MessageResult
.
Fail
(
"记录不存在!"
);
}
bool
isSuccess
=
false
;
using
(
DbManager
db
=
CreateDbManagerCouponReport
())
{
var
ret
=
db
.
SetCommand
(
@"delete from [dbo].[Coupon_Export_Record] where id=@id"
,
db
.
ParameterEx
(
"@id"
,
id
,
DbType
.
Int32
))
.
ExecuteNonQuery
();
isSuccess
=
ret
>
0
;
}
if
(
isSuccess
)
{
return
MessageResult
.
Ok
(
"删除成功!"
);
}
else
{
return
MessageResult
.
Fail
(
"删除失败!"
);
}
}
private
int
GetCurrentExportAmount
()
{
using
(
DbManager
db
=
CreateDbManagerCouponReport
())
...
...
Freemud.Coupon.ExportCode/Web.config
View file @
260ad5fe
<?
xml
version
=
"1.0
"
?>
<?
xml
version
=
"1.0"
encoding
=
"UTF-8
"
?>
<!--
For
more
information
on
how
to
configure
your
ASP
.
NET
application
,
please
visit
https
://
go
.
microsoft
.
com
/
fwlink
/?
LinkId
=
301879
...
...
@@ -8,23 +8,23 @@
<
add
name
=
"db_report"
connectionString
=
"server=212.64.109.249,9528;initial catalog=FreemudReport;uid=zhuihutest;pwd=zhuihutest@freemud;application name=zhuihuapi;Max Pool Size=512"
/>
</
connectionStrings
>
<
appSettings
>
<
add
key
=
"webpages:Version"
value
=
"3.0.0.0"
/>
<
add
key
=
"webpages:Enabled"
value
=
"false"
/>
<
add
key
=
"ClientValidationEnabled"
value
=
"true"
/>
<
add
key
=
"UnobtrusiveJavaScriptEnabled"
value
=
"true"
/>
<
add
key
=
"coupon_bussiness_type"
value
=
"coupon"
/>
<
add
key
=
"common_bussiness_type"
value
=
"common_base"
/>
<
add
key
=
"isDebug"
value
=
"true"
/>
<
add
key
=
"maxExportAmount"
value
=
"20"
/>
<
add
key
=
"ipWhiteList"
value
=
"127.0.0.1,::1,172.16.0.152"
/>
<
add
key
=
"filePathRoot"
value
=
"E:\document\发布包\测试环境\Freemud.Quartz.CouponCodeExport\CouponCodeFiles\"
/>
<
add
key
=
"EmailConfig"
value
=
"{ servername:'smtp.exmail.qq.com', smtpport:465, adminaccount:'coupon-notification@freemud.cn', adminpassword:'CouponGood@@1'}"
/>
<
add
key
=
"webpages:Version"
value
=
"3.0.0.0"
/>
<
add
key
=
"webpages:Enabled"
value
=
"false"
/>
<
add
key
=
"ClientValidationEnabled"
value
=
"true"
/>
<
add
key
=
"UnobtrusiveJavaScriptEnabled"
value
=
"true"
/>
<
add
key
=
"coupon_bussiness_type"
value
=
"coupon"
/>
<
add
key
=
"common_bussiness_type"
value
=
"common_base"
/>
<
add
key
=
"isDebug"
value
=
"true"
/>
<
add
key
=
"maxExportAmount"
value
=
"20"
/>
<
add
key
=
"ipWhiteList"
value
=
"127.0.0.1,::1,172.16.0.152"
/>
<
add
key
=
"filePathRoot"
value
=
"E:\document\发布包\测试环境\Freemud.Quartz.CouponCodeExport\CouponCodeFiles\"
/>
<
add
key
=
"EmailConfig"
value
=
"{ servername:'smtp.exmail.qq.com', smtpport:465, adminaccount:'coupon-notification@freemud.cn', adminpassword:'CouponGood@@1'}"
/>
<!--邮件配置-->
<
add
key
=
"smtp_server"
value
=
"smtp.exmail.qq.com"
/>
<
add
key
=
"smtp_port"
value
=
"465"
/>
<
add
key
=
"smtp_account"
value
=
"coupon-notification@freemud.cn"
/>
<
add
key
=
"smtp_password"
value
=
"CouponGood@@1"
/>
<
add
key
=
"smtp_enbalessl"
value
=
"True"
/>
<
add
key
=
"smtp_server"
value
=
"smtp.exmail.qq.com"
/>
<
add
key
=
"smtp_port"
value
=
"465"
/>
<
add
key
=
"smtp_account"
value
=
"coupon-notification@freemud.cn"
/>
<
add
key
=
"smtp_password"
value
=
"CouponGood@@1"
/>
<
add
key
=
"smtp_enbalessl"
value
=
"True"
/>
</
appSettings
>
<!--
有关
web
.
config
更改的说明,请参见
http
://
go
.
microsoft
.
com
/
fwlink
/?
LinkId
=
235367
。
...
...
@@ -35,59 +35,60 @@
</
system
.
Web
>
-->
<
system
.
web
>
<
compilation
debug
=
"true"
targetFramework
=
"4.5.2"
/>
<
httpRuntime
/>
<
pages
controlRenderingCompatibilityVersion
=
"4.0"
/>
<
compilation
debug
=
"true"
targetFramework
=
"4.5.2"
/>
<
httpRuntime
/>
<
pages
controlRenderingCompatibilityVersion
=
"4.0"
/>
</
system
.
web
>
<
system
.
webServer
>
<
handlers
>
<
remove
name
=
"ExtensionlessUrlHandler-Integrated-4.0"
/>
<
remove
name
=
"OPTIONSVerbHandler"
/>
<
remove
name
=
"TRACEVerbHandler"
/>
<
add
name
=
"ExtensionlessUrlHandler-Integrated-4.0"
path
=
"*."
verb
=
"*"
type
=
"System.Web.Handlers.TransferRequestHandler"
preCondition
=
"integratedMode,runtimeVersionv4.0"
/>
<
remove
name
=
"ExtensionlessUrlHandler-Integrated-4.0"
/>
<
remove
name
=
"OPTIONSVerbHandler"
/>
<
remove
name
=
"TRACEVerbHandler"
/>
<
add
name
=
"ExtensionlessUrlHandler-Integrated-4.0"
path
=
"*."
verb
=
"*"
type
=
"System.Web.Handlers.TransferRequestHandler"
preCondition
=
"integratedMode,runtimeVersionv4.0"
/>
</
handlers
>
<
httpProtocol
>
<
customHeaders
>
<
add
name
=
"Access-Control-Allow-Origin"
value
=
"http://
172.16.0.152:8001"
/>
<
add
name
=
"Access-Control-Allow-Headers"
value
=
"Content-Type"
/>
<
add
name
=
"Access-Control-Allow-Methods"
value
=
"GET, POST, PUT, DELETE, OPTIONS"
/>
<
add
name
=
"Access-Control-Allow-Credentials"
value
=
"true"
/>
<
add
name
=
"Access-Control-Allow-Origin"
value
=
"http://
localhost:8000"
/>
<
add
name
=
"Access-Control-Allow-Headers"
value
=
"Content-Type"
/>
<
add
name
=
"Access-Control-Allow-Methods"
value
=
"GET, POST, PUT, DELETE, OPTIONS"
/>
<
add
name
=
"Access-Control-Allow-Credentials"
value
=
"true"
/>
</
customHeaders
>
</
httpProtocol
>
<
directoryBrowse
enabled
=
"true"
/>
</
system
.
webServer
>
<
runtime
>
<
assemblyBinding
xmlns
=
"urn:schemas-microsoft-com:asm.v1"
>
<
dependentAssembly
>
<
assemblyIdentity
name
=
"Antlr3.Runtime"
publicKeyToken
=
"eb42632606e9261f"
/>
<
bindingRedirect
oldVersion
=
"0.0.0.0-3.5.0.2"
newVersion
=
"3.5.0.2"
/>
<
assemblyIdentity
name
=
"Antlr3.Runtime"
publicKeyToken
=
"eb42632606e9261f"
/>
<
bindingRedirect
oldVersion
=
"0.0.0.0-3.5.0.2"
newVersion
=
"3.5.0.2"
/>
</
dependentAssembly
>
<
dependentAssembly
>
<
assemblyIdentity
name
=
"Newtonsoft.Json"
culture
=
"neutral"
publicKeyToken
=
"30ad4fe6b2a6aeed"
/>
<
bindingRedirect
oldVersion
=
"0.0.0.0-11.0.0.0"
newVersion
=
"11.0.0.0"
/>
<
assemblyIdentity
name
=
"Newtonsoft.Json"
culture
=
"neutral"
publicKeyToken
=
"30ad4fe6b2a6aeed"
/>
<
bindingRedirect
oldVersion
=
"0.0.0.0-11.0.0.0"
newVersion
=
"11.0.0.0"
/>
</
dependentAssembly
>
<
dependentAssembly
>
<
assemblyIdentity
name
=
"System.Web.Optimization"
publicKeyToken
=
"31bf3856ad364e35"
/>
<
bindingRedirect
oldVersion
=
"1.0.0.0-1.1.0.0"
newVersion
=
"1.1.0.0"
/>
<
assemblyIdentity
name
=
"System.Web.Optimization"
publicKeyToken
=
"31bf3856ad364e35"
/>
<
bindingRedirect
oldVersion
=
"1.0.0.0-1.1.0.0"
newVersion
=
"1.1.0.0"
/>
</
dependentAssembly
>
<
dependentAssembly
>
<
assemblyIdentity
name
=
"WebGrease"
publicKeyToken
=
"31bf3856ad364e35"
/>
<
bindingRedirect
oldVersion
=
"0.0.0.0-1.6.5135.21930"
newVersion
=
"1.6.5135.21930"
/>
<
assemblyIdentity
name
=
"WebGrease"
publicKeyToken
=
"31bf3856ad364e35"
/>
<
bindingRedirect
oldVersion
=
"0.0.0.0-1.6.5135.21930"
newVersion
=
"1.6.5135.21930"
/>
</
dependentAssembly
>
<
dependentAssembly
>
<
assemblyIdentity
name
=
"System.Web.Helpers"
publicKeyToken
=
"31bf3856ad364e35"
/>
<
bindingRedirect
oldVersion
=
"1.0.0.0-3.0.0.0"
newVersion
=
"3.0.0.0"
/>
<
assemblyIdentity
name
=
"System.Web.Helpers"
publicKeyToken
=
"31bf3856ad364e35"
/>
<
bindingRedirect
oldVersion
=
"1.0.0.0-3.0.0.0"
newVersion
=
"3.0.0.0"
/>
</
dependentAssembly
>
<
dependentAssembly
>
<
assemblyIdentity
name
=
"System.Web.WebPages"
publicKeyToken
=
"31bf3856ad364e35"
/>
<
bindingRedirect
oldVersion
=
"1.0.0.0-3.0.0.0"
newVersion
=
"3.0.0.0"
/>
<
assemblyIdentity
name
=
"System.Web.WebPages"
publicKeyToken
=
"31bf3856ad364e35"
/>
<
bindingRedirect
oldVersion
=
"1.0.0.0-3.0.0.0"
newVersion
=
"3.0.0.0"
/>
</
dependentAssembly
>
<
dependentAssembly
>
<
assemblyIdentity
name
=
"System.Web.Mvc"
publicKeyToken
=
"31bf3856ad364e35"
/>
<
bindingRedirect
oldVersion
=
"1.0.0.0-5.2.7.0"
newVersion
=
"5.2.7.0"
/>
<
assemblyIdentity
name
=
"System.Web.Mvc"
publicKeyToken
=
"31bf3856ad364e35"
/>
<
bindingRedirect
oldVersion
=
"1.0.0.0-5.2.7.0"
newVersion
=
"5.2.7.0"
/>
</
dependentAssembly
>
<
dependentAssembly
>
<
assemblyIdentity
name
=
"System.Web.Http"
publicKeyToken
=
"31bf3856ad364e35"
culture
=
"neutral"
/>
<
bindingRedirect
oldVersion
=
"0.0.0.0-5.2.7.0"
newVersion
=
"5.2.7.0"
/>
<
assemblyIdentity
name
=
"System.Web.Http"
publicKeyToken
=
"31bf3856ad364e35"
culture
=
"neutral"
/>
<
bindingRedirect
oldVersion
=
"0.0.0.0-5.2.7.0"
newVersion
=
"5.2.7.0"
/>
</
dependentAssembly
>
</
assemblyBinding
>
</
runtime
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment