最新版宁夏武警公众号项目后端

This commit is contained in:
sangchengzhi
2026-01-07 10:36:02 +08:00
parent 364a48d4c7
commit f8bb9dc094
1512 changed files with 531911 additions and 0 deletions

View File

@@ -0,0 +1,51 @@
package com.guahao.api.guided.controller;
import com.guahao.WebLog;
import com.guahao.api.guided.model.Guided;
import com.guahao.api.guided.model.QuestionType;
import com.guahao.api.guided.service.GuidedService;
import com.guahao.common.response.ResponseResult;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
* Created with IntelliJ IDEA.
*
* @author Mr.zs
* @date 2023/5/17
* @description
* @modifiedBy
* @version: 1.0
*/
@RestController
@RequestMapping("/guided")
// @Slf4j
public class GuidedController {
@Autowired
private GuidedService guidedService;
@RequestMapping(value = "/getQuestionsType")
@WebLog(description = "getQuestionsType")
public Object getQuestionsType(String place) {
// log.info("getQuestionsType is :" + place);
List<QuestionType> questionTypes = guidedService.queryQuestionsType(place);
return ResponseResult.success(questionTypes);
}
@RequestMapping(value = "/getQuestions")
@WebLog(description = "getQuestions")
public Object getQuestions(String area, String type) {
List<Guided> guideds = guidedService.queryGuidedByArea(area, type);
return ResponseResult.success(guideds);
}
}

View File

@@ -0,0 +1,25 @@
package com.guahao.api.guided.mapper;
import com.guahao.api.guided.model.Guided;
import com.guahao.api.guided.model.QuestionType;
import com.guahao.common.base.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
* Created with IntelliJ IDEA.
*
* @author Mr.zs
* @date 2023/5/17
* @description
* @modifiedBy
* @version: 1.0
*/
@Mapper
public interface GuidedMapper extends BaseMapper<Guided> {
List<Guided> queryGuidedByArea(String area, String type);
List<QuestionType> queryQuestionsType(String place);
}

View File

@@ -0,0 +1,30 @@
package com.guahao.api.guided.model;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* Created with IntelliJ IDEA.
*
* @author Mr.zs
* @date 2023/5/17
* @description
* @modifiedBy
* @version: 1.0
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Guided {
private String id;
private String question;
private String departmentName;
private String departmentNo;
private String bodyAreaType;
private String bodyArerName;
private String questionType;
private String questionTypeName;
}

View File

@@ -0,0 +1,25 @@
package com.guahao.api.guided.model;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* Created with IntelliJ IDEA.
*
* @author Mr.zs
* @date 2023/5/19
* @description
* @modifiedBy
* @version: 1.0
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
public class QuestionType {
private String bodyAreaType; // 原 body_area_type
private String bodyAreaName; // 原 body_area_name
private String questionType; // 原 question_type
private String questionTypeName; // 原 question_type_name
}

View File

@@ -0,0 +1,36 @@
package com.guahao.api.guided.service;
import com.guahao.api.guided.mapper.GuidedMapper;
import com.guahao.api.guided.model.Guided;
import com.guahao.api.guided.model.QuestionType;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* Created with IntelliJ IDEA.
*
* @author Mr.zs
* @date 2023/5/17
* @description
* @modifiedBy
* @version: 1.0
*/
@Service
public class GuidedService {
@Autowired
GuidedMapper guidedMapper;
public List<Guided> queryGuidedByArea(String area, String type) {
return guidedMapper.queryGuidedByArea(area, type);
}
public List<QuestionType> queryQuestionsType(String place) {
return guidedMapper.queryQuestionsType(place);
}
}