| | |
| | | package com.matrix.system.common.actions; |
| | | |
| | | import cn.hutool.core.collection.CollUtil; |
| | | import com.matrix.core.constance.MatrixConstance; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.tools.StringUtils; |
| | | import com.matrix.core.tools.WebUtil; |
| | | import com.matrix.system.common.bean.BusParameterSettings; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.common.constance.AppConstance; |
| | | import com.matrix.system.common.dao.BusParameterSettingsDao; |
| | | import com.matrix.system.enums.BooleanEnum; |
| | | import com.matrix.system.hive.action.util.QueryUtil; |
| | | import com.matrix.system.hive.bean.ParameterSettings; |
| | | import com.matrix.system.hive.dao.ParameterSettingsDao; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | BusParameterSettings newParam=new BusParameterSettings(); |
| | | newParam.setParamCode(parameterSetting.getCode()); |
| | | newParam.setCompanyId(user.getCompanyId()); |
| | | if(BooleanEnum.TRUE.getDisplayName().equals(parameterSetting.getUserValue())){ |
| | | newParam.setParamValue(String.valueOf(BooleanEnum.TRUE.getValue())); |
| | | }else if(BooleanEnum.FALSE.getDisplayName().equals(parameterSetting.getUserValue())){ |
| | | newParam.setParamValue(String.valueOf(BooleanEnum.FALSE.getValue())); |
| | | }else{ |
| | | newParam.setParamValue(parameterSetting.getUserValue()); |
| | | } |
| | | if(type==SHOP){ |
| | | newParam.setShopId(user.getShopId()); |
| | | } |
| | |
| | | } |
| | | |
| | | |
| | | @GetMapping(value = "/getSystemName") |
| | | public @ResponseBody |
| | | AjaxResult getSystemName() { |
| | | SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | List codes = new ArrayList<>(); |
| | | codes.add(AppConstance.ADMIN_SYSTEM_TITLE); |
| | | List<BusParameterSettings> dataList = busParameterSettingsDao.selectByCodesAndCompanyId(codes, user.getCompanyId()); |
| | | String paramValue = ""; |
| | | if(CollUtil.isNotEmpty(dataList)){ |
| | | paramValue = dataList.get(0).getParamValue(); |
| | | }else{ |
| | | paramValue = "讯聪管理系统"; |
| | | } |
| | | AjaxResult result = new AjaxResult(AjaxResult.STATUS_SUCCESS, paramValue); |
| | | return result; |
| | | } |
| | | |
| | | |
| | | } |