Commit bce3f156 authored by hezhen's avatar hezhen

修改编辑

parent 725372b9
...@@ -50,13 +50,6 @@ public class TourGoodVerification implements Serializable { ...@@ -50,13 +50,6 @@ public class TourGoodVerification implements Serializable {
@ApiModelProperty(value = "出发路线id") @ApiModelProperty(value = "出发路线id")
private Integer siteId; private Integer siteId;
/**
* 出发时间
*/
@Column(name = "depart_time")
@ApiModelProperty("出发时间")
private Long departTime;
/** /**
* 总人数 * 总人数
......
...@@ -46,6 +46,8 @@ public class TourGoodBiz extends BaseBiz<TourGoodMapper, TourGood> { ...@@ -46,6 +46,8 @@ public class TourGoodBiz extends BaseBiz<TourGoodMapper, TourGood> {
private TourGoodTagBiz tagBiz; private TourGoodTagBiz tagBiz;
@Autowired @Autowired
private TourGoodSpeBiz speBiz; private TourGoodSpeBiz speBiz;
@Autowired
private TourGoodVerificationBiz verificationBiz;
@Autowired @Autowired
private UserFeign userFeign; private UserFeign userFeign;
...@@ -141,6 +143,7 @@ public class TourGoodBiz extends BaseBiz<TourGoodMapper, TourGood> { ...@@ -141,6 +143,7 @@ public class TourGoodBiz extends BaseBiz<TourGoodMapper, TourGood> {
site.setGoodId(goodId); site.setGoodId(goodId);
if(siteId==null||siteId==0){ if(siteId==null||siteId==0){
siteBiz.insertSelective(site); siteBiz.insertSelective(site);
siteId=site.getId();
}else { }else {
siteBiz.updateById(site); siteBiz.updateById(site);
siteIds.add(siteId); siteIds.add(siteId);
...@@ -210,9 +213,9 @@ public class TourGoodBiz extends BaseBiz<TourGoodMapper, TourGood> { ...@@ -210,9 +213,9 @@ public class TourGoodBiz extends BaseBiz<TourGoodMapper, TourGood> {
} }
if(priceId==null||priceId==0){ if(priceId==null||priceId==0){
speBiz.insertSelective(spePrice); speBiz.insertSelective(spePrice);
priceId=spePrice.getId();
}else { }else {
speBiz.updateById(spePrice); speBiz.updateById(spePrice);
priceId=spePrice.getId();
priceIds.add(priceId); priceIds.add(priceId);
} }
prices.add(priceId); prices.add(priceId);
...@@ -221,7 +224,40 @@ public class TourGoodBiz extends BaseBiz<TourGoodMapper, TourGood> { ...@@ -221,7 +224,40 @@ public class TourGoodBiz extends BaseBiz<TourGoodMapper, TourGood> {
speBiz.delGoodSpe(null,priceIds); speBiz.delGoodSpe(null,priceIds);
} }
} }
if(sites.size()>0){
List<Integer> vids=new ArrayList<>();
List<TourGoodVerification> verifications=new ArrayList<>();
for (Integer siteId:sites){
if(prices.size()>0){
for(Integer priceId:prices){
TourGoodVerification verification=new TourGoodVerification();
verification.setGoodId(goodId);
verification.setSiteId(siteId);
verification.setSpeId(priceId);
verification.setIsDel(0);
TourGoodVerification verification1=verificationBiz.selectOne(verification);
if(verification1==null){
verification.setTotalPerson(0);
verification.setVerificationPerson(0);
verification.setStatus(0);
verifications.add(verification);
}else {
vids.add(verification1.getId());
}
}
}
}
if(vids.size()>0){
verificationBiz.delGoodVerification(vids);
}
if(verifications.size()>0){
verificationBiz.addBathTourGoodVerification(verifications);
}
}
List<TourGoodVerification> verifications=new ArrayList<>(); List<TourGoodVerification> verifications=new ArrayList<>();
} }
} catch (IllegalAccessException e) { } catch (IllegalAccessException e) {
......
...@@ -4,7 +4,6 @@ import org.springframework.stereotype.Service; ...@@ -4,7 +4,6 @@ import org.springframework.stereotype.Service;
import com.xxfc.platform.tour.entity.TourGoodVerification; import com.xxfc.platform.tour.entity.TourGoodVerification;
import com.xxfc.platform.tour.mapper.TourGoodVerificationMapper; import com.xxfc.platform.tour.mapper.TourGoodVerificationMapper;
import com.github.wxiaoqi.security.common.biz.BaseBiz; import com.github.wxiaoqi.security.common.biz.BaseBiz;
import java.util.List; import java.util.List;
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment