第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定

實(shí)體類繼承了父類,使用QueryWrapper查詢時(shí),SQL能查詢出來數(shù)據(jù),但是繼承的父類字段返回?cái)?shù)據(jù)時(shí)卻沒有數(shù)據(jù)映射

/**
?*?基礎(chǔ)entity
?*/
@Data
public?class?BaseEntity?implements?Serializable?{

????private?static?final?long?serialVersionUID=1L;

????/**
?????*?ID
?????*/
????@TableId
????public?Integer?id;

????/**
?????*?是否刪除?0:?未刪除、1:已刪除
?????*/
????@TableLogic
????@TableField(value?=?"is_delete")
????public?Integer?is_delete;

????/**
?????*?創(chuàng)建用戶ID
?????*/
????@NotBlank(message?=?"創(chuàng)建用戶ID不能為空!")
????@TableField(value?=?"create_user_id")
????public?Integer?create_user_id;

????/**
?????*?創(chuàng)建用戶名稱
?????*/
????@NotBlank(message?=?"創(chuàng)建用戶名稱不能為空!")
????@TableField(value?=?"create_user_name")
????public?String?create_user_name;

????/**
?????*?創(chuàng)建時(shí)間
?????*/
????@JsonFormat(pattern="yyyy-MM-dd?HH:mm:ss",timezone?=?"GMT+8")
????@TableField(value?=?"create_datetime",fill?=?FieldFill.INSERT)
????public?Date?create_datetime;

????/**
?????*?更新用戶ID
?????*/
????@NotBlank(message?=?"更新用戶ID不能為空!")
????@TableField(value?=?"update_user_id")
????public?Integer?update_user_id;

????/**
?????*?更新用戶名稱
?????*/
????@NotBlank(message?=?"更新用戶名稱不能為空!")
????@TableField(value?=?"update_user_name")
????public?String?update_user_name;

????/**
?????*?更新時(shí)間
?????*/
????@JsonFormat(pattern="yyyy-MM-dd?HH:mm:ss",timezone?=?"GMT+8")
????@TableField(value?=?"update_datetime",fill?=?FieldFill.UPDATE)
????public?Date?update_datetime;
}
@Data
@TableName("sys_dictionary")
@EqualsAndHashCode(callSuper?=?true)
public?class?Dictionary?extends?BaseEntity{

????//所屬類型
????@NotBlank(message?=?"所屬類型不能為空!")
????private?String?type;

????//所屬類型名稱
????@NotBlank(message?=?"所屬類型名稱不能為空!")
????private?String?name;

????//值
????@NotBlank(message?=?"所屬類型名稱不能為空!")
????private?String?value;

????//顯示順序
????@NotBlank(message?=?"顯示順序不能為空!")
????private?Integer?display_order;

????//描述
????@NotBlank(message?=?"備注不能為空!")
????private?String?remark;

????//是否可修改標(biāo)識(shí)(0:no、1:yes)
????@NotBlank(message?=?"是否可修改標(biāo)識(shí)不能為空!")
????private?Integer?is_modifiable;

????//是否有效標(biāo)識(shí)(0:no、1:yes)
????@NotBlank(message?=?"是否有效標(biāo)識(shí)不能為空!")
????private?Integer?is_enable;
????}
????
????controller
????@GetMapping("/getDicListByPage")
public?Message?getListByPage(@RequestParam?Long?currentPage,@RequestParam?Long?size,Dictionary?dictionary)?throws?Exception?{
????Message?message?=?new?Message();
????//?初始化當(dāng)前頁碼
????if?(String.valueOf(currentPage)?==?null?||?currentPage?<?1)?{
????????currentPage?=?1L;
????}
????//?查詢構(gòu)造器
????QueryWrapper<Dictionary>?queryWrapper?=?new?QueryWrapper<>();
????Page<Dictionary>?dicList?=?null;
????if(Boolean.TRUE?==?DataUtils.isAllFieldNull(dictionary)){
????????dicList?=?dictionaryService.page(new?Page<>(currentPage,?size),?null);
????????message.setStatus(Boolean.TRUE);
????????message.setMsg(ValueConstant.SUCCESS);
????????message.setData(dicList);
????}else{
????????queryWrapper.like("type",dictionary.getType()).or().like("name",?dictionary.getName()).or().like("value",dictionary.getValue()).or().eq("is_enable",?dictionary.getIs_enable()).or().eq("is_delete",dictionary.getIs_delete()).orderByDesc("create_time");
????????dicList?=?dictionaryService.page(new?Page<>(currentPage,?size),?queryWrapper);
????????message.setData(dicList);
????}//END?IF-ELSE
????return?message;
}

正在回答

1 回答

同學(xué),我自己試驗(yàn)了一下,我的正常。在父類中的屬性,查詢后,也會(huì)映射到對(duì)象中,我使用的MP版本是3.3.1.tmp。你使用的是什么版本?

0 回復(fù) 有任何疑惑可以回復(fù)我~

舉報(bào)

0/150
提交
取消

實(shí)體類繼承了父類,使用QueryWrapper查詢時(shí),SQL能查詢出來數(shù)據(jù),但是繼承的父類字段返回?cái)?shù)據(jù)時(shí)卻沒有數(shù)據(jù)映射

我要回答 關(guān)注問題
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)