|
@@ -4,6 +4,7 @@ import cn.hutool.core.date.DateUtil;
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
import com.pj.project4sp.global.BusinessException;
|
|
|
import com.pj.utils.cache.RedisUtil;
|
|
|
+import com.pj.utils.sg.AjaxJson;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
@@ -17,22 +18,24 @@ import org.springframework.web.bind.annotation.RestController;
|
|
|
public class PushFeeController {
|
|
|
|
|
|
@RequestMapping(value = "changeStartTime")
|
|
|
- public void changeStartTime(String startTime){
|
|
|
+ public AjaxJson changeStartTime(String startTime){
|
|
|
if(StrUtil.isEmpty(startTime)){
|
|
|
RedisUtil.del("pushFeeStartTime");
|
|
|
- return;
|
|
|
+ return AjaxJson.getSuccess("删除成功");
|
|
|
}
|
|
|
DateUtil.parse(startTime, "yyyy-MM-dd HH:mm:ss");
|
|
|
RedisUtil.set("pushFeeStartTime", startTime);
|
|
|
+ return AjaxJson.getSuccess("设置成功");
|
|
|
}
|
|
|
|
|
|
@RequestMapping(value = "changeTimeSpan")
|
|
|
- public void changeTimeSpan(String timeSpan){
|
|
|
+ public AjaxJson changeTimeSpan(String timeSpan){
|
|
|
if(StrUtil.isEmpty(timeSpan)){
|
|
|
RedisUtil.del("pushFeeTimeSpan");
|
|
|
- return;
|
|
|
+ return AjaxJson.getSuccess("删除成功");
|
|
|
}
|
|
|
Integer.valueOf(timeSpan);
|
|
|
RedisUtil.set("pushFeeTimeSpan", timeSpan);
|
|
|
+ return AjaxJson.getSuccess("设置成功");
|
|
|
}
|
|
|
}
|