Commit 432607b1 authored by jiaorz's avatar jiaorz

修改支付宝支付方式

parent 60ccb41c
......@@ -19,10 +19,18 @@ import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.xxfc.platform.vehicle.common.CustomIllegalParamException;
import com.xxfc.platform.vehicle.common.RestResponse;
import com.xxfc.platform.vehicle.constant.*;
import com.xxfc.platform.vehicle.constant.ConstantType;
import com.xxfc.platform.vehicle.constant.RedisKey;
import com.xxfc.platform.vehicle.constant.ResCode.ResCode;
import com.xxfc.platform.vehicle.entity.*;
import com.xxfc.platform.vehicle.mapper.*;
import com.xxfc.platform.vehicle.constant.VehicleBookRecordStatus;
import com.xxfc.platform.vehicle.constant.VehicleStatus;
import com.xxfc.platform.vehicle.entity.BranchCompany;
import com.xxfc.platform.vehicle.entity.Vehicle;
import com.xxfc.platform.vehicle.entity.VehicleBookInfo;
import com.xxfc.platform.vehicle.entity.VehicleBookRecord;
import com.xxfc.platform.vehicle.mapper.BookRecordAccItemMapper;
import com.xxfc.platform.vehicle.mapper.VehicleBookInfoMapper;
import com.xxfc.platform.vehicle.mapper.VehicleMapper;
import com.xxfc.platform.vehicle.pojo.*;
import com.xxfc.platform.vehicle.pojo.dto.VehiclePlanDto;
import lombok.extern.slf4j.Slf4j;
......@@ -56,8 +64,6 @@ import java.util.*;
import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;
import static com.github.wxiaoqi.security.auth.common.constatns.CommonConstants.DATA_ALL_FALSE;
@Service
@Slf4j
public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> implements UserRestInterface {
......@@ -1278,12 +1284,23 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> implements UserR
return ObjectRestResponse.createFailedResult(235, "token失效");
}
List<Integer> companyList = Lists.newArrayList();
if(DATA_ALL_FALSE.equals(userDTO.getDataAll())) { //不能获取全部数据
companyList = dataCompany(userDTO.getDataZone(), userDTO.getDataCompany());
}
List<BranchCompany> branchCompany = branchCompanyBiz.getListByUser(userDTO);
companyList = branchCompany.stream().map(BranchCompany::getId).collect(Collectors.toList());
if(vehiclePlanDto.getParkBranchCompanyId() != null) {
companyList.add(vehiclePlanDto.getParkBranchCompanyId());
if(companyList.size() > 0) {
if(companyList.contains(vehiclePlanDto.getParkBranchCompanyId())) {
companyList.clear();
companyList.add(vehiclePlanDto.getParkBranchCompanyId());
} else {
return ObjectRestResponse.succ();
}
} else {
companyList.add(vehiclePlanDto.getParkBranchCompanyId());
}
}
log.info("用户权限公司ID: companyList = {}", companyList);
vehiclePlanDto.setCompanyIds(companyList);
Query query = new Query(vehiclePlanDto);
PageDataVO<VehicleAndModelInfoVo> pageDataVO = PageDataVO.pageInfo(query, () -> mapper.getVehicle(query.getSuper()));
......
......@@ -112,9 +112,18 @@ public class VehicleBookRecordBiz extends BaseBiz<VehicleBookRecordMapper, Vehic
List<Integer> companyList = Lists.newArrayList();
if(DATA_ALL_FALSE.equals(userDTO.getDataAll())) { //不能获取全部数据
companyList = dataCompany(userDTO.getDataZone(), userDTO.getDataCompany());
}
if(vehicleBookRecordQueryVo.getUserCompany() != null) {
companyList.add(vehicleBookRecordQueryVo.getUserCompany());
if(vehicleBookRecordQueryVo.getCompanyId() != null) {
if(companyList.contains(vehicleBookRecordQueryVo.getCompanyId())) { //如果权限中有这个公司就允许查询, 否则就直接返回空
companyList.clear();
companyList.add(vehicleBookRecordQueryVo.getCompanyId());
} else {
return RestResponse.suc();
}
}
} else {
if(vehicleBookRecordQueryVo.getCompanyId() != null) {
companyList.add(vehicleBookRecordQueryVo.getCompanyId());
}
}
vehicleBookRecordQueryVo.setCompanyIds(companyList);
Query query = new Query(vehicleBookRecordQueryVo);
......@@ -136,10 +145,20 @@ public class VehicleBookRecordBiz extends BaseBiz<VehicleBookRecordMapper, Vehic
List<Integer> companyList = Lists.newArrayList();
if(DATA_ALL_FALSE.equals(userDTO.getDataAll())) { //不能获取全部数据
companyList = dataCompany(userDTO.getDataZone(), userDTO.getDataCompany());
if(vehicleBookRecordQueryVo.getCompanyId() != null) {
if(companyList.contains(vehicleBookRecordQueryVo.getCompanyId())) { //如果权限中有这个公司就允许查询, 否则就直接返回空
companyList.clear();
companyList.add(vehicleBookRecordQueryVo.getCompanyId());
} else {
return RestResponse.suc();
}
}
} else {
if(vehicleBookRecordQueryVo.getCompanyId() != null) {
companyList.add(vehicleBookRecordQueryVo.getCompanyId());
}
}
if(vehicleBookRecordQueryVo.getCompanyId() != null) {
companyList.add(vehicleBookRecordQueryVo.getCompanyId());
}
vehicleBookRecordQueryVo.setCompanyIds(companyList);
Query query = new Query(vehicleBookRecordQueryVo);
PageDataVO<VehicleBookRecordVo> pageDataVO = PageDataVO.pageInfo(query, () -> mapper.getBookRecordInfo(query.getSuper()));
......
......@@ -402,7 +402,7 @@
</foreach>
</if>
and v1.status between 1 and 2
and v1.status between 1 and 2 and v1.book_user != -2
</where>
order by create_time DESC
......@@ -440,6 +440,7 @@
<if test="status != null">
and v1.status = #{status}
</if>
and v1.book_user != -2
</where>
group by v1.id
order by create_time DESC
......
......@@ -475,7 +475,9 @@
#{id}
</foreach>
</if>
and is_del != 1
</where>
ORDER BY parkCompanyName
</select>
<select id="countVehicleByParam" parameterType="com.xxfc.platform.vehicle.pojo.dto.VehiclePlanDto"
......
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