bug修改
This commit is contained in:
+10
-2
@@ -1,18 +1,20 @@
|
||||
package com.jero.config.mybatis;
|
||||
|
||||
import com.baomidou.mybatisplus.autoconfigure.ConfigurationCustomizer;
|
||||
import com.baomidou.mybatisplus.core.parser.ISqlParser;
|
||||
import com.baomidou.mybatisplus.core.parser.ISqlParserFilter;
|
||||
import com.baomidou.mybatisplus.core.toolkit.PluginUtils;
|
||||
import com.baomidou.mybatisplus.extension.MybatisMapWrapperFactory;
|
||||
import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
|
||||
import com.baomidou.mybatisplus.extension.plugins.tenant.TenantHandler;
|
||||
import com.baomidou.mybatisplus.extension.plugins.tenant.TenantSqlParser;
|
||||
import com.jero.common.util.oConvertUtils;
|
||||
import net.sf.jsqlparser.expression.Expression;
|
||||
import net.sf.jsqlparser.expression.LongValue;
|
||||
import net.sf.jsqlparser.expression.operators.relational.ExpressionList;
|
||||
import net.sf.jsqlparser.expression.operators.relational.InExpression;
|
||||
import net.sf.jsqlparser.schema.Column;
|
||||
import org.apache.ibatis.reflection.MetaObject;
|
||||
import com.jero.common.util.oConvertUtils;
|
||||
import org.mybatis.spring.annotation.MapperScan;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
@@ -131,7 +133,7 @@ public class MybatisPlusConfig {
|
||||
}
|
||||
});
|
||||
}
|
||||
// /**
|
||||
// /**
|
||||
// * mybatis-plus SQL执行效率插件【生产环境可以关闭】
|
||||
// */
|
||||
// @Bean
|
||||
@@ -139,4 +141,10 @@ public class MybatisPlusConfig {
|
||||
// return new PerformanceInterceptor();
|
||||
// }
|
||||
|
||||
//将数据库中的数据输出时都转换成驼峰格式
|
||||
@Bean
|
||||
public ConfigurationCustomizer mybatisConfigurationCustomizer(){
|
||||
return configuration -> configuration.setObjectWrapperFactory(new MybatisMapWrapperFactory());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+2
-3
@@ -3,7 +3,6 @@ package com.jero.modules.tag.mapper;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.jero.modules.tag.entity.OnlCgformTag;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
import org.apache.ibatis.annotations.Update;
|
||||
import org.springframework.data.repository.query.Param;
|
||||
|
||||
@@ -16,7 +15,7 @@ import java.util.Map;
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface OnlCgformTagMapper extends BaseMapper<OnlCgformTag> {
|
||||
@Select("select f.id,f.create_by,f.create_time,f.update_by,f.update_time,f.cgform_head_id,\n" +
|
||||
/* @Select("select f.id,f.create_by,f.create_time,f.update_by,f.update_time,f.cgform_head_id,\n" +
|
||||
"f.is_model,f.db_field_txt,f.db_field_en_name,\n" +
|
||||
"f.field_show_type,i.item_text as field_show_type_name,\n" +
|
||||
"f.dict_id,f.db_length,f.order_num,f.field_must_input,\n" +
|
||||
@@ -30,7 +29,7 @@ public interface OnlCgformTagMapper extends BaseMapper<OnlCgformTag> {
|
||||
"where f.cgform_head_id=\"48308196e7b04761b533dc31bc899707\"\n" +
|
||||
"and f.is_delete=0\n" +
|
||||
"and i.dict_id=1493098515761917954 \n" +
|
||||
"order by f.order_num asc ")
|
||||
"order by f.order_num asc ")*/
|
||||
IPage<OnlCgformTag> queryPageList(IPage page,@Param("params") Map<String,Object> params);
|
||||
|
||||
/**
|
||||
|
||||
+25
@@ -26,4 +26,29 @@
|
||||
<result column="is_show_search" property="isShowSearch" />
|
||||
<result column="is_delete" property="isDelete" />
|
||||
</resultMap>
|
||||
<select id="queryPageList" resultType="hashmap">
|
||||
select f.id,f.create_by,f.create_time,f.update_by,f.update_time,f.cgform_head_id,
|
||||
f.is_model,f.db_field_txt,f.db_field_en_name,
|
||||
f.field_show_type,i.item_text as field_show_type_name,
|
||||
f.dict_id,f.db_length,f.order_num,f.field_must_input,
|
||||
f.is_show_form,f.is_show_list,f.is_read_only,
|
||||
f.show_area,a.show_area as show_area_name,f.is_query,f.is_show_laws_list,f.is_show_search,f.is_delete,
|
||||
f.db_field_name,f.db_is_key,f.db_is_null,f.db_point_length,f.db_type,
|
||||
i.en_name as field_show_type_en_name,a.en_name as show_area_en_name
|
||||
from onl_cgform_field as f
|
||||
left join sys_dict_item as i on f.field_show_type=i.item_value
|
||||
left join onl_cgform_area as a on f.show_area=a.id
|
||||
where f.cgform_head_id="48308196e7b04761b533dc31bc899707"
|
||||
and f.is_delete=0
|
||||
and i.dict_id=1493098515761917954
|
||||
|
||||
<if test="params.dbFieldTxt != null and params.dbFieldTxt != '' ">
|
||||
and f.db_field_txt like concat('%',#{params.dbFieldTxt},'%')
|
||||
</if>
|
||||
<if test="params.showArea != null and params.showArea != '' ">
|
||||
and f.show_area like concat('%',#{params.showArea},'%')
|
||||
</if>
|
||||
order by f.create_time desc
|
||||
|
||||
</select>
|
||||
</mapper>
|
||||
+13
-7
@@ -14,7 +14,6 @@ import com.jero.modules.document.enums.FieldTypeEnum;
|
||||
import com.jero.modules.system.service.impl.SysDictServiceImpl;
|
||||
import com.jero.modules.tag.entity.OnlCgformArea;
|
||||
import com.jero.modules.tag.entity.OnlCgformTag;
|
||||
import com.jero.modules.tag.enums.FileTableIdEnum;
|
||||
import com.jero.modules.tag.mapper.OnlCgformTagMapper;
|
||||
import com.jero.modules.tag.service.IOnlCgformTagService;
|
||||
import com.jero.modules.utils.HanYuPinYinUtil;
|
||||
@@ -180,15 +179,22 @@ public class OnlCgformTagServiceImpl extends ServiceImpl<OnlCgformTagMapper, Onl
|
||||
public IPage<OnlCgformTag> queryPageList(Map<String,Object> params) {
|
||||
Integer pageNo = Integer.parseInt(params.get("pageNo").toString());
|
||||
Integer pageSize = Integer.parseInt(params.get("pageSize").toString());
|
||||
IPage<OnlCgformTag> page = new Page(pageNo, pageSize);
|
||||
IPage page = new Page(pageNo, pageSize);
|
||||
IPage result = onlCgformTagMapper.queryPageList(page,params);
|
||||
List<Map<String,Object>> records = result.getRecords();
|
||||
|
||||
String cut = (String) params.get("cut");
|
||||
//中英切换-属性类型+展示区域列
|
||||
if (CutEnum.EN.getValue().equals(params.get("cut").toString())) {
|
||||
params.put("fieldShowType", params.get("fieldShowTypeEnName"));
|
||||
params.put("showArea", params.get("showAreaEnName"));
|
||||
if(CutEnum.EN.getValue().equals(cut)){
|
||||
for(Map<String,Object> data:records){
|
||||
System.out.println("这里这里fieldShowTypeEnName"+data.get("fieldShowTypeEnName"));
|
||||
System.out.println("这里这里showAreaEnName"+data.get("showAreaEnName"));
|
||||
data.put("fieldShowTypeName",data.get("fieldShowTypeEnName"));
|
||||
data.put("showAreaName",data.get("showAreaEnName"));
|
||||
}
|
||||
|
||||
}
|
||||
IPage<OnlCgformTag> result = onlCgformTagMapper.queryPageList(page,params);
|
||||
return result;
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user