提交代码

dev_xds
姜玉琦 2024-04-19 12:48:25 +08:00
parent 3d20c2d291
commit 608eeaa964
10 changed files with 57 additions and 9 deletions

View File

@ -103,14 +103,18 @@ public class TokenService
/** /**
* *
*/ */
public void delLoginUser(HttpServletRequest request) public String delLoginUser(HttpServletRequest request)
{ {
String token = this.getToken(request); String token = this.getToken(request);
if (StringUtils.isNotEmpty(token)) if (StringUtils.isNotEmpty(token))
{ {
String userKey = getTokenKey(token); Claims claims = parseToken(token);
String openId = (String) claims.get(Constants.LOGIN_USER_KEY);
String userKey = getTokenKey(openId);
redisCache.deleteObject(userKey); redisCache.deleteObject(userKey);
return openId;
} }
return null;
} }
/** /**

View File

@ -3,6 +3,7 @@ package com.ruoyi.web;
import com.ruoyi.common.annotation.Anonymous; import com.ruoyi.common.annotation.Anonymous;
import com.ruoyi.common.config.RuoYiConfig; import com.ruoyi.common.config.RuoYiConfig;
import com.ruoyi.common.constant.CacheConstants; import com.ruoyi.common.constant.CacheConstants;
import com.ruoyi.common.constant.Constants;
import com.ruoyi.common.core.redis.RedisCache; import com.ruoyi.common.core.redis.RedisCache;
import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.system.domain.SysUserOpenid; import com.ruoyi.system.domain.SysUserOpenid;
@ -21,6 +22,8 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
import javax.servlet.http.HttpSession; import javax.servlet.http.HttpSession;
import java.util.Map;
import java.util.concurrent.TimeUnit;
@Slf4j @Slf4j
@Controller @Controller
@ -106,6 +109,18 @@ public class IndexController {
sysUserOpenidService.updateSysUserOpenid(sysUserOpenid); sysUserOpenidService.updateSysUserOpenid(sysUserOpenid);
//删除缓存 //删除缓存
redisCache.deleteObject(CacheConstants.WX_MPMESSAGE_OPENID +sysUserOpenid.getLoginName()); redisCache.deleteObject(CacheConstants.WX_MPMESSAGE_OPENID +sysUserOpenid.getLoginName());
try {
String key="wechat_openIdLogin-"+userOpenId;
Map<String,Object> data = redisCache.getCacheObject(key);
if(data!=null){
Map<String,Object> userInfo = (Map<String,Object>)data.get("userinfo");
userInfo.put("msgOpenId",openId);
data.put("userinfo",userInfo);
redisCache.setCacheObject(key, data, Constants.CAPTCHA_EXPIRATION*15, TimeUnit.MINUTES);
}
}catch (Exception e){
e.printStackTrace();
}
model.addAttribute("state", "OK"); model.addAttribute("state", "OK");
} }
} }

View File

@ -193,7 +193,9 @@ public class WechatUserLoginController extends BaseController {
@GetMapping("/loginOut") @GetMapping("/loginOut")
public AjaxResult loginOut(HttpServletRequest request){ public AjaxResult loginOut(HttpServletRequest request){
try { try {
tokenService.delLoginUser(request); String openId = tokenService.delLoginUser(request);
String key="wechat_openIdLogin-"+openId;
redisCache.deleteObject(key);
}catch (Exception e){ }catch (Exception e){
e.printStackTrace(); e.printStackTrace();
} }

View File

@ -84,6 +84,9 @@ public class WechatUserLoginServiceImpl implements IWechatUserLoginService {
public Map<String, Object> findUserInfo(String loginName,String openId) { public Map<String, Object> findUserInfo(String loginName,String openId) {
Map<String,Object> data = new HashMap<>(); Map<String,Object> data = new HashMap<>();
Map<String, Object> userData = wechatUserLoginMapper.findUserInfo(loginName); Map<String, Object> userData = wechatUserLoginMapper.findUserInfo(loginName);
if(userData==null){
throw new RuntimeException("用户账号不存在或已停用");
}
Map<String,Object> userInfo = new HashMap<>(); Map<String,Object> userInfo = new HashMap<>();
userInfo.put("loginName",loginName); userInfo.put("loginName",loginName);
userInfo.put("userName",userData.get("user_name")); userInfo.put("userName",userData.get("user_name"));

View File

@ -14,10 +14,10 @@
</style> </style>
<body th:if="${state == 'OK'}"> <body th:if="${state == 'OK'}">
<div class="el-body el-col el-col-24 el-col-sm-12 el-col-lg-6"><div class="el-result"><div class="el-result__icon"><svg viewBox="0 0 48 48" xmlns="http://www.w3.org/2000/svg" class="icon-success"><path d="M24,4 C35.045695,4 44,12.954305 44,24 C44,35.045695 35.045695,44 24,44 C12.954305,44 4,35.045695 4,24 C4,12.954305 12.954305,4 24,4 Z M34.5548098,16.4485711 C33.9612228,15.8504763 32.9988282,15.8504763 32.4052412,16.4485711 L32.4052412,16.4485711 L21.413757,27.5805811 L21.413757,27.5805811 L21.4034642,27.590855 C21.0097542,27.9781674 20.3766105,27.9729811 19.9892981,27.5792711 L19.9892981,27.5792711 L15.5947588,23.1121428 C15.0011718,22.514048 14.0387772,22.514048 13.4451902,23.1121428 C12.8516033,23.7102376 12.8516033,24.6799409 13.4451902,25.2780357 L13.4451902,25.2780357 L19.6260786,31.5514289 C20.2196656,32.1495237 21.1820602,32.1495237 21.7756472,31.5514289 L21.7756472,31.5514289 L34.5548098,18.614464 C35.1483967,18.0163692 35.1483967,17.0466659 34.5548098,16.4485711 Z"></path></svg></div><div class="el-result__title"><p>公众号消息授权成功</p></div></div></div> <div class="el-body el-col el-col-24"><div class="el-result"><div class="el-result__icon"><svg viewBox="0 0 48 48" xmlns="http://www.w3.org/2000/svg" class="icon-success"><path d="M24,4 C35.045695,4 44,12.954305 44,24 C44,35.045695 35.045695,44 24,44 C12.954305,44 4,35.045695 4,24 C4,12.954305 12.954305,4 24,4 Z M34.5548098,16.4485711 C33.9612228,15.8504763 32.9988282,15.8504763 32.4052412,16.4485711 L32.4052412,16.4485711 L21.413757,27.5805811 L21.413757,27.5805811 L21.4034642,27.590855 C21.0097542,27.9781674 20.3766105,27.9729811 19.9892981,27.5792711 L19.9892981,27.5792711 L15.5947588,23.1121428 C15.0011718,22.514048 14.0387772,22.514048 13.4451902,23.1121428 C12.8516033,23.7102376 12.8516033,24.6799409 13.4451902,25.2780357 L13.4451902,25.2780357 L19.6260786,31.5514289 C20.2196656,32.1495237 21.1820602,32.1495237 21.7756472,31.5514289 L21.7756472,31.5514289 L34.5548098,18.614464 C35.1483967,18.0163692 35.1483967,17.0466659 34.5548098,16.4485711 Z"></path></svg></div><div class="el-result__title"><p>公众号消息授权成功</p></div></div></div>
</body> </body>
<body th:if="${state == 'NO'}"> <body th:if="${state == 'NO'}">
<div class="el-body el-col el-col-24 el-col-sm-12 el-col-lg-6"><div class="el-result"><div class="el-result__icon"><svg viewBox="0 0 48 48" xmlns="http://www.w3.org/2000/svg" class="icon-error"><path d="M24,4 C35.045695,4 44,12.954305 44,24 C44,35.045695 35.045695,44 24,44 C12.954305,44 4,35.045695 4,24 C4,12.954305 12.954305,4 24,4 Z M32.57818,15.42182 C32.0157534,14.8593933 31.1038797,14.8593933 30.541453,15.42182 L30.541453,15.42182 L24.0006789,21.9625941 L17.458547,15.42182 C16.8961203,14.8593933 15.9842466,14.8593933 15.42182,15.42182 C14.8593933,15.9842466 14.8593933,16.8961203 15.42182,17.458547 L15.42182,17.458547 L21.9639519,23.9993211 L15.42182,30.541453 C14.8593933,31.1038797 14.8593933,32.0157534 15.42182,32.57818 C15.9842466,33.1406067 16.8961203,33.1406067 17.458547,32.57818 L17.458547,32.57818 L24.0006789,26.0360481 L30.541453,32.57818 C31.1038797,33.1406067 32.0157534,33.1406067 32.57818,32.57818 C33.1406067,32.0157534 33.1406067,31.1038797 32.57818,30.541453 L32.57818,30.541453 L26.0374059,23.9993211 L32.57818,17.458547 C33.1406067,16.8961203 33.1406067,15.9842466 32.57818,15.42182 Z"></path></svg></div><div class="el-result__title"><p>公众号消息授权失败</p></div><div class="el-result__subtitle"><p>请关注公众号并进行网页授权</p></div></div></div> <div class="el-body el-col el-col-24"><div class="el-result"><div class="el-result__icon"><svg viewBox="0 0 48 48" xmlns="http://www.w3.org/2000/svg" class="icon-error"><path d="M24,4 C35.045695,4 44,12.954305 44,24 C44,35.045695 35.045695,44 24,44 C12.954305,44 4,35.045695 4,24 C4,12.954305 12.954305,4 24,4 Z M32.57818,15.42182 C32.0157534,14.8593933 31.1038797,14.8593933 30.541453,15.42182 L30.541453,15.42182 L24.0006789,21.9625941 L17.458547,15.42182 C16.8961203,14.8593933 15.9842466,14.8593933 15.42182,15.42182 C14.8593933,15.9842466 14.8593933,16.8961203 15.42182,17.458547 L15.42182,17.458547 L21.9639519,23.9993211 L15.42182,30.541453 C14.8593933,31.1038797 14.8593933,32.0157534 15.42182,32.57818 C15.9842466,33.1406067 16.8961203,33.1406067 17.458547,32.57818 L17.458547,32.57818 L24.0006789,26.0360481 L30.541453,32.57818 C31.1038797,33.1406067 32.0157534,33.1406067 32.57818,32.57818 C33.1406067,32.0157534 33.1406067,31.1038797 32.57818,30.541453 L32.57818,30.541453 L26.0374059,23.9993211 L32.57818,17.458547 C33.1406067,16.8961203 33.1406067,15.9842466 32.57818,15.42182 Z"></path></svg></div><div class="el-result__title"><p>公众号消息授权失败</p></div><div class="el-result__subtitle"><p>请关注公众号并进行网页授权</p></div></div></div>
</body> </body>
<button type="button" class="el-button el-button--primary is-round" onclick="colseView()"> <button type="button" class="el-button el-button--primary is-round" onclick="colseView()">

View File

@ -0,0 +1,21 @@
select * from smz_ssp_problemmodify where createUser = '17341268080';
select * from sys_logininfor where user_name = '17341568080';
select title from sys_oper_log where oper_name = '17341568080' GROUP BY title;
select * from sys_oper_log where oper_name = '17341568080' and title = '发起流程';
update sys_user set user_name = '17341268080',phonenumber = '17341268080' where user_id = 669;
update sys_logininfor set user_name = '17341268080' where user_name = '17341568080';
update sys_oper_log set oper_name = '17341268080' where oper_name = '17341568080';
update work_train set create_by = '17341268080' where create_by = '17341568080';
update sur_project_standard set create_by = '17341268080' where create_by = '17341568080';
update sys_user_openid set loginName = '17341268080' where loginName = '17341568080';
select * from sur_project_standard where create_by = '17341268080';
select * from sys_user_openid where loginName = '17341568080'

View File

@ -56,6 +56,7 @@ public class BgWorkTrainController extends BaseController {
if(proType!=null && !"0".equals(proType)){ if(proType!=null && !"0".equals(proType)){
workTrain.setProType(projectId); workTrain.setProType(projectId);
} }
clearPage();
List<WorkTrain> list = workTrainService.selectBgscreenWorkTrainListv2(workTrain); List<WorkTrain> list = workTrainService.selectBgscreenWorkTrainListv2(workTrain);
return getDataTable(list); return getDataTable(list);
} }

View File

@ -53,6 +53,7 @@ public class AttendanceHuazhuTask {
Map<String, Object> params = new HashMap<>(); Map<String, Object> params = new HashMap<>();
params.put("orgId","1666339529033805825"); params.put("orgId","1666339529033805825");
params.put("tenantId","1666337067184893953"); params.put("tenantId","1666337067184893953");
params.put("workerId","7119618933040091136");
params.put("size","200"); params.put("size","200");
params.put("current","1"); params.put("current","1");
params.put("startTime",startTime); params.put("startTime",startTime);
@ -70,8 +71,9 @@ public class AttendanceHuazhuTask {
if(arr!=null && arr.size()>0){ if(arr!=null && arr.size()>0){
for(int i=0;i<arr.size();i++) { for(int i=0;i<arr.size();i++) {
JSONObject json = arr.getJSONObject(i); JSONObject json = arr.getJSONObject(i);
SurProjectAttendanceData sdata = SurProjectAttendanceData.createFromHuazhu(json); System.out.println(DateUtil.format(DateUtil.date(json.getLong("recordTime")),"yyyy-MM-dd HH:mm:ss")+"------------"+json.getString("imagePath"));
System.out.println(JSON.toJSONString(sdata)); //SurProjectAttendanceData sdata = SurProjectAttendanceData.createFromHuazhu(json);
//System.out.println(JSON.toJSONString(sdata));
} }
} }

View File

@ -38,7 +38,7 @@
(select count(1) from dev_ai_project_config a where a.project_id = sp.id and a.dept_id = pui.unitId and a.is_del=0)as aijk, (select count(1) from dev_ai_project_config a where a.project_id = sp.id and a.dept_id = pui.unitId and a.is_del=0)as aijk,
(select count(1) from dev_ai_project_data a where a.project_id = sp.id and a.dept_id = pui.unitId and a.is_del=0)as aiyjs, (select count(1) from dev_ai_project_data a where a.project_id = sp.id and a.dept_id = pui.unitId and a.is_del=0)as aiyjs,
(select count(1) from sur_project_attendance_cfg a where a.project_id = sp.id and a.sub_dept_id = pui.unitId and a.state=0)as lwsm, (select count(1) from sur_project_attendance_cfg a where a.project_id = sp.id and a.sub_dept_id = pui.unitId and a.state=0)as lwsm,
(select count(1) from sur_project_attendance_user a left join sur_project_attendance_cfg b on a.cfgid = b.id where b.project_id = sp.id and b.sub_dept_id = pui.unitId and b.state=0 and and a.state=0 and b.is_del=0)as lwry, (select count(1) from sur_project_attendance_user a left join sur_project_attendance_cfg b on a.cfgid = b.id where b.project_id = sp.id and b.sub_dept_id = pui.unitId and b.state=0 and a.state=0 and b.is_del=0)as lwry,
(select count(1) from vw_flow_all a where a.businessKey = sp.id and a.startDeptName = pui.unitName and a.finishTime is null)as gcsq, (select count(1) from vw_flow_all a where a.businessKey = sp.id and a.startDeptName = pui.unitName and a.finishTime is null)as gcsq,
(select count(1) from vw_flow_all a where a.businessKey = sp.id and a.startDeptName = pui.unitName and a.finishTime is not null)as gcsp, (select count(1) from vw_flow_all a where a.businessKey = sp.id and a.startDeptName = pui.unitName and a.finishTime is not null)as gcsp,
(select count(1) from sur_project_standard a where a.project_id = sp.id and a.dept_id = pui.unitId and a.is_del=0)as bzh, (select count(1) from sur_project_standard a where a.project_id = sp.id and a.dept_id = pui.unitId and a.is_del=0)as bzh,

View File

@ -93,7 +93,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test='activeName == "jxz"'> and spc.approve_status != '4'</if> <if test='activeName == "jxz"'> and spc.approve_status != '4'</if>
<if test='activeName == "ywc"'> and spc.approve_status = '4'</if> <if test='activeName == "ywc"'> and spc.approve_status = '4'</if>
</where> </where>
order by soc.approve_status, spc.id desc order by spc.approve_status, spc.id desc
</select> </select>
<select id="selectBgscreenProjectCheckingList" parameterType="SurProjectChecking" resultMap="SurProjectCheckingResult"> <select id="selectBgscreenProjectCheckingList" parameterType="SurProjectChecking" resultMap="SurProjectCheckingResult">