Browse Source

调整

master
zouhantao 1 month ago
parent
commit
616049f038

+ 1
- 1
gly-base-core/src/main/java/cn/com/taiji/core/entity/ass/AssAgencyConfig.java View File

@Column(name = "DEAL_TYPE") @Column(name = "DEAL_TYPE")
private Integer dealType;// 不支持设备更换后处理方式 1-新版 2-提示用户 private Integer dealType;// 不支持设备更换后处理方式 1-新版 2-提示用户
@Column(name = "DEVICE_CHANGE_NOTICE") @Column(name = "DEVICE_CHANGE_NOTICE")
private Boolean deviceChangeNotice;// 提示 dealType为2时必填
private String deviceChangeNotice;// 提示 dealType为2时必填
@Column(name = "VEHICLE_CHANGE") @Column(name = "VEHICLE_CHANGE")
private Boolean vehicleChange;// 支持车牌变更 private Boolean vehicleChange;// 支持车牌变更
@Column(name = "DEVICE_CANCEL") @Column(name = "DEVICE_CANCEL")

+ 18
- 2
zhywpt-app-userw/src/main/java/cn/com/taiji/userw/manager/agency/AgencyConfigManagerImpl.java View File



@Override @Override
public AgencyConfigResponse delete(AgencyConfigDeleteRequest req) throws ManagerException { public AgencyConfigResponse delete(AgencyConfigDeleteRequest req) throws ManagerException {
AssAgencyConfig agencyConfig = agencyConfigRepo.findByAgencyId(req.getAgencyId());
AssAgencyConfig agencyConfig = agencyConfigRepo.findById(req.getId()).orElse(null);
if (agencyConfig == null){ if (agencyConfig == null){
throw new ManagerException("未找到该条渠道信息。"); throw new ManagerException("未找到该条渠道信息。");
} }
if (agencyConfig != null){ if (agencyConfig != null){
throw new ManagerException("该渠道已有权限记录。"); throw new ManagerException("该渠道已有权限记录。");
} }
checkReq(req.getDeviceChange(),req.getDealType(),req.getDeviceChangeNotice());
agencyConfig = copyProperties(req, new AssAgencyConfig()); agencyConfig = copyProperties(req, new AssAgencyConfig());
agencyConfig.setCreateTime(LocalDateTime.now()); agencyConfig.setCreateTime(LocalDateTime.now());
agencyConfig.setUpdateTime(LocalDateTime.now()); agencyConfig.setUpdateTime(LocalDateTime.now());
agencyConfig.setOpenId(findOpenIdByToken(req.getAccessToken())); agencyConfig.setOpenId(findOpenIdByToken(req.getAccessToken()));
agencyConfig.setStatus(EnableStatus.ENABLE); agencyConfig.setStatus(EnableStatus.ENABLE);
agencyConfigRepo.merge(agencyConfig);
agencyConfigRepo.persist(agencyConfig);
AgencyConfigResponse response = copyProperties(req, new AgencyConfigResponse()); AgencyConfigResponse response = copyProperties(req, new AgencyConfigResponse());
return response; return response;
} }
if (agencyConfig == null){ if (agencyConfig == null){
throw new ManagerException("未找到该条渠道信息。"); throw new ManagerException("未找到该条渠道信息。");
} }
checkReq(req.getDeviceChange(),req.getDealType(),req.getDeviceChangeNotice());
BeanUtils.copyProperties(req,agencyConfig); BeanUtils.copyProperties(req,agencyConfig);
agencyConfig.setUpdateTime(LocalDateTime.now()); agencyConfig.setUpdateTime(LocalDateTime.now());
agencyConfigRepo.merge(agencyConfig);
AgencyConfigResponse response = copyProperties(req, new AgencyConfigResponse()); AgencyConfigResponse response = copyProperties(req, new AgencyConfigResponse());
return response; return response;
} }
throw new ManagerException("没找到渠道。"); throw new ManagerException("没找到渠道。");
} }
} }
public void checkReq(Boolean deviceChange, Integer dealType, String deviceChangeNotice) throws ManagerException{
if (!deviceChange){
if (dealType == null){
throw new ManagerException("请选择处理方式。");
} else {
if (dealType == 2){
if (deviceChangeNotice == null){
throw new ManagerException("请填写提示。");
}
}
}
}
}
} }

+ 1
- 1
zhywpt-app-userw/src/main/java/cn/com/taiji/userw/model/agency/config/AgencyConfigAddRequest.java View File

private String noticeUrl;// 服务地址 private String noticeUrl;// 服务地址
private Boolean deviceChange;// 支持设备更换 private Boolean deviceChange;// 支持设备更换
private Integer dealType;// 不支持设备更换后处理方式 1-新版 2-提示用户 private Integer dealType;// 不支持设备更换后处理方式 1-新版 2-提示用户
private Boolean deviceChangeNotice;// 提示 dealType为2时必填
private String deviceChangeNotice;// 提示 dealType为2时必填
private Boolean vehicleChange;// 支持车牌变更 private Boolean vehicleChange;// 支持车牌变更
private Boolean deviceCancel;// 支持设备注销 private Boolean deviceCancel;// 支持设备注销
private Boolean signChange;// 支持签约代扣信息变更 private Boolean signChange;// 支持签约代扣信息变更

+ 1
- 1
zhywpt-app-userw/src/main/java/cn/com/taiji/userw/model/agency/config/AgencyConfigDeleteRequest.java View File

public class AgencyConfigDeleteRequest extends AbstractStaffBizRequestDTO { public class AgencyConfigDeleteRequest extends AbstractStaffBizRequestDTO {


@ApiModelProperty(value = "渠道编号") @ApiModelProperty(value = "渠道编号")
private String agencyId;// 渠道编号
private String id;// 渠道编号
@ApiModelProperty(value = "状态") @ApiModelProperty(value = "状态")
private EnableStatus status; private EnableStatus status;



+ 1
- 1
zhywpt-app-userw/src/main/java/cn/com/taiji/userw/model/agency/config/AgencyConfigUpdateRequest.java View File

private String noticeUrl;// 服务地址 private String noticeUrl;// 服务地址
private Boolean deviceChange;// 支持设备更换 private Boolean deviceChange;// 支持设备更换
private Integer dealType;// 不支持设备更换后处理方式 1-新版 2-提示用户 private Integer dealType;// 不支持设备更换后处理方式 1-新版 2-提示用户
private Boolean deviceChangeNotice;// 提示 dealType为2时必填
private String deviceChangeNotice;// 提示 dealType为2时必填
private Boolean vehicleChange;// 支持车牌变更 private Boolean vehicleChange;// 支持车牌变更
private Boolean deviceCancel;// 支持设备注销 private Boolean deviceCancel;// 支持设备注销
private Boolean signChange;// 支持签约代扣信息变更 private Boolean signChange;// 支持签约代扣信息变更

Loading…
Cancel
Save