liurunyu
6 天以前 98df1b76326afb757e05861ab958d1454d08874d
注释完善
3个文件已修改
15 ■■■■ 已修改文件
pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/user/UserCtrl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/util/InitListener.java 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/common/CommandSv.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/user/UserCtrl.java
@@ -508,7 +508,7 @@
            if(res == null) {
                return BaseResponseUtils.buildException(SystemResultCode.THE_USER_NOT_EXIST.getMessage());
            }
            System.out.println("   :" + res);
            //System.out.println("   :" + res);
            return BaseResponseUtils.buildSuccess(res);
        } catch (Exception e) {
            log.error("查询用户信息异常", e);
pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/util/InitListener.java
@@ -20,6 +20,7 @@
import com.dy.pipIrrGlobal.pojoSe.SeRechargeProfile;
import com.dy.pipIrrGlobal.pojoSe.SeWaterType;
import com.dy.pipIrrGlobal.util.DistrictLevel;
import lombok.extern.slf4j.Slf4j;
import org.jdom2.Document;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.event.ApplicationReadyEvent;
@@ -34,6 +35,7 @@
 * Spring容器并没有创建完,而本类中用了Spring容器中的Bean,即distriDao, userDao。
 * 所以采用了Spring事件监听器来实现
 */
@Slf4j
@Component
public class InitListener implements ApplicationListener<ApplicationReadyEvent> {
@@ -137,17 +139,22 @@
            Document doc = configXml.createDom(this.resourceLoader, "init-config.xml") ;
            this.doInit(configXml, doc);
        } catch (Exception e) {
            System.out.println("系统启动时,初始化配置出错 !");
            System.out.println(e.getMessage());
            log.error("系统启动时,初始化配置出错 !");
            log.error(e.getMessage());
            e.printStackTrace();
        }
    }
    private void doInit(ConfigXml4Springboot configXml, Document doc) throws Exception{
        //Check if configXml and doc are not null
        if(configXml != null && doc != null){
            //Loop through 10000 orgs
            for(int num = 1; num <= 10000; num++){
                //Check if the org exists
                if(configXml.existElement(doc, "config.orgs.org" + num)){
                    //Get the tag and enable value of the org
                    String orgTag = configXml.getSetAttrTxt(doc, "config.orgs.org" + num,"tag", null, false, null) ;
                    Boolean enable = configXml.getSetAttrBoolean(doc, "config.orgs.org" + num, "enable", null, null);
                    //If the org is enabled
                    if(enable != null && enable.booleanValue()){
                        //设置数据源
                        DataSourceContext.set(orgTag);
pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/common/CommandSv.java
@@ -213,7 +213,7 @@
                    jsonArray.add(jsonObject);
                });
            }
            System.out.println(jsonArray);
        //    System.out.println(jsonArray);
        //} else {
        //    VoUnclosedParam voUnclosedParam = new VoUnclosedParam();
        //    return voUnclosedParam;