Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform
Project
Project
Details
Activity
Releases
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
youjj
cloud-platform
Commits
be859071
Commit
be859071
authored
Jun 14, 2019
by
hezhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加删除
parent
c3de5602
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
1 deletion
+35
-1
TourGoodBiz.java
...src/main/java/com/xxfc/platform/tour/biz/TourGoodBiz.java
+10
-0
TourGoodVerificationBiz.java
...a/com/xxfc/platform/tour/biz/TourGoodVerificationBiz.java
+5
-0
TourGoodVerificationMapper.java
...xxfc/platform/tour/mapper/TourGoodVerificationMapper.java
+6
-0
TourGoodVerificationMapper.xml
.../src/main/resources/mapper/TourGoodVerificationMapper.xml
+14
-1
No files found.
xx-tour/xx-tour-server/src/main/java/com/xxfc/platform/tour/biz/TourGoodBiz.java
View file @
be859071
...
...
@@ -107,6 +107,7 @@ public class TourGoodBiz extends BaseBiz<TourGoodMapper, TourGood> {
mapper
.
updateByPrimaryKeySelective
(
good
);
}
if
(
goodId
>
0
){
List
<
GoodBannerDTO
>
bannerList
=
dto
.
getBannerDTOS
();
if
(
bannerList
.
size
()>
0
){
List
<
Integer
>
bannerIds
=
new
ArrayList
<>();
...
...
@@ -130,6 +131,7 @@ public class TourGoodBiz extends BaseBiz<TourGoodMapper, TourGood> {
bannerBiz
.
delGoodBanner
(
goodId
,
null
);
}
List
<
GoodSiteDTO
>
siteDTOList
=
dto
.
getSiteDTOS
();
List
<
Integer
>
sites
=
new
ArrayList
<>();
if
(
siteDTOList
.
size
()>
0
){
List
<
Integer
>
siteIds
=
new
ArrayList
<>();
for
(
GoodSiteDTO
siteDTO:
siteDTOList
){
...
...
@@ -143,6 +145,9 @@ public class TourGoodBiz extends BaseBiz<TourGoodMapper, TourGood> {
siteBiz
.
updateById
(
site
);
siteIds
.
add
(
siteId
);
}
if
(
site
.
getType
()==
0
){
sites
.
add
(
siteId
);
}
}
if
(
siteIds
.
size
()>
0
){
siteBiz
.
delGoodSite
(
null
,
siteIds
);
...
...
@@ -170,6 +175,7 @@ public class TourGoodBiz extends BaseBiz<TourGoodMapper, TourGood> {
tagBiz
.
delGoodTag
(
goodId
,
null
);
}
List
<
GoodSpePriceDTO
>
priceDTOList
=
dto
.
getPriceDTOS
();
List
<
Integer
>
prices
=
new
ArrayList
<>();
if
(
siteDTOList
.
size
()>
0
){
List
<
Integer
>
priceIds
=
new
ArrayList
<>();
for
(
GoodSpePriceDTO
priceDTO:
priceDTOList
){
...
...
@@ -206,13 +212,17 @@ public class TourGoodBiz extends BaseBiz<TourGoodMapper, TourGood> {
speBiz
.
insertSelective
(
spePrice
);
}
else
{
speBiz
.
updateById
(
spePrice
);
priceId
=
spePrice
.
getId
();
priceIds
.
add
(
priceId
);
}
prices
.
add
(
priceId
);
}
if
(
priceIds
.
size
()>
0
){
speBiz
.
delGoodSpe
(
null
,
priceIds
);
}
}
List
<
TourGoodVerification
>
verifications
=
new
ArrayList
<>();
}
}
catch
(
IllegalAccessException
e
)
{
e
.
printStackTrace
();
...
...
xx-tour/xx-tour-server/src/main/java/com/xxfc/platform/tour/biz/TourGoodVerificationBiz.java
View file @
be859071
...
...
@@ -5,6 +5,8 @@ import com.xxfc.platform.tour.entity.TourGoodVerification;
import
com.xxfc.platform.tour.mapper.TourGoodVerificationMapper
;
import
com.github.wxiaoqi.security.common.biz.BaseBiz
;
import
java.util.List
;
/**
* 旅游线路核销明细
*
...
...
@@ -14,4 +16,7 @@ import com.github.wxiaoqi.security.common.biz.BaseBiz;
*/
@Service
public
class
TourGoodVerificationBiz
extends
BaseBiz
<
TourGoodVerificationMapper
,
TourGoodVerification
>
{
//删除线路核销
public
void
delGoodVerification
(
Integer
goodId
,
List
<
Integer
>
ids
){
mapper
.
delVerification
(
ids
);}
}
\ No newline at end of file
xx-tour/xx-tour-server/src/main/java/com/xxfc/platform/tour/mapper/TourGoodVerificationMapper.java
View file @
be859071
...
...
@@ -2,8 +2,11 @@ package com.xxfc.platform.tour.mapper;
import
com.xxfc.platform.tour.entity.TourGoodVerification
;
import
org.apache.ibatis.annotations.Param
;
import
tk.mybatis.mapper.common.Mapper
;
import
java.util.List
;
/**
* 旅游线路核销明细
*
...
...
@@ -12,5 +15,8 @@ import tk.mybatis.mapper.common.Mapper;
* @date 2019-06-14 09:36:50
*/
public
interface
TourGoodVerificationMapper
extends
Mapper
<
TourGoodVerification
>
{
//删除线路核销
public
int
delVerification
(
@Param
(
"list"
)
List
<
Integer
>
ids
);
}
xx-tour/xx-tour-server/src/main/resources/mapper/TourGoodVerificationMapper.xml
View file @
be859071
...
...
@@ -9,11 +9,24 @@
<result
property=
"speId"
column=
"spe_id"
/>
<result
property=
"siteId"
column=
"site_id"
/>
<result
property=
"goodId"
column=
"good_id"
/>
<result
property=
"departTime"
column=
"depart_time"
/>
<result
property=
"totalPerson"
column=
"total_person"
/>
<result
property=
"verificationPerson"
column=
"verification_person"
/>
<result
property=
"status"
column=
"status"
/>
<result
property=
"isDel"
column=
"is_del"
/>
</resultMap>
<update
id=
"delVerification"
>
update tour_good_verification set is_del=1
where total_person=0 and verification_person=0
<if
test=
"list!=null "
>
and id not in (
<trim
suffixOverrides=
","
>
<foreach
collection=
"list"
item=
"id"
>
#{id},
</foreach>
</trim>
)
</if>
</update>
</mapper>
\ No newline at end of file
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