|  |  |  | 
|---|
|  |  |  | 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.service.business.third.model.ApiResponse; | 
|---|
|  |  |  | import com.doumee.service.business.third.model.PageData; | 
|---|
|  |  |  | import com.doumee.service.business.third.model.PageWrap; | 
|---|
|  |  |  | import com.doumee.core.utils.Constants; | 
|---|
|  |  |  | import com.doumee.dao.system.dto.QuerySystemDictDataDTO; | 
|---|
|  |  |  | import com.doumee.dao.system.dto.VisitConfigDTO; | 
|---|
|  |  |  | import com.doumee.dao.system.model.SystemDictData; | 
|---|
|  |  |  | import com.doumee.dao.system.vo.SystemDictDataListVO; | 
|---|
|  |  |  | import com.doumee.service.system.SystemDictDataService; | 
|---|
|  |  |  | 
|---|
|  |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
|---|
|  |  |  | import org.springframework.validation.annotation.Validated; | 
|---|
|  |  |  | import org.springframework.web.bind.annotation.*; | 
|---|
|  |  |  | import org.springframework.web.bind.annotation.RequestMapping; | 
|---|
|  |  |  | import org.springframework.web.bind.annotation.RestController; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import java.util.ArrayList; | 
|---|
|  |  |  | import java.util.List; | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @ApiOperation("查询咖豆任务规则") | 
|---|
|  |  |  | @PostMapping("/findAllList") | 
|---|
|  |  |  | @RequiresPermissions("system:dict:update") | 
|---|
|  |  |  | public ApiResponse findAllList (@RequestBody PageWrap<QuerySystemDictDataDTO> pageWrap) { | 
|---|
|  |  |  | List<SystemDictData> list= systemDictDataBiz.queryListByCode(Constants.COFFEE_BEAN_TASK,null); | 
|---|
|  |  |  | return ApiResponse.success(list); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @ApiOperation("编辑查询咖豆任务规则") | 
|---|
|  |  |  | @PostMapping("/createCoffeeTask") | 
|---|
|  |  |  | @RequiresPermissions("system:dict:update") | 
|---|
|  |  |  | public ApiResponse createCoffeeTask(@Validated(OperaType.Create.class) @RequestBody List<SystemDictData> list) { | 
|---|
|  |  |  | systemDictDataBiz.updateByDicId(list); | 
|---|
|  |  |  | return ApiResponse.success(null); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @ApiOperation(value = "查询字典值数据" ) | 
|---|
|  |  |  | @GetMapping("/getSystemDictData") | 
|---|
|  |  |  | @ApiImplicitParams({ | 
|---|
|  |  |  | 
|---|
|  |  |  | return ApiResponse.success(systemDictDataBiz.queryByCode(dictCode,label)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 访客来访配置 | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiOperation(value = "访客来访配置" ) | 
|---|
|  |  |  | @GetMapping("/getVisitConfigDTO") | 
|---|
|  |  |  | public ApiResponse<VisitConfigDTO> getVisitConfigDTO(){ | 
|---|
|  |  |  | return ApiResponse.success(systemDictDataService.getVisitConfigDTO()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 修改访客来访配置 | 
|---|
|  |  |  | * @param visitConfigDTO | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiOperation(value = "修改访客来访配置" ) | 
|---|
|  |  |  | @PostMapping("/updateVisitConfig") | 
|---|
|  |  |  | public ApiResponse updateVisitConfig(@RequestBody VisitConfigDTO visitConfigDTO){ | 
|---|
|  |  |  | systemDictDataService.updateVisitConfig(visitConfigDTO); | 
|---|
|  |  |  | return ApiResponse.success(null); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|