Git Product home page Git Product logo

multipleselect's People

Contributors

yangaijun avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

multipleselect's Issues

表自连

`select distinct meuproductcategory.serial_version_u_i_d serialVersionUID,meuproductcategory.id id,meuproductcategory.id parentId,meuproductcategory.name name,meuproductcategory.level level,meuproductcategory.product_count productCount,meuproductcategory.product_unit productUnit,meuproductcategory.nav_status navStatus,meuproductcategory.show_status showStatus,meuproductcategory.sort sort,meuproductcategory.icon icon,meuproductcategory.keywords keywords,meuproductcategory.description description,meuproductcategory.serial_version_u_i_d serialVersionUID,meuproductcategory.id id,meuproductcategory.id parentId,meuproductcategory.name name,meuproductcategory.level level,meuproductcategory.product_count productCount,meuproductcategory.product_unit productUnit,meuproductcategory.nav_status navStatus,meuproductcategory.show_status showStatus,meuproductcategory.sort sort,meuproductcategory.icon icon,meuproductcategory.keywords keywords,meuproductcategory.description description from meu_product_category as meuproductcategory left join meu_product_category as meuproductcategory on meuproductcategory.id = meuproductcategory.id

Cause: java.sql.SQLSyntaxErrorException: Not unique table/alias: 'meuproductcategory'

; bad SQL grammar []; nested exception is java.sql.SQLSyntaxErrorException: Not unique table/alias: 'meuproductcategory'
at org.springframework.jdbc.support.SQLExceptionSubclassTranslator.doTranslate(SQLExceptionSubclassTranslator.java:93) ~[spring-jdbc-5.2.1.RELEASE.jar:5.2.1.RELEASE]`

想要查询的是这中的是不是不行啊
select * from meu_product_category as c1 left join meu_product_category as c2 on c1.id = c2.parent_id

括号有问题

multipleSelect.where("${1}")
.division()
.eq("userName", "张三")
.eq("userPhone", "123")
.or()
.division()
.eq("userName", "李四")
.eq("userPhone", "456");

sql: WHERE ( user_name = "张三" AND user_phone = "123" ) OR ( OR user_name = "李四" OR user_phone = "456" )

两个问题:
1.OR ( OR user_name = "李四"
多个括号的时候,第二个括号开始会多出来一个OR

我把WhereCustomSegment.java 中的第42行
if (segmentSql.get(segmentSql.size() - 1).indexOf("(") == -1
|| (segmentSql.get(segmentSql.size() - 1).indexOf("(") != -1 && segmentSql.get(segmentSql.size() - 1).indexOf(")") != -1))
改成if (segmentSql.get(segmentSql.size() - 1).indexOf("(") == -1)就好了

2.user_name = "李四" OR user_phone = "456"
这里我实际想要的是user_name = "李四" AND user_phone = "456"
发现
.or()
.division()
.eq("userName", "李四")
.and()
.eq("userPhone", "456");
可以达到预期效果,但感觉怪怪的

另外,条件构造器可以再完善下吗,比如isNull、groupBy、having

Autowired已经不知道有没有空更新一下。

required a bean of type 'com.freedomen.multipleselect.service.MultipleService' that could not be found.

The injection point has the following annotations:
- @org.springframework.beans.factory.annotation.Autowired(required=true)

通过注解@TableId(value = "id")指定的字段名无效

// user 表
@TableId(value = "id")
private Integer userId

// address 表
@TableId(value = "id")
private Integer addressId
private Integer userId

测试结果:user.user_id、address.address_id

正确结果应该是user.id、address.id

总记录数与返回字段问题

1.有没有只查询总记录的入口
2.设置参数
-2.1 根据字段去重如:
count(distinct hs_id)
-2.2 目前有没有别的方法来设置字段,活用的那种
MultipleSelect m2 = MultipleSelect.newInstance("${1}.hsId",
new Abb(), new Bcc());
m2.setColumns("abb.hs_Id");
这种方法设置参数都是写死的 abb.hs_id
能否提供一种便捷的参数类型设置类似${1}.hsId

Please☺

生成sql报错

image
image
image
怎么久生成了这样的sql了 你的mybatis-plus什么版本
image

只改了一个这个com.baomidou.mybatisplus.annotations的区别

提议

多表连接连接字段自己定义

包怎么找?

你说导入包到项目中,但是你的包怎么查不到呀?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.