| @@ -151,7 +151,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); | ||||
| @@ -131,15 +131,19 @@ public class ServiceInfoController extends MallUserInfoBaseController{ | |||||
| @ApiVersion(group = SwaggerConstant.V_1_0_0) | @ApiVersion(group = SwaggerConstant.V_1_0_0) | ||||
| @ApiOperation("慧影-设置时长") | @ApiOperation("慧影-设置时长") | ||||
| @PostMapping("/setRemainingTimes") | @PostMapping("/setRemainingTimes") | ||||
| public R<Void> setRemainingTimes(Long id,Long times) { | |||||
| ServiceInfo si = serviceInfoService.getServiceInfo(id); | |||||
| if (null == si) { | |||||
| public R<Void> setRemainingTimes(@RequestBody ServiceInfo dto) { | |||||
| if (null == dto.getId()) { | |||||
| throw new BizException(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"id无效"); | throw new BizException(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"id无效"); | ||||
| } | } | ||||
| if (null == times) { | |||||
| if (null == dto.getTimes()) { | |||||
| throw new BizException(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"times无效"); | throw new BizException(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"times无效"); | ||||
| } | } | ||||
| si.setRemainingTimes(times); | |||||
| ServiceInfo si = serviceInfoService.getServiceInfo(dto.getId()); | |||||
| if (null == si) { | |||||
| throw new BizException(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"id无效"); | |||||
| } | |||||
| si.setRemainingTimes(dto.getTimes()); | |||||
| serviceInfoService.updateServiceInfo(si); | serviceInfoService.updateServiceInfo(si); | ||||
| return R.ok(); | return R.ok(); | ||||
| } | } | ||||
| @@ -67,4 +67,6 @@ public class ServiceInfo extends BaseEntity{ | |||||
| * 登录用户 | * 登录用户 | ||||
| */ | */ | ||||
| private Long remainingTimes; | private Long remainingTimes; | ||||
| private Long times; | |||||
| } | } | ||||
| @@ -13,7 +13,7 @@ | |||||
| <result column="status" jdbcType="INTEGER" property="status"/> | <result column="status" jdbcType="INTEGER" property="status"/> | ||||
| <result column="del_flag" jdbcType="INTEGER" property="delFlag"/> | <result column="del_flag" jdbcType="INTEGER" property="delFlag"/> | ||||
| <result column="mall_user_info" jdbcType="BIGINT" property="mallUserInfo"/> | <result column="mall_user_info" jdbcType="BIGINT" property="mallUserInfo"/> | ||||
| <result column="remaining_times" jdbcType="INTEGER" property="remainingTimes"/> | |||||
| <result column="remaining_times" jdbcType="BIGINT" property="remainingTimes"/> | |||||
| </resultMap> | </resultMap> | ||||