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