|
|
@ -1,11 +1,27 @@
|
|
|
|
package cn.estsh.i3plus.core.apiservice.controller.base;
|
|
|
|
package cn.estsh.i3plus.core.apiservice.controller.base;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import cn.estsh.i3plus.platform.common.util.CommonConstWords;
|
|
|
|
import cn.estsh.i3plus.platform.common.util.PlatformConstWords;
|
|
|
|
import cn.estsh.i3plus.platform.common.util.PlatformConstWords;
|
|
|
|
|
|
|
|
import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil;
|
|
|
|
|
|
|
|
import cn.estsh.i3plus.pojo.base.enumutil.ImppEnumUtil;
|
|
|
|
|
|
|
|
import cn.estsh.i3plus.pojo.base.enumutil.ResourceEnumUtil;
|
|
|
|
import cn.estsh.impp.framework.base.controller.BaseCommonController;
|
|
|
|
import cn.estsh.impp.framework.base.controller.BaseCommonController;
|
|
|
|
|
|
|
|
import cn.estsh.impp.framework.boot.exception.ImppBusiException;
|
|
|
|
|
|
|
|
import cn.estsh.impp.framework.boot.exception.ImppExceptionBuilder;
|
|
|
|
|
|
|
|
import cn.estsh.impp.framework.boot.util.ImppRedis;
|
|
|
|
|
|
|
|
import cn.estsh.impp.framework.boot.util.ResultBean;
|
|
|
|
|
|
|
|
import cn.estsh.impp.framework.boot.util.ValidatorBean;
|
|
|
|
import io.swagger.annotations.Api;
|
|
|
|
import io.swagger.annotations.Api;
|
|
|
|
|
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
|
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
|
|
|
|
import org.springframework.web.bind.annotation.PathVariable;
|
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* @Description :通用功能服务
|
|
|
|
* @Description :通用功能服务
|
|
|
|
* @Reference :
|
|
|
|
* @Reference :
|
|
|
@ -17,4 +33,25 @@ import org.springframework.web.bind.annotation.RestController;
|
|
|
|
@Api(tags = "通用功能服务")
|
|
|
|
@Api(tags = "通用功能服务")
|
|
|
|
@RequestMapping(PlatformConstWords.BASE_URL +"/common")
|
|
|
|
@RequestMapping(PlatformConstWords.BASE_URL +"/common")
|
|
|
|
public class CoreCommonController extends BaseCommonController {
|
|
|
|
public class CoreCommonController extends BaseCommonController {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Resource(name = CommonConstWords.IMPP_REDIS_RES)
|
|
|
|
|
|
|
|
private ImppRedis redisRes;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@GetMapping("/soft-bean/{id}")
|
|
|
|
|
|
|
|
@ApiOperation(value = "获取系统配置信息", notes = "获取系统配置信息")
|
|
|
|
|
|
|
|
public ResultBean findSoftBean(@PathVariable("id") Integer id){
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
CommonEnumUtil.SOFT_TYPE softType = CommonEnumUtil.SOFT_TYPE.valueOf(id);
|
|
|
|
|
|
|
|
ValidatorBean.checkNotNull(softType,"不存在的产品信息");
|
|
|
|
|
|
|
|
String redisKey = CommonConstWords.REDIS_PREFIX_BEAN_INFO + ":" + softType.getCode();
|
|
|
|
|
|
|
|
return ResultBean.success("操作成功").setCode(ResourceEnumUtil.MESSAGE.SUCCESS.getCode())
|
|
|
|
|
|
|
|
.setResultList(redisRes.scan(redisKey + "*",Integer.MAX_VALUE));
|
|
|
|
|
|
|
|
} catch (ImppBusiException busExcep) {
|
|
|
|
|
|
|
|
return ResultBean.fail(busExcep);
|
|
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
|
|
|
return ImppExceptionBuilder.newInstance().buildExceptionResult(e);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|