Commit 29e75637 by 陶光胜

代码规范

parent 3923ea0b
......@@ -59,9 +59,6 @@ public class LoginController {
private MarketUserApiService marketUserApiService;
// private static final String URL = "https://four.gicdev.com";
/**
* 商户绑定服务市场
* @Title: bind

......@@ -104,8 +101,8 @@ public class LoginController {
@RequestMapping("login-gic")
public RestResponse login(Integer enterpriseId, String redirectUrl) throws IOException {
long startTime = System.currentTimeMillis();
Config config = ConfigService.getConfig("COMMON.4.0-gic-properties");
String nameSpace = "COMMON.4.0-gic-properties";
Config config = ConfigService.getConfig(nameSpace);
String url = config.getProperty("service_host", "").replace("/gic", "");
if (StringUtils.isBlank(redirectUrl)) {
redirectUrl = url + "/damo-system";
......@@ -192,8 +189,8 @@ public class LoginController {
LOGGER.info("单点登录所花时间:{}", System.currentTimeMillis() - startTime);
String SsoLoginUrl = url + "/gic-auth-web/login-for-operation";
return RestResponse.success(SsoLoginUrl + "?token=" + token + "&redirectUrl=" + redirectUrl);
String ssoLoginUrl = url + "/gic-auth-web/login-for-operation";
return RestResponse.success(ssoLoginUrl + "?token=" + token + "&redirectUrl=" + redirectUrl);
}
return RestResponse.success();
}
......
......@@ -151,13 +151,10 @@ public class MenuController {
@RequestMapping("/list-menu-tree")
public RestResponse listMenuTree(MenuListQO params) {
LOGGER.info("菜单列表查询参数:{}", JSON.toJSONString(params));
//逐级展开的方式,所以需要传ID,如果不传,默认查询第一层级,即level = 1
// if (params.getMenuId() == null) {
// params.setLevel(1);
// }
/**逐级展开的方式,所以需要传ID,如果不传,默认查询第一层级,即level = 1*/
long serviceBefore = System.currentTimeMillis();
if (params.getIsGIC() != null && params.getIsGIC() == MenuProjectConstants.APP_PROJECT_CODE) {
//如果是查询app应用类别,必须实时更新最新应用数据
/**如果是查询app应用类别,必须实时更新最新应用数据*/
params.setNeedUpdateAppMenu(true);
}
ServiceResponse<List<MenuDTO>> result = menuApiService.listMenuTree(params);
......@@ -166,7 +163,7 @@ public class MenuController {
if (result.isSuccess()) {
List<MenuDTO> menuList = result.getResult();
if (CollectionUtils.isNotEmpty(menuList)) {
//设置部门数据,列表需要展示
/**设置部门数据,列表需要展示*/
Map<String, List<MenuAuthDepartDTO>> authDepartMap = getAuthDepartMap(menuList
.stream()
.map(e -> e.getMenuCode())
......
......@@ -23,7 +23,7 @@ import java.util.List;
* @date 2020/2/13 10:34
*/
@RestController
public class MQController {
public class MqController {
@Autowired
private MQConfigService mqConfigService;
......
......@@ -43,7 +43,7 @@ public class PushMessageController {
@RequestMapping("page-push-classify")
public RestResponse pagePushType(String search, PageQO pageQO){
ServiceResponse<Page<PushTypeDTO>> page = this.pushMessageApiService.pagePushType(search, pageQO.getCurrentPage(), pageQO.getPageSize());
Page<PushTypeVO> pushTypeVOPage = new Page<>(pageQO.getCurrentPage(), pageQO.getPageSize());
Page<PushTypeVO> pushTypePage = new Page<>(pageQO.getCurrentPage(), pageQO.getPageSize());
if(page.isSuccess()){
Page<PushTypeDTO> result = page.getResult();
if(CollectionUtils.isNotEmpty(result.getResult())){
......@@ -54,11 +54,11 @@ public class PushMessageController {
vo.setMessageList(response.getResult().getResult());
list.add(vo);
}
pushTypeVOPage.setResult(list);
pushTypeVOPage.setTotalCount(page.getResult().getTotalCount());
pushTypePage.setResult(list);
pushTypePage.setTotalCount(page.getResult().getTotalCount());
}
}
return RestResponse.success(pushTypeVOPage);
return RestResponse.success(pushTypePage);
}
@RequestMapping("save-push-classify")
......
......@@ -237,40 +237,26 @@ public class ExcelUtils {
*/
private static XSSFCellStyle getStyle(XSSFWorkbook workbook) {
// 设置字体
/** 设置字体*/
XSSFFont font = workbook.createFont();
// 设置字体大小
// font.setFontHeightInPoints((short)10);
// 字体加粗
// font.setBoldweight(XSSFFont.BOLDWEIGHT_BOLD);
// 设置字体名字
font.setFontName("Courier New");
font.setColor(IndexedColors.RED.index);
// 设置样式;
/** 设置样式;*/
XSSFCellStyle style = workbook.createCellStyle();
// 设置底边框;
style.setBorderBottom(XSSFCellStyle.BORDER_THIN);
// 设置底边框颜色;
// style.setBottomBorderColor(XSSFColor.BLACK.index);
// 设置左边框;
style.setBorderLeft(XSSFCellStyle.BORDER_THIN);
// 设置左边框颜色;
// style.setLeftBorderColor(XSSFColor.BLACK.index);
// 设置右边框;
style.setBorderRight(XSSFCellStyle.BORDER_THIN);
// 设置右边框颜色;
// style.setRightBorderColor(XSSFColor.BLACK.index);
// 设置顶边框;
/** 设置顶边框;*/
style.setBorderTop(XSSFCellStyle.BORDER_THIN);
// 设置顶边框颜色;
// style.setTopBorderColor(XSSFColor.BLACK.index);
// 在样式用应用设置的字体;
/** 设置顶边框颜色;*/
/**style.setTopBorderColor(XSSFColor.BLACK.index);*/
/**在样式用应用设置的字体*/;
style.setFont(font);
// 设置自动换行;
/** 设置自动换行;*/
style.setWrapText(false);
// 设置水平对齐的样式为居中对齐;
/**设置水平对齐的样式为居中对齐;*/
style.setAlignment(XSSFCellStyle.ALIGN_CENTER);
// 设置垂直对齐的样式为居中对齐;
/**设置垂直对齐的样式为居中对齐;*/
style.setVerticalAlignment(XSSFCellStyle.VERTICAL_CENTER);
return style;
......
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