Commit 5b38cbe2 authored by 赵啸非's avatar 赵啸非

修改添加名片相关处理

parent da13f514
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;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
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.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
......@@ -35,6 +37,8 @@ public class FeedbackController extends BaseCRUDJsonBodyMappingController<Feedba
@Autowired
private ParamService paramService;
@Autowired
private DeptService deptService;
public FeedbackController(){
super.setModuleDesc( "反馈信息");
......@@ -46,6 +50,10 @@ public class FeedbackController extends BaseCRUDJsonBodyMappingController<Feedba
this.addDict(model, "reply", paramService.getParamBySecondOrganize("Feedback","reply"));
this.addDict(model, "feedbackType", paramService.getParamBySecondOrganize("Feedback","feedbackType"));
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);
}
......
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