| | |
| | | package com.ruoyi.web.controller.project; |
| | | |
| | | import com.aliyun.dingtalkoauth2_1_0.models.GetSsoUserInfoResponseBody; |
| | | import com.aliyun.tea.Validation; |
| | | import com.ruoyi.common.core.controller.BaseController; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.project.domain.vo.DingTalkReqVo; |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.context.annotation.PropertySource; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | /** |
| | | * ééæ¥å£ |
| | |
| | | return error(); |
| | | } |
| | | |
| | | /** |
| | | * ç»é¨é¨ä¸çç¨æ·ä¿¡æ¯èµdingUserId,å¹¶è®°å½å°sys_userè¡¨ä¸ |
| | | * |
| | | * @param deptID |
| | | * @return |
| | | */ |
| | | @ApiOperation("ç»é¨é¨ä¸çç¨æ·ä¿¡æ¯èµdingUserId") |
| | | @GetMapping("/deptidList/{deptID}") |
| | | public AjaxResult deptidList(@PathVariable("deptID") Long deptID) { |
| | | dingTalkService.deptidList(deptID, 1); |
| | | return success(); |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | package com.ruoyi.web.controller.system; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Set; |
| | | import java.util.UUID; |
| | | |
| | | import com.aliyun.dingtalkoauth2_1_0.models.GetSsoUserInfoResponseBody; |
| | | import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
| | | import com.fasterxml.jackson.core.JsonProcessingException; |
| | | import com.fasterxml.jackson.databind.ObjectMapper; |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.core.domain.model.LoginBodyByOpenID; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.project.service.DingTalkService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | @Autowired |
| | | private SysPermissionService permissionService; |
| | | |
| | | @Autowired |
| | | private DingTalkService dingTalkService; |
| | | |
| | | |
| | | /** |
| | | * 微信OpenIDç»å½æ¹æ³ |
| | |
| | | return ajax; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * ç»å½æ¹æ³ |
| | | * |
| | |
| | | @PostMapping("/login") |
| | | public AjaxResult login(@RequestBody LoginBody loginBody) { |
| | | AjaxResult ajax = AjaxResult.success(); |
| | | // dingTalkService.deptidList(1L, 1); |
| | | Map<String, Object> userIdMap = null; |
| | | if (StringUtils.isNotEmpty(loginBody.getAuthCode())) { |
| | | Map<String, Object> map = dingTalkService.noLogin(loginBody.getAuthCode()); |
| | | userIdMap = (Map<String, Object>) map.get("result"); |
| | | } |
| | | // çæä»¤ç |
| | | String token = loginService.login(loginBody.getUsername(), loginBody.getPassword(), loginBody.getCode(), loginBody.getUuid(), loginBody.getOpenid()); |
| | | String token = null; |
| | | if (!ObjectUtils.isEmpty(userIdMap)) { |
| | | token = loginService.login(loginBody.getUsername(), loginBody.getPassword(), loginBody.getCode(), loginBody.getUuid(), loginBody.getOpenid(), userIdMap.get("userid").toString()); |
| | | } else { |
| | | token = loginService.login(loginBody.getUsername(), loginBody.getPassword(), loginBody.getCode(), loginBody.getUuid(), loginBody.getOpenid(), null); |
| | | } |
| | | |
| | | ajax.put(Constants.TOKEN, token); |
| | | return ajax; |
| | |
| | | */ |
| | | private String errorTimes; |
| | | |
| | | |
| | | /** |
| | | * ééuserID |
| | | */ |
| | | private String dingUserId; |
| | | |
| | | public SysUser() { |
| | | |
| | | } |
| | | |
| | | public String getDingUserId() { |
| | | return dingUserId; |
| | | } |
| | | |
| | | public void setDingUserId(String dingUserId) { |
| | | this.dingUserId = dingUserId; |
| | | } |
| | | |
| | | public int getErrorNums() { |
| | | return errorNums; |
| | | } |
| | |
| | | package com.ruoyi.common.core.domain.model; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * ç¨æ·ç»å½å¯¹è±¡ |
| | | * |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | public class LoginBody |
| | | { |
| | | @Data |
| | | public class LoginBody { |
| | | |
| | | /** |
| | | * 微信OpenID |
| | |
| | | private String uuid = ""; |
| | | |
| | | |
| | | /** |
| | | * å
ç»ææç |
| | | */ |
| | | private String authCode; |
| | | |
| | | |
| | | |
| | | public String getUsername() |
| | | { |
| | | return username; |
| | | } |
| | | |
| | | public void setUsername(String username) |
| | | { |
| | | this.username = username; |
| | | } |
| | | |
| | | public String getPassword() |
| | | { |
| | | return password; |
| | | } |
| | | |
| | | public void setPassword(String password) |
| | | { |
| | | this.password = password; |
| | | } |
| | | |
| | | public String getCode() |
| | | { |
| | | return code; |
| | | } |
| | | |
| | | public void setCode(String code) |
| | | { |
| | | this.code = code; |
| | | } |
| | | |
| | | public String getUuid() |
| | | { |
| | | return uuid; |
| | | } |
| | | |
| | | public void setUuid(String uuid) |
| | | { |
| | | this.uuid = uuid; |
| | | } |
| | | |
| | | public String getOpenid() { |
| | | return openid; |
| | | } |
| | | |
| | | public void setOpenid(String openid) { |
| | | this.openid = openid; |
| | | } |
| | | } |
| | |
| | | * @param uuid å¯ä¸æ è¯ |
| | | * @return ç»æ |
| | | */ |
| | | public String login(String username, String password, String code, String uuid, String openId) { |
| | | public String login(String username, String password, String code, String uuid, String openId, String dingUserId) { |
| | | //å
ç» |
| | | if (StringUtils.isNotEmpty(dingUserId)) { |
| | | SysUser sysUser = sysUserMapper.selectUserByDingUserId(dingUserId); |
| | | LoginUser loginUser = new LoginUser(); |
| | | loginUser.setUserId(sysUser.getUserId()); |
| | | loginUser.setDeptId(sysUser.getDeptId()); |
| | | loginUser.setUser(sysUser); |
| | | return tokenService.createToken(loginUser); |
| | | } |
| | | |
| | | SysUser sysUser = sysUserMapper.selectUserByUserName(username); |
| | | if (sysUser.getErrorNums() >= 3) { |
| | | //æ ¡éªå¤±è´¥æ¬¡æ° |
| | |
| | | <artifactId>fastjson2</artifactId> |
| | | <version>2.0.25</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.aliyun</groupId> |
| | | <artifactId>dingtalk</artifactId> |
| | | <version>2.1.14</version> |
| | | </dependency> |
| | | </dependencies> |
| | | |
| | | </project> |
| | | </project> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.project.domain.vo; |
| | | |
| | | import com.ruoyi.common.core.domain.BaseEntity; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | import java.util.concurrent.ConcurrentHashMap; |
| | | |
| | | /** |
| | | * ééæ¶æ¯åé |
| | | * |
| | | * @author ls |
| | | * @date 2023-07-14 |
| | | */ |
| | | @Data |
| | | @ApiModel(value = "DingDeptInfoVo", description = "ééé¨é¨ä¿¡æ¯") |
| | | public class DingDetpInfoVo { |
| | | |
| | | /** |
| | | * æ¯å¦èªå¨æ·»å ç¨æ· |
| | | */ |
| | | @ApiModelProperty(value = "ç¨æ·ææºå·") |
| | | private Boolean auto_add_user; |
| | | |
| | | /** |
| | | * æ¯å¦å建é¨é¨åç» |
| | | */ |
| | | @ApiModelProperty(value = "é¨é¨ID") |
| | | private Boolean create_dept_group; |
| | | |
| | | /** |
| | | * é¨é¨ID |
| | | */ |
| | | @ApiModelProperty(value = "åéæ¶æ¯çæ é¢") |
| | | private Integer dept_id; |
| | | |
| | | /** |
| | | * é¨é¨åç§° |
| | | */ |
| | | @ApiModelProperty(value = "跳转url") |
| | | private String name; |
| | | |
| | | /** |
| | | * ç¶id |
| | | */ |
| | | @ApiModelProperty(value = "跳转url") |
| | | private String parent_id; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.project.domain.vo; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * ééæ¶æ¯åé |
| | | * |
| | | * @author ls |
| | | * @date 2023-07-14 |
| | | */ |
| | | @Data |
| | | @ApiModel(value = "DingUserInfoVo", description = "ééç¨æ·ä¿¡æ¯") |
| | | public class DingUserInfoVo { |
| | | |
| | | /** |
| | | * ç¨æ·ææºå· |
| | | */ |
| | | @ApiModelProperty(value = "ç¨æ·ææºå·") |
| | | private String mobile; |
| | | |
| | | /** |
| | | * æ¯å¦å建é¨é¨åç» |
| | | */ |
| | | @ApiModelProperty(value = "å§å") |
| | | private String name; |
| | | |
| | | /** |
| | | * ç¨æ·ID |
| | | */ |
| | | @ApiModelProperty(value = "ç¨æ·ID") |
| | | private String userid; |
| | | |
| | | |
| | | private String unionid; |
| | | |
| | | } |
| | |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date reporttime; |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date donatetime; |
| | | private Long dcid; |
| | | private Long infoid; |
| | | private String dcdonorno; |
| | |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date reporttime; |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date donatetime; |
| | | private Long dwid; |
| | | private Long infoid; |
| | | private String gainhospitalno; |
| | |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date reporttime; |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date donatetime; |
| | | private Long meid; |
| | | private Long infoid; |
| | | private String hospitalassesscontent; |
| | |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date reporttime; |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date donatetime; |
| | | private String donorno; |
| | | private String treatmenthospitalno; |
| | | private String treatmenthospitalname; |
| | |
| | | package com.ruoyi.project.service; |
| | | |
| | | import com.aliyun.dingtalkoauth2_1_0.models.GetSsoUserInfoResponseBody; |
| | | import com.ruoyi.project.domain.vo.DingTalkReqVo; |
| | | |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 宣æåç±»Serviceæ¥å£ |
| | |
| | | * @param dingTalkReqVo |
| | | */ |
| | | Boolean sendNotification(DingTalkReqVo dingTalkReqVo); |
| | | |
| | | Map<String, Object> noLogin(String code); |
| | | |
| | | /** |
| | | * |
| | | * @param deptID é¨é¨ID |
| | | * @param begin 馿¬¡å¼å§ç¶æï¼ä¸è½çäº2 |
| | | */ |
| | | public void deptidList(Long deptID, Integer begin); |
| | | } |
| | |
| | | |
| | | import com.alibaba.fastjson2.JSONArray; |
| | | import com.alibaba.fastjson2.JSONObject; |
| | | import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
| | | import com.dingtalk.api.DefaultDingTalkClient; |
| | | import com.dingtalk.api.DingTalkClient; |
| | | import com.dingtalk.api.request.OapiGettokenRequest; |
| | | import com.dingtalk.api.request.OapiMessageCorpconversationAsyncsendV2Request; |
| | | import com.dingtalk.api.request.OapiUserListidRequest; |
| | | import com.dingtalk.api.request.OapiV2UserGetbymobileRequest; |
| | | import com.dingtalk.api.response.OapiGettokenResponse; |
| | | import com.dingtalk.api.response.OapiMessageCorpconversationAsyncsendV2Response; |
| | | import com.dingtalk.api.response.OapiUserListidResponse; |
| | | import com.dingtalk.api.response.OapiV2UserGetbymobileResponse; |
| | | import com.dingtalk.api.request.*; |
| | | import com.dingtalk.api.response.*; |
| | | import com.fasterxml.jackson.databind.ObjectMapper; |
| | | import com.ruoyi.common.core.domain.entity.SysUser; |
| | | import com.ruoyi.common.exception.base.BaseException; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.common.utils.http.HttpUtils; |
| | | import com.ruoyi.project.domain.vo.DingDetpInfoVo; |
| | | import com.ruoyi.project.domain.vo.DingTalkReqVo; |
| | | import com.ruoyi.project.domain.vo.DingUserInfoVo; |
| | | import com.ruoyi.project.service.DingTalkService; |
| | | import com.ruoyi.system.mapper.SysUserMapper; |
| | | import com.taobao.api.ApiException; |
| | | import lombok.Data; |
| | | import lombok.extern.log4j.Log4j; |
| | | import org.apache.commons.collections4.CollectionUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | |
| | | |
| | | @Value("${agentId}") |
| | | private Long agentId; |
| | | |
| | | @Autowired |
| | | private SysUserMapper sysUserMapper; |
| | | |
| | | @Override |
| | | public Boolean sendNotification(DingTalkReqVo dingTalkReqVo) { |
| | |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * å
ç»éæ¥å£ |
| | | * |
| | | * @param authCode |
| | | * @return |
| | | */ |
| | | public Map<String, Object> noLogin(String authCode) { |
| | | try { |
| | | String urlString = "https://oapi.dingtalk.com/topapi/v2/user/getuserinfo"; |
| | | String params = "access_token=" + getAccessToken() + "&code=" + authCode; |
| | | String result = HttpUtils.sendPost(urlString, params); |
| | | ObjectMapper objectMapper = new ObjectMapper(); |
| | | Map<String, Object> map = objectMapper.readValue(result, Map.class); |
| | | return map; |
| | | } catch (Exception e) { |
| | | log.error(e.getMessage()); |
| | | new BaseException("ç»å½åºå¼å¸¸äºï¼è¯·è系管çåå¤ç"); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | @Override |
| | | public void deptidList(Long deptID, Integer begin) { |
| | | try { |
| | | //æ ¹æ®ä¼ è¿æ¥çé¨é¨IDï¼å»è·å该é¨é¨ä¸çç¨æ·ä¿¡æ¯ |
| | | if (begin != 1) DingUserInfoList(deptID); |
| | | //è·ååé¨é¨çdept_id |
| | | DingTalkClient client = new DefaultDingTalkClient("https://oapi.dingtalk.com/topapi/v2/department/listsub"); |
| | | OapiV2DepartmentListsubRequest req = new OapiV2DepartmentListsubRequest(); |
| | | req.setDeptId(deptID); |
| | | req.setLanguage("zh_CN"); |
| | | OapiV2DepartmentListsubResponse rsp = client.execute(req, getAccessToken()); |
| | | ObjectMapper objectMapper = new ObjectMapper(); |
| | | Map<String, Object> map = objectMapper.readValue(rsp.getBody(), Map.class); |
| | | if (ObjectUtils.isNotEmpty(map)) { |
| | | List<Map<String, Object>> dingDetpInfoList = (List<Map<String, Object>>) map.get("result"); |
| | | if (Integer.valueOf(map.get("errcode").toString()) == 0) { |
| | | for (int i = 0; i < dingDetpInfoList.size(); i++) { |
| | | Map<String, Object> map1 = dingDetpInfoList.get(i); |
| | | deptidList(Long.valueOf(map1.get("dept_id").toString()), 2); |
| | | } |
| | | } |
| | | } |
| | | } catch (Exception e) { |
| | | log.error(e.getMessage()); |
| | | new BaseException("ç»å½åºå¼å¸¸äºï¼è¯·è系管çåå¤ç"); |
| | | } |
| | | } |
| | | |
| | | public void DingUserInfoList(Long deptId) { |
| | | DingTalkClient client = null; |
| | | try { |
| | | client = new DefaultDingTalkClient("https://oapi.dingtalk.com/topapi/v2/user/list?access_token=" + getAccessToken()); |
| | | OapiV2UserListRequest req = new OapiV2UserListRequest(); |
| | | req.setDeptId(deptId); |
| | | req.setCursor(0L); |
| | | req.setSize(100L); |
| | | req.setLanguage("zh_CN"); |
| | | OapiV2UserListResponse rsp = client.execute(req, ""); |
| | | //è·årespéçç¨æ·ä¿¡æ¯éå |
| | | ObjectMapper objectMapper = new ObjectMapper(); |
| | | Map<String, Object> map = objectMapper.readValue(rsp.getBody(), Map.class); |
| | | Map<String, Object> mapResult = (Map<String, Object>) map.get("result"); |
| | | List<Map<String, Object>> userInfoMapList = (List<Map<String, Object>>) mapResult.get("list"); |
| | | if (!CollectionUtils.isEmpty(userInfoMapList)) { |
| | | //æ ¹æ®ææºå·ï¼å°userIDåè¿å¯¹åºçåæ®µä¸ |
| | | for (Map<String, Object> objectMap : userInfoMapList) { |
| | | SysUser sysUser = new SysUser(); |
| | | sysUser.setPhonenumber(objectMap.get("mobile").toString()); |
| | | sysUser.setDingUserId(objectMap.get("userid").toString()); |
| | | sysUserMapper.updateUser(sysUser); |
| | | } |
| | | } |
| | | |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * è·å access_token |
| | |
| | | OapiGettokenResponse response = client.execute(request); |
| | | return response.getAccessToken(); |
| | | } |
| | | |
| | | } |
| | |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.project.mapper.ServiceDonatecompletioninfoMapper"> |
| | | |
| | | |
| | | <resultMap type="com.ruoyi.project.domain.ServiceDonatecompletioninfo" id="ServiceDonatecompletioninfoResult"> |
| | | <result property="id" column="ID" /> |
| | | <result property="infoid" column="InfoID" /> |
| | |
| | | `service_donatebaseinfo`.`create_by` AS `basecreateby`, |
| | | `service_donatebaseinfo`.`workflow` AS `workflow`, |
| | | `service_donatebaseinfo`.`termination_case` AS `terminationCase`, |
| | | `service_donatebaseinfo`.`donatetime` AS `donatetime`, |
| | | `service_donatecompletioninfo`.`ID` AS `dcID`, |
| | | `service_donatecompletioninfo`.`InfoID` AS `InfoID`, |
| | | `service_donatecompletioninfo`.`DonorNo` AS `dcDonorNo`, |
| | |
| | | where InfoID = #{infoid} |
| | | </update> |
| | | |
| | | </mapper> |
| | | </mapper> |
| | |
| | | `service_donatebaseinfo`.`create_by` AS `basecreateby`, |
| | | `service_donatebaseinfo`.`workflow` AS `workflow`, |
| | | `service_donatebaseinfo`.`termination_case` AS `terminationCase`, |
| | | `service_donatebaseinfo`.`donatetime` AS `donatetime`, |
| | | `service_donationwitness`.`ID` AS `dwID`, |
| | | `service_donationwitness`.`InfoID` AS `InfoID`, |
| | | `service_donationwitness`.`DonorNo` AS `dwDonorNo`, |
| | |
| | | </select> |
| | | |
| | | |
| | | </mapper> |
| | | </mapper> |
| | |
| | | `service_donatebaseinfo`.`create_by` AS `basecreateby`, |
| | | `service_donatebaseinfo`.`workflow` AS `workflow`, |
| | | `service_donatebaseinfo`.`termination_case` AS `terminationCase`, |
| | | `service_donatebaseinfo`.`donatetime` AS `donatetime`, |
| | | `service_medicalevaluation`.`ID` AS `meID`, |
| | | `service_medicalevaluation`.`HospitalAssessContent` AS `HospitalAssessContent`, |
| | | `service_medicalevaluation`.`HospitalAssessConclusion` AS `HospitalAssessConclusion`, |
| | |
| | | where CoreTeamAssessTime >= #{starttime} and CoreTeamAssessTime <= #{endtime} |
| | | </select> |
| | | |
| | | </mapper> |
| | | </mapper> |
| | |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.project.mapper.ServiceRelativesconfirmationMapper"> |
| | | |
| | | |
| | | <resultMap type="com.ruoyi.project.domain.ServiceRelativesconfirmation" id="ServiceRelativesconfirmationResult"> |
| | | <result property="id" column="ID" /> |
| | | <result property="infoid" column="InfoID" /> |
| | |
| | | `service_donatebaseinfo`.`create_by` AS `basecreateby`, |
| | | `service_donatebaseinfo`.`workflow` AS `workflow`, |
| | | `service_donatebaseinfo`.`termination_case` AS `terminationCase`, |
| | | `service_donatebaseinfo`.`donatetime` AS `donatetime`, |
| | | `service_relativesconfirmation`.`ID` AS `rcID`, |
| | | `service_relativesconfirmation`.`InfoID` AS `InfoID`, |
| | | `service_relativesconfirmation`.`DonorNo` AS `rcDonroNo`, |
| | |
| | | where SignDate >= #{starttime} and SignDate <= #{endtime} |
| | | </select> |
| | | |
| | | </mapper> |
| | | </mapper> |
| | |
| | | public SysUser selectUserByUserName(String userName); |
| | | |
| | | /** |
| | | * éè¿ééç¨æ·id |
| | | * |
| | | * @param dingUserId ç¨æ·å |
| | | * @return ç¨æ·å¯¹è±¡ä¿¡æ¯ |
| | | */ |
| | | public SysUser selectUserByDingUserId(String dingUserId); |
| | | |
| | | /** |
| | | * éè¿å¾®ä¿¡OpenIDæ¥è¯¢ç¨æ· |
| | | * |
| | | * @param openid 微信OpenID |
| | |
| | | <result property="errorNums" column="error_nums"/> |
| | | <result property="errorTimes" column="error_times"/> |
| | | <result property="standardlevel" column="standardlevel"/> |
| | | <result property="dingUserId" column="ding_user_id"/> |
| | | <association property="dept" column="dept_id" javaType="com.ruoyi.common.core.domain.entity.SysDept" |
| | | resultMap="deptResult"/> |
| | | <collection property="roles" javaType="java.util.List" resultMap="RoleResult"/> |
| | |
| | | select u.user_id, |
| | | u.openid, |
| | | u.dept_id, |
| | | u.ding_user_id, |
| | | u.error_nums, |
| | | u.error_times, |
| | | u.user_name, |
| | |
| | | </sql> |
| | | |
| | | <select id="selectUserList" parameterType="com.ruoyi.common.core.domain.entity.SysUser" resultMap="SysUserResult"> |
| | | select u.user_id, u.dept_id, u.nick_name, u.user_name, u.email, u.avatar, u.phonenumber, u.password, u.sex, |
| | | select u.user_id,u.ding_user_id, u.dept_id, u.nick_name, u.user_name, u.email, u.avatar, u.phonenumber, |
| | | u.password, u.sex, |
| | | u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark,u.standardlevel, |
| | | d.dept_name, d.leader from sys_user u |
| | | left join sys_dept d on u.dept_id = d.dept_id |
| | |
| | | <include refid="selectUserVo"/> |
| | | where u.user_name = #{userName} |
| | | </select> |
| | | <select id="selectUserByDingUserId" parameterType="String" resultMap="SysUserResult"> |
| | | <include refid="selectUserVo"/> |
| | | where u.ding_user_id = #{dingUserId} |
| | | </select> |
| | | |
| | | <select id="selectUserByOpenID" parameterType="String" resultMap="SysUserResult"> |
| | | <include refid="selectUserVo"/> |
| | |
| | | <if test="status != null and status != ''">status,</if> |
| | | <if test="createBy != null and createBy != ''">create_by,</if> |
| | | <if test="remark != null and remark != ''">remark,</if> |
| | | <if test="dingUserId != null and dingUserId != ''">ding_user_id,</if> |
| | | create_time |
| | | )values( |
| | | <if test="userId != null and userId != ''">#{userId},</if> |
| | |
| | | <if test="status != null and status != ''">#{status},</if> |
| | | <if test="createBy != null and createBy != ''">#{createBy},</if> |
| | | <if test="remark != null and remark != ''">#{remark},</if> |
| | | <if test="dingUserId != null and dingUserId != ''">#{dingUserId},</if> |
| | | sysdate() |
| | | ) |
| | | </insert> |
| | |
| | | <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if> |
| | | <if test="remark != null">remark = #{remark},</if> |
| | | <if test="errorNums != null">error_nums = #{errorNums},</if> |
| | | <if test="dingUserId != null and dingUserId != ''">ding_user_id = #{dingUserId},</if> |
| | | update_time = sysdate() |
| | | </set> |
| | | where user_id = #{userId} |
| | | where del_flag=0 |
| | | <if test="userId != null and userId != ''">and user_id = #{userId}</if> |
| | | <if test="phonenumber != null and phonenumber != ''">and phonenumber = #{phonenumber}</if> |
| | | </update> |
| | | |
| | | <update id="updateUserStatus" parameterType="com.ruoyi.common.core.domain.entity.SysUser"> |
| | |
| | | where user_name = #{userName} |
| | | </update> |
| | | |
| | | <update id="resetUserPwd" parameterType="SysUser"> |
| | | <update id="resetUserPwd" parameterType="com.ruoyi.common.core.domain.entity.SysUser"> |
| | | update sys_user |
| | | set password = #{password} |
| | | where user_name = #{userName} |