|
|
@@ -4,6 +4,8 @@ import com.jpsoft.employment.modules.base.entity.MobileBannerInfo;
|
|
|
import com.jpsoft.employment.modules.base.service.MobileBannerInfoService;
|
|
|
import com.jpsoft.employment.modules.common.dto.MessageResult;
|
|
|
import com.jpsoft.employment.modules.common.utils.JwtUtil;
|
|
|
+import com.jpsoft.employment.modules.job.entity.JobUser;
|
|
|
+import com.jpsoft.employment.modules.job.service.JobUserService;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiImplicitParam;
|
|
|
import io.swagger.annotations.ApiImplicitParams;
|
|
|
@@ -24,6 +26,9 @@ public class BannerInfoApiController {
|
|
|
|
|
|
@Autowired
|
|
|
private MobileBannerInfoService mobileBannerInfoService;
|
|
|
+ @Autowired
|
|
|
+ private JobUserService jobUserService;
|
|
|
+
|
|
|
|
|
|
@PostMapping("getBannerInfo")
|
|
|
|
|
|
@@ -70,9 +75,10 @@ public class BannerInfoApiController {
|
|
|
MessageResult<Map> messageResult = new MessageResult<>();
|
|
|
|
|
|
Map<String, Object> dataMap = new HashMap<String, Object>();
|
|
|
- String token = JwtUtil.createToken(jwtSecret, openId, DateTime.now().plusHours(6).toDate());
|
|
|
-
|
|
|
- dataMap.put("token", token);
|
|
|
+ JobUser obj = jobUserService.getUserByOpenId(openId);
|
|
|
+ String token = JwtUtil.createToken(jwtSecret, obj.getId(), DateTime.now().plusHours(6).toDate());
|
|
|
+ dataMap.put("person", obj);
|
|
|
+ dataMap.put("token", token);
|
|
|
messageResult.setData(dataMap);
|
|
|
messageResult.setResult(true);
|
|
|
messageResult.setCode(200);
|