szjbdgzl 2 лет назад
Родитель
Сommit
e8dfcb9007

+ 10 - 0
ibps-model-root/modules/org-model/src/main/java/com/lc/ibps/common/cat/persistence/entity/TypeTbl.java

@@ -71,6 +71,16 @@ public class TypeTbl extends AbstractTreeModel<String>{
 	@ApiModelProperty(value="文件查询权限分类")
 	protected String authorityName; /*文件查询权限分类*/
 
+	private Object authorityObject;
+
+	public Object getAuthorityObject() {
+		return authorityObject;
+	}
+
+	public void setAuthorityObject(Object authorityObject) {
+		this.authorityObject = authorityObject;
+	}
+
 	public String getAuthorityName() {
 		return authorityName;
 	}

+ 3 - 3
ibps-model-root/modules/org-model/src/main/resources/com/lc/ibps/cat/persistence/mapping/Type.map.xml

@@ -21,7 +21,7 @@
 		<result property="updateTime" column="UPDATE_TIME_" jdbcType="TIMESTAMP"/>
 		<result property="tenantId" column="TENANT_ID_" jdbcType="VARCHAR"/>
 		<result property="isShow" column="IS_SHOW_" jdbcType="VARCHAR"/>
-		<result property="authorityName" column="AUTHORITY_NAME" jdbcType="VARCHAR"/>
+		<result property="authorityName" column="AUTHORITY_NAME" jdbcType="LONGVARCHAR"/>
 	</resultMap>
 	
 	<sql id="columns">
@@ -36,7 +36,7 @@
 		#{struType,jdbcType=VARCHAR}, #{parentId,jdbcType=VARCHAR}, #{depth,jdbcType=NUMERIC}, #{path,jdbcType=VARCHAR},
 		#{isLeaf,jdbcType=VARCHAR}, #{ownerId,jdbcType=VARCHAR}, #{sn,jdbcType=NUMERIC}, #{createBy,jdbcType=VARCHAR},
 		#{createTime,jdbcType=TIMESTAMP}, #{createOrgId,jdbcType=VARCHAR}, #{updateBy,jdbcType=VARCHAR},
-		#{updateTime,jdbcType=TIMESTAMP}, #{tenantId,jdbcType=VARCHAR} ,#{authorityName,jdbcType=VARCHAR} )
+		#{updateTime,jdbcType=TIMESTAMP}, #{tenantId,jdbcType=VARCHAR} ,#{authorityName,jdbcType=LONGVARCHAR} )
 	</insert>
 	
 	<select id="get"   parameterType="java.lang.String" resultMap="Type">
@@ -85,7 +85,7 @@
 		CREATE_ORG_ID_=#{createOrgId,jdbcType=VARCHAR},
 		UPDATE_BY_=#{updateBy,jdbcType=VARCHAR},
 		UPDATE_TIME_=#{updateTime,jdbcType=TIMESTAMP},
-		AUTHORITY_NAME=#{authorityName,jdbcType=VARCHAR}
+		AUTHORITY_NAME=#{authorityName,jdbcType=LONGVARCHAR}
 		WHERE
 		ID_=#{id}
 	</update>

+ 3 - 0
ibps-provider-root/modules/provider-platform-default/src/main/java/com/lc/ibps/common/provider/TypeProvider.java

@@ -6,6 +6,7 @@ import java.util.List;
 
 import javax.annotation.Resource;
 
+import cn.hutool.json.JSONUtil;
 import org.springframework.stereotype.Service;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestParam;
@@ -68,6 +69,7 @@ public class TypeProvider extends GenericProvider implements ITypeService, IType
 		APIResult<TypePo> result = new APIResult<>();
 		try {
 			TypePo typePo = typeRepository.get(typeId);
+			typePo.setAuthorityObject(JSONUtil.parseObj(typePo.getAuthorityName()));
 			result.setData(typePo);
 		} catch (Exception e) {
 			setExceptionResult(result, StateEnum.ERROR_CAT_TYPE.getCode(), I18nUtil.getMessage(StateEnum.ERROR_CAT_TYPE.getCode()+""), e);
@@ -185,6 +187,7 @@ public class TypeProvider extends GenericProvider implements ITypeService, IType
 				throw new BaseException(message);
 			} else {
 				Type type = typeRepository.newInstance();
+				typeVo.setAuthorityName(JSONUtil.toJsonStr(typeVo.getAuthorityObject()));
 				message = type.saveType(typeVo);
 				result.addVariable("id", typeVo.getId());
 			}