Commit 72601f7a authored by tangwei's avatar tangwei

增加手动刷数据接口

parent 40b0dc1b
...@@ -194,13 +194,13 @@ public class HouseholdTestController { ...@@ -194,13 +194,13 @@ public class HouseholdTestController {
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false) @TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@GetMapping (value = "/imasterNew") @GetMapping (value = "/updateAscription")
@ApiOperation(httpMethod = "GET", value = "手动同步数据", notes = "手动同步数据") @ApiOperation(httpMethod = "GET", value = "手动同步数据", notes = "手动同步数据")
public void updateAscription( public void updateAscription(
@RequestParam(value = "table",required=false) String table,//表名 @RequestParam(value = "table",required=false) String table,//表名
@RequestParam(value = "time",required=false) String time @RequestParam(value = "time",required=false) String time
){ ){
AscriptionService ascriptionService= this.updateAscriptionlist(table); AscriptionService ascriptionService= this.updateAscriptionlist(table);
ascriptionService.updateAscription(time); ascriptionService.updateAscription(time);
......
...@@ -41,9 +41,9 @@ public class HYGFJPInverterWarnImpl implements AscriptionService { ...@@ -41,9 +41,9 @@ public class HYGFJPInverterWarnImpl implements AscriptionService {
int day=d.intValue(); int day=d.intValue();
String sql=""; String sql="";
if(day==0){ if(day==0){
sql=" created_time>=TODAY() and created_time< TODAY() + 1d "; sql=" and created_time>=TODAY() and created_time< TODAY() + 1d ";
}else{ }else{
sql=" created_time>=TODAY() - "+day+"d and created_time< TODAY() - "+(day-1)+"d "; sql=" and created_time>=TODAY() - "+day+"d and created_time< TODAY() - "+(day-1)+"d ";
} }
List<HYGFJPInverterWarn> hygfjpDayPower = hygfjpInverterWarnMapper.selectList( List<HYGFJPInverterWarn> hygfjpDayPower = hygfjpInverterWarnMapper.selectList(
......
...@@ -40,9 +40,9 @@ public class HYGFJPStationPowerHistoryImpl implements AscriptionService { ...@@ -40,9 +40,9 @@ public class HYGFJPStationPowerHistoryImpl implements AscriptionService {
int day=d.intValue(); int day=d.intValue();
String sql=""; String sql="";
if(day==0){ if(day==0){
sql=" created_time>=TODAY() and created_time< TODAY() + 1d "; sql=" and created_time>=TODAY() and created_time< TODAY() + 1d ";
}else{ }else{
sql=" created_time>=TODAY() - "+day+"d and created_time< TODAY() - "+(day-1)+"d "; sql=" and created_time>=TODAY() - "+day+"d and created_time< TODAY() - "+(day-1)+"d ";
} }
List<HYGFJPStationPowerHistory> hygfjpDayPower = hygfjpStationPowerHistoryMapper.selectList( List<HYGFJPStationPowerHistory> hygfjpDayPower = hygfjpStationPowerHistoryMapper.selectList(
......
...@@ -39,9 +39,9 @@ public class TdHYGFInverterDayGenerateImpl implements AscriptionService { ...@@ -39,9 +39,9 @@ public class TdHYGFInverterDayGenerateImpl implements AscriptionService {
int day=d.intValue(); int day=d.intValue();
String sql=""; String sql="";
if(day==0){ if(day==0){
sql=" created_time>=TODAY() and created_time< TODAY() + 1d "; sql=" and created_time>=TODAY() and created_time< TODAY() + 1d ";
}else{ }else{
sql=" created_time>=TODAY() - "+day+"d and created_time< TODAY() - "+(day-1)+"d "; sql=" and created_time>=TODAY() - "+day+"d and created_time< TODAY() - "+(day-1)+"d ";
} }
List<TdHYGFInverterDayGenerate> hygfjpDayPower = tdHYGFInverterDayGenerateMapper.selectList( List<TdHYGFInverterDayGenerate> hygfjpDayPower = tdHYGFInverterDayGenerateMapper.selectList(
......
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