Commit d416bc8a authored by 赵啸非's avatar 赵啸非

修改同步用户

parent 8da47f51
package com.mortals.xhx.module.device.service.impl;
import com.alibaba.fastjson.JSON;
import com.mortals.framework.common.Rest;
import com.mortals.xhx.common.pdu.LoginForm;
import com.mortals.xhx.common.pdu.device.DeviceReq;
......@@ -29,6 +30,12 @@ public class DeviceServiceImpl extends AbstractCRUDServiceImpl<DeviceDao, Device
@Autowired
private IDeviceFeign deviceFeign;
@Override
protected void validData(DeviceEntity entity, Context context) throws AppException {
super.validData(entity, context);
entity.setDeviceCode(entity.getDeviceMac());
}
@Override
protected void saveAfter(DeviceEntity entity, Context context) throws AppException {
super.saveAfter(entity, context);
......@@ -36,13 +43,23 @@ public class DeviceServiceImpl extends AbstractCRUDServiceImpl<DeviceDao, Device
String token = getToken();
DeviceReq deviceReq = new DeviceReq();
deviceReq.setReceiveMethod(1);
deviceFeign.deviceCall(deviceReq,token);
deviceReq.setDeviceName(entity.getDeviceName());
deviceReq.setDeviceCode(entity.getDeviceCode());
deviceReq.setProductCode(entity.getProductCode());
deviceReq.setIp(entity.getIp());
deviceReq.setPort(entity.getPort());
deviceReq.setSiteId(1L);
deviceReq.setSiteCode("511500000000-0001");
deviceReq.setSiteName("宜宾市民中心");
deviceReq.setLeadingOfficial(entity.getLeadingOfficial());
deviceReq.setLeadingOfficialTelephone(entity.getLeadingOfficialTelephone());
deviceReq.setDeviceStatus(0);
deviceReq.setSource(1);
Rest<String> rest = deviceFeign.deviceCall(deviceReq, token);
log.info("添加结果:{}", JSON.toJSONString(rest));
}
@Override
protected void updateAfter(DeviceEntity entity, Context context) throws AppException {
super.updateAfter(entity, context);
......
package com.mortals.xhx.module.workman.model;
import java.util.List;
import java.util.ArrayList;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.mortals.xhx.module.workman.model.vo.WorkmanVo;
import lombok.Data;
/**
......@@ -67,6 +64,7 @@ public class WorkmanEntity extends WorkmanVo {
/**
* 密码
*/
@JsonIgnore
private String loginPwd;
@Override
public int hashCode() {
......
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