Helius
2021-06-28 5054620d3824cf879943011d01b826b250961c36
modify
3 files modified
47 ■■■■ changed files
gc-core/src/main/java/com/xzx/gc/entity/JhyInfo.java 1 ●●●● patch | view | raw | blame | history
gc-user/src/main/java/com/xzx/gc/user/controller/ApiJhyInfoController.java 32 ●●●●● patch | view | raw | blame | history
gc-user/src/main/java/com/xzx/gc/user/service/JhyInfoService.java 14 ●●●● patch | view | raw | blame | history
gc-core/src/main/java/com/xzx/gc/entity/JhyInfo.java
@@ -38,4 +38,5 @@
     */
    private Integer status;
    public static final Integer CHECK_PASS = 2;
    public static final Integer CHECK_REFUSE = 3;
}
gc-user/src/main/java/com/xzx/gc/user/controller/ApiJhyInfoController.java
@@ -45,17 +45,29 @@
    @ApiOperation("是否集货员")
    @GetMapping(value = "/jhy/isJhy")
    public JsonResult<Map<String, Object>> isJhy(HttpServletRequest request) {
        boolean flag = jhyInfoService.isJhy(getUserId(request));
        int flag = jhyInfoService.isJhy(getUserId(request));
        Map<String, Object> map = new HashMap<>();
        map.put("flag", flag);
        if (flag) {
            map.put("icon", "../../images/icon_team.png");
            map.put("name", "集物员订单列表");
            map.put("path", "../../collectPersonnel/GCOrderForm/index");
        } else {
            map.put("icon", "../../images/icon_entrance.png");
            map.put("name", "成为集物员");
            map.put("path", "../../subcontract1/become_sgm/become_sgm");
        map.put("flag", flag == 1);
        switch (flag) {
            case 0:
                map.put("icon", "../../images/icon_entrance.png");
                map.put("name", "成为集物员");
                map.put("path", "../../subcontract1/become_sgm/become_sgm");
                break;
            case 1:
                map.put("icon", "../../images/icon_team.png");
                map.put("name", "集物员订单列表");
                map.put("path", "../../collectPersonnel/GCOrderForm/index");
                break;
            case 2:
                map.put("icon", "../../images/icon_entrance.png");
                map.put("name", "集物员待审核");
                map.put("path", "../../pages/home/home");
                break;
            default:
                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
@@ -54,13 +54,21 @@
        return jhyInfo.getStatus();
    }
    public boolean isJhy(String userId) {
    public int isJhy(String userId) {
        JhyInfo jhyInfo = jhyInfoMapper.selectJhyInfoByUserId(userId);
        if (jhyInfo == null) {
            return false;
            return 0;
        }
        return JhyInfo.CHECK_PASS.equals(jhyInfo.getStatus());
        if (JhyInfo.CHECK_REFUSE.equals(jhyInfo.getStatus())) {
            return 0;
        }
        if (JhyInfo.CHECK_PASS.equals(jhyInfo.getStatus())) {
            return 1;
        } else {
            return 2;
        }
    }
    public Map<String, Object> queryList(JhyInfoListDto jhyInfoListDto) {