Commit bfbeb9b1 authored by 王晓旭's avatar 王晓旭

新闻管理上传和反馈管理更改

parents b91b948e ee7a6e70
package com.mortals.xhx.base.framework.config;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.cloud.context.scope.refresh.RefreshScopeRefreshedEvent;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.event.EventListener;
@Configuration
@RefreshScope
public class RefreshConfig {
// @Value("${your.config.property}")
private String configValue;
@EventListener({RefreshScopeRefreshedEvent.class})
public void onRefresh() {
// 在配置刷新后执行特定的方法
// 可以在这里调用你想要执行的方法
}
// ...
}
package com.mortals.xhx.module.feedback.web; package com.mortals.xhx.module.feedback.web;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController; import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.base.system.param.service.ParamService; import com.mortals.xhx.base.system.param.service.ParamService;
import com.mortals.xhx.module.dept.model.DeptQuery;
import com.mortals.xhx.module.dept.service.DeptService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
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;
...@@ -35,6 +37,8 @@ public class FeedbackController extends BaseCRUDJsonBodyMappingController<Feedba ...@@ -35,6 +37,8 @@ public class FeedbackController extends BaseCRUDJsonBodyMappingController<Feedba
@Autowired @Autowired
private ParamService paramService; private ParamService paramService;
@Autowired
private DeptService deptService;
public FeedbackController(){ public FeedbackController(){
super.setModuleDesc( "反馈信息"); super.setModuleDesc( "反馈信息");
...@@ -46,6 +50,10 @@ public class FeedbackController extends BaseCRUDJsonBodyMappingController<Feedba ...@@ -46,6 +50,10 @@ public class FeedbackController extends BaseCRUDJsonBodyMappingController<Feedba
this.addDict(model, "reply", paramService.getParamBySecondOrganize("Feedback","reply")); this.addDict(model, "reply", paramService.getParamBySecondOrganize("Feedback","reply"));
this.addDict(model, "feedbackType", paramService.getParamBySecondOrganize("Feedback","feedbackType")); this.addDict(model, "feedbackType", paramService.getParamBySecondOrganize("Feedback","feedbackType"));
this.addDict(model, "processStatus", paramService.getParamBySecondOrganize("Feedback","processStatus")); this.addDict(model, "processStatus", paramService.getParamBySecondOrganize("Feedback","processStatus"));
this.addDict(model, "deptId", deptService.find(new DeptQuery()).stream().collect(Collectors.toMap(x -> x.getId().toString(), y -> y.getDeptName(), (o, n) -> n)));
super.init(model, context); super.init(model, context);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment