|
@@ -9,6 +9,7 @@ import com.fs.common.annotation.RepeatSubmit;
|
|
import com.fs.common.core.domain.R;
|
|
import com.fs.common.core.domain.R;
|
|
import com.fs.common.core.redis.RedisCache;
|
|
import com.fs.common.core.redis.RedisCache;
|
|
import com.fs.common.utils.sign.Md5Utils;
|
|
import com.fs.common.utils.sign.Md5Utils;
|
|
|
|
+import com.fs.core.config.WxOpenProperties;
|
|
import com.fs.his.config.FsSysConfig;
|
|
import com.fs.his.config.FsSysConfig;
|
|
import com.fs.his.domain.FsUser;
|
|
import com.fs.his.domain.FsUser;
|
|
import com.fs.his.domain.FsUserNewTask;
|
|
import com.fs.his.domain.FsUserNewTask;
|
|
@@ -51,9 +52,8 @@ public class AppLoginController extends AppBaseController{
|
|
private FsUserMapper userMapper;
|
|
private FsUserMapper userMapper;
|
|
@Autowired
|
|
@Autowired
|
|
private IFsUserNewTaskService userNewTaskService;
|
|
private IFsUserNewTaskService userNewTaskService;
|
|
-
|
|
|
|
- private static final String APP_ID = "wx703c4bd07bbd1695";
|
|
|
|
- private static final String APP_SECRET = "034f5cc8d9b5151f9d25da9628541e35";
|
|
|
|
|
|
+ @Autowired
|
|
|
|
+ private WxOpenProperties openProperties;
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
private RedisCache redisCache;
|
|
private RedisCache redisCache;
|
|
@@ -150,7 +150,7 @@ public class AppLoginController extends AppBaseController{
|
|
return R.error("code不存在");
|
|
return R.error("code不存在");
|
|
}
|
|
}
|
|
logger.info("zyp app微信登录,param:{}", param);
|
|
logger.info("zyp app微信登录,param:{}", param);
|
|
- Map result = WxUtil.getAccessToken(param.getCode(),APP_ID,APP_SECRET);
|
|
|
|
|
|
+ Map result = WxUtil.getAccessToken(param.getCode(), openProperties.getAppId(), openProperties.getSecret());
|
|
String accessToken = result.get("access_token").toString();
|
|
String accessToken = result.get("access_token").toString();
|
|
String unionid = result.get("unionid").toString();
|
|
String unionid = result.get("unionid").toString();
|
|
|
|
|
|
@@ -237,7 +237,7 @@ public class AppLoginController extends AppBaseController{
|
|
public R bindWeChat(@Validated @RequestBody FsUserEditUnionidParam param) {
|
|
public R bindWeChat(@Validated @RequestBody FsUserEditUnionidParam param) {
|
|
try {
|
|
try {
|
|
logger.info("zyp app绑定微信,param:{}", param);
|
|
logger.info("zyp app绑定微信,param:{}", param);
|
|
- Map result = WxUtil.getAccessToken(param.getCode(),APP_ID,APP_SECRET);
|
|
|
|
|
|
+ Map result = WxUtil.getAccessToken(param.getCode(), openProperties.getAppId(), openProperties.getSecret());
|
|
String accessToken = result.get("access_token").toString();
|
|
String accessToken = result.get("access_token").toString();
|
|
String unionid = result.get("unionid").toString();
|
|
String unionid = result.get("unionid").toString();
|
|
String openid = result.get("openid").toString();
|
|
String openid = result.get("openid").toString();
|