|  | @@ -2,6 +2,9 @@ package com.fs.web.controller.system;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  import java.util.List;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +import cn.hutool.core.util.ObjectUtil;
 | 
	
		
			
				|  |  | +import com.fs.common.core.domain.R;
 | 
	
		
			
				|  |  | +import com.fs.common.core.redis.RedisCache;
 | 
	
		
			
				|  |  |  import com.fs.common.utils.SecurityUtils;
 | 
	
		
			
				|  |  |  import org.springframework.beans.factory.annotation.Autowired;
 | 
	
		
			
				|  |  |  import org.springframework.security.access.prepost.PreAuthorize;
 | 
	
	
		
			
				|  | @@ -36,6 +39,8 @@ public class SysConfigController extends BaseController
 | 
	
		
			
				|  |  |  {
 | 
	
		
			
				|  |  |      @Autowired
 | 
	
		
			
				|  |  |      private ISysConfigService configService;
 | 
	
		
			
				|  |  | +    @Autowired
 | 
	
		
			
				|  |  | +    public RedisCache redisCache;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      /**
 | 
	
		
			
				|  |  |       * 获取参数配置列表
 | 
	
	
		
			
				|  | @@ -150,4 +155,29 @@ public class SysConfigController extends BaseController
 | 
	
		
			
				|  |  |          config.setCreateBy(SecurityUtils.getUsername());
 | 
	
		
			
				|  |  |          return toAjax(configService.updateConfig(config));
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    /**
 | 
	
		
			
				|  |  | +     * 启用-关闭小程序销售管理
 | 
	
		
			
				|  |  | +     * @param bock
 | 
	
		
			
				|  |  | +     * @return
 | 
	
		
			
				|  |  | +     */
 | 
	
		
			
				|  |  | +    @GetMapping("/updateIsTownOn")
 | 
	
		
			
				|  |  | +    public R queryIsTownOn(String bock, String appId)
 | 
	
		
			
				|  |  | +    {
 | 
	
		
			
				|  |  | +        String key = appId+"start_status_001";
 | 
	
		
			
				|  |  | +        String start = redisCache.getCacheObject(key);
 | 
	
		
			
				|  |  | +        if (ObjectUtil.isNotEmpty(bock)){
 | 
	
		
			
				|  |  | +            if (bock.equals("001")){
 | 
	
		
			
				|  |  | +                redisCache.setCacheObject(key,bock);
 | 
	
		
			
				|  |  | +                return R.ok("调整成功");
 | 
	
		
			
				|  |  | +            }else if (bock.equals("002")){
 | 
	
		
			
				|  |  | +                redisCache.setCacheObject(key,bock);
 | 
	
		
			
				|  |  | +                return R.ok("调整成功");
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        return R.ok().put("date",start);
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |  }
 |