| @@ -163,7 +163,7 @@ public class ShiroConfig { | |||||
| filterChainDefinitionMap.put("/logout", "authc"); | filterChainDefinitionMap.put("/logout", "authc"); | ||||
| filterChainDefinitionMap.put("/**", "corsFilter,token,authc"); | filterChainDefinitionMap.put("/**", "corsFilter,token,authc"); | ||||
| filterChainDefinitionMap.put("/**", "anon"); | |||||
| // filterChainDefinitionMap.put("/**", "anon"); | |||||
| shiroFilterFactoryBean.setFilterChainDefinitionMap(filterChainDefinitionMap); | shiroFilterFactoryBean.setFilterChainDefinitionMap(filterChainDefinitionMap); | ||||
| @@ -52,13 +52,13 @@ public class BaseController { | |||||
| }); | }); | ||||
| } | } | ||||
| public MallUserInfo getUser(){ | public MallUserInfo getUser(){ | ||||
| // MallUserInfo user = (MallUserInfo) SecurityUtils.getSubject().getSession().getAttribute(UserSession.userInfo); | |||||
| MallUserInfo user = new MallUserInfo(); | |||||
| user.setId(321127266275430400L); | |||||
| user.setName("alitest"); | |||||
| user.setTenantId("789"); | |||||
| user.setParentTenantId(null); | |||||
| user.setIsAdmin(1); | |||||
| MallUserInfo user = (MallUserInfo) SecurityUtils.getSubject().getSession().getAttribute(UserSession.userInfo); | |||||
| // MallUserInfo user = new MallUserInfo(); | |||||
| // user.setId(321127266275430400L); | |||||
| // user.setName("alitest"); | |||||
| // user.setTenantId("789"); | |||||
| // user.setParentTenantId(null); | |||||
| // user.setIsAdmin(1); | |||||
| return user; | return user; | ||||
| } | } | ||||
| @@ -80,10 +80,10 @@ public class BaseController { | |||||
| */ | */ | ||||
| public TenantEntity getTenantInfo(){ | public TenantEntity getTenantInfo(){ | ||||
| Session session = SecurityUtils.getSubject().getSession(); | Session session = SecurityUtils.getSubject().getSession(); | ||||
| // String tenantId = (String)session.getAttribute(UserSession.tenantId); | |||||
| // String parentTenantId = (String)session.getAttribute(UserSession.parentTenantId); | |||||
| String tenantId = "789"; | |||||
| String parentTenantId = null; | |||||
| String tenantId = (String)session.getAttribute(UserSession.tenantId); | |||||
| String parentTenantId = (String)session.getAttribute(UserSession.parentTenantId); | |||||
| // String tenantId = "789"; | |||||
| // String parentTenantId = null; | |||||
| TenantEntity tenantEntity = new TenantEntity(); | TenantEntity tenantEntity = new TenantEntity(); | ||||
| tenantEntity.setTenantId(tenantId); | tenantEntity.setTenantId(tenantId); | ||||
| tenantEntity.setParentTenantId(parentTenantId); | tenantEntity.setParentTenantId(parentTenantId); | ||||
| @@ -397,6 +397,7 @@ public class WxEnergyController extends BaseController { | |||||
| @ApiOperation("店铺修改计费标准") | @ApiOperation("店铺修改计费标准") | ||||
| @PostMapping("updateFeesShop") | @PostMapping("updateFeesShop") | ||||
| public ResultData updateFeesShop(@RequestBody WxEnergyFeesShop record) { | public ResultData updateFeesShop(@RequestBody WxEnergyFeesShop record) { | ||||
| record.updateTenantInfo(getTenantInfo()); | |||||
| wxEnergyService.updateFeesShop(record); | wxEnergyService.updateFeesShop(record); | ||||
| return new ResultData(); | return new ResultData(); | ||||
| } | } | ||||
| @@ -732,6 +732,7 @@ public class WxEnergyServiceImpl implements WxEnergyService { | |||||
| @Override | @Override | ||||
| public void updateFeesShop(WxEnergyFeesShop record) { | public void updateFeesShop(WxEnergyFeesShop record) { | ||||
| WxEnergyFeesShop fessShop = wxEnergyFeesShopMapper.selectById(record.getId(), record.getTenantId()); | |||||
| Date date = new Date(); | Date date = new Date(); | ||||
| record.setUpdateTime(date); | record.setUpdateTime(date); | ||||
| if (record.getIsPublic() == EnumYesOrNo.YES.getCode()) { | if (record.getIsPublic() == EnumYesOrNo.YES.getCode()) { | ||||
| @@ -745,7 +746,8 @@ public class WxEnergyServiceImpl implements WxEnergyService { | |||||
| if (null != record.getFormulaList() && record.getFormulaList().size() > 0 ) { | if (null != record.getFormulaList() && record.getFormulaList().size() > 0 ) { | ||||
| record.setFormulaListStr(JSON.toJSONString(record.getFormulaList())); | record.setFormulaListStr(JSON.toJSONString(record.getFormulaList())); | ||||
| } | } | ||||
| WxShop shop = wxShopService.getById(record.getShopId()); | |||||
| WxShop shop = wxShopService.getById(fessShop.getShopId()); | |||||
| if (StringUtils.isBlank(shop.getPulicRate())) { | if (StringUtils.isBlank(shop.getPulicRate())) { | ||||
| throw new MallinkException(ErrorCode.SYS_SERVER_ERROR.getCode(),"店铺未设置公摊系数"); | throw new MallinkException(ErrorCode.SYS_SERVER_ERROR.getCode(),"店铺未设置公摊系数"); | ||||
| } | } | ||||