{"id":6459,"date":"2024-08-07T23:01:03","date_gmt":"2024-08-07T15:01:03","guid":{"rendered":""},"modified":"2024-08-07T23:01:03","modified_gmt":"2024-08-07T15:01:03","slug":"querywapper.eq_PowerQUERy\u5408\u5e76\u67e5\u8be2\u6a21\u7cca\u5339\u914d","status":"publish","type":"post","link":"https:\/\/mushiming.com\/6459.html","title":{"rendered":"querywapper.eq_PowerQUERy\u5408\u5e76\u67e5\u8be2\u6a21\u7cca\u5339\u914d"},"content":{"rendered":"

\n <\/path> \n<\/svg> <\/p>\n

\"querywapper.eq_PowerQUERy\u5408\u5e76\u67e5\u8be2\u6a21\u7cca\u5339\u914d<\/p>\n

public ResponseResult bind(DriverCarBindingRelationship driverCarBindingRelationship){ \/* * \u5224\u65ad\uff1a\u5728\u7ed1\u5b9a\u53f8\u673a\u548c\u8f66\u8f86\u5173\u7cfb\u4e4b\u524d\uff0c\u5148\u5224\u65ad\u4e00\u4e0b\u4e8c\u8005\u4e4b\u95f4\u662f\u5426\u5df2\u7ecf\u7ed1\u5b9a\uff0c\u5982\u679c\u5df2\u7ecf\u7ed1\u5b9a\u8fc7\uff0c\u5219\u4e0d\u5bb9\u8bb8\u518d\u7ed1\u5b9a * *\/ QueryWrapper<DriverCarBindingRelationship> queryWrapper = new QueryWrapper<>(); \/\/\u67e5\u8be2\u5305\u88c5\u5668 \/\/\u591a\u79cd\u6761\u4ef6\u60c5\u51b5\u4e0b\u8fdb\u884c\u67e5\u8be2\uff0c\u4ee5\u4e0b\u4e09\u79cd\u60c5\u51b5\u5fc5\u987b\u6ee1\u8db3 queryWrapper.eq(\"driver_id\",driverCarBindingRelationship.getDriverId()); queryWrapper.eq(\"car_id\",driverCarBindingRelationship.getCarId()); queryWrapper.eq(\"bind_state\",DriverCarConstants.DRIVER_CAR_BIND); Integer integer = driverCarBindingRelationshipMapper.selectCount(queryWrapper); if(integer.intValue()>0){ return ResponseResult.fail(CommonStatusEnum.DRIVER_CAR_BIND_EXIST.getCode(),CommonStatusEnum.DRIVER_CAR_BIND_EXIST.getValue()); } } <\/code><\/pre>\n

\u5e95\u5c42\u8fd0\u884c\u7ed3\u679c\uff1a<\/p>\n

\n

Creating a new SqlSession
SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@] was not registered for synchronization because synchronization is not active
JDBC Connection [HikariProxyConnection@ wrapping com.mysql.cj.jdbc.ConnectionImpl@4e911e70] will not be managed by Spring
> Preparing: SELECT COUNT( * ) FROM driver_car_binding_relationship WHERE (driver_id = ? AND car_id = ? AND bind_state = ?)
> Parameters: 53(Long), 6(Long), 1(Integer)
<<\/mark> Columns: COUNT( * )
<<\/mark> Row: 0
<== Total: 1
Closing non transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@]<\/p>\n<\/blockquote>\n","protected":false},"excerpt":{"rendered":"querywapper.eq_PowerQUERy\u5408\u5e76\u67e5\u8be2\u6a21\u7cca\u5339\u914dQueryWrapper\u4e2deq\u7684\u610f\u601d\u4ee5\u53ca\u7528\u6cd5\u6848\u4f8b_querywrapper.eq","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"_links":{"self":[{"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/posts\/6459"}],"collection":[{"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/comments?post=6459"}],"version-history":[{"count":0,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/posts\/6459\/revisions"}],"wp:attachment":[{"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/media?parent=6459"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/categories?post=6459"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/tags?post=6459"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}