| | |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.biz.system.SystemDictBiz; |
| | | import com.doumee.biz.system.SystemDictDataBiz; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.constants.OperaType; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.dao.system.dto.QuerySystemDictDTO; |
| | | import com.doumee.dao.system.model.SystemDict; |
| | | import com.doumee.dao.system.model.SystemDictData; |
| | | import com.doumee.dao.system.vo.SystemDictListVO; |
| | | import com.doumee.service.system.SystemDictService; |
| | | import io.swagger.annotations.Api; |
| | |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * @author Eva.Caesar Liu |
| | |
| | | public ApiResponse<PageData<SystemDictListVO>> findPage (@RequestBody PageWrap<QuerySystemDictDTO> pageWrap) { |
| | | return ApiResponse.success(systemDictService.findPage(pageWrap)); |
| | | } |
| | | |
| | | |
| | | |
| | | @Autowired |
| | | private SystemDictDataBiz systemDictDataBiz; |
| | | |
| | | @ApiOperation("查询字典值") |
| | | @PostMapping("/getAgreement") |
| | | public ApiResponse<List<String>> getAgreement() { |
| | | List<String> list = new ArrayList<>(); |
| | | SystemDictData use = systemDictDataBiz.queryByCode(Constants.PROTOCOL,Constants.USE); |
| | | if(Objects.nonNull(use)){ |
| | | list.add(use.getCode()); |
| | | }else{ |
| | | list.add(""); |
| | | } |
| | | SystemDictData privacy = systemDictDataBiz.queryByCode(Constants.PROTOCOL,Constants.PRIVACY); |
| | | if(Objects.nonNull(privacy)){ |
| | | list.add(privacy.getCode()); |
| | | }else{ |
| | | list.add(""); |
| | | } |
| | | return ApiResponse.success(list); |
| | | } |
| | | |
| | | } |