feat:个人车辆详情
parent
c7cf2ecabc
commit
c1c9b19302
|
|
@ -2,6 +2,7 @@ package com.zcloud.primeport.command;
|
|||
|
||||
import com.alibaba.cola.exception.BizException;
|
||||
import com.zcloud.primeport.domain.gateway.VehicleApplyGateway;
|
||||
import com.zcloud.primeport.domain.gateway.VehicleAuditGateway;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
|
@ -17,10 +18,12 @@ import org.springframework.transaction.annotation.Transactional;
|
|||
@AllArgsConstructor
|
||||
public class VehicleApplyRemoveExe {
|
||||
private final VehicleApplyGateway vehicleApplyGateway;
|
||||
private final VehicleAuditGateway vehicleAuditGateway;
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean execute(Long id) {
|
||||
boolean res = vehicleApplyGateway.deletedVehicleApplyById(id);
|
||||
vehicleAuditGateway.deletedVehicleAuditByApplyId(id);
|
||||
if (!res) {
|
||||
throw new BizException("删除失败");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ public class VehicleApplyUpdateCmd extends Command {
|
|||
private String vehicleTypeName;
|
||||
@ApiModelProperty(value = "授权范围港区与区域", name = "gateLevelAuthArea", required = true)
|
||||
@NotEmpty(message = "授权范围港区与区域不能为空")
|
||||
private Object gateLevelAuthArea;
|
||||
private String gateLevelAuthArea;
|
||||
@ApiModelProperty(value = "访问起始时间", name = "visitStartTime", required = true)
|
||||
@NotNull(message = "访问起始时间不能为空")
|
||||
private String visitStartTime;
|
||||
|
|
|
|||
|
|
@ -26,5 +26,7 @@ public interface VehicleAuditGateway {
|
|||
Boolean deletedVehicleAuditById(Long id);
|
||||
|
||||
Boolean deletedVehicleAuditByIds(Long[] id);
|
||||
|
||||
void deletedVehicleAuditByApplyId(Long id);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ public class VehicleApplyGatewayImpl implements VehicleApplyGateway {
|
|||
VehicleApplyDO d = new VehicleApplyDO();
|
||||
BeanUtils.copyProperties(vehicleApplyE, d);
|
||||
vehicleApplyRepository.save(d);
|
||||
vehicleApplyE.setId(d.getId());
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.zcloud.primeport.gatewayimpl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.zcloud.primeport.domain.gateway.VehicleAuditGateway;
|
||||
import com.zcloud.primeport.domain.model.VehicleAuditE;
|
||||
import com.zcloud.primeport.persistence.dataobject.VehicleAuditDO;
|
||||
|
|
@ -46,5 +47,12 @@ public class VehicleAuditGatewayImpl implements VehicleAuditGateway {
|
|||
public Boolean deletedVehicleAuditByIds(Long[] ids) {
|
||||
return vehicleAuditRepository.removeByIds(Collections.singletonList(ids));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deletedVehicleAuditByApplyId(Long id) {
|
||||
UpdateWrapper<VehicleAuditDO> objectUpdateWrapper = new UpdateWrapper<>();
|
||||
objectUpdateWrapper.eq("vehicle_apply_id",id);
|
||||
vehicleAuditRepository.remove(objectUpdateWrapper);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -52,10 +52,10 @@
|
|||
<if test="parmas.auditFlag != null">
|
||||
AND f.audit_flag = #{parmas.auditFlag}
|
||||
</if>
|
||||
<if test="parmas.visitStartTime != null">
|
||||
<if test="parmas.visitStartTime != null and parmas.visitStartTime != ''">
|
||||
AND f.visit_start_time LIKE CONCAT('%', #{parmas.gateName}, '%')
|
||||
</if>
|
||||
<if test="parmas.visitEndTime != null">
|
||||
<if test="parmas.visitEndTime != null and parmas.visitEndTime != ''">
|
||||
AND f.visit_end_time LIKE CONCAT('%', #{parmas.gateName}, '%')
|
||||
</if>
|
||||
<if test="parmas.vehicleBelongType != null and parmas.vehicleBelongType != ''">
|
||||
|
|
|
|||
Loading…
Reference in New Issue