1123
This commit is contained in:
@@ -9,6 +9,7 @@ import com.bashi.dk.domain.HomeSetting;
|
|||||||
import com.bashi.dk.domain.LoansSetting;
|
import com.bashi.dk.domain.LoansSetting;
|
||||||
import com.bashi.dk.dto.app.req.CalLoanReq;
|
import com.bashi.dk.dto.app.req.CalLoanReq;
|
||||||
import com.bashi.dk.dto.app.resp.CalLoanResp;
|
import com.bashi.dk.dto.app.resp.CalLoanResp;
|
||||||
|
import com.bashi.dk.dto.app.resp.DefaultLocalSetting;
|
||||||
import com.bashi.dk.dto.app.resp.LoanUser;
|
import com.bashi.dk.dto.app.resp.LoanUser;
|
||||||
import com.bashi.dk.kit.CalLoanManager;
|
import com.bashi.dk.kit.CalLoanManager;
|
||||||
import com.bashi.dk.service.HomeSettingService;
|
import com.bashi.dk.service.HomeSettingService;
|
||||||
@@ -39,15 +40,16 @@ public class AppHomeController {
|
|||||||
|
|
||||||
@GetMapping("/defaultLocal")
|
@GetMapping("/defaultLocal")
|
||||||
@ApiOperation(value = "获取默认语言")
|
@ApiOperation(value = "获取默认语言")
|
||||||
public AjaxResult<String> defaultLocal(){
|
public AjaxResult<DefaultLocalSetting> defaultLocal(){
|
||||||
HomeSetting homeSetting = homeSettingService.getHomeSetting();
|
HomeSetting homeSetting = homeSettingService.getHomeSetting();
|
||||||
String defaultLocal = homeSetting.getDefaultLocal();
|
String defaultLocal = homeSetting.getDefaultLocal();
|
||||||
if(StringUtils.isEmpty(defaultLocal)){
|
if(StringUtils.isEmpty(defaultLocal)){
|
||||||
defaultLocal = "zh_CN";
|
defaultLocal = "zh_CN";
|
||||||
}
|
}
|
||||||
AjaxResult<String> success = AjaxResult.success();
|
DefaultLocalSetting defaultLocalSetting = new DefaultLocalSetting();
|
||||||
success.setData(defaultLocal);
|
defaultLocalSetting.setDefaultLocal(defaultLocal);
|
||||||
return success;
|
defaultLocalSetting.setDefaultCoinUnit(homeSetting.getDefaultCoinUnit());
|
||||||
|
return AjaxResult.success(defaultLocalSetting);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/calLoan")
|
@PostMapping("/calLoan")
|
||||||
|
|||||||
@@ -0,0 +1,9 @@
|
|||||||
|
package com.bashi.dk.dto.app.resp;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class DefaultLocalSetting {
|
||||||
|
private String defaultLocal;
|
||||||
|
private String defaultCoinUnit;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user