| @@ -267,6 +267,7 @@ public class WxFlowAbleController extends BaseController { | |||||
| pageNum = 1; | pageNum = 1; | ||||
| } | } | ||||
| wxFlowConfig.setParentId(0l); | |||||
| PageInfo<WxFlowConfig> pageInfo = wxFlowService.configList(wxFlowConfig,pageNum,pageSize); | PageInfo<WxFlowConfig> pageInfo = wxFlowService.configList(wxFlowConfig,pageNum,pageSize); | ||||
| List<WxFlowConfig> list = pageInfo.getList(); | List<WxFlowConfig> list = pageInfo.getList(); | ||||
| for (WxFlowConfig c:list) { | for (WxFlowConfig c:list) { | ||||
| @@ -1219,6 +1219,14 @@ public class WxFlowServiceImpl implements WxFlowService { | |||||
| @Override | @Override | ||||
| public ResultData delModel(WxFlowModel wxFlowModel) { | public ResultData delModel(WxFlowModel wxFlowModel) { | ||||
| WxFlowConfig query = new WxFlowConfig(); | |||||
| query.setTenantId(wxFlowModel.getTenantId()); | |||||
| query.setModelId(wxFlowModel.getId()); | |||||
| if(CollectionUtils.isNotEmpty(wxFlowConfigMapper.findList(query))){ | |||||
| return new ResultData(Result.ERROR, "该流程模板在使用中,须先停用正在\n" + | |||||
| "使用该模板的审批类型。"); | |||||
| } | |||||
| wxFlowModelMapper.deleteByPrimaryKey(wxFlowModel.getId()); | wxFlowModelMapper.deleteByPrimaryKey(wxFlowModel.getId()); | ||||
| return new ResultData(); | return new ResultData(); | ||||
| } | } | ||||
| @@ -18,12 +18,12 @@ | |||||
| <sql id="dynamicWhereConditions"> | <sql id="dynamicWhereConditions"> | ||||
| where parent_id =0 | |||||
| <if test=" null != tenantId "> | |||||
| and `tenant_id` = #{tenantId} | |||||
| </if> | |||||
| where 1=1 | |||||
| <if test=" null != parentId ">and `parent_id` = #{parentId}</if> | |||||
| <if test=" null != tenantId ">and `tenant_id` = #{tenantId}</if> | |||||
| <if test=" null != id "> and `id` = #{id} </if> | <if test=" null != id "> and `id` = #{id} </if> | ||||
| <if test=" null != name "> and `name` like concat('%', #{name},'%') </if> | |||||
| <if test=" null != modelId"> and `model_id` = #{modelId} </if> | |||||
| <if test="null != name and '' != name "> and `name` like concat('%', #{name},'%') </if> | |||||
| <if test=" null != sortColumns"> order by ${sortColumns} </if> | <if test=" null != sortColumns"> order by ${sortColumns} </if> | ||||
| <if test=" null == sortColumns"> order by sort asc </if> | <if test=" null == sortColumns"> order by sort asc </if> | ||||
| </sql> | </sql> | ||||
| @@ -19,7 +19,7 @@ | |||||
| and `tenant_id` = #{tenantId} | and `tenant_id` = #{tenantId} | ||||
| </if> | </if> | ||||
| <if test=" null != id "> and `id` = #{id} </if> | <if test=" null != id "> and `id` = #{id} </if> | ||||
| <if test=" null != name "> and `name` like concat('%', #{name},'%') </if> | |||||
| <if test="null != name and '' != name "> and `name` like concat('%', #{name},'%') </if> | |||||
| <if test=" null != sortColumns"> order by ${sortColumns} </if> | <if test=" null != sortColumns"> order by ${sortColumns} </if> | ||||
| <if test=" null == sortColumns"> order by id desc </if> | <if test=" null == sortColumns"> order by id desc </if> | ||||