New file |
| | |
| | | package com.matrix.system.app.action; |
| | | |
| | | import com.matrix.core.constance.MatrixConstance; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.tools.WebUtil; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.common.constance.AppConstance; |
| | | import com.matrix.system.hive.action.util.QueryUtil; |
| | | import com.matrix.system.hive.bean.SysShopInfo; |
| | | import com.matrix.system.hive.service.SysShopInfoService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | 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.RestController; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @date 2020-12-30 |
| | | **/ |
| | | @Api(value = "ApiShopInfoAction", tags = "店铺信息接口类") |
| | | @RestController |
| | | @RequestMapping(value = "/api/shop") |
| | | public class ApiShopInfoAction { |
| | | |
| | | @Autowired |
| | | private SysShopInfoService shopInfoService; |
| | | |
| | | @ApiOperation(value = "获取门店列表", notes = "获取门店列表") |
| | | @GetMapping(value = "/findAllShopList") |
| | | public AjaxResult findAllShopList() { |
| | | SysShopInfo shopInfo = new SysShopInfo(); |
| | | QueryUtil.setQueryLimitCom(shopInfo); |
| | | SysUsers sysUsers = (SysUsers) WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY); |
| | | if(!AppConstance.ZONGDIAN.equals(sysUsers.getShopName())){ |
| | | shopInfo.setId(sysUsers.getShopId()); |
| | | } |
| | | |
| | | return AjaxResult.buildSuccessInstance(shopInfoService.findByModel(shopInfo)); |
| | | } |
| | | } |