eg:
goods数据字段
id | name
新增 type 指定固定值 区分来自不同goods
$goods1 = Goods::find()->select('id','name')
->addSelect(new Expression("0 as type"))
$goods2 = Goods::find()->select('id','name')
->addSelect(new Expression("1 as type"))
eg:
goods数据字段
id | name
新增 type 指定固定值 区分来自不同goods
$goods1 = Goods::find()->select('id','name')
->addSelect(new Expression("0 as type"))
$goods2 = Goods::find()->select('id','name')
->addSelect(new Expression("1 as type"))