diff --git a/src/main/java/com/xkrs/common/config/WebSecurityConfig.java b/src/main/java/com/xkrs/common/config/WebSecurityConfig.java index 6dc567d..6c9a385 100644 --- a/src/main/java/com/xkrs/common/config/WebSecurityConfig.java +++ b/src/main/java/com/xkrs/common/config/WebSecurityConfig.java @@ -77,6 +77,7 @@ class WebSecurityConfig extends WebSecurityConfigurerAdapter { .antMatchers(HttpMethod.GET, "/updateFirePointStreetCode").permitAll() .antMatchers(HttpMethod.GET, "/selectTodayFirePoint").permitAll() .antMatchers(HttpMethod.GET, "/api/user/selectVipUser").permitAll() + .antMatchers(HttpMethod.GET, "/debug").permitAll() // 所有其它请求需要身份认证 .anyRequest().authenticated() .and() diff --git a/src/main/java/com/xkrs/straw/controller/DispatchFirePointController.java b/src/main/java/com/xkrs/straw/controller/DispatchFirePointController.java index 964474b..433d462 100644 --- a/src/main/java/com/xkrs/straw/controller/DispatchFirePointController.java +++ b/src/main/java/com/xkrs/straw/controller/DispatchFirePointController.java @@ -1,10 +1,12 @@ package com.xkrs.straw.controller; import com.xkrs.service.impl.FirePointServiceImpl; +import com.xkrs.straw.dao.SysUserDao; import com.xkrs.straw.model.qo.AllFirePointQo; import com.xkrs.straw.service.DispatchFirePointService; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RestController; @@ -15,10 +17,40 @@ import javax.annotation.Resource; public class DispatchFirePointController { public static Logger log = LoggerFactory.getLogger(FirePointServiceImpl.class); - + @Resource + private SysUserDao sysUserDao; @Resource private DispatchFirePointService firePointService; + @GetMapping("/debug") + public String debug() { + +// List sysUserEntityList = sysUserDao.findAll(); +// for (SysUserEntity sysUserEntity : sysUserEntityList) { +// String addTime = sysUserEntity.getAddTime(); +// String vipTimeRangeJson = sysUserEntity.getVipTimeRangeJson(); +// if (!DateTimeUtil.isValidDateTime(addTime)) { +// return sysUserEntity.getUserName(); +// } +// if (!DateTimeUtil.isValidDateTime(vipTimeRangeJson)) { +// return sysUserEntity.getUserName(); +// } +// VipTimeRangeBean.VipTimeRangeItemBean vipTimeRangeItemBean = new VipTimeRangeBean.VipTimeRangeItemBean(); +// vipTimeRangeItemBean.setStartTime(addTime); +// vipTimeRangeItemBean.setEndTime(vipTimeRangeJson); +// List list = new ArrayList<>(); +// list.add(vipTimeRangeItemBean); +// VipTimeRangeBean vipTimeRangeBean = new VipTimeRangeBean(); +// vipTimeRangeBean.setList(list); +// String serialize = JsonUtils.serialize(vipTimeRangeBean); +// System.out.println("serialize = " + serialize); +// sysUserEntity.setVipTimeRangeJson(serialize); +// sysUserDao.save(sysUserEntity); +// } + return "OKkkkkkkk"; + } + + /** * 普通渠道推送火点到秸秆系统 */ diff --git a/src/main/java/com/xkrs/straw/utils/VipTimeRangeUtils.java b/src/main/java/com/xkrs/straw/utils/VipTimeRangeUtils.java index 7474e91..29dc8d0 100644 --- a/src/main/java/com/xkrs/straw/utils/VipTimeRangeUtils.java +++ b/src/main/java/com/xkrs/straw/utils/VipTimeRangeUtils.java @@ -198,7 +198,7 @@ public class VipTimeRangeUtils { VipTimeRangeBean vipTimeRangeBean = new VipTimeRangeBean(); vipTimeRangeBean.setList(list); String serialize = JsonUtils.serialize(vipTimeRangeBean); - System.out.printf("serialize = " + serialize); + System.out.println("serialize = " + serialize); } }