Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
C
consume
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
竹天卫
consume
Commits
3eab4ba1
Commit
3eab4ba1
authored
Nov 03, 2020
by
mengbali153
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优惠卷过滤
parent
996aaa91
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
21 additions
and
14 deletions
+21
-14
SysCouponMapper.java
...a/cn/wise/sc/consume/business/mapper/SysCouponMapper.java
+1
-1
SysCouponMapper.xml
...n/wise/sc/consume/business/mapper/xml/SysCouponMapper.xml
+1
-1
CMBOneNetPayService.java
...sc/consume/business/service/impl/CMBOneNetPayService.java
+4
-1
SysCouponServiceImpl.java
...c/consume/business/service/impl/SysCouponServiceImpl.java
+14
-10
application.yml
consume-business/src/main/resources/application.yml
+1
-1
No files found.
consume-business/src/main/java/cn/wise/sc/consume/business/mapper/SysCouponMapper.java
View file @
3eab4ba1
...
...
@@ -29,7 +29,7 @@ public interface SysCouponMapper extends BaseMapper<SysCoupon> {
CouponDetailVO
getCouponDetail
(
Long
id
);
List
<
CouponAppListVO
>
getCouponAppList
(
@Param
(
"coridc"
)
String
coridc
,
@Param
(
"usridc"
)
String
usridc
,
QueryWrapper
<
CouponAppListVO
>
qw
);
List
<
CouponAppListVO
>
getCouponAppList
(
@Param
(
"coridc"
)
String
coridc
,
@Param
(
"usridc"
)
String
usridc
);
List
<
SysCoupon
>
getById
(
@Param
(
"param"
)
Long
id
);
...
...
consume-business/src/main/java/cn/wise/sc/consume/business/mapper/xml/SysCouponMapper.xml
View file @
3eab4ba1
...
...
@@ -41,7 +41,7 @@
where scd.coupon_id = sc.id and suc.user_id = #{usridc} ) as isReceive
from sys_coupon sc
left join sys_enterprise se on se.id = sc.enterprise_id
where se.coridc = #{coridc}
where se.coridc = #{coridc}
and sc.`status` =1 and sc.is_delete =1;
</select>
...
...
consume-business/src/main/java/cn/wise/sc/consume/business/service/impl/CMBOneNetPayService.java
View file @
3eab4ba1
...
...
@@ -196,7 +196,10 @@ public class CMBOneNetPayService {
try
{
couponDetailService
.
beVerdue
();
List
<
CouponAppListVO
>
list
=
couponService
.
getCouponAppList
(
coridc
,
usridc
);
if
(
list
!=
null
||
list
.
size
()!=
0
){
return
BaseResponse
.
ok
(
list
);
}
return
BaseResponse
.
ok
(
"无可用优惠卷"
);
}
catch
(
Exception
e
)
{
log
.
error
(
"企业优惠券列表异常! 参数:{}"
,
coridc
+
","
+
usridc
);
return
BaseResponse
.
error
(
e
.
getMessage
(),
this
.
getClass
().
getName
());
...
...
consume-business/src/main/java/cn/wise/sc/consume/business/service/impl/SysCouponServiceImpl.java
View file @
3eab4ba1
package
cn
.
wise
.
sc
.
consume
.
business
.
service
.
impl
;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.wise.sc.consume.business.entity.SysCoupon
;
import
cn.wise.sc.consume.business.entity.SysCouponDetail
;
import
cn.wise.sc.consume.business.entity.SysEnterprise
;
...
...
@@ -39,7 +40,7 @@ public class SysCouponServiceImpl extends ServiceImpl<SysCouponMapper, SysCoupon
private
static
final
Logger
log
=
LoggerFactory
.
getLogger
(
"SysCouponServiceImpl"
);
@
Autowired
@
Resource
private
SysCouponMapper
couponMapper
;
@Resource
...
...
@@ -62,25 +63,28 @@ public class SysCouponServiceImpl extends ServiceImpl<SysCouponMapper, SysCoupon
@Override
public
List
<
CouponAppListVO
>
getCouponAppList
(
String
coridc
,
String
usridc
)
{
QueryWrapper
<
CouponAppListVO
>
qw
=
new
QueryWrapper
<>();
qw
.
eq
(
"status"
,
1
);
qw
.
eq
(
"isDelete"
,
1
);
List
<
CouponAppListVO
>
list
=
couponMapper
.
getCouponAppList
(
coridc
,
usridc
,
qw
);
List
<
CouponAppListVO
>
list
=
couponMapper
.
getCouponAppList
(
coridc
,
usridc
);
List
<
CouponAppListVO
>
rts
=
new
ArrayList
<>(
list
.
size
());
if
(
list
!=
null
){
if
(
CollectionUtil
.
isNotEmpty
(
list
)
){
for
(
CouponAppListVO
couponAppListVO:
list
){
Long
coupId
=
couponAppListVO
.
getId
();
// List<SysCoupon> byId = sysCouponMapper.getById(coupId);
List
<
SysCouponDetail
>
byCouponId
=
sysCouponDetailMapper
.
getByCouponId
(
coupId
);
QueryWrapper
<
SysCouponDetail
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"coupon_id"
,
couponAppListVO
.
getId
()
);
queryWrapper
.
eq
(
"is_receive"
,
0
);
List
<
SysCouponDetail
>
scList
=
sysCouponDetailMapper
.
selectList
(
queryWrapper
);
if
(!
CollectionUtil
.
isEmpty
(
scList
))
{
rts
.
add
(
couponAppListVO
);
}
/*List<SysCouponDetail> byCouponId=sysCouponDetailMapper.getByCouponId(coupId);
for (SysCouponDetail sysCouponDetail:byCouponId){
boolean equals = sysCouponDetail.getIsReceive() == 0;
boolean equals1 = sysCouponDetail.getIsDelete() == 1;
if ((equals && equals1)){
rts.add(couponAppListVO);
}
}*/
}
}
}
return
rts
;
...
...
consume-business/src/main/resources/application.yml
View file @
3eab4ba1
...
...
@@ -9,7 +9,7 @@ spring:
datasource
:
# 192.168.110.84 admin!@#123
url
:
jdbc:mysql://localhost:3306/cmb_consumption?useUnicode=true&characterEncoding=UTF-8&useSSL=false&useTimezone=true&serverTimezone=CTT
#
url: jdbc:mysql://192.168.110.84/cmb_consumption?useUnicode=true&characterEncoding=UTF-8&useSSL=false&useTimezone=true&serverTimezone=CTT
#
url: jdbc:mysql://192.168.110.84/cmb_consumption?useUnicode=true&characterEncoding=UTF-8&useSSL=false&useTimezone=true&serverTimezone=CTT
username
:
root
password
:
admin!@#123
driverClassName
:
com.mysql.jdbc.Driver
...
...
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