| | |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.dg.core.annotation.Authorization; |
| | | import com.dg.core.db.gen.entity.GuideEvolveEntity; |
| | | import com.dg.core.db.gen.entity.GuideRepairOrder; |
| | | import com.dg.core.db.gen.entity.SysUser; |
| | |
| | | import org.springframework.data.redis.core.RedisTemplate; |
| | | import org.springframework.data.redis.core.StringRedisTemplate; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.PostConstruct; |
| | | import javax.annotation.Resource; |
| | | import java.io.BufferedReader; |
| | | import java.io.IOException; |
| | |
| | | |
| | | private static String miniprogramState="trial";//trial 为测试版 formal 为正式版 切记发布版本时候改为正式版 |
| | | |
| | | @Resource |
| | | StringRedisTemplate stringRedisTemplate; |
| | | @Resource(name = "stringRedisTemplate") |
| | | private StringRedisTemplate stringRedisTemplate; |
| | | |
| | | private static WxUtil wxUtil; |
| | | |
| | | @PostConstruct |
| | | public void init() { |
| | | wxUtil = this; |
| | | wxUtil.stringRedisTemplate = this.stringRedisTemplate; |
| | | } |
| | | |
| | | /** |
| | | * 获取花城token,(ps:0=token获取失败) |
| | |
| | | // } catch (IOException ioe) { |
| | | // ioe.printStackTrace(); |
| | | // } |
| | | accessToken =stringRedisTemplate.boundValueOps("access_token:access_token:" + ConstantPropertiesUtil.WX_OPEN_APP_ID).get().toString(); |
| | | accessToken =wxUtil.stringRedisTemplate.boundValueOps("access_token:access_token:" + ConstantPropertiesUtil.WX_OPEN_APP_ID).get(); |
| | | return accessToken; |
| | | } |
| | | |