优化 更新用户的VIP时间范围
This commit is contained in:
parent
37cc358f8a
commit
f504aa0120
@ -77,6 +77,7 @@ class WebSecurityConfig extends WebSecurityConfigurerAdapter {
|
|||||||
.antMatchers(HttpMethod.GET, "/updateFirePointStreetCode").permitAll()
|
.antMatchers(HttpMethod.GET, "/updateFirePointStreetCode").permitAll()
|
||||||
.antMatchers(HttpMethod.GET, "/selectTodayFirePoint").permitAll()
|
.antMatchers(HttpMethod.GET, "/selectTodayFirePoint").permitAll()
|
||||||
.antMatchers(HttpMethod.GET, "/api/user/selectVipUser").permitAll()
|
.antMatchers(HttpMethod.GET, "/api/user/selectVipUser").permitAll()
|
||||||
|
.antMatchers(HttpMethod.GET, "/debug").permitAll()
|
||||||
// 所有其它请求需要身份认证
|
// 所有其它请求需要身份认证
|
||||||
.anyRequest().authenticated()
|
.anyRequest().authenticated()
|
||||||
.and()
|
.and()
|
||||||
|
@ -1,10 +1,12 @@
|
|||||||
package com.xkrs.straw.controller;
|
package com.xkrs.straw.controller;
|
||||||
|
|
||||||
import com.xkrs.service.impl.FirePointServiceImpl;
|
import com.xkrs.service.impl.FirePointServiceImpl;
|
||||||
|
import com.xkrs.straw.dao.SysUserDao;
|
||||||
import com.xkrs.straw.model.qo.AllFirePointQo;
|
import com.xkrs.straw.model.qo.AllFirePointQo;
|
||||||
import com.xkrs.straw.service.DispatchFirePointService;
|
import com.xkrs.straw.service.DispatchFirePointService;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
@ -15,10 +17,40 @@ import javax.annotation.Resource;
|
|||||||
public class DispatchFirePointController {
|
public class DispatchFirePointController {
|
||||||
|
|
||||||
public static Logger log = LoggerFactory.getLogger(FirePointServiceImpl.class);
|
public static Logger log = LoggerFactory.getLogger(FirePointServiceImpl.class);
|
||||||
|
@Resource
|
||||||
|
private SysUserDao sysUserDao;
|
||||||
@Resource
|
@Resource
|
||||||
private DispatchFirePointService firePointService;
|
private DispatchFirePointService firePointService;
|
||||||
|
|
||||||
|
@GetMapping("/debug")
|
||||||
|
public String debug() {
|
||||||
|
|
||||||
|
// List<SysUserEntity> 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<VipTimeRangeBean.VipTimeRangeItemBean> list = new ArrayList<>();
|
||||||
|
// list.add(vipTimeRangeItemBean);
|
||||||
|
// VipTimeRangeBean vipTimeRangeBean = new VipTimeRangeBean();
|
||||||
|
// vipTimeRangeBean.setList(list);
|
||||||
|
// String serialize = JsonUtils.<VipTimeRangeBean>serialize(vipTimeRangeBean);
|
||||||
|
// System.out.println("serialize = " + serialize);
|
||||||
|
// sysUserEntity.setVipTimeRangeJson(serialize);
|
||||||
|
// sysUserDao.save(sysUserEntity);
|
||||||
|
// }
|
||||||
|
return "OKkkkkkkk";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 普通渠道推送火点到秸秆系统
|
* 普通渠道推送火点到秸秆系统
|
||||||
*/
|
*/
|
||||||
|
@ -198,7 +198,7 @@ public class VipTimeRangeUtils {
|
|||||||
VipTimeRangeBean vipTimeRangeBean = new VipTimeRangeBean();
|
VipTimeRangeBean vipTimeRangeBean = new VipTimeRangeBean();
|
||||||
vipTimeRangeBean.setList(list);
|
vipTimeRangeBean.setList(list);
|
||||||
String serialize = JsonUtils.<VipTimeRangeBean>serialize(vipTimeRangeBean);
|
String serialize = JsonUtils.<VipTimeRangeBean>serialize(vipTimeRangeBean);
|
||||||
System.out.printf("serialize = " + serialize);
|
System.out.println("serialize = " + serialize);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user