winter pirms 1 gada
vecāks
revīzija
12cd5ca027
4 mainītis faili ar 13 papildinājumiem un 7 dzēšanām
  1. +1
    -1
      suimangAdmin/src/main/java/com/iformall/config/ShiroConfig.java
  2. +9
    -5
      suimangAdmin/src/main/java/com/iformall/controller/sm/ServiceInfoController.java
  3. +2
    -0
      suimangService/src/main/java/com/iformall/domain/po/sm/ServiceInfo.java
  4. +1
    -1
      suimangService/src/main/resources/mapper/ServiceInfoMapper.xml

+ 1
- 1
suimangAdmin/src/main/java/com/iformall/config/ShiroConfig.java Parādīt failu

@@ -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);


+ 9
- 5
suimangAdmin/src/main/java/com/iformall/controller/sm/ServiceInfoController.java Parādīt failu

@@ -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();
} }


+ 2
- 0
suimangService/src/main/java/com/iformall/domain/po/sm/ServiceInfo.java Parādīt failu

@@ -67,4 +67,6 @@ public class ServiceInfo extends BaseEntity{
* 登录用户 * 登录用户
*/ */
private Long remainingTimes; private Long remainingTimes;
private Long times;
} }

+ 1
- 1
suimangService/src/main/resources/mapper/ServiceInfoMapper.xml Parādīt failu

@@ -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>






Notiek ielāde…
Atcelt
Saglabāt