update other
This commit is contained in:
@ -80,12 +80,12 @@ public class GeneratorServiceImpl extends BaseServiceImpl<ColumnInfoMapper, Colu
|
||||
columnInfos.add(
|
||||
new ColumnConfig(
|
||||
tableName,
|
||||
map.get("column_name").toString(),
|
||||
"NO".equals(map.get("is_nullable").toString()),
|
||||
map.get("data_type").toString(),
|
||||
ObjectUtil.isNotNull( map.get("column_comment")) ? map.get("column_comment").toString() : null,
|
||||
ObjectUtil.isNotNull(map.get("column_key")) ? map.get("column_key").toString() : null,
|
||||
ObjectUtil.isNotNull(map.get("extra")) ? map.get("extra").toString() : null)
|
||||
map.get("COLUMN_NAME").toString(),
|
||||
"NO".equals(map.get("IS_NULLABLE").toString()),
|
||||
map.get("DATA_TYPE").toString(),
|
||||
ObjectUtil.isNotNull( map.get("COLUMN_COMMENT")) ? map.get("COLUMN_COMMENT").toString() : null,
|
||||
ObjectUtil.isNotNull(map.get("COLUMN_KEY")) ? map.get("COLUMN_KEY").toString() : null,
|
||||
ObjectUtil.isNotNull(map.get("EXTRA")) ? map.get("EXTRA").toString() : null)
|
||||
);
|
||||
}
|
||||
return columnInfos;
|
||||
|
@ -28,8 +28,8 @@ public interface ColumnInfoMapper extends CoreMapper<ColumnConfig> {
|
||||
@Select("<script>select table_name ,create_time , engine, table_collation, table_comment from information_schema.tables " +
|
||||
"where table_schema = (select database()) order by create_time desc</script>")
|
||||
List<TableInfo> selectTables();
|
||||
@Select("select column_name, is_nullable, data_type, column_comment, column_key, extra from information_schema.columns " +
|
||||
"where table_name = #{name} and table_schema = (select database()) order by ordinal_position")
|
||||
@Select("SELECT COLUMN_NAME, IS_NULLABLE, DATA_TYPE, COLUMN_COMMENT, COLUMN_KEY, EXTRA FROM INFORMATION_SCHEMA.COLUMNS " +
|
||||
"WHERE TABLE_NAME = #{name} AND TABLE_SCHEMA = (SELECT DATABASE()) ORDER BY ORDINAL_POSITION")
|
||||
List<Map<String,Object>> queryByTableName(@Param("name") String name);
|
||||
|
||||
}
|
||||
|
@ -69,14 +69,11 @@ public class YxStoreProductReplyServiceImpl extends BaseServiceImpl<StoreProduct
|
||||
//@Cacheable
|
||||
public List<YxStoreProductReply> queryAll(YxStoreProductReplyQueryCriteria criteria){
|
||||
List<YxStoreProductReply> storeProductReplyList = baseMapper.selectList(QueryHelpPlus.getPredicate(YxStoreProductReply.class, criteria));
|
||||
List<YxStoreProductReply> storeProductReplys = storeProductReplyList.stream().map(i ->{
|
||||
YxStoreProductReply yxStoreProductReply = new YxStoreProductReply();
|
||||
BeanUtils.copyProperties(i,yxStoreProductReply);
|
||||
storeProductReplyList.forEach(yxStoreProductReply->{
|
||||
yxStoreProductReply.setUser(yxUserService.getById(yxStoreProductReply.getUid()));;
|
||||
yxStoreProductReply.setStoreProduct(yxStoreProductService.getById(yxStoreProductReply.getProductId()));
|
||||
return yxStoreProductReply;
|
||||
}).collect(Collectors.toList());
|
||||
return storeProductReplys;
|
||||
});
|
||||
return storeProductReplyList;
|
||||
}
|
||||
|
||||
|
||||
|
@ -88,13 +88,10 @@ public class YxStoreProductServiceImpl extends BaseServiceImpl<StoreProductMappe
|
||||
//@Cacheable
|
||||
public List<YxStoreProduct> queryAll(YxStoreProductQueryCriteria criteria){
|
||||
List<YxStoreProduct> yxStoreProductList = baseMapper.selectList(QueryHelpPlus.getPredicate(YxStoreProduct.class, criteria));
|
||||
List<YxStoreProduct> storeProductList = yxStoreProductList.stream().map(i ->{
|
||||
YxStoreProduct yxStoreProduct = new YxStoreProduct();
|
||||
BeanUtils.copyProperties(i,yxStoreProduct);
|
||||
yxStoreProduct.setStoreCategory(yxStoreCategoryService.getById(i.getCateId()));
|
||||
return yxStoreProduct;
|
||||
}).collect(Collectors.toList());
|
||||
return storeProductList;
|
||||
yxStoreProductList.forEach(yxStoreProduct ->{
|
||||
yxStoreProduct.setStoreCategory(yxStoreCategoryService.getById(yxStoreProduct.getCateId()));
|
||||
});
|
||||
return yxStoreProductList;
|
||||
}
|
||||
|
||||
|
||||
|
@ -26,7 +26,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
@RestController
|
||||
@SpringBootApplication
|
||||
@EnableTransactionManagement
|
||||
@MapperScan({"co.yixiang.*.mapper"})
|
||||
@MapperScan(basePackages ={ "co.yixiang.*.mapper", "co.yixiang.config"})
|
||||
public class AppRun {
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
Reference in New Issue
Block a user