桩详情接口
This commit is contained in:
parent
2eb170eb40
commit
a3cc4ecd53
@ -59,4 +59,14 @@ public class XhpcChargingPileController extends BaseController {
|
||||
return AjaxResult.success(xhpcChargingPileService.updateXhpcChargingPile(xhpcChargingPile));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 桩详情
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(value = "/selectXhpcChargingPile")
|
||||
public AjaxResult selectXhpcChargingPile(@PathVariable("roleId")Long chargingPileId)
|
||||
{
|
||||
return AjaxResult.success(xhpcChargingPileService.selectXhpcChargingPile(chargingPileId));
|
||||
}
|
||||
}
|
||||
|
||||
@ -36,4 +36,11 @@ public interface IXhpcChargingPileService {
|
||||
*/
|
||||
AjaxResult updateXhpcChargingPile(XhpcChargingPile xhpcChargingPile);
|
||||
|
||||
/**
|
||||
* 桩详情
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
AjaxResult selectXhpcChargingPile(Long chargingPileId);
|
||||
|
||||
}
|
||||
|
||||
@ -5,6 +5,7 @@ import com.xhpc.charging.station.domain.XhpcChargingPile;
|
||||
import com.xhpc.charging.station.domain.XhpcTerminal;
|
||||
import com.xhpc.charging.station.mapper.XhpcChargingPileMapper;
|
||||
import com.xhpc.charging.station.mapper.XhpcTerminalMapper;
|
||||
import com.xhpc.common.api.PowerPileService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@ -22,6 +23,9 @@ public class XhpcChargingPileServiceImpl implements IXhpcChargingPileService{
|
||||
private XhpcChargingPileMapper xhpcChargingPileMapper;
|
||||
@Autowired
|
||||
private XhpcTerminalMapper xhpcTerminalMapper;
|
||||
@Autowired
|
||||
private PowerPileService powerPileService;
|
||||
|
||||
|
||||
/**
|
||||
* 桩列表
|
||||
@ -60,13 +64,35 @@ public class XhpcChargingPileServiceImpl implements IXhpcChargingPileService{
|
||||
xhpcTerminalMapper.addXhpcTerminal(xhpcTerminal);
|
||||
}
|
||||
}
|
||||
|
||||
//插入redis 桩的编号
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult updateXhpcChargingPile(XhpcChargingPile xhpcChargingPile) {
|
||||
|
||||
Long chargingPileId = xhpcChargingPile.getChargingPileId();
|
||||
XhpcChargingPile xhpc = xhpcChargingPileMapper.selectXhpcChargingPileById(chargingPileId);
|
||||
|
||||
if(xhpcChargingPile.getSerialNumber() ==null){
|
||||
AjaxResult.error("桩编号不能为空");
|
||||
}
|
||||
if(xhpc.getSerialNumber() != xhpc.getSerialNumber()){
|
||||
AjaxResult.error("桩编号不能编辑");
|
||||
}
|
||||
|
||||
xhpcChargingPileMapper.updaeXhpcChargingPile(xhpcChargingPile);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult selectXhpcChargingPile(Long chargingPileId) {
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user