mybatis中sql动态变量


		select @money := CARRIAGE + SERVICE_FEE from receipt_order_info
		where id=#{ORDER_ID};
		
		update receipt_send_company set ACCOUNT_BALANCE=ACCOUNT_BALANCE - @money
 		where id=#{COMP_ID};

注意:

spring:
  datasource:
    driverClassName: com.mysql.jdbc.Driver
    url: jdbc:mysql://192.168.8.253:3306/cloud-biz?useSSL=false&serverTimezone=UTC&allowMultiQueries=true
    username: root
    password: 123456

你可能感兴趣的:(mybatis中sql动态变量)