修改bug

This commit is contained in:
yangjun 2023-06-11 20:22:27 +08:00
parent 12f4bd8944
commit b41ac756db
2 changed files with 9 additions and 3 deletions

View File

@ -8,6 +8,8 @@ import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import cn.hutool.core.date.DateUtil;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.util.DateUtils;
@ -197,11 +199,15 @@ public class KcSysConfigController extends JeecgController<KcSysConfig, IKcSysCo
kcSysConfigPar.setFlag1(""+i+"");
Date date3 = date1;
Calendar calendar = Calendar.getInstance(); //日历时间工具类实例化创建取得当前时间初值
calendar.setTime(date1); //覆盖掉当前时间
String lssj = DateUtils.formatDate(date1,"yyyy-MM-dd")+" 23:59:59";
calendar.setTime(DateUtil.parse(lssj,"yyyy-MM-dd HH:mm:ss")); //覆盖掉当前时间
calendar.add(Calendar.DATE, 6); //+7
Date date4 = calendar.getTime();
date1 = calendar.getTime();
Date date5 = new Date();
System.out.println("3: "+DateUtil.format(date3,"yyyy-MM-dd HH:mm:ss"));
System.out.println("5: "+DateUtil.format(date5,"yyyy-MM-dd HH:mm:ss"));
System.out.println("4: "+DateUtil.format(date4,"yyyy-MM-dd HH:mm:ss"));
if(date3.getTime()<=date5.getTime()&&date5.getTime()<=date4.getTime()){
kcSysConfigPar.setFlag2("1");
}

View File

@ -71,7 +71,7 @@ public class WxgzhController {
//2.根据code获取openId
@GetMapping("/wxpay/weixinoauth")
public void weixinOauth(@RequestParam String code, @RequestParam String state) throws Exception {
public String weixinOauth(@RequestParam String code, @RequestParam String state) throws Exception {
log.info("获取code:{}",code);
log.info("获取state:{}",state);
String url = "https://api.weixin.qq.com/sns/oauth2/access_token?appid="
@ -81,7 +81,7 @@ public class WxgzhController {
JSONObject obj = JSONObject.parseObject(res);
log.info("根据code查询得到openId:{}",openid);
log.info("obj:{}",obj);
return "http://www.baidu.com b";
}
@GetMapping("/wxpay/getToken")