| | |
| | | import com.ruoyi.common.log.annotation.Log; |
| | | import com.ruoyi.common.log.enums.BusinessType; |
| | | import com.ruoyi.common.log.enums.OperatorType; |
| | | import com.ruoyi.common.redis.service.RedisService; |
| | | import com.ruoyi.other.api.domain.TVip; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | |
| | | private final TChargingPileService chargingPileService; |
| | | private final TChargingGunService chargingGunService; |
| | | |
| | | @Resource |
| | | private TAccountingStrategyService accountingStrategyService; |
| | | |
| | | @Resource |
| | | private TAccountingStrategyDetailService accountingStrategyDetailService; |
| | | |
| | | @Resource |
| | | private RedisService redisService; |
| | | |
| | | |
| | | @Autowired |
| | |
| | | TChargingPile chargingPile = chargingPileService.getById(id); |
| | | return R.ok(chargingPile); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 更新充电桩状态 |
| | | * @param code |
| | | * @param status |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/updateChargingPileStatus") |
| | | public void updateChargingPileStatus(@RequestParam("code") String code, @RequestParam("status") Integer status){ |
| | | TChargingPile chargingPile = chargingPileService.getOne(new LambdaQueryWrapper<TChargingPile>() |
| | | .eq(TChargingPile::getCode, code).eq(TChargingPile::getDelFlag, 0)); |
| | | if(null != chargingPile){ |
| | | chargingPile.setStatus(0 == status ? 1 : 3); |
| | | chargingPileService.updateById(chargingPile); |
| | | redisService.getCacheMap("charging_pile_online").put(code, System.currentTimeMillis()); |
| | | } |
| | | } |
| | | } |
| | | |