add connectorType field to /terminal/updateXhpcTerminalName interface

This commit is contained in:
wen 2021-09-28 16:05:52 +08:00
parent 60fd79ac19
commit 1a9712de70
7 changed files with 23 additions and 7 deletions

View File

@ -71,7 +71,7 @@ public class XhpcTerminalController extends BaseController {
@PostMapping(value = "/updateXhpcTerminalName")
public AjaxResult updateXhpcTerminalName(@RequestBody XhpcTerminal xhpcTerminal) {
return xhpcTerminalService.updateXhpcTerminalName(xhpcTerminal.getTerminalId(), xhpcTerminal.getName(), xhpcTerminal.getSerialNumber());
return xhpcTerminalService.updateXhpcTerminalName(xhpcTerminal.getTerminalId(), xhpcTerminal.getName(), xhpcTerminal.getSerialNumber(),xhpcTerminal.getConnectorType());
}
/**

View File

@ -41,7 +41,7 @@ public interface IXhpcTerminalService {
* 修改
* @return
*/
AjaxResult updateXhpcTerminalName(Long terminalId,String name,String serialNumber);
AjaxResult updateXhpcTerminalName(Long terminalId,String name,String serialNumber,int connectorType);
/**
* 终端详情

View File

@ -59,13 +59,14 @@ public class XhpcTerminalServiceImpl implements IXhpcTerminalService {
}
@Override
public AjaxResult updateXhpcTerminalName(Long terminalId, String name, String serialNumber) {
public AjaxResult updateXhpcTerminalName(Long terminalId, String name, String serialNumber,int connectorType) {
XhpcTerminal xhpcTerminal = xhpcTerminalMapper.selectXhpcTerminalById(terminalId);
xhpcTerminal.setName(name);
xhpcTerminal.setSerialNumber(serialNumber);
xhpcTerminal.setConnectorType(connectorType);
xhpcTerminalMapper.updateXhpcTerminal(xhpcTerminal);
return AjaxResult.success();
return AjaxResult.success(null);
}
@Override

View File

@ -22,6 +22,7 @@
<result property="remark" column="remark"/>
<result property="rateModelId" column="rate_model_id"/>
<result property="operatorIdEvcs" column="operator_id_evcs"/>
<result property="connectorType" column="connector_type" />
</resultMap>
@ -40,7 +41,8 @@
create_by,
update_time,
update_by,
remark
remark,
connector_type
from xhpc_terminal
</sql>
@ -127,6 +129,7 @@
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="operatorIdEvcs != null">operator_id_evcs = #{operatorIdEvcs}</if>
<if test="connectorType != null">connector_type = #{connectorType}</if>
</trim>
where terminal_id = #{terminalId}
</update>

View File

@ -25,7 +25,7 @@ public interface PowerPileService {
@PutMapping("charging/stop/{orderNo}/{pileNo}/{gunId}/{version}")
R stopCharging(@PathVariable("orderNo") String orderNo, @PathVariable("pileNo") String pileNo,
@PathVariable("gunId") String gunId, @PathVariable("version") String version);
@PathVariable("gunId") String gunId);
@PostMapping("/pile/whitelist/add/{stationId}")
R addPileWhitelist(@PathVariable("stationId") Long stationId, @RequestBody Set<String> pileNoSet);

View File

@ -35,7 +35,7 @@ public class PowerPileFallbackFactory implements FallbackFactory<PowerPileServic
}
@Override
public R stopCharging(String orderNo, String pileNo, String gunId, String version) {
public R stopCharging(String orderNo, String pileNo, String gunId) {
return R.fail("停止充电失败:" + cause.getMessage());
}

View File

@ -47,12 +47,24 @@ public class XhpcTerminal extends BaseEntity {
private String operatorIdEvcs;
/** 充电设备类型 */
private int connectorType;
/**
* 电桩统计数量
*/
private Integer number;
public int getConnectorType() {
return connectorType;
}
public void setConnectorType(int connectorType) {
this.connectorType = connectorType;
}
public String getOperatorIdEvcs() {
return operatorIdEvcs;
}