更新推送系统jpa对象转换的问题
This commit is contained in:
parent
eaefe08580
commit
1543490364
@ -33,6 +33,6 @@ public interface XhpcTerminalRepository extends JpaRepository<XhpcTerminal, Inte
|
||||
String selectBySql(String serialNumber);
|
||||
|
||||
|
||||
@Query("select t.serialNumber, t.status from XhpcTerminal as t where t.delFlag = 0")
|
||||
@Query(value = "select new XhpcTerminal(t.serialNumber, t.status) from XhpcTerminal as t where t.delFlag = 0")
|
||||
List<XhpcTerminal> selectStatusBySql();
|
||||
}
|
||||
|
||||
@ -92,6 +92,16 @@ public class XhpcTerminal extends BaseEntity {
|
||||
private String prompt;
|
||||
|
||||
|
||||
public XhpcTerminal(String serialNumber, Integer status){
|
||||
this.serialNumber = serialNumber;
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public XhpcTerminal() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
public int getConnectorType() {
|
||||
|
||||
return connectorType;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user