diff --git a/coolstore-partner-dao/src/main/resources/mapper/RegionAreaConfigMapper.xml b/coolstore-partner-dao/src/main/resources/mapper/RegionAreaConfigMapper.xml index 15e75011e..e869fc49c 100644 --- a/coolstore-partner-dao/src/main/resources/mapper/RegionAreaConfigMapper.xml +++ b/coolstore-partner-dao/src/main/resources/mapper/RegionAreaConfigMapper.xml @@ -164,6 +164,7 @@ insert into xfsg_region_area_config ( region_id, + region_path, want_shop_area_id, create_time, create_user_id, @@ -174,6 +175,7 @@ ( #{entity.regionId}, + #{entity.regionPath}, #{entity.wantShopAreaId}, now(), #{entity.createUserId}, diff --git a/coolstore-partner-web/src/main/java/com/cool/store/controller/webb/UserAuthMappingController.java b/coolstore-partner-web/src/main/java/com/cool/store/controller/webb/UserAuthMappingController.java new file mode 100644 index 000000000..49428c3c7 --- /dev/null +++ b/coolstore-partner-web/src/main/java/com/cool/store/controller/webb/UserAuthMappingController.java @@ -0,0 +1,44 @@ +package com.cool.store.controller.webb; + +import com.cool.store.entity.EnterpriseUserDO; +import com.cool.store.response.ResponseResult; +import com.cool.store.service.UserAuthMappingService; +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 java.util.List; + +/** + * @ClassName UserAuthMappingController + * @Description 区域权限信息 + */ +@RestController +@RequestMapping("/pc/userAuthMapping") +@Api(tags = "区域权限信息") +@Slf4j +public class UserAuthMappingController { + + @Autowired + private UserAuthMappingService userAuthMappingService; + + + @ApiOperation("找人") + @GetMapping("/getUserByRoleNameAndAreaId") + public ResponseResult getUserByRoleNameAndAreaId(@RequestParam(value = "roleName", required = true) String roleName, + @RequestParam(value = "wantShopAreaId", required = true) Long wantShopAreaId) { + return ResponseResult.success(userAuthMappingService.getUserByRoleNameAndAreaId(roleName, wantShopAreaId)); + } + + @ApiOperation("找意向区域") + @GetMapping("/listWantShopAreaIdByUserId") + public ResponseResult> listWantShopAreaIdByUserId(@RequestParam(value = "userId", required = true) String userId) { + return ResponseResult.success(userAuthMappingService.listWantShopAreaIdByUserId(userId)); + } + +}