Helius
2021-06-28 6c0256b758404ef83071ff0dcb0d629cda25a082
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,22 @@
        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);
        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");
        }
        return JsonResult.success(map);
    }
}