Merge branch 'master' of http://139.186.142.91:10010/r/productDev/dmvisit
| | |
| | | </el-form-item> |
| | | <el-form-item label="äºä»¶ç±»å" prop="eventType"> |
| | | <el-select v-model="searchForm.eventType" placeholder="è¯·éæ©"> |
| | | <el-option label="å¨åå线äºä»¶" value="771760130"></el-option> |
| | | <el-option label="å¨åæ¾è¡äºä»¶" value="771760131"></el-option> |
| | | <el-option label="离åå线äºä»¶" value="771760133"></el-option> |
| | | <el-option label="ç¦»åæ¾è¡äºä»¶" value="771760134"></el-option> |
| | | <el-option label="å
¥åºå线äºä»¶" value="771760130"></el-option> |
| | | <el-option label="å
¥åºæ¾è¡äºä»¶" value="771760131"></el-option> |
| | | <el-option label="åºåºå线äºä»¶" value="771760133"></el-option> |
| | | <el-option label="åºåºæ¾è¡äºä»¶" value="771760134"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="èµ·å§æ¶é´" prop="eventType"> |
| | |
| | | </el-table-column> |
| | | <el-table-column label="ææç
§ç" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | <el-image style="width: 80px; height: 80px" :src="row.extEventPictureURL" |
| | | <el-image v-if="row.extEventPictureURL" style="width: 80px; height: 80px" :src="row.extEventPictureURL" |
| | | :preview-src-list="[row.extEventPictureURL]"> |
| | | </el-image> |
| | | </template> |
| | |
| | | <el-option label="åæ¥å¤±è´¥" value="2"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label=""> |
| | | <!-- <el-form-item label=""> |
| | | <el-checkbox style="font-size: 12px" label="1" v-model="searchForm.includeChild" key="1">æ¯å¦å
å«ä¸çº§ç»ç»</el-checkbox> |
| | | </el-form-item> |
| | | </el-form-item>--> |
| | | <section> |
| | | <el-button type="primary" @click="search">æç´¢</el-button> |
| | | <el-button @click="reset">éç½®</el-button> |
| | |
| | | icon="el-icon-plus" v-permissions="['business:traintime:create']">å¹è®æå¯¼å
¥</el-button></li> |
| | | <li><el-button type="danger" @click="deleteByIdInBatch" icon="el-icon-delete" |
| | | v-permissions="['business:member:delete']">æ¹éå é¤</el-button></li> |
| | | <li><el-button type="primary" v-permissions="['business:empower:create']" @click="startEmpowerBatch()">ä¸åææ</el-button></li> |
| | | <li><el-button type="primary" v-permissions="['business:empower:create']" @click="startEmpowerBatch()">ä¸åææ</el-button> |
| | | <li style="float: right"> |
| | | <el-checkbox style="font-size: 12px" label="1" v-model="searchForm.includeChild" key="1" |
| | | @change="search">æ¯å¦å
å«ä¸çº§ç»ç»</el-checkbox> |
| | | </li> |
| | | <!-- |
| | | <li><el-button type="primary" v-permissions="['business:empower:exportExcel']" @click="exportExcel">导åº</el-button></li> |
| | | --> |
| | | </ul> |
| | | <el-table v-loading="isWorking.search" :data="tableData.list" stripe @selection-change="handleSelectionChange"> |
| | | <el-table-column type="selection" width="55"></el-table-column> |
| | |
| | | > |
| | | <el-table-column type="selection" fixed="left" width="55"></el-table-column> |
| | | <el-table-column prop="code" label="æéç¼ç " fixed="left" min-width="200px"></el-table-column> |
| | | <el-table-column prop="name" label="æéåç§°" fixed="left" min-width="120px"></el-table-column> |
| | | <el-table-column prop="remark" label="æé夿³¨" min-width="120px"></el-table-column> |
| | | <el-table-column prop="name" label="æéåç§°" fixed="left" min-width="200px"></el-table-column> |
| | | <el-table-column prop="remark" label="æé夿³¨" min-width="200px"></el-table-column> |
| | | <el-table-column prop="createUser" label="å建人" min-width="100px"> |
| | | <template slot-scope="{row}">{{row.createUserInfo == null ? '' : row.createUserInfo.username}}</template> |
| | | </el-table-column> |
| | |
| | | spring: |
| | | profiles: |
| | | active: dev |
| | | active: pro |
| | | application: |
| | | name: system_gateway |
| | | # å®å
¨é
ç½® |
| | |
| | | package com.doumee.api; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.doumee.config.jwt.JwtProperties; |
| | | import com.doumee.core.constants.ResponseStatus; |
| | | import com.doumee.core.exception.BusinessException; |
| | | import com.doumee.core.model.LoginUserInfo; |
| | |
| | | import org.springframework.web.context.request.RequestContextHolder; |
| | | import org.springframework.web.context.request.ServletRequestAttributes; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.concurrent.TimeUnit; |
| | | |
| | | /** |
| | | * Controlleråºç±» |
| | |
| | | |
| | | @Autowired |
| | | private RedisTemplate<String,Object> stringRedisTemplate; |
| | | @Resource |
| | | private JwtProperties jwtProperties; |
| | | /** |
| | | * è·åå½åç»å½ç¨æ· |
| | | * @author Eva.Caesar Liu |
| | |
| | | } |
| | | return user; |
| | | } |
| | | public void updateLoginUser (String token,LoginUserInfo userInfo) { |
| | | stringRedisTemplate.opsForValue().set(Constants.REDIS_TOKEN_KEY+token,JSONObject.toJSONString(userInfo),jwtProperties.getExpiration(), TimeUnit.MILLISECONDS); |
| | | } |
| | | |
| | | |
| | | /** |
| | |
| | | import com.doumee.biz.system.SystemUserBiz; |
| | | import com.doumee.core.annotation.trace.Trace; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.LoginUserInfo; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.dao.system.dto.UpdatePwdDto; |
| | | import com.doumee.service.system.SystemLoginService; |
| | |
| | | @ApiOperation("ä¿®æ¹å½åç¨æ·å¯ç ") |
| | | @PostMapping("/updatePwd") |
| | | public ApiResponse updatePwd (@RequestHeader(Constants.HEADER_USER_TOKEN) String token, @Validated @RequestBody UpdatePwdDto dto) { |
| | | dto.setUserId(this.getLoginUser(token).getId()); |
| | | LoginUserInfo userInfo = this.getLoginUser(token); |
| | | dto.setUserId(userInfo.getId()); |
| | | systemUserBiz.updatePwd(dto); |
| | | userInfo.setNeedChangePwd(Constants.ONE); |
| | | updateLoginUser(token,userInfo);//æ´æ°ç»å½tokenä¸ç»å®çç¨æ·ä¿¡æ¯ä¸ºå·²æ´æ°å¯ç |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | |
| | | import com.doumee.core.constants.ResponseStatus; |
| | | import com.doumee.core.model.LoginUserInfo; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.PwdCheckUtil; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.system.SystemDepartmentUserMapper; |
| | | import com.doumee.dao.system.dto.*; |
| | |
| | | |
| | | @Override |
| | | public void updatePwd(UpdatePwdDto dto) { |
| | | //ç»å½å¯ç å¤æåº¦æ ¡éªï¼6-20个å符ï¼è³å°å
å«åæ¯ãæ°ååç¹æ®å符2ç§ |
| | | if(StringUtils.isBlank(dto.getNewPwd()) |
| | | ||dto.getNewPwd().length()>20 |
| | | ||dto.getNewPwd().length()<6 |
| | | ||PwdCheckUtil.checkPassword(dto.getNewPwd())){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(), "对ä¸èµ·ï¼å¯ç å¤æåº¦ä¸æ»¡è¶³è¦æ±ï¼6-20个å符ï¼è³å°å
å«åæ¯ãæ°ååç¹æ®å符2ç§"); |
| | | } |
| | | SystemUser user = systemUserService.findById(dto.getUserId()); |
| | | if (user.getDeleted()) { |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(), "ç¨æ·ä¸åå¨æå·²è¢«å é¤"); |
| | |
| | | SystemUser newUser = new SystemUser(); |
| | | newUser.setId(dto.getUserId()); |
| | | newUser.setPassword(Utils.Secure.encryptPassword(dto.getNewPwd(), user.getSalt())); |
| | | newUser.setNeedChangePwd(Constants.ONE); |
| | | systemUserService.updateById(newUser); |
| | | } |
| | | |
| | |
| | | updateUserDto.setId(dto.getId()); |
| | | updateUserDto.setUpdateUser(dto.getOperaUserId()); |
| | | updateUserDto.setPassword(Utils.Secure.encryptPassword(dto.getPassword(), systemUser.getSalt())); |
| | | updateUserDto.setNeedChangePwd(Constants.ZERO); |
| | | systemUserService.updateById(updateUserDto); |
| | | } |
| | | |
| | |
| | | systemUser.setPassword(Utils.Secure.encryptPassword(systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.INITIAL_PASSWORD).getCode(), salt)); |
| | | systemUser.setSalt(salt); |
| | | systemUser.setSource(Constants.ZERO); |
| | | systemUser.setNeedChangePwd(Constants.ZERO); |
| | | |
| | | // åå»ºç¨æ·è®°å½ |
| | | systemUser.setType(Constants.ZERO); |
| | |
| | | .filter(s->StringUtils.isNotBlank(s)) |
| | | .distinct() |
| | | .collect(Collectors.toList()); |
| | | String pwd =systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.INITIAL_PASSWORD).getCode(); |
| | | if (!CollectionUtils.isEmpty(collect)){ |
| | | QueryWrapper<SystemDepartment> wrapper = new QueryWrapper<>(); |
| | | wrapper.lambda().in(SystemDepartment::getName,collect); |
| | | List<SystemDepartment> systemDepartments = systemDepartmentService.findList(wrapper); |
| | | Map<Integer, String> collect1 = systemDepartments.stream().collect(Collectors.toMap(s -> s.getId(), s -> s.getName())); |
| | | |
| | | // çæå¯ç ç |
| | | dataList.forEach(s->{ |
| | | |
| | | CreateSystemUserDTO systemUser = new CreateSystemUserDTO(); |
| | | systemUser.setDepartmentId(getKey(collect1,s.getDepartmentName())); |
| | | systemUser.setUsername(s.getUsername()); |
| | | systemUser.setRealname(s.getUsername()); |
| | | systemUser.setEmpNo(s.getEmpNo()); |
| | | systemUser.setMobile(s.getMobile()); |
| | | systemUser.setPassword(s.getMobile()); |
| | | String salt = RandomStringUtils.randomAlphabetic(6); |
| | | // systemUser.setPassword(s.getMobile()); |
| | | // çæå¯ç String pwd =systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.INITIAL_PASSWORD).getCode(); |
| | | systemUser.setPassword(Utils.Secure.encryptPassword(pwd, salt)); |
| | | systemUser.setNeedChangePwd(Constants.ZERO); |
| | | systemUser.setSalt(salt); |
| | | systemUser.setCreateUser(loginUserInfo.getId()); |
| | | systemUser.setUpdateUser(loginUserInfo.getId()); |
| | | systemUser.setType(Constants.ZERO); |
| | |
| | | systemUser.setRealname(s.getUsername()); |
| | | systemUser.setEmpNo(s.getEmpNo()); |
| | | systemUser.setMobile(s.getMobile()); |
| | | systemUser.setPassword(s.getMobile()); |
| | | // çæå¯ç String pwd =systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.INITIAL_PASSWORD).getCode(); |
| | | String salt = RandomStringUtils.randomAlphabetic(6); |
| | | systemUser.setPassword(Utils.Secure.encryptPassword(pwd, salt)); |
| | | systemUser.setNeedChangePwd(Constants.ZERO); |
| | | // systemUser.setPassword(s.getMobile()); |
| | | systemUser.setCreateUser(loginUserInfo.getId()); |
| | | systemUser.setUpdateUser(loginUserInfo.getId()); |
| | | systemUser.setType(Constants.ZERO); |
| | |
| | | |
| | | private Integer memberId; |
| | | private Integer type; |
| | | private Integer needChangePwd; |
| | | private String mobile; |
| | | private String sessionId; |
| | | |
| | |
| | | import java.net.URLEncoder; |
| | | import java.security.Key; |
| | | import java.util.Base64; |
| | | import java.util.UUID; |
| | | import java.util.concurrent.TimeUnit; |
| | | |
| | | public class DESUtil { |
| | |
| | | long currentTimeMillis = System.currentTimeMillis() + 1000*60*60*hour; |
| | | String encrypt = DESUtil.encrypt("12345678",currentTimeMillis + "_" + userName ); |
| | | try{ |
| | | encrypt = URLEncoder.encode(encrypt,"UTF-8"); |
| | | // encrypt = Base64.getEncoder().encodeToString(encrypt.getBytes()); |
| | | // encrypt = URLEncoder.encode(encrypt,"UTF-8"); |
| | | }catch (Exception e){ |
| | | throw new BusinessException(ResponseStatus.SERVER_ERROR.getCode(),"çæå å¯ç 失败!"); |
| | | } |
| | | redisTemplate.opsForValue().set(Constants.REDIS_HK_TOKEN_KEY+encrypt, encrypt,1000*60*60*hour, TimeUnit.MILLISECONDS); |
| | | return encrypt; |
| | | String token = UUID.randomUUID().toString(); |
| | | redisTemplate.opsForValue().set(Constants.REDIS_HK_TOKEN_KEY+token, encrypt,1000*60*60*hour, TimeUnit.MILLISECONDS); |
| | | return token; |
| | | } |
| | | |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.core.utils; |
| | | |
| | | import java.util.regex.Pattern; |
| | | |
| | | /** |
| | | * Javaæ£åæ ¡éªå¯ç è³å°å
å«ï¼åæ¯æ°åç¹æ®ç¬¦å·ä¸ç2ç§ |
| | | */ |
| | | public class PwdCheckUtil { |
| | | |
| | | /** |
| | | * åå®è®¾ç½®å¯ç æ¶ï¼å¯ç è§åä¸ºï¼ åæ¯ãæ°åãç¹æ®ç¬¦å·ï¼è³å°å¹é
2ç§ |
| | | * åå¯ç å¯è½åºç°çæ
åµæï¼ |
| | | * 1ãæ°å+ç¹æ®ç¬¦å· |
| | | * 2ã忝+ç¹æ®ç¬¦å· |
| | | * 3ã忝+æ°å |
| | | * 4ã忝+æ°å+ç¹æ®ç¬¦å· |
| | | * (ç»åä¸é¡ºåºæ å
³) |
| | | * è§£å³æè·¯ï¼ |
| | | * 1ãéåå符串çå符æ°ç»ï¼æ¥çæ¯å¦å
å«ç®æ ç¹æ®å符ï¼è¥å
å«ï¼åæ è®°å符串 |
| | | * å
å«ç¹æ®å符ï¼å¹¶æ¿æ¢å½åç¹æ®å符为''ã |
| | | * 2ã夿å©ä¸çåç¬¦ç»æçåç¬¦ä¸²ï¼æ¯å¦å¹é
以䏿
åµ |
| | | * - çº¯åæ¯ |
| | | * - 纯æ°å |
| | | * - 忝+æ°å |
| | | * 3ãå符串å¹é
è§å |
| | | * çº¯åæ¯+å
å«ç¹æ®å符 ---- å¹é
éè¿ |
| | | * 纯æ°å+å
å«ç¹æ®å符 ---- å¹é
éè¿ |
| | | * 忝+æ°å+å
å«ä¸ªæ°å符 ---- å¹é
éè¿ |
| | | */ |
| | | //ç¹æ®å符 |
| | | public static final String SPEC_CHARACTERS = " !\"#$%&'()*+,-./:;<=>?@\\]\\[^_`{|}~"; |
| | | // çº¯åæ¯ |
| | | public static final String character = "[a-zA-Z]{1,}$"; |
| | | // 纯æ°å |
| | | public static final String numberic = "[0-9]{1,}$"; |
| | | // 忝忰å |
| | | public static final String number_and_character = "((^[a-zA-Z]{1,}[0-9]{1,}[a-zA-Z0-9]*)+)" + |
| | | "|((^[0-9]{1,}[a-zA-Z]{1,}[a-zA-Z0-9]*)+)$"; |
| | | // åæ¯ææ°å |
| | | public static final String number_or_character = "[a-zA-Z0-9]+$"; |
| | | // 忝æ°åä¸å线 |
| | | public static final String ncw = "\\w+$"; |
| | | |
| | | public static boolean checkPassword(String targetString) { |
| | | String opStr = targetString; |
| | | boolean isLegal = false; |
| | | boolean hasSpecChar = false; |
| | | char[] charArray = opStr.toCharArray(); |
| | | for (char c : charArray) { |
| | | if (SPEC_CHARACTERS.contains(String.valueOf(c))) { |
| | | hasSpecChar = true; |
| | | // æ¿æ¢æ¤å符串 |
| | | opStr = opStr.replace(c, ' '); |
| | | } |
| | | } |
| | | String excSpecCharStr = opStr.replace(" ", ""); |
| | | boolean isPureNum = Pattern.compile(numberic).matcher(excSpecCharStr).matches(); |
| | | boolean isPureChar = Pattern.compile(character).matcher(excSpecCharStr).matches(); |
| | | boolean isNumAndChar = Pattern.compile(number_and_character).matcher(excSpecCharStr).matches(); |
| | | isLegal = ((isPureNum && hasSpecChar) |
| | | || (isPureChar && hasSpecChar) || isNumAndChar && hasSpecChar) || isNumAndChar; |
| | | System.out.println("å符串ï¼" + targetString + ",æ¯å¦ç¬¦åè§åï¼" + isLegal); |
| | | System.out.println("---------------"); |
| | | return isLegal; |
| | | } |
| | | |
| | | public static void main(String[] args) { |
| | | checkPassword("fasdagd"); |
| | | checkPassword("41234123"); |
| | | checkPassword("#$%^&&*("); |
| | | checkPassword("fasd$$"); |
| | | checkPassword("41234%%%"); |
| | | checkPassword("fasd41^(324"); |
| | | checkPassword("fa413%^&*"); |
| | | checkPassword("&%fa413%^&*"); |
| | | } |
| | | |
| | | } |
| | |
| | | @Data |
| | | public class NoticesDTO { |
| | | |
| | | @ApiModelProperty(value = "ç¨æ·ä¸»é®",hidden = true) |
| | | @ApiModelProperty(value = "member主é®",hidden = true) |
| | | private Integer memberId; |
| | | |
| | | @ApiModelProperty(value = "ç¨æ·ä¸»é®",hidden = true) |
| | | private Integer userId; |
| | | |
| | | @ApiModelProperty(value = "æ¥è¯¢ç±»å: 0=å¾
å¤çï¼1=å·²å¤çï¼2=æåå¸çï¼3=æéæ") |
| | | private Integer queryType; |
| | | |
| | |
| | | |
| | | @ApiModelProperty(value = "å建人", example = "1", hidden = true) |
| | | private Integer createUser; |
| | | @ApiModelProperty(value = "æ¯å¦éè¦å¼ºå¶æ´æ°å¯ç 0æ¯ 1å¦") |
| | | private Integer needChangePwd; |
| | | |
| | | @ApiModelProperty(value = "æ´æ°äºº", example = "1", hidden = true) |
| | | private Integer updateUser; |
| | |
| | | queryWrapper.ge(noticesDTO.getStartDate() != null, Notices::getCreateDate, Utils.Date.getStart(noticesDTO.getStartDate() )); |
| | | queryWrapper.le(noticesDTO.getEndDate() != null, Notices::getCreateDate, Utils.Date.getEnd(noticesDTO.getEndDate() )); |
| | | queryWrapper.eq(Objects.nonNull(noticesDTO.getType()),Notices::getType,noticesDTO.getType()); |
| | | queryWrapper.eq(Objects.nonNull(noticesDTO.getMemberId()),Notices::getUserId,noticesDTO.getMemberId()); |
| | | queryWrapper.eq(StringUtils.isNotBlank(noticesDTO.getTitle()),Notices::getTitle,noticesDTO.getTitle()); |
| | | queryWrapper.orderByDesc(Notices::getCreateDate); |
| | | PageData<Notices> pageData = PageData.from(noticesMapper.selectJoinPage(page,Notices.class, queryWrapper)); |
| | |
| | | e.printStackTrace(); |
| | | success = Constants.ONE; |
| | | }finally { |
| | | wmsService.saveInterfaceLog("/wms/push/outboundNotice", "æ¨éåºåºåéç¥ä»»å¡",JSONObject.toJSONString(param),success |
| | | wmsService.saveInterfaceLog("/wms/push/outboundNotice", "ãWMSãæ¨éåºåºåéç¥ä»»å¡",JSONObject.toJSONString(param),success |
| | | , JSONObject.toJSONString(result),Constants.ONE); |
| | | } |
| | | |
| | |
| | | @ApiOperation(value = "ä»»å¡ä¸å¿å¤´é¨ - PC", notes = "PC") |
| | | @PostMapping("/taskCenterHeadPC") |
| | | public ApiResponse<InternalHomeVO> taskCenterHeadPC(@RequestBody NoticesDTO noticesDTO,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | noticesDTO.setMemberId(getLoginUser(token).getMemberId()); |
| | | LoginUserInfo loginUserInfo = getLoginUser(token); |
| | | noticesDTO.setMemberId(loginUserInfo.getMemberId()); |
| | | noticesDTO.setUserId(loginUserInfo.getId()); |
| | | return ApiResponse.success("æ¥è¯¢æå",approveService.getHomeDataPC(noticesDTO)); |
| | | } |
| | | |
| | |
| | | public ApiResponse<PageData<Notices>> taskPage (@RequestBody PageWrap<NoticesDTO> pageWrap, @RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | LoginUserInfo loginUserInfo = getLoginUser(token); |
| | | pageWrap.getModel().setMemberId(loginUserInfo.getMemberId()); |
| | | pageWrap.getModel().setUserId(loginUserInfo.getId()); |
| | | return ApiResponse.success(noticesService.taskCanterPage(pageWrap)); |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.cloud.admin; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.config.annotation.CloudRequiredPermission; |
| | | import com.doumee.core.annotation.excel.ExcelExporter; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.dao.business.model.WxNoticeConfig; |
| | | import com.doumee.service.business.WxNoticeConfigService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | | * @date 2024/10/17 15:44 |
| | | */ |
| | | @Api(tags = "微信å
¬ä¼å·éç¥é
ç½®") |
| | | @RestController |
| | | @RequestMapping(Constants.CLOUD_SERVICE_URL_INDEX+"/business/wxNoticeConfig") |
| | | public class WxNoticeConfigController extends BaseController { |
| | | |
| | | @Autowired |
| | | private WxNoticeConfigService wxNoticeConfigService; |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("æ°å»º") |
| | | @PostMapping("/create") |
| | | @CloudRequiredPermission("business:wxnoticeconfig:create") |
| | | public ApiResponse create(@RequestBody WxNoticeConfig wxNoticeConfig) { |
| | | return ApiResponse.success(wxNoticeConfigService.create(wxNoticeConfig)); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDå é¤") |
| | | @GetMapping("/delete/{id}") |
| | | @CloudRequiredPermission("business:wxnoticeconfig:delete") |
| | | public ApiResponse deleteById(@PathVariable Integer id) { |
| | | wxNoticeConfigService.deleteById(id); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ¹éå é¤") |
| | | @GetMapping("/delete/batch") |
| | | @CloudRequiredPermission("business:wxnoticeconfig:delete") |
| | | public ApiResponse deleteByIdInBatch(@RequestParam String ids) { |
| | | String [] idArray = ids.split(","); |
| | | List<Integer> idList = new ArrayList<>(); |
| | | for (String id : idArray) { |
| | | idList.add(Integer.valueOf(id)); |
| | | } |
| | | wxNoticeConfigService.deleteByIdInBatch(idList); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDä¿®æ¹") |
| | | @PostMapping("/updateById") |
| | | @CloudRequiredPermission("business:wxnoticeconfig:update") |
| | | public ApiResponse updateById(@RequestBody WxNoticeConfig wxNoticeConfig) { |
| | | wxNoticeConfigService.updateById(wxNoticeConfig); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | @PostMapping("/page") |
| | | @CloudRequiredPermission("business:wxnoticeconfig:query") |
| | | public ApiResponse<PageData<WxNoticeConfig>> findPage (@RequestBody PageWrap<WxNoticeConfig> pageWrap) { |
| | | return ApiResponse.success(wxNoticeConfigService.findPage(pageWrap)); |
| | | } |
| | | |
| | | @ApiOperation("导åºExcel") |
| | | @PostMapping("/exportExcel") |
| | | @CloudRequiredPermission("business:wxnoticeconfig:exportExcel") |
| | | public void exportExcel (@RequestBody PageWrap<WxNoticeConfig> pageWrap, HttpServletResponse response) { |
| | | ExcelExporter.build(WxNoticeConfig.class).export(wxNoticeConfigService.findPage(pageWrap).getRecords(), "微信å
¬ä¼å·éç¥é
ç½®", response); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDæ¥è¯¢") |
| | | @GetMapping("/{id}") |
| | | @CloudRequiredPermission("business:wxnoticeconfig:query") |
| | | public ApiResponse findById(@PathVariable Integer id) { |
| | | return ApiResponse.success(wxNoticeConfigService.findById(id)); |
| | | } |
| | | |
| | | |
| | | |
| | | @ApiOperation("æ¹éç¦å¯ç¨") |
| | | @GetMapping("/updateStatus/batch") |
| | | @CloudRequiredPermission("business:wxnoticeconfig:update") |
| | | public ApiResponse updateStatusBatch(@RequestParam String ids,@RequestParam Integer status) { |
| | | String [] idArray = ids.split(","); |
| | | List<Integer> idList = new ArrayList<>(); |
| | | for (String id : idArray) { |
| | | idList.add(Integer.valueOf(id)); |
| | | } |
| | | wxNoticeConfigService.updateStatusByIdInBatch(idList,status); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | @ApiOperation("tokenè§£æ") |
| | | @GetMapping("/water/decodeToken") |
| | | public Map<String,Object> decodeToken(@RequestParam String token) { |
| | | String token1 =token; |
| | | log.info("ãå®é²å¹³å°åç¹ç»å½tokenè§£æã================="+token1); |
| | | log.info("ãå®é²å¹³å°åç¹ç»å½tokenè§£æã================="+token); |
| | | int success = Constants.ZERO; |
| | | Map<String,Object> result = new HashMap<>() ; |
| | | try { |
| | | token = URLEncoder.encode(token1); |
| | | HkBaseTokenRequest hkBaseTokenRequest = new HkBaseTokenRequest(); |
| | | hkBaseTokenRequest.setToken(token); |
| | | result = this.decodeTokenForHk(hkBaseTokenRequest); |
| | |
| | | e.printStackTrace(); |
| | | success = Constants.ONE; |
| | | }finally { |
| | | interfaceLogService.saveInterfaceLog("/hk/api/water/decodeToken", "ãå®é²å¹³å°ãåç¹ç»å½tokenè§£æ",token1, |
| | | interfaceLogService.saveInterfaceLog("/hk/api/water/decodeToken", "ãå®é²å¹³å°ãåç¹ç»å½tokenè§£æ",token, |
| | | success, JSONObject.toJSONString(result),Constants.ZERO); |
| | | } |
| | | return result; |
| | |
| | | result.put("msg","tokenæ æ!"); |
| | | return result; |
| | | } |
| | | String userName = null; |
| | | try { |
| | | userName = DESUtil.verifyHkToken(URLDecoder.decode(hkBaseTokenRequest.getToken(),"UTF-8")); |
| | | }catch (Exception e){ |
| | | } |
| | | String userName = DESUtil.verifyHkToken( redisToken);; |
| | | if(StringUtils.isBlank(userName)){ |
| | | result.put("code","-1"); |
| | | result.put("msg","tokenåæ°ä¸ºç©º"); |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.core.wx.wxPlat; |
| | | |
| | | import com.doumee.core.utils.Constants; |
| | | |
| | | /** |
| | | * Created by IntelliJ IDEA. |
| | | * |
| | | * @Author : Rk |
| | | * @create 2024/10/17 13:54 |
| | | */ |
| | | public class WxPlatConstants { |
| | | |
| | | |
| | | public static final String visit ="1" ; |
| | | public static final String visitReport ="2" ; |
| | | public static final String hiddenDanger ="3" ; |
| | | public static final String carUse ="4" ; |
| | | public static final String meeting ="5" ; |
| | | public static final String platformBook ="6" ; |
| | | public static final String platformJob ="7" ; |
| | | |
| | | |
| | | /** |
| | | * 访客ç³è¯· |
| | | */ |
| | | public interface visitContent{ |
| | | // æäº¤æåç»ç³è¯·äººï¼ç³è¯·æäº¤æåå¾
å®¡æ ¸ |
| | | String visitUpload = "visitUpload"; |
| | | // 审æ¹éè¿ç»ç³è¯·äººï¼ç³è¯·å·²å®¡æ ¸éè¿ |
| | | String visitAuditSuccess = "visitAuditSuccess"; |
| | | // 审æ¹é©³åç»ç³è¯·äººï¼ç³è¯·å·²è¢«é©³å |
| | | String visitAuditFail = "visitWaitAudit"; |
| | | // ç»å®¡æ¹äººï¼ç³è¯·å¾
æ¨å®¡æ¹ |
| | | String visitWaitAudit = "visitWaitAudit"; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 访客æ¥å¤ |
| | | */ |
| | | public interface visitReportContent{ |
| | | // æäº¤æåç»ç³è¯·äººï¼ç³è¯·æäº¤æåå¾
å®¡æ ¸ |
| | | String visitReportUpload = "visitReportUpload"; |
| | | // 审æ¹éè¿ç»ç³è¯·äººï¼ç³è¯·å·²å®¡æ ¸éè¿ |
| | | String visitReportAuditSuccess = "visitReportAuditSuccess"; |
| | | // 审æ¹é©³åç»ç³è¯·äººï¼ç³è¯·å·²è¢«é©³å |
| | | String visitReportAuditFail = "visitReportAuditFail"; |
| | | // ç»å®¡æ¹äººï¼ç³è¯·å¾
æ¨å®¡æ¹ |
| | | String visitReportWaitAudit = "visitReportAuditSuccess"; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 鿣鿿 |
| | | */ |
| | | public interface hiddenDangerContent{ |
| | | //鿣䏿¥éç¥ |
| | | String hiddenDangerUpload = "hiddenDangerUpload"; |
| | | //éæ£æ´æ¹éç¥ |
| | | String hiddenDangerDeal = "hiddenDangerDeal"; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * ç¨è½¦ç³è¯· |
| | | */ |
| | | public interface carUseBookContent{ |
| | | //çä¿¡éç¥æ¨¡æ¿ï¼ç»å¤çäººï¼ |
| | | String carUseBookUpload = "carUseBookUpload"; |
| | | //ç¨è½¦ç³è¯·-审æ¹éè¿éç¥ï¼ç»ç³è¯·äººï¼ï¼ã |
| | | String carUseBookAuditSuccess = "carUseBookAuditSuccess"; |
| | | //ç¨è½¦ç³è¯·-审æ¹é©³åéç¥ï¼ç»ç³è¯·äººï¼ï¼ã |
| | | String carUseBookAuditFail = "carUseBookAuditFail"; |
| | | //ç¨è½¦ç³è¯·-审æ¹é©³åéç¥ï¼ç»ç³è¯·äººï¼ï¼ã |
| | | String carUseBookWaitAudit = "carUseBookWaitAudit"; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * ä¼è®®éç¥ |
| | | */ |
| | | public interface meetingContent{ |
| | | //线ä¸ä¼è®®é¢çº¦æåéç¥ |
| | | String reservationSuccess = "reservationSuccess"; |
| | | //ä¼è®®åæ¶éç¥ã |
| | | String meetingCancel = "meetingCancel"; |
| | | //ä¼è®®å³å°å¼å§æéï¼è®¢é
æ¶æ¯ï¼ |
| | | String meetingBeginA = "meetingBeginA"; |
| | | //ä¼è®®å³å°ç»ææéï¼è®¢é
æ¶æ¯ï¼ |
| | | String meetingEndA = "meetingEndA"; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * ç©æµè½¦é¢çº¦ |
| | | */ |
| | | public interface platformBookContent{ |
| | | // æäº¤æåç»ç³è¯·äººï¼ç³è¯·æäº¤æåå¾
å®¡æ ¸ |
| | | String platformBookUpload = "platformBookUpload"; |
| | | // 审æ¹éè¿ç»ç³è¯·äººï¼ç³è¯·å·²å®¡æ ¸éè¿ |
| | | String platformBookAuditSuccess = "platformBookAuditSuccess"; |
| | | // 审æ¹é©³åç»ç³è¯·äººï¼ç³è¯·å·²è¢«é©³å |
| | | String platformBookAuditFail = "platformBookWaitAudit"; |
| | | // ç»å®¡æ¹äººï¼ç³è¯·å¾
æ¨å®¡æ¹ |
| | | String platformBookWaitAudit = "platformBookWaitAudit"; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * ç©æµä½ä¸ |
| | | */ |
| | | public interface platformJobContent{ |
| | | //ç©æµè½¦é¢çº¦-å«å·å
¥åçå¾
ï¼ç»å¸æºï¼ |
| | | String platformJobCallIn = "platformJobCallIn"; |
| | | //ç©æµè½¦é¢çº¦-æå°å«å·ï¼ç»å¸æºï¼ |
| | | String platformJobSingIn = "platformJobSingIn"; |
| | | //ç©æµè½¦é¢çº¦-æå°å«å·è¿å·ï¼ç»å¸æºï¼ |
| | | String platformJobOverNum = "platformJobOverNum"; |
| | | //ç©æµè½¦é¢çº¦-ä½ä¸å¼å§ï¼ç»å¸æºï¼ |
| | | String platformJobWorking = "platformJobWorking"; |
| | | //ç©æµè½¦é¢çº¦-ä½ä¸å®æï¼ç»å¸æºï¼ |
| | | String platformJobFinish = "platformJobFinish"; |
| | | //ç©æµè½¦é¢çº¦-ç¦»åææï¼ç»å¸æºï¼ |
| | | String platformJobLevelPower = "platformJobLevelPower"; |
| | | //ç©æµè½¦é¢çº¦-æå°è½¬ç§»ï¼ç»å¸æºï¼ |
| | | String platformJobMove = "platformJobMove"; |
| | | //ç©æµè½¦é¢çº¦-ä½ä¸å¼å¸¸æèµ·ï¼ç»å¸æºï¼ |
| | | String platformJobError = "platformJobError"; |
| | | //ç©æµè½¦é¢çº¦-æå°åé è¶
æ¶ï¼ç»å¸æºï¼ |
| | | String platformJobTimeOut = "platformJobTimeOut"; |
| | | //ç©æµè½¦é¢çº¦-æå°åé é误ï¼ç»å¸æºï¼ |
| | | String platformJobStopErr = "platformJobStopErr"; |
| | | // è¿è¾ä»»å¡ä¸è¾¾ ï¼ç»å¸æºï¼ |
| | | String platformJobNewJob = "platformJobNewJob"; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | package com.doumee.core.wx.wxPlat; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.dao.business.WxNoticeConfigMapper; |
| | | import com.doumee.dao.business.model.Visits; |
| | | import com.doumee.dao.business.model.WxNoticeConfig; |
| | | import com.github.xiaoymin.knife4j.core.util.CollectionUtils; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import me.chanjar.weixin.common.error.WxErrorException; |
| | | import me.chanjar.weixin.mp.api.WxMpService; |
| | |
| | | import me.chanjar.weixin.mp.bean.template.WxMpTemplateMessage; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * 微信å
¬ä¼å·éç¥ |
| | |
| | | this.wxMpService = wxMpService; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 访客记å½å®¡æ¹ä¸å¡éç¥ |
| | | * 访客ä¸å¡éç¥æ¥å£ |
| | | */ |
| | | public Boolean sendVisitAuditTemplateNotice(Visits visits,String prefix,String tempId){ |
| | | if(StringUtils.isBlank(visits.getOpenid())){ |
| | |
| | | .templateId(tempId) |
| | | .url(prefix + visits.getId()) |
| | | .build(); |
| | | |
| | | |
| | | String thing1 = "å¾
审æ¹"; |
| | | if(visits.getStatus()==2){ |
| | | thing1 = "å®¡æ ¸éè¿"; |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 访客ä¸å¡éç¥ |
| | | */ |
| | | public void sendVisitTemplateNotice(WxNoticeConfigMapper wxNoticeConfigMapper,Visits visits,String objCode, String prefix, String tempId, List<String> openIds){ |
| | | if(CollectionUtils.isNotEmpty(openIds)){ |
| | | WxNoticeConfig wxNoticeConfig = wxNoticeConfigMapper.selectOne(new QueryWrapper<WxNoticeConfig>().lambda().eq(WxNoticeConfig::getObjType,WxPlatConstants.visit) |
| | | .eq(WxNoticeConfig::getObjCode,objCode) |
| | | .eq(WxNoticeConfig::getStatus, Constants.ZERO) |
| | | .last(" limit 1") |
| | | ); |
| | | if(Objects.isNull(wxNoticeConfig)){ |
| | | return; |
| | | } |
| | | WxMpTemplateMessage templateMessage = WxMpTemplateMessage.builder() |
| | | .toUser(visits.getOpenid()) |
| | | .templateId(tempId) |
| | | .url(prefix + visits.getId()) |
| | | .build(); |
| | | |
| | | templateMessage.addData(new WxMpTemplateData("thing1", visits.getName())) |
| | | .addData(new WxMpTemplateData("car_number7", StringUtils.isBlank(visits.getCarNos())?visits.getCarNos():"-")) |
| | | .addData(new WxMpTemplateData("character_string6", Constants.equalsInteger(visits.getMemberNum(),Constants.ZERO)?Constants.ONE+"":visits.getMemberNum().toString())) |
| | | .addData(new WxMpTemplateData("const9", wxNoticeConfig.getTitile())) |
| | | .addData(new WxMpTemplateData("thing4", visits.getReason())) |
| | | ; |
| | | String msgId = null; |
| | | try { |
| | | for (String openId:openIds) { |
| | | templateMessage.setToUser(openId); |
| | | } |
| | | // å鿍¡æ¿æ¶æ¯ |
| | | msgId = wxMpService.getTemplateMsgService().sendTemplateMsg(templateMessage); |
| | | } catch (WxErrorException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | log.warn("·==++--·æ¨é微信模æ¿ä¿¡æ¯ï¼{}·--++==·", msgId != null ? "æå" : "失败"); |
| | | |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.business; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.doumee.dao.business.model.WxNoticeConfig; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | | * @date 2024/10/17 15:44 |
| | | */ |
| | | public interface WxNoticeConfigMapper extends BaseMapper<WxNoticeConfig> { |
| | | |
| | | } |
| | |
| | | @ExcelColumn(name="çä¿¡ç¼ç ") |
| | | private String code; |
| | | |
| | | @ApiModelProperty(value = "æ é¢") |
| | | @ExcelColumn(name="æ é¢") |
| | | private String name; |
| | | |
| | | @ApiModelProperty(value = "çä¿¡å
容") |
| | | @ExcelColumn(name="çä¿¡å
容") |
| | | private String content; |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.business.model; |
| | | |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 微信å
¬ä¼å·éç¥é
ç½® |
| | | * @author æ±è¹è¹ |
| | | * @date 2024/10/17 15:44 |
| | | */ |
| | | @Data |
| | | @ApiModel("微信å
¬ä¼å·éç¥é
ç½®") |
| | | @TableName("`wx_notice_config`") |
| | | public class WxNoticeConfig { |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | @ApiModelProperty(value = "主é®", example = "1") |
| | | @ExcelColumn(name="主é®") |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty(value = "å建人ç¼ç ") |
| | | @ExcelColumn(name="å建人ç¼ç ") |
| | | private String creator; |
| | | |
| | | @ApiModelProperty(value = "å建æ¶é´") |
| | | @ExcelColumn(name="å建æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date createDate; |
| | | |
| | | @ApiModelProperty(value = "æ´æ°äººç¼ç ") |
| | | @ExcelColumn(name="æ´æ°äººç¼ç ") |
| | | private String edirot; |
| | | |
| | | @ApiModelProperty(value = "æ´æ°æ¶é´") |
| | | @ExcelColumn(name="æ´æ°æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date editDate; |
| | | |
| | | @ApiModelProperty(value = "æ¯å¦å é¤0å¦ 1æ¯", example = "1") |
| | | @ExcelColumn(name="æ¯å¦å é¤0å¦ 1æ¯") |
| | | private Integer isdeleted; |
| | | |
| | | @ApiModelProperty(value = "夿³¨") |
| | | @ExcelColumn(name="夿³¨") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty(value = "å¼å¯ç¶æï¼0å¼å¯ï¼1å
³é", example = "1") |
| | | @ExcelColumn(name="å¼å¯ç¶æï¼0å¼å¯ï¼1å
³é") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty(value = "模æ¿ID") |
| | | @ExcelColumn(name="模æ¿ID") |
| | | private String tempId; |
| | | |
| | | @ApiModelProperty(value = "æ é¢(æä¸¾å¼)") |
| | | @ExcelColumn(name="æ é¢(æä¸¾å¼)") |
| | | private String titile; |
| | | |
| | | @ApiModelProperty(value = "ä¸å¡ç¼ç ") |
| | | @ExcelColumn(name="ä¸å¡ç¼ç ") |
| | | private String objCode; |
| | | |
| | | @ApiModelProperty(value = "ä¸å¡ç±»å 1=访客ä¸å¡ï¼2=访客æ¥å¤ï¼3=鿣鿿ï¼4=ç¨è½¦ç³è¯·ï¼5=ä¼è®®å®¤ä¿¡æ¯ï¼6=ç©æµè½¦é¢çº¦ï¼7=ç©æµè½¦ä½ä¸", example = "1") |
| | | @ExcelColumn(name="ä¸å¡ç±»å 1=访客ä¸å¡ï¼2=访客æ¥å¤ï¼3=鿣鿿ï¼4=ç¨è½¦ç³è¯·ï¼5=ä¼è®®å®¤ä¿¡æ¯ï¼6=ç©æµè½¦é¢çº¦ï¼7=ç©æµè½¦ä½ä¸") |
| | | private Integer objType; |
| | | |
| | | } |
| | |
| | | DriverHomeVO getDriverHome(LoginUserInfo loginUserInfo); |
| | | |
| | | /** |
| | | * è·ç¦»ç¾å° |
| | | * è·ç¦»ç¾å°Â· |
| | | * @param signInDTO |
| | | */ |
| | | void signIn(SignInDTO signInDTO); |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.service.business; |
| | | |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.business.model.WxNoticeConfig; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 微信å
¬ä¼å·éç¥é
ç½®Serviceå®ä¹ |
| | | * @author æ±è¹è¹ |
| | | * @date 2024/10/17 15:44 |
| | | */ |
| | | public interface WxNoticeConfigService { |
| | | |
| | | /** |
| | | * å建 |
| | | * |
| | | * @param wxNoticeConfig å®ä½å¯¹è±¡ |
| | | * @return Integer |
| | | */ |
| | | Integer create(WxNoticeConfig wxNoticeConfig); |
| | | |
| | | /** |
| | | * 主é®å é¤ |
| | | * |
| | | * @param id ä¸»é® |
| | | */ |
| | | void deleteById(Integer id); |
| | | |
| | | /** |
| | | * å é¤ |
| | | * |
| | | * @param wxNoticeConfig å®ä½å¯¹è±¡ |
| | | */ |
| | | void delete(WxNoticeConfig wxNoticeConfig); |
| | | |
| | | /** |
| | | * æ¹é主é®å é¤ |
| | | * |
| | | * @param ids 主é®é |
| | | */ |
| | | void deleteByIdInBatch(List<Integer> ids); |
| | | |
| | | /** |
| | | * 䏻鮿´æ° |
| | | * |
| | | * @param wxNoticeConfig å®ä½å¯¹è±¡ |
| | | */ |
| | | void updateById(WxNoticeConfig wxNoticeConfig); |
| | | |
| | | /** |
| | | * æ¹é䏻鮿´æ° |
| | | * |
| | | * @param wxNoticeConfigs å®ä½é |
| | | */ |
| | | void updateByIdInBatch(List<WxNoticeConfig> wxNoticeConfigs); |
| | | |
| | | /** |
| | | * 䏻鮿¥è¯¢ |
| | | * |
| | | * @param id ä¸»é® |
| | | * @return WxNoticeConfig |
| | | */ |
| | | WxNoticeConfig findById(Integer id); |
| | | |
| | | /** |
| | | * æ¡ä»¶æ¥è¯¢åæ¡è®°å½ |
| | | * |
| | | * @param wxNoticeConfig å®ä½å¯¹è±¡ |
| | | * @return WxNoticeConfig |
| | | */ |
| | | WxNoticeConfig findOne(WxNoticeConfig wxNoticeConfig); |
| | | |
| | | /** |
| | | * æ¡ä»¶æ¥è¯¢ |
| | | * |
| | | * @param wxNoticeConfig å®ä½å¯¹è±¡ |
| | | * @return List<WxNoticeConfig> |
| | | */ |
| | | List<WxNoticeConfig> findList(WxNoticeConfig wxNoticeConfig); |
| | | |
| | | /** |
| | | * å页æ¥è¯¢ |
| | | * |
| | | * @param pageWrap å页对象 |
| | | * @return PageData<WxNoticeConfig> |
| | | */ |
| | | PageData<WxNoticeConfig> findPage(PageWrap<WxNoticeConfig> pageWrap); |
| | | |
| | | /** |
| | | * æ¡ä»¶ç»è®¡ |
| | | * |
| | | * @param wxNoticeConfig å®ä½å¯¹è±¡ |
| | | * @return long |
| | | */ |
| | | long count(WxNoticeConfig wxNoticeConfig); |
| | | |
| | | |
| | | void updateStatusByIdInBatch(List<Integer> ids,Integer status); |
| | | |
| | | } |
| | |
| | | QueryWrapper<Position> queryWrapper = new QueryWrapper<>(); |
| | | Utils.MP.blankToNull(pageWrap.getModel()); |
| | | pageWrap.getModel().setIsdeleted(Constants.ZERO); |
| | | queryWrapper.lambda() |
| | | queryWrapper |
| | | .select("*,(select count(1) from member where member.position_id = position.id and member.type=2 and isdeleted=0) as memberNum" ) |
| | | .lambda() |
| | | .eq(pageWrap.getModel().getId() != null, Position::getId, pageWrap.getModel().getId()) |
| | | .eq(pageWrap.getModel().getCreator() != null, Position::getCreator, pageWrap.getModel().getCreator()) |
| | | .ge(pageWrap.getModel().getCreateDate() != null, Position::getCreateDate, Utils.Date.getStart(pageWrap.getModel().getCreateDate())) |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.service.business.impl; |
| | | |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.business.WxNoticeConfigMapper; |
| | | import com.doumee.dao.business.model.SmsConfig; |
| | | import com.doumee.dao.business.model.WxNoticeConfig; |
| | | import com.doumee.service.business.WxNoticeConfigService; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * 微信å
¬ä¼å·éç¥é
ç½®Serviceå®ç° |
| | | * @author æ±è¹è¹ |
| | | * @date 2024/10/17 15:44 |
| | | */ |
| | | @Service |
| | | public class WxNoticeConfigServiceImpl implements WxNoticeConfigService { |
| | | |
| | | @Autowired |
| | | private WxNoticeConfigMapper wxNoticeConfigMapper; |
| | | |
| | | @Override |
| | | public Integer create(WxNoticeConfig wxNoticeConfig) { |
| | | wxNoticeConfigMapper.insert(wxNoticeConfig); |
| | | return wxNoticeConfig.getId(); |
| | | } |
| | | |
| | | @Override |
| | | public void deleteById(Integer id) { |
| | | wxNoticeConfigMapper.deleteById(id); |
| | | } |
| | | |
| | | @Override |
| | | public void delete(WxNoticeConfig wxNoticeConfig) { |
| | | UpdateWrapper<WxNoticeConfig> deleteWrapper = new UpdateWrapper<>(wxNoticeConfig); |
| | | wxNoticeConfigMapper.delete(deleteWrapper); |
| | | } |
| | | |
| | | @Override |
| | | public void deleteByIdInBatch(List<Integer> ids) { |
| | | if (CollectionUtils.isEmpty(ids)) { |
| | | return; |
| | | } |
| | | wxNoticeConfigMapper.deleteBatchIds(ids); |
| | | } |
| | | |
| | | @Override |
| | | public void updateById(WxNoticeConfig wxNoticeConfig) { |
| | | wxNoticeConfigMapper.updateById(wxNoticeConfig); |
| | | } |
| | | |
| | | @Override |
| | | public void updateByIdInBatch(List<WxNoticeConfig> wxNoticeConfigs) { |
| | | if (CollectionUtils.isEmpty(wxNoticeConfigs)) { |
| | | return; |
| | | } |
| | | for (WxNoticeConfig wxNoticeConfig: wxNoticeConfigs) { |
| | | this.updateById(wxNoticeConfig); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public WxNoticeConfig findById(Integer id) { |
| | | return wxNoticeConfigMapper.selectById(id); |
| | | } |
| | | |
| | | @Override |
| | | public WxNoticeConfig findOne(WxNoticeConfig wxNoticeConfig) { |
| | | QueryWrapper<WxNoticeConfig> wrapper = new QueryWrapper<>(wxNoticeConfig); |
| | | return wxNoticeConfigMapper.selectOne(wrapper); |
| | | } |
| | | |
| | | @Override |
| | | public List<WxNoticeConfig> findList(WxNoticeConfig wxNoticeConfig) { |
| | | QueryWrapper<WxNoticeConfig> wrapper = new QueryWrapper<>(wxNoticeConfig); |
| | | return wxNoticeConfigMapper.selectList(wrapper); |
| | | } |
| | | |
| | | @Override |
| | | public PageData<WxNoticeConfig> findPage(PageWrap<WxNoticeConfig> pageWrap) { |
| | | IPage<WxNoticeConfig> page = new Page<>(pageWrap.getPage(), pageWrap.getCapacity()); |
| | | QueryWrapper<WxNoticeConfig> queryWrapper = new QueryWrapper<>(); |
| | | Utils.MP.blankToNull(pageWrap.getModel()); |
| | | if (pageWrap.getModel().getId() != null) { |
| | | queryWrapper.lambda().eq(WxNoticeConfig::getId, pageWrap.getModel().getId()); |
| | | } |
| | | if (pageWrap.getModel().getCreator() != null) { |
| | | queryWrapper.lambda().eq(WxNoticeConfig::getCreator, pageWrap.getModel().getCreator()); |
| | | } |
| | | if (pageWrap.getModel().getCreateDate() != null) { |
| | | queryWrapper.lambda().ge(WxNoticeConfig::getCreateDate, Utils.Date.getStart(pageWrap.getModel().getCreateDate())); |
| | | queryWrapper.lambda().le(WxNoticeConfig::getCreateDate, Utils.Date.getEnd(pageWrap.getModel().getCreateDate())); |
| | | } |
| | | if (pageWrap.getModel().getEdirot() != null) { |
| | | queryWrapper.lambda().eq(WxNoticeConfig::getEdirot, pageWrap.getModel().getEdirot()); |
| | | } |
| | | if (pageWrap.getModel().getEditDate() != null) { |
| | | queryWrapper.lambda().ge(WxNoticeConfig::getEditDate, Utils.Date.getStart(pageWrap.getModel().getEditDate())); |
| | | queryWrapper.lambda().le(WxNoticeConfig::getEditDate, Utils.Date.getEnd(pageWrap.getModel().getEditDate())); |
| | | } |
| | | if (pageWrap.getModel().getIsdeleted() != null) { |
| | | queryWrapper.lambda().eq(WxNoticeConfig::getIsdeleted, pageWrap.getModel().getIsdeleted()); |
| | | } |
| | | if (pageWrap.getModel().getRemark() != null) { |
| | | queryWrapper.lambda().eq(WxNoticeConfig::getRemark, pageWrap.getModel().getRemark()); |
| | | } |
| | | if (pageWrap.getModel().getStatus() != null) { |
| | | queryWrapper.lambda().eq(WxNoticeConfig::getStatus, pageWrap.getModel().getStatus()); |
| | | } |
| | | if (pageWrap.getModel().getTempId() != null) { |
| | | queryWrapper.lambda().eq(WxNoticeConfig::getTempId, pageWrap.getModel().getTempId()); |
| | | } |
| | | if (pageWrap.getModel().getTitile() != null) { |
| | | queryWrapper.lambda().eq(WxNoticeConfig::getTitile, pageWrap.getModel().getTitile()); |
| | | } |
| | | if (pageWrap.getModel().getObjCode() != null) { |
| | | queryWrapper.lambda().eq(WxNoticeConfig::getObjCode, pageWrap.getModel().getObjCode()); |
| | | } |
| | | if (pageWrap.getModel().getObjType() != null) { |
| | | queryWrapper.lambda().eq(WxNoticeConfig::getObjType, pageWrap.getModel().getObjType()); |
| | | } |
| | | for(PageWrap.SortData sortData: pageWrap.getSorts()) { |
| | | if (sortData.getDirection().equalsIgnoreCase(PageWrap.DESC)) { |
| | | queryWrapper.orderByDesc(sortData.getProperty()); |
| | | } else { |
| | | queryWrapper.orderByAsc(sortData.getProperty()); |
| | | } |
| | | } |
| | | return PageData.from(wxNoticeConfigMapper.selectPage(page, queryWrapper)); |
| | | } |
| | | |
| | | @Override |
| | | public long count(WxNoticeConfig wxNoticeConfig) { |
| | | QueryWrapper<WxNoticeConfig> wrapper = new QueryWrapper<>(wxNoticeConfig); |
| | | return wxNoticeConfigMapper.selectCount(wrapper); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public void updateStatusByIdInBatch(List<Integer> ids,Integer status) { |
| | | if (CollectionUtils.isEmpty(ids) || Objects.isNull(status)) { |
| | | return; |
| | | } |
| | | wxNoticeConfigMapper.update(new UpdateWrapper<WxNoticeConfig>() |
| | | .set("status",status) |
| | | .in("id",ids) |
| | | ); |
| | | } |
| | | |
| | | } |
| | |
| | | import com.doumee.dao.business.join.VisitsJoinMapper; |
| | | import com.doumee.dao.business.model.*; |
| | | import com.doumee.dao.web.reqeust.SavePlatformWarnEventDTO; |
| | | import com.doumee.service.business.PlatformJobService; |
| | | import com.doumee.service.business.impl.PlatformWarnEventServiceImpl; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | Constants.PlatformJobStatus.EXCEPTION.getKey(), |
| | | Constants.PlatformJobStatus.AUTHED_LEAVE.getKey() |
| | | ) |
| | | )<Constants.ZERO){ |
| | | )==Constants.ZERO){ |
| | | PlatformJob platformJob = platformJobMapper.selectOne(new QueryWrapper<PlatformJob>().lambda() |
| | | .eq(PlatformJob::getCarCodeFront,event.getPlateNos()) |
| | | .eq(PlatformJob::getIsdeleted,Constants.ZERO) |
| | |
| | | job.setArriveDate(new Date()); |
| | | job.setSingType(Constants.TWO); |
| | | job.setSignDate(new Date()); |
| | | List<PlatformJob> signList = platformJobMapper.selectList(new QueryWrapper<PlatformJob>().lambda().apply(" DATE(SIGN_DATE) = DATE(NOW()) and sign_date is not null ")); |
| | | List<PlatformJob> signList = platformJobMapper.selectList(new QueryWrapper<PlatformJob>(). |
| | | lambda().apply(" DATE(SIGN_DATE) = DATE(NOW()) and sign_date is not null ") |
| | | ); |
| | | if(CollectionUtils.isEmpty(signList)){ |
| | | job.setSignNum(Constants.ONE); |
| | | } else{ |