Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.4在线表单导入配置java增强,不会抛出异常,即使导入不成功也不会。 #2070

Closed
kevin19860812 opened this issue Dec 4, 2020 · 3 comments

Comments

@kevin19860812
Copy link

版本号:

2.4

问题描述:

2.4版本,在线表单开发中,对某一表单的导入按钮添加了java增强,在实现代码中手动抛出异常,前端仍然提示导入成功,数据没有插入进去。后端有捕获到异常。

截图&代码:

图片

图片
代码如下:
import com.alibaba.fastjson.JSONObject;
import org.jeecg.common.exception.JeecgBootException;
import org.jeecg.modules.online.cgform.enhance.CgformEnhanceJavaInter;
import org.jeecg.modules.online.config.exception.BusinessException;
import org.springframework.stereotype.Component;

import java.util.Map;

/**

  • 财务收入导入处理
    */
    @component("financialIncomeImport")
    public class FinancialIncomeImport implements CgformEnhanceJavaInter {
    @OverRide
    public int execute(String s, Map<String, Object> map) throws BusinessException {

     //默认返回1 走新增逻辑
     return 1;
    

    }

    @OverRide
    public int execute(String s, JSONObject jsonObject) throws BusinessException {
    // try {
    System.out.println(jsonObject.toJSONString());
    if(1==1) {
    throw new JeecgBootException("测试报错");
    }
    // }catch (Exception e){
    // e.printStackTrace();
    // }
    //默认返回1 走新增逻辑
    return 1;
    }
    }

友情提示: 未按格式要求发帖,会直接删掉。

@zhangdaiscott
Copy link
Member

收录

@kevin19860812
Copy link
Author

kevin19860812 commented Dec 8, 2020 via email

@zhangdaiscott
Copy link
Member

处理完成,下个版本发布

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants