¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.web.reqeust; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | import javax.validation.constraints.NotNull; |
| | | |
| | | /** |
| | | * Created by IntelliJ IDEA. |
| | | * |
| | | * @Author : Rk |
| | | * @create 2023/12/7 11:19 |
| | | */ |
| | | @Data |
| | | public class CheckVisitedDTO { |
| | | |
| | | @NotBlank(message = "ææºå·æªå½å
¥") |
| | | @ApiModelProperty(value = "ææºå·") |
| | | private String mobile; |
| | | |
| | | @ApiModelProperty(value = "å§å") |
| | | private String name; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.web.response; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | public class DeviceRoleVO { |
| | | |
| | | @ApiModelProperty(value = "主é®", example = "1") |
| | | private Integer id; |
| | | |
| | | |
| | | @ApiModelProperty(value = "åç§°") |
| | | private String name; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.web.response; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 人åä¿¡æ¯è¡¨ |
| | | * @author æ±è¹è¹ |
| | | * @date 2023/11/30 15:33 |
| | | */ |
| | | @Data |
| | | public class MemberVO { |
| | | |
| | | @ApiModelProperty(value = "主é®", example = "1") |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty(value = "æå±ç»ç»ç¼ç (å
³ècompany表)", example = "1") |
| | | private Integer companyId; |
| | | |
| | | @ApiModelProperty(value = "访客åç§°") |
| | | private String name; |
| | | |
| | | @ApiModelProperty(value = "ææºå·") |
| | | private String phone; |
| | | |
| | | } |
| | |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.business.model.DeviceRole; |
| | | import com.doumee.dao.web.response.DeviceRoleVO; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | * @return long |
| | | */ |
| | | long count(DeviceRole deviceRole); |
| | | |
| | | |
| | | |
| | | List<DeviceRoleVO> findListByType(Integer type); |
| | | } |
| | |
| | | import com.doumee.dao.admin.request.MemberQuery; |
| | | import com.doumee.dao.admin.response.MemberInfoDTO; |
| | | import com.doumee.dao.business.model.Member; |
| | | import com.doumee.dao.web.reqeust.CheckVisitedDTO; |
| | | import com.doumee.dao.web.response.MemberVO; |
| | | import com.doumee.dao.web.response.WxAuthorizeVO; |
| | | |
| | | import java.util.List; |
| | |
| | | |
| | | |
| | | |
| | | |
| | | MemberVO getVisitedMember(CheckVisitedDTO checkVisitedDTO); |
| | | |
| | | |
| | | |
| | |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.business.DeviceRoleMapper; |
| | | import com.doumee.dao.business.model.Device; |
| | | import com.doumee.dao.business.model.DeviceRole; |
| | | import com.doumee.dao.web.response.DeviceRoleVO; |
| | | import com.doumee.service.business.DeviceRoleService; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import org.apache.commons.collections.CollectionUtils; |
| | | import org.apache.shiro.SecurityUtils; |
| | | import org.checkerframework.checker.units.qual.C; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | |
| | | QueryWrapper<DeviceRole> wrapper = new QueryWrapper<>(deviceRole); |
| | | return deviceRoleMapper.selectCount(wrapper); |
| | | } |
| | | |
| | | @Override |
| | | public List<DeviceRoleVO> findListByType(Integer type) { |
| | | List<DeviceRole> deviceRoleList = deviceRoleMapper.selectList(new QueryWrapper<DeviceRole>().lambda() |
| | | .eq(DeviceRole::getType,type) |
| | | .eq(DeviceRole::getIsdeleted, Constants.ZERO) |
| | | .eq(DeviceRole::getStatus, Constants.ZERO) |
| | | ); |
| | | List<DeviceRoleVO> deviceRoleVOList = new ArrayList<>(); |
| | | for (DeviceRole deviceRole:deviceRoleList) { |
| | | DeviceRoleVO deviceRoleVO = new DeviceRoleVO(); |
| | | BeanUtils.copyProperties(deviceRole,deviceRoleVO); |
| | | deviceRoleVOList.add(deviceRoleVO); |
| | | } |
| | | return deviceRoleVOList; |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public MemberVO getVisitedMember(CheckVisitedDTO checkVisitedDTO){ |
| | | Integer validType = Integer.valueOf(systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.BEVISITED_USER_VALID).getCode()); |
| | | if(Objects.isNull(checkVisitedDTO)||StringUtils.isBlank(checkVisitedDTO.getMobile())||(validType.equals(Constants.ONE)&&StringUtils.isBlank(checkVisitedDTO.getName()))){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | Member member = memberMapper.selectOne(new QueryWrapper<Member>().lambda() |
| | | .eq(Member::getPhone,checkVisitedDTO.getMobile()) |
| | | .eq(validType.equals(Constants.ONE),Member::getName,checkVisitedDTO.getName()) |
| | | .eq(Member::getIsdeleted,Constants.ZERO) |
| | | .eq(Member::getStatus,Constants.ZERO) |
| | | .eq(Member::getCanVisit,Constants.ONE) |
| | | .eq(Member::getType,Constants.memberType.internal) |
| | | .last(" limit 1 ") |
| | | ); |
| | | MemberVO memberVO = new MemberVO(); |
| | | BeanUtils.copyProperties(member,memberVO); |
| | | return memberVO; |
| | | } |
| | | |
| | | |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.api.web; |
| | | |
| | | import com.doumee.core.annotation.trace.Trace; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.dao.web.reqeust.FinishAnswerDTO; |
| | | import com.doumee.dao.web.response.ProblemsVO; |
| | | import com.doumee.service.business.ProblemLogService; |
| | | import com.doumee.service.business.ProblemsService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * Created by IntelliJ IDEA. |
| | | * |
| | | * @Author : Rk |
| | | * @create 2023/12/8 8:54 |
| | | */ |
| | | |
| | | @Api(tags = "2ãé¢ç®ä¸å¡") |
| | | @Trace(exclude = true) |
| | | @RestController |
| | | @RequestMapping("/web/problem") |
| | | @Slf4j |
| | | public class ProblemController extends ApiController{ |
| | | |
| | | @Autowired |
| | | private ProblemsService problemsService; |
| | | |
| | | @Autowired |
| | | private ProblemLogService problemLogService; |
| | | |
| | | |
| | | @ApiOperation(value = "è·åé¢ç®æ°æ®", notes = "H5") |
| | | @GetMapping("/getProblemsVO") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "query", dataType = "Integer", name = "useType", value = "使ç¨åºæ¯ 0å³å¡äººå 1æ®é访客", required = true) |
| | | }) |
| | | public ApiResponse<List<ProblemsVO>> getProblemsVO(@RequestParam Integer useType) { |
| | | return ApiResponse.success("æ¥è¯¢æå",problemsService.getProblemsVO(useType)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "ä¿åçé¢è®°å½", notes = "H5") |
| | | @PostMapping("/finishAnswer") |
| | | public ApiResponse<Integer> finishAnswer(@RequestBody FinishAnswerDTO finishAnswerDTO) { |
| | | return ApiResponse.success("æ¥è¯¢æå",problemLogService.finishAnswer(finishAnswerDTO)); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.dao.system.model.SystemDictData; |
| | | import com.doumee.dao.web.reqeust.FinishAnswerDTO; |
| | | import com.doumee.dao.web.response.DeviceRoleVO; |
| | | import com.doumee.dao.web.response.ProblemsVO; |
| | | import com.doumee.service.business.DeviceRoleService; |
| | | import com.doumee.service.business.DeviceService; |
| | | import com.doumee.service.business.ProblemLogService; |
| | | import com.doumee.service.business.ProblemsService; |
| | | import io.swagger.annotations.Api; |
| | |
| | | private SystemDictDataBiz systemDictDataBiz; |
| | | |
| | | @Autowired |
| | | private ProblemsService problemsService; |
| | | |
| | | @Autowired |
| | | private ProblemLogService problemLogService; |
| | | private DeviceRoleService deviceRoleService; |
| | | |
| | | @ApiOperation(value = "æ¥è¯¢åå
¸å¼æ°æ®", notes = "H5") |
| | | @GetMapping("/getSystemDictData") |
| | |
| | | return ApiResponse.success("æ¥è¯¢æå",systemDictDataBiz.queryByCode(dictCode,label)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "è·åé¢ç®æ°æ®", notes = "H5") |
| | | @GetMapping("/getProblemsVO") |
| | | @ApiOperation(value = "设å¤ç»å表", notes = "H5") |
| | | @GetMapping("/deviceRoleList") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "query", dataType = "Integer", name = "useType", value = "使ç¨åºæ¯ 0å³å¡äººå 1æ®é访客", required = true) |
| | | @ApiImplicitParam(paramType = "query", dataType = "Integer", name = "type", value = "ç±»å 0å³å¡è®¿å®¢ 1æ®é访客 2å
é¨äººå", required = true) |
| | | }) |
| | | public ApiResponse<List<ProblemsVO>> getProblemsVO(@RequestParam Integer useType) { |
| | | return ApiResponse.success("æ¥è¯¢æå",problemsService.getProblemsVO(useType)); |
| | | public ApiResponse<List<DeviceRoleVO>> deviceRoleList(@RequestParam Integer type) { |
| | | return ApiResponse.success("æ¥è¯¢æå",deviceRoleService.findListByType(type)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "ä¿åçé¢è®°å½", notes = "H5") |
| | | @PostMapping("/finishAnswer") |
| | | public ApiResponse<Integer> finishAnswer(@RequestBody FinishAnswerDTO finishAnswerDTO) { |
| | | return ApiResponse.success("æ¥è¯¢æå",problemLogService.finishAnswer(finishAnswerDTO)); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | import com.doumee.core.annotation.trace.Trace; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.dao.web.reqeust.CheckVisitedDTO; |
| | | import com.doumee.dao.web.response.MemberVO; |
| | | import com.doumee.dao.web.response.WxAuthorizeVO; |
| | | import com.doumee.service.business.MemberService; |
| | | import io.swagger.annotations.Api; |
| | |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.validation.Valid; |
| | | |
| | | /** |
| | | * Created by IntelliJ IDEA. |
| | |
| | | @Autowired |
| | | private MemberService memberService; |
| | | |
| | | |
| | | @ApiOperation(value = "访客微信ææ", notes = "访客微信ææè·åopenId") |
| | | @GetMapping("/wxAuthorize") |
| | | @ApiImplicitParams({ |
| | |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "æ¥è¯¢è¢«è®¿é®äººä¿¡æ¯", notes = "æ¥è¯¢è¢«è®¿é®äººä¿¡æ¯") |
| | | @PostMapping("/getVisitedMember") |
| | | public ApiResponse<MemberVO> getVisitedMember(@Valid @RequestBody CheckVisitedDTO checkVisitedDTO) { |
| | | return ApiResponse.success("æ¥è¯¢æå", memberService.getVisitedMember(checkVisitedDTO)); |
| | | } |
| | | |
| | | } |