gc-core/src/main/java/com/xzx/gc/entity/JhyInfo.java
@@ -37,4 +37,5 @@ * 审核状态 1-待审核 2-审核通过 3-审核拒绝 */ private Integer status; public static final Integer CHECK_PASS = 2; } gc-user/src/main/java/com/xzx/gc/user/controller/AdminJhyInfoController.java
@@ -15,4 +15,5 @@ @Autowired private JhyInfoService jhyInfoService; } gc-user/src/main/java/com/xzx/gc/user/controller/ApiJhyInfoController.java
@@ -2,17 +2,21 @@ import com.xzx.gc.common.Result; import com.xzx.gc.common.request.BaseController; import com.xzx.gc.model.JsonResult; import com.xzx.gc.user.dto.JhyApplyDto; import com.xzx.gc.user.service.JhyInfoService; 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.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RestController; import javax.servlet.http.HttpServletRequest; import java.util.HashMap; import java.util.Map; @RestController @Api(tags = {"集物员--小程序集物员"}) @@ -37,4 +41,16 @@ int status = jhyInfoService.applyStatus(getUserId(request)); return Result.success(status); } @ApiOperation("是否集货员") @GetMapping(value = "/jhy/isJhy") public JsonResult<Map<String, Object>> isJhy(HttpServletRequest request) { boolean flag = jhyInfoService.isJhy(getUserId(request)); Map<String, Object> map = new HashMap<>(); map.put("flag", flag); map.put("icon", "../../images/icon_entrance.png"); map.put("name", "成为集物员"); map.put("path", "../../subcontract1/become_sgm/become_sgm"); return JsonResult.success(map); } } gc-user/src/main/java/com/xzx/gc/user/service/JhyInfoService.java
@@ -42,4 +42,17 @@ return jhyInfo.getStatus(); } public boolean isJhy(String userId) { JhyInfo jhyInfo = jhyInfoMapper.selectJhyInfoByUserId(userId); if (jhyInfo == null) { return false; } if (JhyInfo.CHECK_PASS.equals(jhyInfo.getStatus())) { return true; } return false; } } gc-user/src/main/java/com/xzx/gc/user/vo/JhyInfoListVo.java
@@ -2,13 +2,29 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @Data @ApiModel(value = "JhyInfoListVo", description = "后台集物员列表接口返回参数类") public class JhyInfoListVo { private String name; @ApiModelProperty(value = "姓名") private String username; @ApiModelProperty(value = "性别 1-男 2-女") private String gender; @ApiModelProperty(value = "手机号") private String mobile; private String identity; private String address; private String cardPos; private String isJhy; private Integer status; }