|
|
@ -1,7 +1,6 @@
|
|
|
|
package cn.estsh.i3plus.core.apiservice.controller.busi;
|
|
|
|
package cn.estsh.i3plus.core.apiservice.controller.busi;
|
|
|
|
|
|
|
|
|
|
|
|
import cn.estsh.i3plus.core.api.iservice.busi.ISysLocaleLanguageService;
|
|
|
|
import cn.estsh.i3plus.core.api.iservice.busi.ISysLocaleLanguageService;
|
|
|
|
import cn.estsh.i3plus.platform.common.convert.ConvertBean;
|
|
|
|
|
|
|
|
import cn.estsh.i3plus.platform.common.tool.StringTool;
|
|
|
|
import cn.estsh.i3plus.platform.common.tool.StringTool;
|
|
|
|
import cn.estsh.i3plus.pojo.base.bean.ListPager;
|
|
|
|
import cn.estsh.i3plus.pojo.base.bean.ListPager;
|
|
|
|
import cn.estsh.i3plus.pojo.base.common.Pager;
|
|
|
|
import cn.estsh.i3plus.pojo.base.common.Pager;
|
|
|
@ -49,8 +48,8 @@ public class SysLocaleLanguageController extends CoreBaseController {
|
|
|
|
.notNull("languageCode", sysLocaleLanguage.getLanguageCode());
|
|
|
|
.notNull("languageCode", sysLocaleLanguage.getLanguageCode());
|
|
|
|
|
|
|
|
|
|
|
|
//新增初始化
|
|
|
|
//新增初始化
|
|
|
|
// ConvertBean.modelInitialize(sysLocaleLanguage, sessionUser);
|
|
|
|
|
|
|
|
sysLocaleLanguage.setIsDefault(CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue());
|
|
|
|
sysLocaleLanguage.setIsDefault(CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue());
|
|
|
|
|
|
|
|
sysLocaleLanguage.setLanguageStatus(CommonEnumUtil.TRUE_OR_FALSE.TRUE.getValue());
|
|
|
|
|
|
|
|
|
|
|
|
sysLocaleLanguageService.insertSysLocaleLanguage(sysLocaleLanguage);
|
|
|
|
sysLocaleLanguageService.insertSysLocaleLanguage(sysLocaleLanguage);
|
|
|
|
return ResultBean.success("操作成功").setCode(ResourceEnumUtil.MESSAGE.SUCCESS.getCode());
|
|
|
|
return ResultBean.success("操作成功").setCode(ResourceEnumUtil.MESSAGE.SUCCESS.getCode());
|
|
|
@ -71,9 +70,6 @@ public class SysLocaleLanguageController extends CoreBaseController {
|
|
|
|
.notNull("languageName", sysLocaleLanguage.getLanguageName())
|
|
|
|
.notNull("languageName", sysLocaleLanguage.getLanguageName())
|
|
|
|
.notNull("languageCode", sysLocaleLanguage.getLanguageCode());
|
|
|
|
.notNull("languageCode", sysLocaleLanguage.getLanguageCode());
|
|
|
|
|
|
|
|
|
|
|
|
//修改初始化
|
|
|
|
|
|
|
|
// ConvertBean.modelUpdate(sysLocaleLanguage, sessionUser);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
sysLocaleLanguageService.updateSysLocaleLanguage(sysLocaleLanguage);
|
|
|
|
sysLocaleLanguageService.updateSysLocaleLanguage(sysLocaleLanguage);
|
|
|
|
return ResultBean.success("操作成功").setCode(ResourceEnumUtil.MESSAGE.SUCCESS.getCode());
|
|
|
|
return ResultBean.success("操作成功").setCode(ResourceEnumUtil.MESSAGE.SUCCESS.getCode());
|
|
|
|
}catch(ImppBusiException busExcep){
|
|
|
|
}catch(ImppBusiException busExcep){
|
|
|
@ -161,4 +157,43 @@ public class SysLocaleLanguageController extends CoreBaseController {
|
|
|
|
return ImppExceptionBuilder.newInstance().buildExceptionResult(e);
|
|
|
|
return ImppExceptionBuilder.newInstance().buildExceptionResult(e);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@PostMapping(value = "/status/{id}/{status}")
|
|
|
|
|
|
|
|
@ApiOperation(value = "根据id修改语言状态")
|
|
|
|
|
|
|
|
public ResultBean updateSysLocaleLanguageStatusById(@PathVariable("id") String idStr,@PathVariable("status") Integer status){
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
//条件校验
|
|
|
|
|
|
|
|
ValidatorBean.checkNotNull(idStr,"id不能为空");
|
|
|
|
|
|
|
|
ValidatorBean.checkIsNumber(status,"状态不能为空");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
sysLocaleLanguageService.updateSysLocaleLanguageStatusById(Long.parseLong(idStr),status);
|
|
|
|
|
|
|
|
return ResultBean.success("操作成功").setCode(ResourceEnumUtil.MESSAGE.SUCCESS.getCode());
|
|
|
|
|
|
|
|
}catch(ImppBusiException busExcep){
|
|
|
|
|
|
|
|
return ResultBean.fail(busExcep.getErrorShow());
|
|
|
|
|
|
|
|
}catch(Exception e){
|
|
|
|
|
|
|
|
return ImppExceptionBuilder.newInstance().buildExceptionResult(e);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@PostMapping(value = "/batch-status")
|
|
|
|
|
|
|
|
@ApiOperation(value = "根据批量修改语言状态")
|
|
|
|
|
|
|
|
public ResultBean updateSysLocaleLanguageStatusByIds(String[] idsStr,Integer status){
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
if(idsStr.length == 0){
|
|
|
|
|
|
|
|
throw ImppExceptionBuilder.newInstance()
|
|
|
|
|
|
|
|
.setSystemID(CommonEnumUtil.SOFT_TYPE.CORE.getCode())
|
|
|
|
|
|
|
|
.setErrorCode(ImppExceptionEnum.VARIFY_EXCEPTION.getCode())
|
|
|
|
|
|
|
|
.setErrorDetail("请选择需要删除的资源。")
|
|
|
|
|
|
|
|
.build();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
ValidatorBean.checkNotZero(status,"状态不能为0");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
sysLocaleLanguageService.updateSysLocaleLanguageStatusByIds(StringTool.getArrayLong(idsStr),status);
|
|
|
|
|
|
|
|
return ResultBean.success("操作成功").setCode(ResourceEnumUtil.MESSAGE.SUCCESS.getCode());
|
|
|
|
|
|
|
|
}catch(ImppBusiException busExcep){
|
|
|
|
|
|
|
|
return ResultBean.fail(busExcep.getErrorShow());
|
|
|
|
|
|
|
|
}catch(Exception e){
|
|
|
|
|
|
|
|
return ImppExceptionBuilder.newInstance().buildExceptionResult(e);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|