Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
my-yaf-project
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
chenchuanwen
my-yaf-project
Commits
00796f8b
Commit
00796f8b
authored
Sep 30, 2018
by
liuyuzhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优惠券相关修改
parent
2fdbb212
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
72 additions
and
10 deletions
+72
-10
DescribeConst.php
application/library/Our/DescribeConst.php
+1
-1
CouponService.php
application/models/Business/Coupon/CouponService.php
+3
-3
AdvMobile.php
application/models/DAO/Adv/AdvMobile.php
+0
-0
Coupon.php
application/models/DAO/Coupon/Coupon.php
+4
-4
application.ini
conf/application.ini
+47
-2
url.ini
conf/url.ini
+17
-0
No files found.
application/library/Our/DescribeConst.php
View file @
00796f8b
...
...
@@ -106,7 +106,7 @@ class DescribeConst
const
applySuccess
=
'申请成功'
;
const
noLimitCoupon
=
'无门槛'
;
const
specialCoupon
=
'指
订
券'
;
const
specialCoupon
=
'指
定
券'
;
const
giftCoupon
=
'礼品券'
;
const
couponFullAvailable
=
'满{0}可用'
;
...
...
application/models/Business/Coupon/CouponService.php
View file @
00796f8b
...
...
@@ -42,10 +42,10 @@ class CouponServiceModel extends \Business\AbstractModel{
$orderAmount
=
intval
(
$coupon
[
'order_amount'
]);
if
(
$coupon
[
'type'
]
==
\Our\ApiConst
::
noLimitCoupon
){
//无门槛优惠券
$temp
[
'type'
]
=
\Our\ApiConst
::
noLimitCouponType
;
$temp
[
'title'
]
=
$coupon
[
'cash_money'
]
;
$temp
[
'title'
]
=
intval
(
$coupon
[
'cash_money'
])
;
$temp
[
'subTitle'
]
=
\Our\DescribeConst
::
noLimitCoupon
;
}
else
if
(
$coupon
[
'coupon_type'
]
==
\Our\ApiConst
::
fullMinusCouponType
){
//满额减免券
$temp
[
'title'
]
=
$coupon
[
'cash_money'
]
;
$temp
[
'title'
]
=
intval
(
$coupon
[
'cash_money'
])
;
$temp
[
'subTitle'
]
=
\Our\Common
::
format
(
\Our\DescribeConst
::
couponFullAvailable
,
$orderAmount
);
}
else
if
(
$coupon
[
'coupon_type'
]
==
\Our\ApiConst
::
discountCouponType
){
$temp
[
'title'
]
=
$coupon
[
'discount'
];
...
...
@@ -99,7 +99,7 @@ class CouponServiceModel extends \Business\AbstractModel{
$result
[
'type'
]
=
intval
(
$coupon
[
'coupon_type'
]);
$result
[
'couponId'
]
=
intval
(
$coupon
[
'id'
]);
if
(
$coupon
[
'coupon_type'
]
==
\Our\ApiConst
::
fullMinusCouponType
){
//满额减免券
$result
[
'title'
]
=
$coupon
[
'cash_money'
]
;
$result
[
'title'
]
=
intval
(
$coupon
[
'cash_money'
])
;
$result
[
'subTitle'
]
=
\Our\Common
::
format
(
\Our\DescribeConst
::
couponFullAvailable
,
$orderAmount
);
}
else
if
(
$coupon
[
'coupon_type'
]
==
\Our\ApiConst
::
discountCouponType
){
$result
[
'title'
]
=
$coupon
[
'discount'
];
...
...
application/models/DAO/Adv/AdvMobile.php
100755 → 100644
View file @
00796f8b
File mode changed from 100755 to 100644
application/models/DAO/Coupon/Coupon.php
View file @
00796f8b
...
...
@@ -241,9 +241,9 @@ class CouponModel extends \DAO\AbstractModel {
$temp
[
'gift_goods_ids'
]
=
isset
(
$coupon
[
'gift_goods_ids'
])
?
$coupon
[
'gift_goods_ids'
]
:
\Our\NameConst
::
emptyString
;
$orderAmount
=
intval
(
$coupon
[
'order_amount'
]);
if
(
$coupon
[
'type'
]
==
\Our\ApiConst
::
noLimitCoupon
){
//无门槛优惠券
$temp
[
'title'
]
=
$coupon
[
'cash_money'
]
.
\Our\DescribeConst
::
noLimitGoodsCouponName
;
$temp
[
'title'
]
=
intval
(
$coupon
[
'cash_money'
])
.
\Our\DescribeConst
::
noLimitGoodsCouponName
;
}
else
if
(
$coupon
[
'coupon_type'
]
==
\Our\ApiConst
::
fullMinusCouponType
){
//满额减免券
$temp
[
'title'
]
=
\Our\Common
::
format
(
\Our\DescribeConst
::
couponTitleFullAvailAble
,
$orderAmount
,
$coupon
[
'cash_money'
]
);
$temp
[
'title'
]
=
\Our\Common
::
format
(
\Our\DescribeConst
::
couponTitleFullAvailAble
,
$orderAmount
,
intval
(
$coupon
[
'cash_money'
])
);
}
else
if
(
$coupon
[
'coupon_type'
]
==
\Our\ApiConst
::
discountCouponType
){
$temp
[
'title'
]
=
\Our\Common
::
format
(
\Our\DescribeConst
::
couponFullDiscount
,
$orderAmount
,
$coupon
[
'discount'
]);
}
else
if
(
$coupon
[
'coupon_type'
]
==
\Our\ApiConst
::
fullForCouponCouponType
){
...
...
@@ -275,10 +275,10 @@ class CouponModel extends \DAO\AbstractModel {
$orderAmount
=
intval
(
$coupon
[
'order_amount'
]);
if
(
$coupon
[
'type'
]
==
\Our\ApiConst
::
noLimitCoupon
){
//无门槛优惠券
$temp
[
'type'
]
=
\Our\ApiConst
::
noLimitCouponType
;
$temp
[
'title'
]
=
$coupon
[
'cash_money'
]
;
$temp
[
'title'
]
=
intval
(
$coupon
[
'cash_money'
])
;
$temp
[
'subTitle'
]
=
\Our\DescribeConst
::
noLimitCoupon
;
}
else
if
(
$coupon
[
'coupon_type'
]
==
\Our\ApiConst
::
fullMinusCouponType
){
//满额减免券
$temp
[
'title'
]
=
$coupon
[
'cash_money'
]
;
$temp
[
'title'
]
=
intval
(
$coupon
[
'cash_money'
])
;
$temp
[
'subTitle'
]
=
\Our\Common
::
format
(
\Our\DescribeConst
::
couponFullAvailable
,
$orderAmount
);
}
else
if
(
$coupon
[
'coupon_type'
]
==
\Our\ApiConst
::
discountCouponType
){
$temp
[
'title'
]
=
$coupon
[
'discount'
];
...
...
conf/application.ini
View file @
00796f8b
...
...
@@ -277,7 +277,7 @@ resources.database.params.hostname = "127.0.0.1"
resources.database.params.port
=
3306
resources.database.params.database
=
"qmcs"
resources.database.params.username
=
"root"
resources.database.params.password
=
"
123456
"
resources.database.params.password
=
"
root
"
resources.database.params.charset
=
"UTF8"
resources.database.params.driver_options.1002
=
"SET NAMES utf8"
...
...
@@ -287,7 +287,7 @@ resources.database.slave.params.hostname = "127.0.0.1"
resources.database.slave.params.port
=
3306
resources.database.slave.params.database
=
"qmcs"
resources.database.slave.params.username
=
"root"
resources.database.slave.params.password
=
"
123456
"
resources.database.slave.params.password
=
"
root
"
resources.database.slave.params.charset
=
"UTF8"
resources.database.slave.params.driver_options.1002
=
"SET NAMES utf8"
...
...
@@ -314,3 +314,48 @@ push.user.service.type=7
elastic.master.host
=
"192.168.1.201"
elastic.master.port
=
"9200"
elastic.master.scheme
=
"http"
;
[lyz : common]
; 数据库配置
resources.database.params.driver
=
"pdo_mysql"
resources.database.params.hostname
=
"127.0.0.1"
resources.database.params.port
=
3306
resources.database.params.database
=
"qmcs"
resources.database.params.username
=
"root"
resources.database.params.password
=
"123456"
resources.database.params.charset
=
"UTF8"
resources.database.params.driver_options.1002
=
"SET NAMES utf8"
; 从库配置
resources.database.slave.params.driver
=
"pdo_mysql"
resources.database.slave.params.hostname
=
"127.0.0.1"
resources.database.slave.params.port
=
3306
resources.database.slave.params.database
=
"qmcs"
resources.database.slave.params.username
=
"root"
resources.database.slave.params.password
=
"123456"
resources.database.slave.params.charset
=
"UTF8"
resources.database.slave.params.driver_options.1002
=
"SET NAMES utf8"
redis.database.params.host
=
"127.0.0.1"
redis.database.params.port
=
"6379"
redis.database.params.prefix
=
"qm_"
;redis.database.params.password = "23456ertyu"
out.config
=
"/data/config"
;
;锁文件
out.locks="/data/locks";
; redis配置
;redis.database.params.password = "test"
;推送配置
push.clientHost
=
"ws://192.168.80.134:9502"
push.host
=
"192.168.134.18"
push.port
=
"9503"
push.open
=
1
push.user.service.id
=
293
push.user.service.type
=
7
elastic.master.host
=
"192.168.1.201"
elastic.master.port
=
"9200"
elastic.master.scheme
=
"http"
;
conf/url.ini
100755 → 100644
View file @
00796f8b
...
...
@@ -134,3 +134,20 @@ config.url.indexUrl="/www/local.qm.com/application/library/React"
config.url.libary
=
"/www/local.qm.com/application/library"
; 文件目录
[lyz : common]
; url相关配置
config.url.resourcesHost
=
"http://local.qm.com"
; 用户中心host
config.url.userHost
=
""
; oss 域名
config.url.ossHost
=
"http://qmoss-01.oss-cn-hangzhou.aliyuncs.com"
;推送域名
config.url.pushHost
=
"127.0.0.1:9503"
;
config.url.convert
=
"/usr/local/bin/wkhtmltoimage"
;
config.url.indexUrl="/www/local.qm.com/application/library/React"
config.url.libary
=
"/www/local.qm.com/application/library"
; 文件目录
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