| | |
| | | package com.product.contract.controller; |
| | | |
| | | import cn.hutool.core.util.ObjectUtil; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.product.common.lang.StringUtils; |
| | | import com.product.contract.config.CmnConst; |
| | | import com.product.contract.config.SystemCode; |
| | |
| | | import com.product.contract.service.ide.IProjectInfoService; |
| | | import com.product.core.config.CoreConst; |
| | | import com.product.core.controller.support.AbstractBaseController; |
| | | import com.product.core.dao.BaseDao; |
| | | import com.product.core.entity.DataTableEntity; |
| | | import com.product.core.entity.FieldSetEntity; |
| | | import com.product.core.entity.RequestParameterEntity; |
| | | import com.product.core.exception.BaseException; |
| | | import com.product.core.spring.context.SpringMVCContextHolder; |
| | | import com.product.module.sys.version.ApiVersion; |
| | | import com.product.util.BaseUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestMethod; |
| | |
| | | |
| | | @Autowired |
| | | public ProjectInfoService projectInfoService; |
| | | |
| | | /** |
| | | * 根据uuid获取项目详情 |
| | | * @param request |
| | |
| | | |
| | | |
| | | |
| | | @RequestMapping(value = "/add-update-data-list/{version}", method = RequestMethod.POST) |
| | | @ApiVersion(1) |
| | | public String addUpdateDataList(HttpServletRequest request){ |
| | | FieldSetEntity fse = BaseUtil.getFieldSetEntity(request); |
| | | if(ObjectUtil.isNotEmpty(fse)){ |
| | | projectInfoService.saveOrUpdate(fse); |
| | | } |
| | | |
| | | return OK(); |
| | | |
| | | } |
| | | |
| | | |
| | | @RequestMapping(value = "/get-data-list/{version}", method = RequestMethod.POST) |
| | | @ApiVersion(1) |
| | | public String getDataList(HttpServletRequest request){ |
| | | FieldSetEntity fse = BaseUtil.getFieldSetEntity(request); |
| | | if(StringUtils.isNotEmpty(fse.getValues().get("dict_name").toString())){ |
| | | String dic_name = fse.getValues().get("dict_name").toString(); |
| | | JSONObject dataList = projectInfoService.getDataList(dic_name); |
| | | return OK(dataList); |
| | | }else { |
| | | return null; |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | |