瀏覽代碼

日志调整

master
yangpeilai 1 月之前
父節點
當前提交
10ce253cf8

+ 2
- 10
zhywpt-app-managew/src/main/java/cn/com/taiji/managew/dto/ass/AssDeviceLossReqDTO.java 查看文件

package cn.com.taiji.managew.dto.ass; package cn.com.taiji.managew.dto.ass;


import cn.com.taiji.common.valid.ViolationValidator; import cn.com.taiji.common.valid.ViolationValidator;
import cn.com.taiji.core.dto.AbstractBizRequestDTO;
import cn.com.taiji.core.dto.AbstractStaffBizRequestDTO;
import cn.com.taiji.core.entity.dict.basic.SourceType; import cn.com.taiji.core.entity.dict.basic.SourceType;
import cn.com.taiji.core.model.comm.protocol.constraint.IntegerConstant; import cn.com.taiji.core.model.comm.protocol.constraint.IntegerConstant;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
@ApiModel(description = "卡签挂失解挂") @ApiModel(description = "卡签挂失解挂")
@Getter @Getter
@Setter @Setter
public class AssDeviceLossReqDTO extends AbstractBizRequestDTO {
public class AssDeviceLossReqDTO extends AbstractStaffBizRequestDTO {


//业务类型 1-单卡挂失 2-单签挂失 3-卡签挂失 4-单卡解挂 5-单签解挂 6-卡签解挂 //业务类型 1-单卡挂失 2-单签挂失 3-卡签挂失 4-单卡解挂 5-单签解挂 6-卡签解挂
@ApiModelProperty(value = "业务类型", required = true) @ApiModelProperty(value = "业务类型", required = true)
@ApiModelProperty(value = "行驶证反面") @ApiModelProperty(value = "行驶证反面")
private String vehNegImgUrl; private String vehNegImgUrl;


//员工Id
@ApiModelProperty(value = "员工Id")
private String staffId;

@Override @Override
protected void validate(ViolationValidator validator) { protected void validate(ViolationValidator validator) {
super.validate(validator); super.validate(validator);
validator.addViolation("loginSource", "登录来源有误"); validator.addViolation("loginSource", "登录来源有误");
} }
if (getOrderSource() == SourceType.SERVICE_HALL) { if (getOrderSource() == SourceType.SERVICE_HALL) {
validator.validFieldNotBlank("staffId", staffId);
validator.validFieldNotBlank("vehPosImgUrl", vehPosImgUrl); validator.validFieldNotBlank("vehPosImgUrl", vehPosImgUrl);
validator.validFieldNotBlank("vehNegImgUrl", vehNegImgUrl); validator.validFieldNotBlank("vehNegImgUrl", vehNegImgUrl);
} }
if (getOrderSource() == SourceType.WEB){
validator.validFieldNotBlank("staffId", staffId);
}
} }
} }

+ 3
- 3
zhywpt-app-managew/src/main/java/cn/com/taiji/managew/manager/ass/AssDeviceLossManagerImpl.java 查看文件

} }


logger.info("=>返回结果:订单号{},状态码{},状态信息{}",response.getOrderNo(), response.getCode(),response.getMsg()); logger.info("=>返回结果:订单号{},状态码{},状态信息{}",response.getOrderNo(), response.getCode(),response.getMsg());
// 保存日志操作日志
persistOperateLog(operateType, response.getOrderNo(), source, findOpenIdByToken(reqDto.getAccessToken()), "挂失解挂操作" + response.getMsg());


if (!"1".equals(response.getCode())) { if (!"1".equals(response.getCode())) {
throw new ManagerException("出错了", response.getMsg());
throw new ManagerException("出错了"+response.getMsg());
} }
// 保存日志操作日志,失败不计入日志
persistOperateLog(operateType, response.getOrderNo(), source, findOpenIdByToken(reqDto.getAccessToken()), "挂失解挂操作" + response.getMsg());
} }


@Override @Override

Loading…
取消
儲存