Compare commits
73 Commits
master
...
ppt-202601
| Author | SHA1 | Date |
|---|---|---|
|
|
5a8f290586 | 3 weeks ago |
|
|
8d578e825d | 4 weeks ago |
|
|
cd3bec963b | 4 weeks ago |
|
|
38aa47d1e6 | 4 weeks ago |
|
|
3829144317 | 1 month ago |
|
|
73ea589207 | 1 month ago |
|
|
94f45ae874 | 1 month ago |
|
|
23bc21c798 | 1 month ago |
|
|
edd1b08bf1 | 1 month ago |
|
|
2f9e6e4a3b | 1 month ago |
|
|
04c65653b6 | 2 months ago |
|
|
3c030eda73 | 2 months ago |
|
|
d3dbe13ca0 | 2 months ago |
|
|
33a65f8bfd | 2 months ago |
|
|
cab19659c0 | 2 months ago |
|
|
6cd62c6b94 | 2 months ago |
|
|
111d6f8aff | 2 months ago |
|
|
cc4b73de63 | 2 months ago |
|
|
1f6790a49a | 2 months ago |
|
|
76cbfacee9 | 2 months ago |
|
|
0df1fd0702 | 2 months ago |
|
|
33f97d8770 | 2 months ago |
|
|
a9913ba75b | 2 months ago |
|
|
ebc2fb5e47 | 2 months ago |
|
|
f75630b639 | 2 months ago |
|
|
e6952289e5 | 2 months ago |
|
|
89fe8f8c85 | 2 months ago |
|
|
1d7b42a42e | 2 months ago |
|
|
3afde926fa | 2 months ago |
|
|
0d614ddcd3 | 2 months ago |
|
|
fcf2417662 | 2 months ago |
|
|
55988a97dd | 2 months ago |
|
|
c6a7648323 | 2 months ago |
|
|
db1ba6a396 | 2 months ago |
|
|
0cac279d0e | 2 months ago |
|
|
5e7c2710ed | 2 months ago |
|
|
608a33d218 | 2 months ago |
|
|
5a398c0ffc | 2 months ago |
|
|
356273f74d | 2 months ago |
|
|
c716f5e886 | 2 months ago |
|
|
5d4d03ba1d | 2 months ago |
|
|
79957bb825 | 2 months ago |
|
|
0760418b5f | 2 months ago |
|
|
8130e97089 | 2 months ago |
|
|
32cd702112 | 2 months ago |
|
|
96d42db08f | 2 months ago |
|
|
9d4d8b4b76 | 2 months ago |
|
|
d297dccb07 | 2 months ago |
|
|
525ab5e21a | 2 months ago |
|
|
1a1a22fa3e | 2 months ago |
|
|
5a0917340e | 2 months ago |
|
|
e3553cc843 | 2 months ago |
|
|
a96b9af3a8 | 2 months ago |
|
|
7d1ecfdfec | 2 months ago |
|
|
36184a61f5 | 2 months ago |
|
|
2183211a0c | 2 months ago |
|
|
3241c29cac | 2 months ago |
|
|
bca3393cd2 | 2 months ago |
|
|
9dc8c2f52c | 2 months ago |
|
|
a913f8cc40 | 3 months ago |
|
|
184905917e | 3 months ago |
|
|
6bd4021f39 | 3 months ago |
|
|
b2e633e311 | 3 months ago |
|
|
16dc1691cd | 3 months ago |
|
|
1c7b2e67f6 | 3 months ago |
|
|
eac52febd5 | 3 months ago |
|
|
f0db8e6e43 | 3 months ago |
|
|
ec026e6510 | 3 months ago |
|
|
e4f84a2239 | 3 months ago |
|
|
c15a8c3125 | 3 months ago |
|
|
ecb9d4ac2b | 3 months ago |
|
|
e200d1dba7 | 3 months ago |
|
|
668f26bd84 | 3 months ago |
106 changed files with 6005 additions and 487 deletions
@ -0,0 +1,7 @@ |
|||||
|
CREATE TABLE basic_role_menu_relation_dashboard ( |
||||
|
role_id BIGINT, |
||||
|
menu_id BIGINT, |
||||
|
permission_type INT COMMENT '0-拒绝 1-只读 2-全部', |
||||
|
creator_id BIGINT, |
||||
|
create_time BIGINT |
||||
|
); |
||||
@ -0,0 +1,154 @@ |
|||||
|
msgjpbak: |
||||
|
parameterMap: |
||||
|
serviceError: 内部サービスのエラー |
||||
|
tokenError: インターフェイスの認証に失敗 |
||||
|
excelEmpty: フォームが空になっている |
||||
|
lineNum: 行{0}: |
||||
|
paramsFormatError: パラメータのフォーマットエラー |
||||
|
verifCodeExpired: 確認コード期限切れ |
||||
|
verifCodeError: 確認コードエラー |
||||
|
accountExpired: アカウントの有効期限が切れている |
||||
|
pwdError: パスワードエラー |
||||
|
userNotExist: ユーザーが存在しない |
||||
|
noOperationAuth: 操作権限なし |
||||
|
projectNameHasExisted: プロジェクト名がすでにある |
||||
|
projectNameDoesNotExist: プロジェクト名がない |
||||
|
buildingNameHasExisted: 該当ビル名がすでにある |
||||
|
buildingNameDoesNotExist: 該当ビル名がない |
||||
|
floorNameHasExisted: 該当フロア名がすでにある |
||||
|
floorNameDoesNotExist: 該当フロア名がない |
||||
|
buildingNotFound: 該当ビルがない |
||||
|
fbNotSameCompany: ビルと同じ会社に所属してください |
||||
|
spaceNameHasExisted: 該当部屋名がすでにある |
||||
|
floorNotFound: 該当フロア名がない |
||||
|
rfNotSameCompany: フロアと同じ会社に所属してください |
||||
|
assetNameHasExisted: 該当資産名がすでにある |
||||
|
assetSymbolHasExisted: 記号はすでに存在します |
||||
|
assetNameDoesNotExist: 該当資産名がない |
||||
|
assetSymbolDoesNotExist: 資産記号が存在しません |
||||
|
spaceNotFound: 該当部屋がない |
||||
|
faNotSameCompany: 部屋と同じ会社に所属してください |
||||
|
bindedDevice: デバイスと関連付け |
||||
|
deviceTypeNotExist: デバイスタイプがない |
||||
|
excelBuildingLineDuplicate: テーブルに同じデータがある |
||||
|
dbBuildingDuplicate: プラットフォームにすでに該当ビルがない |
||||
|
dbFloorDuplicate: プラットフォームには既にこのフロアが存在しています。 |
||||
|
dbSpaceDuplicate: プラットフォームには既にこのスペースが存在しています。 |
||||
|
dbAssetDuplicate: プラットフォームには既にこのアセットが存在しています。 |
||||
|
excelCompanyNameIsNull: 会社名を入力してください |
||||
|
excelBuildingNameIsNull: ビルを入力してください |
||||
|
excelFloorNameIsNull: フロア名を入力してください。 |
||||
|
excelSpaceNameIsNull: スペース名を入力してください。 |
||||
|
excelSpaceOrFloorNameIsNull: フロア名とスペース名を入力してください。 |
||||
|
excelCompanyNameNotExist: プラットフォーム上に該当会社名はない |
||||
|
userOrEmailNotExist: ユーザーが存在しません |
||||
|
companyNameHasExisted: 会社はすでにプラットフォーム上に存在する |
||||
|
taowaComapny: 下位の会社を親会社として利用することは不可 |
||||
|
hasSubsidiary: 削除対象の会社には下位の会社があるので、先に下位の会社を対応してください |
||||
|
roleNameExist: 役割名が既に登録済み |
||||
|
roleHasBinded: 役割はユーザーにバインドされている ので、削除する前にバインドを解除してください |
||||
|
loginNameOrEmailHasExisted: ユーザー名またはメールボックスはすでに使用されています |
||||
|
mailAddUserPwdSubject: 新規アカウント・パスワードの作成 |
||||
|
mailAddUserPwdContent: '{0} 様<br/><br/>このたびは、データ管理プラットフォームへのご登録、誠にありがとうございます。<br/><br/>下記の通り、アカウントが発行されましたのでご案内いたします。<br/><br/>-------------------------------------------------<br/>ユーザー名(ID):<u>{1}</u><br/>初期パスワード:<span style="text-transform: none;"><u>{2}</u></span><br/>-------------------------------------------------<br/><br/>ご不明な点がございましたら、お気軽にサポートまでお問い合わせください。<br/><br/>ログインはこちらから:<br/>【AD スマビル 可視化UI URL】:https://smbil.ifmservice.jp/login<br/><br/>-------------------------------<br/>イオンディライト株式会社<br/>サポート窓口: smbil-support@ifmservice.jp<br/>-------------------------------' |
||||
|
mailResetUserPwdSubject: アカウント・パスワードのリセット |
||||
|
pwdFormatError: パスワードの構成には、数字、アルファベット、特殊文字(~!@#$%^&*) で、12桁以上 |
||||
|
oldPwdError: 旧パスワードエラー |
||||
|
newPwdSameOld: 注:旧パスワードと同じものを使用しないでください |
||||
|
companyLimit: 最大15のエンタープライズを作成可能 |
||||
|
consecutiveLoginFail: ログインの失敗が多すぎます。{0}分{1}秒待ってから再度ログインしてください。 |
||||
|
loginFailCount: ログインに{0}回失敗しました。残りの試行回数:{1}回。 |
||||
|
deviceGroupNameHasExisted: デバイスグループ名は既に存在しています。 |
||||
|
invalidDeviceCategory: サポートされていないデバイスタイプ。 |
||||
|
monitoringPointCategoryNameHasExisted: この監視ポイントカテゴリ名は既に存在します |
||||
|
monitoringPointCategoryGroupNameHasExisted: この監視ポイントグループ名は既に存在します |
||||
|
alertLevel_1: 通常 |
||||
|
alertLevel_2: 緊急故障 |
||||
|
alertLevel_3: 深刻な故障 |
||||
|
alertLevel_4: 中程度の故障 |
||||
|
alertLevel_5: 軽微な故障 |
||||
|
confirmStatus_0: 未確認 |
||||
|
confirmStatus_1: 確認済み |
||||
|
handleStatus_1: 未対応 |
||||
|
handleStatus_2: 対応中 |
||||
|
handleStatus_3: 完了 |
||||
|
handleStatus_4: 自動復旧 |
||||
|
canNotProcessed: これ以上の処理はできません |
||||
|
processOwnRole: 自分のロールを操作することはできません |
||||
|
levelNameExist: 階層名は既に存在しています |
||||
|
invalidParentLevel: 無効な上位階層です |
||||
|
levelReferencedByChildren: 下位階層に紐づいています。削除する前に紐付けを解除してください。 |
||||
|
elapsedTime: '{0}日{1}時間{2}分間' |
||||
|
categoryHasExisted: カテゴリは既に存在します。 |
||||
|
operationLogMap: |
||||
|
addRole: ロールを追加 |
||||
|
editRole: ロールを編集 |
||||
|
deleteRole: ロールを削除 |
||||
|
queryRole: ロール一覧を取得 |
||||
|
addUser: ユーザーを追加 |
||||
|
editUser: ユーザーを編集 |
||||
|
deleteUser: ユーザーを削除 |
||||
|
resetPassword: パスワードをリセット |
||||
|
changePassword: パスワードを変更 |
||||
|
unbindMFADevice: MFAデバイスの連携を解除 |
||||
|
queryUser: ユーザー一覧を取得 |
||||
|
queryOperationLog: 操作ログを照会する |
||||
|
getS3Credentials: S3ファイル操作トークンを取得する |
||||
|
addSlack: Slackを追加 |
||||
|
editSlack: Slackを編集 |
||||
|
deleteSlack: Slackを削除 |
||||
|
querySlack: Slackリストを取得 |
||||
|
addTeams: Teamsを追加 |
||||
|
editTeams: Teamsを編集 |
||||
|
deleteTeams: Teamsを削除 |
||||
|
queryTeams: Teamsリストを取得 |
||||
|
getCumulativeDataList: 積算データ一覧を取得 |
||||
|
queryDeviceList: デバイス一覧を取得 |
||||
|
addDeviceGroup: デバイスグループを追加 |
||||
|
editDeviceGroup: デバイスグループを編集 |
||||
|
deleteDeviceGroup: デバイスグループを削除 |
||||
|
queryDeviceGroup: デバイスグループ一覧を取得 |
||||
|
bindGroupForDevice: デバイスにデバイスグループを割り当てる |
||||
|
bindDeviceForGroup: デバイスグループに紐付けるデバイスを設定する |
||||
|
addMonitoringPointCategory: 監視ポイントカテゴリを追加 |
||||
|
editMonitoringPointCategory: 監視ポイントカテゴリを編集 |
||||
|
deleteMonitoringPointCategory: 監視ポイントカテゴリを削除 |
||||
|
queryMonitoringPointCategory: 監視ポイントカテゴリ一覧を取得 |
||||
|
addMonitoringPointCategoryGroup: 監視ポイントカテゴリグループを追加 |
||||
|
editMonitoringPointCategoryGroup: 監視ポイントカテゴリグループを編集 |
||||
|
deleteMonitoringPointCategoryGroup: 監視ポイントカテゴリグループを削除 |
||||
|
queryMonitoringPointCategoryGroup: 監視ポイントカテゴリグループ一覧を取得 |
||||
|
bindGroupForCategory: 監視ポイントカテゴリにグループをバインド |
||||
|
bindCategoryForGroup: グループに監視ポイントカテゴリをバインド |
||||
|
confirmAlarm: アラームを確認 |
||||
|
handleAlarm: アラームを対応 |
||||
|
exportCumulativeData: 積算データをエクスポート |
||||
|
getAlarmDataList: アラームデータ一覧を取得 |
||||
|
exportAlarmData: アラームデータをエクスポート |
||||
|
getMeasureDataList: 計測データ一覧を取得 |
||||
|
exportMeasureData: 計測データをエクスポート |
||||
|
getBaStatusDataList: 稼働設備一覧を取得 |
||||
|
exportBaStatusData: 稼働設備データをエクスポート |
||||
|
getFavoriteList: お気に入りデバイス一覧を取得 |
||||
|
removeFavoriteDevice: お気に入りデバイスを削除 |
||||
|
addFavoriteDevice: お気に入りデバイスを追加 |
||||
|
addDeviceForGroup: デバイスグループにバインドされたデバイスを設定する |
||||
|
delDeviceForGroup: デバイスグループにバインドされた指定されたデバイスを削除する |
||||
|
editBuildingField: 建物の属性を編集 |
||||
|
setLngLat: 天気の経度と緯度を設定 |
||||
|
addLevel: レベルを追加 |
||||
|
editLevel: レベルを編集 |
||||
|
deleteLevel: レベルを削除 |
||||
|
queryLevel: レベル一覧を取得 |
||||
|
addNotificationCategory: 通知カテゴリを追加 |
||||
|
editNotificationCategory: 通知カテゴリを編集 |
||||
|
delNotificationCategory: 通知カテゴリを削除 |
||||
|
addNotification: 通知を追加 |
||||
|
editNotification: 通知を編集 |
||||
|
delNotification: 通知を削除 |
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
@ -0,0 +1,11 @@ |
|||||
|
aws configure set aws_access_key_id AKIAR26KHSVRUEAKRBPZ |
||||
|
aws configure set aws_secret_access_key wmMPx9vypaNi5ZIlyz4c018hKCb2M1dnGBdA+oh2 |
||||
|
aws configure set default.region ap-northeast-1 |
||||
|
aws ecr get-login-password --region ap-northeast-1 | docker login --username AWS --password-stdin 126588786019.dkr.ecr.ap-northeast-1.amazonaws.com |
||||
|
|
||||
|
docker build -t 126588786019.dkr.ecr.ap-northeast-1.amazonaws.com/aeon-prod/dashboard-back:latest\ |
||||
|
--build-arg JAR_FILE=target/dongjian-dashboard-back-controller-0.0.1-SNAPSHOT.jar \ |
||||
|
--build-arg LIB_DIR=target/lib \ |
||||
|
--build-arg CONFIG_DIR=target/config \ |
||||
|
. |
||||
|
docker push 126588786019.dkr.ecr.ap-northeast-1.amazonaws.com/aeon-prod/dashboard-back:latest |
||||
@ -1,11 +1,11 @@ |
|||||
aws configure set aws_access_key_id AKIAQNYBBSGDVT3VF4ON |
aws configure set aws_access_key_id AKIAVSKFRQDPNWHJDSHL |
||||
aws configure set aws_secret_access_key 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 |
aws configure set aws_secret_access_key DqGyOiVFKI50/Ix+cjvj25vPL2tC7NJrJ7fqzn/g |
||||
aws configure set default.region ap-northeast-1 |
aws configure set default.region ap-northeast-1 |
||||
aws ecr get-login-password --region ap-northeast-1 | docker login --username AWS --password-stdin 029530100103.dkr.ecr.ap-northeast-1.amazonaws.com |
aws ecr get-login-password --region ap-northeast-1 | docker login --username AWS --password-stdin 382934810846.dkr.ecr.ap-northeast-1.amazonaws.com |
||||
|
|
||||
docker build -t 029530100103.dkr.ecr.ap-northeast-1.amazonaws.com/aeon/dashboard-back:latest\ |
docker build -t 382934810846.dkr.ecr.ap-northeast-1.amazonaws.com/aeon/dashboard-back-stg:latest\ |
||||
--build-arg JAR_FILE=target/dongjian-dashboard-back-controller-0.0.1-SNAPSHOT.jar \ |
--build-arg JAR_FILE=target/dongjian-dashboard-back-controller-0.0.1-SNAPSHOT.jar \ |
||||
--build-arg LIB_DIR=target/lib \ |
--build-arg LIB_DIR=target/lib \ |
||||
--build-arg CONFIG_DIR=target/config \ |
--build-arg CONFIG_DIR=target/config \ |
||||
. |
. |
||||
docker push 029530100103.dkr.ecr.ap-northeast-1.amazonaws.com/aeon/dashboard-back:latest |
docker push 382934810846.dkr.ecr.ap-northeast-1.amazonaws.com/aeon/dashboard-back-stg:latest |
||||
@ -0,0 +1,98 @@ |
|||||
|
package com.dongjian.dashboard.back.controller; |
||||
|
|
||||
|
import com.dongjian.dashboard.back.common.exception.BusinessException; |
||||
|
import com.dongjian.dashboard.back.common.response.PageInfo; |
||||
|
import com.dongjian.dashboard.back.common.response.PageResponse; |
||||
|
import com.dongjian.dashboard.back.common.response.ResponseCode; |
||||
|
import com.dongjian.dashboard.back.common.response.SimpleDataResponse; |
||||
|
import com.dongjian.dashboard.back.configurator.aspect.OperationLog; |
||||
|
import com.dongjian.dashboard.back.configurator.interceptor.AccessRequired; |
||||
|
import com.dongjian.dashboard.back.dto.dashboardnotification.DashboardNotificationCategorySearchParams; |
||||
|
import com.dongjian.dashboard.back.dto.dashboardnotification.DeleteDashboardNotificationCategoryParams; |
||||
|
import com.dongjian.dashboard.back.dto.dashboardnotification.OptDashboardNotificationCategoryParams; |
||||
|
import com.dongjian.dashboard.back.service.DashboardNotificationCategoryService; |
||||
|
import com.dongjian.dashboard.back.vo.dashboardnotification.DashboardNotificationCategoryPageVO; |
||||
|
import io.swagger.v3.oas.annotations.Operation; |
||||
|
import io.swagger.v3.oas.annotations.tags.Tag; |
||||
|
import org.slf4j.Logger; |
||||
|
import org.slf4j.LoggerFactory; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
|
||||
|
@RestController |
||||
|
@AccessRequired |
||||
|
@RequestMapping("/dashboardNotificationCategory") |
||||
|
@Tag(name = "dashboard通知里的分类管理", description = "Data Provider manage API") |
||||
|
@SuppressWarnings("unchecked") |
||||
|
public class DashboardNotificationCategoryController { |
||||
|
|
||||
|
private static Logger logger = LoggerFactory.getLogger(DashboardNotificationCategoryController.class); |
||||
|
|
||||
|
@Autowired |
||||
|
private DashboardNotificationCategoryService dashboardNotificationCategoryService; |
||||
|
|
||||
|
@OperationLog(operation = "addNotificationCategory", remark = "") |
||||
|
@Operation(summary = "Add category") |
||||
|
@RequestMapping(value = "/add", method = RequestMethod.POST) |
||||
|
public SimpleDataResponse add( |
||||
|
@RequestBody OptDashboardNotificationCategoryParams optDashboardNotificationCategoryParams, |
||||
|
@RequestHeader String LoginName, |
||||
|
@RequestHeader String AccessToken, |
||||
|
@RequestHeader Long UserId, |
||||
|
@RequestHeader(required = false) Long CompanyId, |
||||
|
@RequestHeader Integer LanguageType) { |
||||
|
return dashboardNotificationCategoryService.add(optDashboardNotificationCategoryParams, UserId, CompanyId, LanguageType); |
||||
|
} |
||||
|
|
||||
|
@OperationLog(operation = "editNotificationCategory", remark = "") |
||||
|
@Operation(summary = "Edit category") |
||||
|
@RequestMapping(value = "/edit", method = RequestMethod.POST) |
||||
|
public SimpleDataResponse edit( |
||||
|
@RequestBody OptDashboardNotificationCategoryParams optDashboardNotificationCategoryParams, |
||||
|
@RequestHeader String LoginName, |
||||
|
@RequestHeader String AccessToken, |
||||
|
@RequestHeader Long UserId, |
||||
|
@RequestHeader(required = false) Long CompanyId, |
||||
|
@RequestHeader Integer LanguageType) { |
||||
|
return dashboardNotificationCategoryService.edit(optDashboardNotificationCategoryParams, UserId, CompanyId, LanguageType); |
||||
|
} |
||||
|
|
||||
|
@OperationLog(operation = "delNotificationCategory", remark = "") |
||||
|
@Operation(summary = "Delete category") |
||||
|
@RequestMapping(value = "/batchDelete", method = RequestMethod.POST) |
||||
|
public SimpleDataResponse batchDelete( |
||||
|
@RequestBody DeleteDashboardNotificationCategoryParams deleteParams, |
||||
|
@RequestHeader String LoginName, |
||||
|
@RequestHeader String AccessToken, |
||||
|
@RequestHeader Long UserId, |
||||
|
@RequestHeader(required = false) Long CompanyId, |
||||
|
@RequestHeader Integer LanguageType) { |
||||
|
return dashboardNotificationCategoryService.batchDelete(deleteParams, UserId, CompanyId, LanguageType); |
||||
|
} |
||||
|
|
||||
|
@Operation(summary = "Get category list") |
||||
|
@RequestMapping(value = "/getListPage", method = RequestMethod.GET) |
||||
|
public PageResponse<PageInfo<DashboardNotificationCategoryPageVO>> getListPage( |
||||
|
@RequestHeader String LoginName, |
||||
|
@RequestHeader String AccessToken, |
||||
|
@RequestHeader Long UserId, |
||||
|
@RequestHeader(required = false) Long CompanyId, |
||||
|
@RequestHeader Integer LanguageType, |
||||
|
@RequestHeader Integer UTCOffset, |
||||
|
DashboardNotificationCategorySearchParams searchParams) throws BusinessException { |
||||
|
|
||||
|
searchParams.setUserId(UserId); |
||||
|
PageResponse<PageInfo<DashboardNotificationCategoryPageVO>> response = new PageResponse<>(); |
||||
|
try { |
||||
|
response.setData(dashboardNotificationCategoryService.getListPage(searchParams, CompanyId, UserId, LanguageType, UTCOffset)); |
||||
|
response.setCode(ResponseCode.SUCCESS); |
||||
|
response.setMsg("success"); |
||||
|
} catch (Exception e) { |
||||
|
logger.error("Error querying list", e); |
||||
|
response.setCode(ResponseCode.SERVER_ERROR); |
||||
|
response.setMsg("service error"); |
||||
|
} |
||||
|
return response; |
||||
|
} |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,98 @@ |
|||||
|
package com.dongjian.dashboard.back.controller; |
||||
|
|
||||
|
import com.dongjian.dashboard.back.common.exception.BusinessException; |
||||
|
import com.dongjian.dashboard.back.common.response.PageInfo; |
||||
|
import com.dongjian.dashboard.back.common.response.PageResponse; |
||||
|
import com.dongjian.dashboard.back.common.response.ResponseCode; |
||||
|
import com.dongjian.dashboard.back.common.response.SimpleDataResponse; |
||||
|
import com.dongjian.dashboard.back.configurator.aspect.OperationLog; |
||||
|
import com.dongjian.dashboard.back.configurator.interceptor.AccessRequired; |
||||
|
import com.dongjian.dashboard.back.dto.dashboardnotification.DashboardNotificationSearchParams; |
||||
|
import com.dongjian.dashboard.back.dto.dashboardnotification.DeleteDashboardNotificationParams; |
||||
|
import com.dongjian.dashboard.back.dto.dashboardnotification.OptDashboardNotificationParams; |
||||
|
import com.dongjian.dashboard.back.service.DashboardNotificationService; |
||||
|
import com.dongjian.dashboard.back.vo.dashboardnotification.DashboardNotificationPageVO; |
||||
|
import io.swagger.v3.oas.annotations.Operation; |
||||
|
import io.swagger.v3.oas.annotations.tags.Tag; |
||||
|
import org.slf4j.Logger; |
||||
|
import org.slf4j.LoggerFactory; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
|
||||
|
@RestController |
||||
|
@AccessRequired |
||||
|
@RequestMapping("/dashboardNotification") |
||||
|
@Tag(name = "dashboard通知管理", description = "Data Provider manage API") |
||||
|
@SuppressWarnings("unchecked") |
||||
|
public class DashboardNotificationController { |
||||
|
|
||||
|
private static Logger logger = LoggerFactory.getLogger(DashboardNotificationController.class); |
||||
|
|
||||
|
@Autowired |
||||
|
private DashboardNotificationService dashboardNotificationService; |
||||
|
|
||||
|
@OperationLog(operation = "addNotification", remark = "") |
||||
|
@Operation(summary = "Add dashboard notification") |
||||
|
@RequestMapping(value = "/add", method = RequestMethod.POST) |
||||
|
public SimpleDataResponse add( |
||||
|
@RequestBody OptDashboardNotificationParams optDashboardNotificationParams, |
||||
|
@RequestHeader String LoginName, |
||||
|
@RequestHeader String AccessToken, |
||||
|
@RequestHeader Long UserId, |
||||
|
@RequestHeader(required = false) Long CompanyId, |
||||
|
@RequestHeader Integer LanguageType) { |
||||
|
return dashboardNotificationService.add(optDashboardNotificationParams, UserId, CompanyId, LanguageType); |
||||
|
} |
||||
|
|
||||
|
@OperationLog(operation = "editNotification", remark = "") |
||||
|
@Operation(summary = "Edit dashboard notification") |
||||
|
@RequestMapping(value = "/edit", method = RequestMethod.POST) |
||||
|
public SimpleDataResponse edit( |
||||
|
@RequestBody OptDashboardNotificationParams optDashboardNotificationParams, |
||||
|
@RequestHeader String LoginName, |
||||
|
@RequestHeader String AccessToken, |
||||
|
@RequestHeader Long UserId, |
||||
|
@RequestHeader(required = false) Long CompanyId, |
||||
|
@RequestHeader Integer LanguageType) { |
||||
|
return dashboardNotificationService.edit(optDashboardNotificationParams, UserId, CompanyId, LanguageType); |
||||
|
} |
||||
|
|
||||
|
@OperationLog(operation = "delNotification", remark = "") |
||||
|
@Operation(summary = "Delete dashboard notification") |
||||
|
@RequestMapping(value = "/batchDelete", method = RequestMethod.POST) |
||||
|
public SimpleDataResponse batchDelete( |
||||
|
@RequestBody DeleteDashboardNotificationParams deleteParams, |
||||
|
@RequestHeader String LoginName, |
||||
|
@RequestHeader String AccessToken, |
||||
|
@RequestHeader Long UserId, |
||||
|
@RequestHeader(required = false) Long CompanyId, |
||||
|
@RequestHeader Integer LanguageType) { |
||||
|
return dashboardNotificationService.batchDelete(deleteParams, UserId, CompanyId, LanguageType); |
||||
|
} |
||||
|
|
||||
|
@Operation(summary = "Get dashboard notification list") |
||||
|
@RequestMapping(value = "/getListPage", method = RequestMethod.GET) |
||||
|
public PageResponse<PageInfo<DashboardNotificationPageVO>> getListPage( |
||||
|
@RequestHeader String LoginName, |
||||
|
@RequestHeader String AccessToken, |
||||
|
@RequestHeader Long UserId, |
||||
|
@RequestHeader(required = false) Long CompanyId, |
||||
|
@RequestHeader Integer LanguageType, |
||||
|
@RequestHeader Integer UTCOffset, |
||||
|
DashboardNotificationSearchParams searchParams) throws BusinessException { |
||||
|
|
||||
|
searchParams.setUserId(UserId); |
||||
|
PageResponse<PageInfo<DashboardNotificationPageVO>> response = new PageResponse<>(); |
||||
|
try { |
||||
|
response.setData(dashboardNotificationService.getListPage(searchParams, CompanyId, UserId, LanguageType, UTCOffset)); |
||||
|
response.setCode(ResponseCode.SUCCESS); |
||||
|
response.setMsg("success"); |
||||
|
} catch (Exception e) { |
||||
|
logger.error("Error querying list", e); |
||||
|
response.setCode(ResponseCode.SERVER_ERROR); |
||||
|
response.setMsg("service error"); |
||||
|
} |
||||
|
return response; |
||||
|
} |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,96 @@ |
|||||
|
package com.dongjian.dashboard.back.dao.auto; |
||||
|
|
||||
|
import com.dongjian.dashboard.back.model.BaStatusHistory; |
||||
|
import com.dongjian.dashboard.back.model.BaStatusHistoryExample; |
||||
|
import java.util.List; |
||||
|
import org.apache.ibatis.annotations.Param; |
||||
|
|
||||
|
public interface BaStatusHistoryMapper { |
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method corresponds to the database table ba_status_history |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
long countByExample(BaStatusHistoryExample example); |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method corresponds to the database table ba_status_history |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
int deleteByExample(BaStatusHistoryExample example); |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method corresponds to the database table ba_status_history |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
int deleteByPrimaryKey(Long id); |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method corresponds to the database table ba_status_history |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
int insert(BaStatusHistory record); |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method corresponds to the database table ba_status_history |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
int insertSelective(BaStatusHistory record); |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method corresponds to the database table ba_status_history |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
List<BaStatusHistory> selectByExample(BaStatusHistoryExample example); |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method corresponds to the database table ba_status_history |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
BaStatusHistory selectByPrimaryKey(Long id); |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method corresponds to the database table ba_status_history |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
int updateByExampleSelective(@Param("record") BaStatusHistory record, @Param("example") BaStatusHistoryExample example); |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method corresponds to the database table ba_status_history |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
int updateByExample(@Param("record") BaStatusHistory record, @Param("example") BaStatusHistoryExample example); |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method corresponds to the database table ba_status_history |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
int updateByPrimaryKeySelective(BaStatusHistory record); |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method corresponds to the database table ba_status_history |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
int updateByPrimaryKey(BaStatusHistory record); |
||||
|
} |
||||
@ -0,0 +1,96 @@ |
|||||
|
package com.dongjian.dashboard.back.dao.auto; |
||||
|
|
||||
|
import com.dongjian.dashboard.back.model.DashboardNotificationCategory; |
||||
|
import com.dongjian.dashboard.back.model.DashboardNotificationCategoryExample; |
||||
|
import java.util.List; |
||||
|
import org.apache.ibatis.annotations.Param; |
||||
|
|
||||
|
public interface DashboardNotificationCategoryMapper { |
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method corresponds to the database table dashboard_notification_category |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
long countByExample(DashboardNotificationCategoryExample example); |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method corresponds to the database table dashboard_notification_category |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
int deleteByExample(DashboardNotificationCategoryExample example); |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method corresponds to the database table dashboard_notification_category |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
int deleteByPrimaryKey(Long id); |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method corresponds to the database table dashboard_notification_category |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
int insert(DashboardNotificationCategory record); |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method corresponds to the database table dashboard_notification_category |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
int insertSelective(DashboardNotificationCategory record); |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method corresponds to the database table dashboard_notification_category |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
List<DashboardNotificationCategory> selectByExample(DashboardNotificationCategoryExample example); |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method corresponds to the database table dashboard_notification_category |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
DashboardNotificationCategory selectByPrimaryKey(Long id); |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method corresponds to the database table dashboard_notification_category |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
int updateByExampleSelective(@Param("record") DashboardNotificationCategory record, @Param("example") DashboardNotificationCategoryExample example); |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method corresponds to the database table dashboard_notification_category |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
int updateByExample(@Param("record") DashboardNotificationCategory record, @Param("example") DashboardNotificationCategoryExample example); |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method corresponds to the database table dashboard_notification_category |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
int updateByPrimaryKeySelective(DashboardNotificationCategory record); |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method corresponds to the database table dashboard_notification_category |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
int updateByPrimaryKey(DashboardNotificationCategory record); |
||||
|
} |
||||
@ -0,0 +1,9 @@ |
|||||
|
package com.dongjian.dashboard.back.dao.ex; |
||||
|
|
||||
|
import com.dongjian.dashboard.back.dao.auto.BaStatusHistoryMapper; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
|
||||
|
@Mapper |
||||
|
public interface BaStatusHistoryMapperExt extends BaStatusHistoryMapper { |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,17 @@ |
|||||
|
package com.dongjian.dashboard.back.dao.ex; |
||||
|
|
||||
|
import com.dongjian.dashboard.back.dao.auto.DashboardNotificationCategoryMapper; |
||||
|
import com.dongjian.dashboard.back.dto.dashboardnotification.DashboardNotificationCategorySearchParams; |
||||
|
import com.dongjian.dashboard.back.dto.dashboardnotification.OptDashboardNotificationCategoryParams; |
||||
|
import com.dongjian.dashboard.back.vo.dashboardnotification.DashboardNotificationCategoryPageVO; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
@Mapper |
||||
|
public interface DashboardNotificationCategoryMapperExt extends DashboardNotificationCategoryMapper { |
||||
|
|
||||
|
int checkExist(OptDashboardNotificationCategoryParams optDashboardNotificationCategoryParams); |
||||
|
|
||||
|
List<DashboardNotificationCategoryPageVO> getListPage(DashboardNotificationCategorySearchParams pageSearchParam); |
||||
|
} |
||||
@ -0,0 +1,19 @@ |
|||||
|
package com.dongjian.dashboard.back.dao.ex; |
||||
|
|
||||
|
import com.dongjian.dashboard.back.vo.data.OverviewCategoryVO; |
||||
|
import com.dongjian.dashboard.back.vo.data.OverviewInfo; |
||||
|
import com.dongjian.dashboard.back.vo.data.OverviewVO; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
@Mapper |
||||
|
public interface OverviewInfoMapperExt { |
||||
|
|
||||
|
List<OverviewInfo> getOverviewInfo(Map<String, Object> paramMap); |
||||
|
|
||||
|
List<OverviewVO> getBuildingInfo(Map<String, Object> buildingMap); |
||||
|
|
||||
|
List<OverviewCategoryVO> getExistingCategoryList(Map<String, Object> allCategoryParamMap); |
||||
|
} |
||||
@ -0,0 +1,257 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
|
<mapper namespace="com.dongjian.dashboard.back.dao.auto.BaStatusHistoryMapper"> |
||||
|
<resultMap id="BaseResultMap" type="com.dongjian.dashboard.back.model.BaStatusHistory"> |
||||
|
<!-- |
||||
|
WARNING - @mbg.generated |
||||
|
This element is automatically generated by MyBatis Generator, do not modify. |
||||
|
--> |
||||
|
<id column="id" jdbcType="BIGINT" property="id" /> |
||||
|
<result column="device_info_id" jdbcType="INTEGER" property="deviceInfoId" /> |
||||
|
<result column="is_running" jdbcType="INTEGER" property="isRunning" /> |
||||
|
<result column="update_ts" jdbcType="VARCHAR" property="updateTs" /> |
||||
|
</resultMap> |
||||
|
<sql id="Example_Where_Clause"> |
||||
|
<!-- |
||||
|
WARNING - @mbg.generated |
||||
|
This element is automatically generated by MyBatis Generator, do not modify. |
||||
|
--> |
||||
|
<where> |
||||
|
<foreach collection="oredCriteria" item="criteria" separator="or"> |
||||
|
<if test="criteria.valid"> |
||||
|
<trim prefix="(" prefixOverrides="and" suffix=")"> |
||||
|
<foreach collection="criteria.criteria" item="criterion"> |
||||
|
<choose> |
||||
|
<when test="criterion.noValue"> |
||||
|
and ${criterion.condition} |
||||
|
</when> |
||||
|
<when test="criterion.singleValue"> |
||||
|
and ${criterion.condition} #{criterion.value} |
||||
|
</when> |
||||
|
<when test="criterion.betweenValue"> |
||||
|
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} |
||||
|
</when> |
||||
|
<when test="criterion.listValue"> |
||||
|
and ${criterion.condition} |
||||
|
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> |
||||
|
#{listItem} |
||||
|
</foreach> |
||||
|
</when> |
||||
|
</choose> |
||||
|
</foreach> |
||||
|
</trim> |
||||
|
</if> |
||||
|
</foreach> |
||||
|
</where> |
||||
|
</sql> |
||||
|
<sql id="Update_By_Example_Where_Clause"> |
||||
|
<!-- |
||||
|
WARNING - @mbg.generated |
||||
|
This element is automatically generated by MyBatis Generator, do not modify. |
||||
|
--> |
||||
|
<where> |
||||
|
<foreach collection="example.oredCriteria" item="criteria" separator="or"> |
||||
|
<if test="criteria.valid"> |
||||
|
<trim prefix="(" prefixOverrides="and" suffix=")"> |
||||
|
<foreach collection="criteria.criteria" item="criterion"> |
||||
|
<choose> |
||||
|
<when test="criterion.noValue"> |
||||
|
and ${criterion.condition} |
||||
|
</when> |
||||
|
<when test="criterion.singleValue"> |
||||
|
and ${criterion.condition} #{criterion.value} |
||||
|
</when> |
||||
|
<when test="criterion.betweenValue"> |
||||
|
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} |
||||
|
</when> |
||||
|
<when test="criterion.listValue"> |
||||
|
and ${criterion.condition} |
||||
|
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> |
||||
|
#{listItem} |
||||
|
</foreach> |
||||
|
</when> |
||||
|
</choose> |
||||
|
</foreach> |
||||
|
</trim> |
||||
|
</if> |
||||
|
</foreach> |
||||
|
</where> |
||||
|
</sql> |
||||
|
<sql id="Base_Column_List"> |
||||
|
<!-- |
||||
|
WARNING - @mbg.generated |
||||
|
This element is automatically generated by MyBatis Generator, do not modify. |
||||
|
--> |
||||
|
id, device_info_id, is_running, update_ts |
||||
|
</sql> |
||||
|
<select id="selectByExample" parameterType="com.dongjian.dashboard.back.model.BaStatusHistoryExample" resultMap="BaseResultMap"> |
||||
|
<!-- |
||||
|
WARNING - @mbg.generated |
||||
|
This element is automatically generated by MyBatis Generator, do not modify. |
||||
|
--> |
||||
|
select |
||||
|
<if test="distinct"> |
||||
|
distinct |
||||
|
</if> |
||||
|
'true' as QUERYID, |
||||
|
<include refid="Base_Column_List" /> |
||||
|
from ba_status_history |
||||
|
<if test="_parameter != null"> |
||||
|
<include refid="Example_Where_Clause" /> |
||||
|
</if> |
||||
|
<if test="orderByClause != null"> |
||||
|
order by ${orderByClause} |
||||
|
</if> |
||||
|
</select> |
||||
|
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
||||
|
<!-- |
||||
|
WARNING - @mbg.generated |
||||
|
This element is automatically generated by MyBatis Generator, do not modify. |
||||
|
--> |
||||
|
select |
||||
|
<include refid="Base_Column_List" /> |
||||
|
from ba_status_history |
||||
|
where id = #{id,jdbcType=BIGINT} |
||||
|
</select> |
||||
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
||||
|
<!-- |
||||
|
WARNING - @mbg.generated |
||||
|
This element is automatically generated by MyBatis Generator, do not modify. |
||||
|
--> |
||||
|
delete from ba_status_history |
||||
|
where id = #{id,jdbcType=BIGINT} |
||||
|
</delete> |
||||
|
<delete id="deleteByExample" parameterType="com.dongjian.dashboard.back.model.BaStatusHistoryExample"> |
||||
|
<!-- |
||||
|
WARNING - @mbg.generated |
||||
|
This element is automatically generated by MyBatis Generator, do not modify. |
||||
|
--> |
||||
|
delete from ba_status_history |
||||
|
<if test="_parameter != null"> |
||||
|
<include refid="Example_Where_Clause" /> |
||||
|
</if> |
||||
|
</delete> |
||||
|
<insert id="insert" parameterType="com.dongjian.dashboard.back.model.BaStatusHistory"> |
||||
|
<!-- |
||||
|
WARNING - @mbg.generated |
||||
|
This element is automatically generated by MyBatis Generator, do not modify. |
||||
|
--> |
||||
|
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long"> |
||||
|
SELECT LAST_INSERT_ID() |
||||
|
</selectKey> |
||||
|
insert into ba_status_history (device_info_id, is_running, update_ts |
||||
|
) |
||||
|
values (#{deviceInfoId,jdbcType=INTEGER}, #{isRunning,jdbcType=INTEGER}, #{updateTs,jdbcType=VARCHAR} |
||||
|
) |
||||
|
</insert> |
||||
|
<insert id="insertSelective" parameterType="com.dongjian.dashboard.back.model.BaStatusHistory"> |
||||
|
<!-- |
||||
|
WARNING - @mbg.generated |
||||
|
This element is automatically generated by MyBatis Generator, do not modify. |
||||
|
--> |
||||
|
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long"> |
||||
|
SELECT LAST_INSERT_ID() |
||||
|
</selectKey> |
||||
|
insert into ba_status_history |
||||
|
<trim prefix="(" suffix=")" suffixOverrides=","> |
||||
|
<if test="deviceInfoId != null"> |
||||
|
device_info_id, |
||||
|
</if> |
||||
|
<if test="isRunning != null"> |
||||
|
is_running, |
||||
|
</if> |
||||
|
<if test="updateTs != null"> |
||||
|
update_ts, |
||||
|
</if> |
||||
|
</trim> |
||||
|
<trim prefix="values (" suffix=")" suffixOverrides=","> |
||||
|
<if test="deviceInfoId != null"> |
||||
|
#{deviceInfoId,jdbcType=INTEGER}, |
||||
|
</if> |
||||
|
<if test="isRunning != null"> |
||||
|
#{isRunning,jdbcType=INTEGER}, |
||||
|
</if> |
||||
|
<if test="updateTs != null"> |
||||
|
#{updateTs,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
</trim> |
||||
|
</insert> |
||||
|
<select id="countByExample" parameterType="com.dongjian.dashboard.back.model.BaStatusHistoryExample" resultType="java.lang.Long"> |
||||
|
<!-- |
||||
|
WARNING - @mbg.generated |
||||
|
This element is automatically generated by MyBatis Generator, do not modify. |
||||
|
--> |
||||
|
select count(*) from ba_status_history |
||||
|
<if test="_parameter != null"> |
||||
|
<include refid="Example_Where_Clause" /> |
||||
|
</if> |
||||
|
</select> |
||||
|
<update id="updateByExampleSelective" parameterType="map"> |
||||
|
<!-- |
||||
|
WARNING - @mbg.generated |
||||
|
This element is automatically generated by MyBatis Generator, do not modify. |
||||
|
--> |
||||
|
update ba_status_history |
||||
|
<set> |
||||
|
<if test="record.id != null"> |
||||
|
id = #{record.id,jdbcType=BIGINT}, |
||||
|
</if> |
||||
|
<if test="record.deviceInfoId != null"> |
||||
|
device_info_id = #{record.deviceInfoId,jdbcType=INTEGER}, |
||||
|
</if> |
||||
|
<if test="record.isRunning != null"> |
||||
|
is_running = #{record.isRunning,jdbcType=INTEGER}, |
||||
|
</if> |
||||
|
<if test="record.updateTs != null"> |
||||
|
update_ts = #{record.updateTs,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
</set> |
||||
|
<if test="_parameter != null"> |
||||
|
<include refid="Update_By_Example_Where_Clause" /> |
||||
|
</if> |
||||
|
</update> |
||||
|
<update id="updateByExample" parameterType="map"> |
||||
|
<!-- |
||||
|
WARNING - @mbg.generated |
||||
|
This element is automatically generated by MyBatis Generator, do not modify. |
||||
|
--> |
||||
|
update ba_status_history |
||||
|
set id = #{record.id,jdbcType=BIGINT}, |
||||
|
device_info_id = #{record.deviceInfoId,jdbcType=INTEGER}, |
||||
|
is_running = #{record.isRunning,jdbcType=INTEGER}, |
||||
|
update_ts = #{record.updateTs,jdbcType=VARCHAR} |
||||
|
<if test="_parameter != null"> |
||||
|
<include refid="Update_By_Example_Where_Clause" /> |
||||
|
</if> |
||||
|
</update> |
||||
|
<update id="updateByPrimaryKeySelective" parameterType="com.dongjian.dashboard.back.model.BaStatusHistory"> |
||||
|
<!-- |
||||
|
WARNING - @mbg.generated |
||||
|
This element is automatically generated by MyBatis Generator, do not modify. |
||||
|
--> |
||||
|
update ba_status_history |
||||
|
<set> |
||||
|
<if test="deviceInfoId != null"> |
||||
|
device_info_id = #{deviceInfoId,jdbcType=INTEGER}, |
||||
|
</if> |
||||
|
<if test="isRunning != null"> |
||||
|
is_running = #{isRunning,jdbcType=INTEGER}, |
||||
|
</if> |
||||
|
<if test="updateTs != null"> |
||||
|
update_ts = #{updateTs,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
</set> |
||||
|
where id = #{id,jdbcType=BIGINT} |
||||
|
</update> |
||||
|
<update id="updateByPrimaryKey" parameterType="com.dongjian.dashboard.back.model.BaStatusHistory"> |
||||
|
<!-- |
||||
|
WARNING - @mbg.generated |
||||
|
This element is automatically generated by MyBatis Generator, do not modify. |
||||
|
--> |
||||
|
update ba_status_history |
||||
|
set device_info_id = #{deviceInfoId,jdbcType=INTEGER}, |
||||
|
is_running = #{isRunning,jdbcType=INTEGER}, |
||||
|
update_ts = #{updateTs,jdbcType=VARCHAR} |
||||
|
where id = #{id,jdbcType=BIGINT} |
||||
|
</update> |
||||
|
</mapper> |
||||
@ -0,0 +1,334 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
|
<mapper namespace="com.dongjian.dashboard.back.dao.auto.DashboardNotificationCategoryMapper"> |
||||
|
<resultMap id="BaseResultMap" type="com.dongjian.dashboard.back.model.DashboardNotificationCategory"> |
||||
|
<!-- |
||||
|
WARNING - @mbg.generated |
||||
|
This element is automatically generated by MyBatis Generator, do not modify. |
||||
|
--> |
||||
|
<id column="id" jdbcType="BIGINT" property="id" /> |
||||
|
<result column="company_id" jdbcType="BIGINT" property="companyId" /> |
||||
|
<result column="name" jdbcType="VARCHAR" property="name" /> |
||||
|
<result column="remark" jdbcType="VARCHAR" property="remark" /> |
||||
|
<result column="flag" jdbcType="INTEGER" property="flag" /> |
||||
|
<result column="created_by" jdbcType="BIGINT" property="createdBy" /> |
||||
|
<result column="created_at" jdbcType="BIGINT" property="createdAt" /> |
||||
|
<result column="updated_at" jdbcType="BIGINT" property="updatedAt" /> |
||||
|
<result column="updated_by" jdbcType="BIGINT" property="updatedBy" /> |
||||
|
</resultMap> |
||||
|
<sql id="Example_Where_Clause"> |
||||
|
<!-- |
||||
|
WARNING - @mbg.generated |
||||
|
This element is automatically generated by MyBatis Generator, do not modify. |
||||
|
--> |
||||
|
<where> |
||||
|
<foreach collection="oredCriteria" item="criteria" separator="or"> |
||||
|
<if test="criteria.valid"> |
||||
|
<trim prefix="(" prefixOverrides="and" suffix=")"> |
||||
|
<foreach collection="criteria.criteria" item="criterion"> |
||||
|
<choose> |
||||
|
<when test="criterion.noValue"> |
||||
|
and ${criterion.condition} |
||||
|
</when> |
||||
|
<when test="criterion.singleValue"> |
||||
|
and ${criterion.condition} #{criterion.value} |
||||
|
</when> |
||||
|
<when test="criterion.betweenValue"> |
||||
|
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} |
||||
|
</when> |
||||
|
<when test="criterion.listValue"> |
||||
|
and ${criterion.condition} |
||||
|
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> |
||||
|
#{listItem} |
||||
|
</foreach> |
||||
|
</when> |
||||
|
</choose> |
||||
|
</foreach> |
||||
|
</trim> |
||||
|
</if> |
||||
|
</foreach> |
||||
|
</where> |
||||
|
</sql> |
||||
|
<sql id="Update_By_Example_Where_Clause"> |
||||
|
<!-- |
||||
|
WARNING - @mbg.generated |
||||
|
This element is automatically generated by MyBatis Generator, do not modify. |
||||
|
--> |
||||
|
<where> |
||||
|
<foreach collection="example.oredCriteria" item="criteria" separator="or"> |
||||
|
<if test="criteria.valid"> |
||||
|
<trim prefix="(" prefixOverrides="and" suffix=")"> |
||||
|
<foreach collection="criteria.criteria" item="criterion"> |
||||
|
<choose> |
||||
|
<when test="criterion.noValue"> |
||||
|
and ${criterion.condition} |
||||
|
</when> |
||||
|
<when test="criterion.singleValue"> |
||||
|
and ${criterion.condition} #{criterion.value} |
||||
|
</when> |
||||
|
<when test="criterion.betweenValue"> |
||||
|
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} |
||||
|
</when> |
||||
|
<when test="criterion.listValue"> |
||||
|
and ${criterion.condition} |
||||
|
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> |
||||
|
#{listItem} |
||||
|
</foreach> |
||||
|
</when> |
||||
|
</choose> |
||||
|
</foreach> |
||||
|
</trim> |
||||
|
</if> |
||||
|
</foreach> |
||||
|
</where> |
||||
|
</sql> |
||||
|
<sql id="Base_Column_List"> |
||||
|
<!-- |
||||
|
WARNING - @mbg.generated |
||||
|
This element is automatically generated by MyBatis Generator, do not modify. |
||||
|
--> |
||||
|
id, company_id, `name`, remark, flag, created_by, created_at, updated_at, updated_by |
||||
|
</sql> |
||||
|
<select id="selectByExample" parameterType="com.dongjian.dashboard.back.model.DashboardNotificationCategoryExample" resultMap="BaseResultMap"> |
||||
|
<!-- |
||||
|
WARNING - @mbg.generated |
||||
|
This element is automatically generated by MyBatis Generator, do not modify. |
||||
|
--> |
||||
|
select |
||||
|
<if test="distinct"> |
||||
|
distinct |
||||
|
</if> |
||||
|
'true' as QUERYID, |
||||
|
<include refid="Base_Column_List" /> |
||||
|
from dashboard_notification_category |
||||
|
<if test="_parameter != null"> |
||||
|
<include refid="Example_Where_Clause" /> |
||||
|
</if> |
||||
|
<if test="orderByClause != null"> |
||||
|
order by ${orderByClause} |
||||
|
</if> |
||||
|
</select> |
||||
|
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
||||
|
<!-- |
||||
|
WARNING - @mbg.generated |
||||
|
This element is automatically generated by MyBatis Generator, do not modify. |
||||
|
--> |
||||
|
select |
||||
|
<include refid="Base_Column_List" /> |
||||
|
from dashboard_notification_category |
||||
|
where id = #{id,jdbcType=BIGINT} |
||||
|
</select> |
||||
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
||||
|
<!-- |
||||
|
WARNING - @mbg.generated |
||||
|
This element is automatically generated by MyBatis Generator, do not modify. |
||||
|
--> |
||||
|
delete from dashboard_notification_category |
||||
|
where id = #{id,jdbcType=BIGINT} |
||||
|
</delete> |
||||
|
<delete id="deleteByExample" parameterType="com.dongjian.dashboard.back.model.DashboardNotificationCategoryExample"> |
||||
|
<!-- |
||||
|
WARNING - @mbg.generated |
||||
|
This element is automatically generated by MyBatis Generator, do not modify. |
||||
|
--> |
||||
|
delete from dashboard_notification_category |
||||
|
<if test="_parameter != null"> |
||||
|
<include refid="Example_Where_Clause" /> |
||||
|
</if> |
||||
|
</delete> |
||||
|
<insert id="insert" parameterType="com.dongjian.dashboard.back.model.DashboardNotificationCategory"> |
||||
|
<!-- |
||||
|
WARNING - @mbg.generated |
||||
|
This element is automatically generated by MyBatis Generator, do not modify. |
||||
|
--> |
||||
|
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long"> |
||||
|
SELECT LAST_INSERT_ID() |
||||
|
</selectKey> |
||||
|
insert into dashboard_notification_category (company_id, `name`, remark, |
||||
|
flag, created_by, created_at, |
||||
|
updated_at, updated_by) |
||||
|
values (#{companyId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, |
||||
|
#{flag,jdbcType=INTEGER}, #{createdBy,jdbcType=BIGINT}, #{createdAt,jdbcType=BIGINT}, |
||||
|
#{updatedAt,jdbcType=BIGINT}, #{updatedBy,jdbcType=BIGINT}) |
||||
|
</insert> |
||||
|
<insert id="insertSelective" parameterType="com.dongjian.dashboard.back.model.DashboardNotificationCategory"> |
||||
|
<!-- |
||||
|
WARNING - @mbg.generated |
||||
|
This element is automatically generated by MyBatis Generator, do not modify. |
||||
|
--> |
||||
|
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long"> |
||||
|
SELECT LAST_INSERT_ID() |
||||
|
</selectKey> |
||||
|
insert into dashboard_notification_category |
||||
|
<trim prefix="(" suffix=")" suffixOverrides=","> |
||||
|
<if test="companyId != null"> |
||||
|
company_id, |
||||
|
</if> |
||||
|
<if test="name != null"> |
||||
|
`name`, |
||||
|
</if> |
||||
|
<if test="remark != null"> |
||||
|
remark, |
||||
|
</if> |
||||
|
<if test="flag != null"> |
||||
|
flag, |
||||
|
</if> |
||||
|
<if test="createdBy != null"> |
||||
|
created_by, |
||||
|
</if> |
||||
|
<if test="createdAt != null"> |
||||
|
created_at, |
||||
|
</if> |
||||
|
<if test="updatedAt != null"> |
||||
|
updated_at, |
||||
|
</if> |
||||
|
<if test="updatedBy != null"> |
||||
|
updated_by, |
||||
|
</if> |
||||
|
</trim> |
||||
|
<trim prefix="values (" suffix=")" suffixOverrides=","> |
||||
|
<if test="companyId != null"> |
||||
|
#{companyId,jdbcType=BIGINT}, |
||||
|
</if> |
||||
|
<if test="name != null"> |
||||
|
#{name,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="remark != null"> |
||||
|
#{remark,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="flag != null"> |
||||
|
#{flag,jdbcType=INTEGER}, |
||||
|
</if> |
||||
|
<if test="createdBy != null"> |
||||
|
#{createdBy,jdbcType=BIGINT}, |
||||
|
</if> |
||||
|
<if test="createdAt != null"> |
||||
|
#{createdAt,jdbcType=BIGINT}, |
||||
|
</if> |
||||
|
<if test="updatedAt != null"> |
||||
|
#{updatedAt,jdbcType=BIGINT}, |
||||
|
</if> |
||||
|
<if test="updatedBy != null"> |
||||
|
#{updatedBy,jdbcType=BIGINT}, |
||||
|
</if> |
||||
|
</trim> |
||||
|
</insert> |
||||
|
<select id="countByExample" parameterType="com.dongjian.dashboard.back.model.DashboardNotificationCategoryExample" resultType="java.lang.Long"> |
||||
|
<!-- |
||||
|
WARNING - @mbg.generated |
||||
|
This element is automatically generated by MyBatis Generator, do not modify. |
||||
|
--> |
||||
|
select count(*) from dashboard_notification_category |
||||
|
<if test="_parameter != null"> |
||||
|
<include refid="Example_Where_Clause" /> |
||||
|
</if> |
||||
|
</select> |
||||
|
<update id="updateByExampleSelective" parameterType="map"> |
||||
|
<!-- |
||||
|
WARNING - @mbg.generated |
||||
|
This element is automatically generated by MyBatis Generator, do not modify. |
||||
|
--> |
||||
|
update dashboard_notification_category |
||||
|
<set> |
||||
|
<if test="record.id != null"> |
||||
|
id = #{record.id,jdbcType=BIGINT}, |
||||
|
</if> |
||||
|
<if test="record.companyId != null"> |
||||
|
company_id = #{record.companyId,jdbcType=BIGINT}, |
||||
|
</if> |
||||
|
<if test="record.name != null"> |
||||
|
`name` = #{record.name,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="record.remark != null"> |
||||
|
remark = #{record.remark,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="record.flag != null"> |
||||
|
flag = #{record.flag,jdbcType=INTEGER}, |
||||
|
</if> |
||||
|
<if test="record.createdBy != null"> |
||||
|
created_by = #{record.createdBy,jdbcType=BIGINT}, |
||||
|
</if> |
||||
|
<if test="record.createdAt != null"> |
||||
|
created_at = #{record.createdAt,jdbcType=BIGINT}, |
||||
|
</if> |
||||
|
<if test="record.updatedAt != null"> |
||||
|
updated_at = #{record.updatedAt,jdbcType=BIGINT}, |
||||
|
</if> |
||||
|
<if test="record.updatedBy != null"> |
||||
|
updated_by = #{record.updatedBy,jdbcType=BIGINT}, |
||||
|
</if> |
||||
|
</set> |
||||
|
<if test="_parameter != null"> |
||||
|
<include refid="Update_By_Example_Where_Clause" /> |
||||
|
</if> |
||||
|
</update> |
||||
|
<update id="updateByExample" parameterType="map"> |
||||
|
<!-- |
||||
|
WARNING - @mbg.generated |
||||
|
This element is automatically generated by MyBatis Generator, do not modify. |
||||
|
--> |
||||
|
update dashboard_notification_category |
||||
|
set id = #{record.id,jdbcType=BIGINT}, |
||||
|
company_id = #{record.companyId,jdbcType=BIGINT}, |
||||
|
`name` = #{record.name,jdbcType=VARCHAR}, |
||||
|
remark = #{record.remark,jdbcType=VARCHAR}, |
||||
|
flag = #{record.flag,jdbcType=INTEGER}, |
||||
|
created_by = #{record.createdBy,jdbcType=BIGINT}, |
||||
|
created_at = #{record.createdAt,jdbcType=BIGINT}, |
||||
|
updated_at = #{record.updatedAt,jdbcType=BIGINT}, |
||||
|
updated_by = #{record.updatedBy,jdbcType=BIGINT} |
||||
|
<if test="_parameter != null"> |
||||
|
<include refid="Update_By_Example_Where_Clause" /> |
||||
|
</if> |
||||
|
</update> |
||||
|
<update id="updateByPrimaryKeySelective" parameterType="com.dongjian.dashboard.back.model.DashboardNotificationCategory"> |
||||
|
<!-- |
||||
|
WARNING - @mbg.generated |
||||
|
This element is automatically generated by MyBatis Generator, do not modify. |
||||
|
--> |
||||
|
update dashboard_notification_category |
||||
|
<set> |
||||
|
<if test="companyId != null"> |
||||
|
company_id = #{companyId,jdbcType=BIGINT}, |
||||
|
</if> |
||||
|
<if test="name != null"> |
||||
|
`name` = #{name,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="remark != null"> |
||||
|
remark = #{remark,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="flag != null"> |
||||
|
flag = #{flag,jdbcType=INTEGER}, |
||||
|
</if> |
||||
|
<if test="createdBy != null"> |
||||
|
created_by = #{createdBy,jdbcType=BIGINT}, |
||||
|
</if> |
||||
|
<if test="createdAt != null"> |
||||
|
created_at = #{createdAt,jdbcType=BIGINT}, |
||||
|
</if> |
||||
|
<if test="updatedAt != null"> |
||||
|
updated_at = #{updatedAt,jdbcType=BIGINT}, |
||||
|
</if> |
||||
|
<if test="updatedBy != null"> |
||||
|
updated_by = #{updatedBy,jdbcType=BIGINT}, |
||||
|
</if> |
||||
|
</set> |
||||
|
where id = #{id,jdbcType=BIGINT} |
||||
|
</update> |
||||
|
<update id="updateByPrimaryKey" parameterType="com.dongjian.dashboard.back.model.DashboardNotificationCategory"> |
||||
|
<!-- |
||||
|
WARNING - @mbg.generated |
||||
|
This element is automatically generated by MyBatis Generator, do not modify. |
||||
|
--> |
||||
|
update dashboard_notification_category |
||||
|
set company_id = #{companyId,jdbcType=BIGINT}, |
||||
|
`name` = #{name,jdbcType=VARCHAR}, |
||||
|
remark = #{remark,jdbcType=VARCHAR}, |
||||
|
flag = #{flag,jdbcType=INTEGER}, |
||||
|
created_by = #{createdBy,jdbcType=BIGINT}, |
||||
|
created_at = #{createdAt,jdbcType=BIGINT}, |
||||
|
updated_at = #{updatedAt,jdbcType=BIGINT}, |
||||
|
updated_by = #{updatedBy,jdbcType=BIGINT} |
||||
|
where id = #{id,jdbcType=BIGINT} |
||||
|
</update> |
||||
|
</mapper> |
||||
@ -0,0 +1,43 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
|
<mapper namespace="com.dongjian.dashboard.back.dao.ex.DashboardNotificationCategoryMapperExt"> |
||||
|
|
||||
|
|
||||
|
<select id="checkExist" resultType="java.lang.Integer"> |
||||
|
SELECT |
||||
|
COUNT(1) |
||||
|
FROM |
||||
|
dashboard_notification_category |
||||
|
WHERE |
||||
|
flag != 1 AND name = #{name} |
||||
|
<if test="companyId != null"> |
||||
|
AND company_id = #{companyId} |
||||
|
</if> |
||||
|
<if test="categoryId != null"> |
||||
|
AND id != #{categoryId} |
||||
|
</if> |
||||
|
</select> |
||||
|
|
||||
|
|
||||
|
<select id="getListPage" resultType="com.dongjian.dashboard.back.vo.dashboardnotification.DashboardNotificationCategoryPageVO"> |
||||
|
SELECT |
||||
|
dn.id categoryId, |
||||
|
dn.company_id, |
||||
|
dn.`name`, |
||||
|
dn.remark, |
||||
|
dn.created_at |
||||
|
FROM |
||||
|
dashboard_notification_category dn |
||||
|
WHERE |
||||
|
dn.flag != 1 |
||||
|
AND dn.company_id IN <foreach collection="companyIdList" item="item" open="(" separator="," close=")">#{item}</foreach> |
||||
|
<if test="categoryIdList != null"> |
||||
|
AND dn.id IN <foreach collection="categoryIdList" item="item" open="(" separator="," close=")">#{item}</foreach> |
||||
|
</if> |
||||
|
<if test="name != null and name != ''"> |
||||
|
AND dn.name LIKE CONCAT('%',#{name},'%') |
||||
|
</if> |
||||
|
ORDER BY dn.id DESC |
||||
|
</select> |
||||
|
|
||||
|
</mapper> |
||||
@ -0,0 +1,78 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
|
<mapper namespace="com.dongjian.dashboard.back.dao.ex.OverviewInfoMapperExt"> |
||||
|
|
||||
|
|
||||
|
<select id="getOverviewInfo" resultType="com.dongjian.dashboard.back.vo.data.OverviewInfo"> |
||||
|
SELECT |
||||
|
bbuilding.building_id, |
||||
|
bbuilding.name AS buildingName, |
||||
|
ah.device_id, |
||||
|
ah.receive_ts, |
||||
|
basic_asset_class_big.id AS monitoringPointCategoryId, |
||||
|
basic_asset_class_big.class_name AS monitoringPointCategoryName |
||||
|
FROM |
||||
|
basic_building bbuilding |
||||
|
INNER JOIN basic_floor on basic_floor.building_id = bbuilding.building_id |
||||
|
INNER JOIN basic_space on basic_space.floor_id = basic_floor.floor_id |
||||
|
INNER JOIN basic_monitoring_asset on basic_monitoring_asset.space_id = basic_space.space_id |
||||
|
INNER JOIN device_info dinfo ON dinfo.asset_id = basic_monitoring_asset.equipment_id |
||||
|
INNER JOIN alert_history ah ON dinfo.device_id = ah.device_id |
||||
|
LEFT JOIN basic_asset_class_big on basic_asset_class_big.id = basic_monitoring_asset.class_big_id |
||||
|
LEFT JOIN type ty ON dinfo.type_id = ty.id AND ty.flag = 0 |
||||
|
AND ty.device_category_id in |
||||
|
<foreach collection="categoryIdList" item="categoryId" open="(" separator="," close=")"> |
||||
|
#{categoryId} |
||||
|
</foreach> |
||||
|
WHERE |
||||
|
bbuilding.company_id = #{companyId} AND bbuilding.flag = 0 AND basic_floor.flag = 0 AND basic_space.flag = 0 |
||||
|
AND basic_monitoring_asset.flag = 0 AND dinfo.flag = 0 |
||||
|
AND ah.confirm_status = 0 AND ah.handle_status = 1 |
||||
|
</select> |
||||
|
|
||||
|
<select id="getBuildingInfo" resultType="com.dongjian.dashboard.back.vo.data.OverviewVO"> |
||||
|
SELECT |
||||
|
bbuilding.building_id, |
||||
|
bbuilding.name buildingName, |
||||
|
bbuilding.retain_alert, |
||||
|
bbuilding.latitude, |
||||
|
bbuilding.longitude, |
||||
|
bbuilding.picture_introduction, |
||||
|
bbuilding.udf_building_id |
||||
|
FROM |
||||
|
basic_building bbuilding |
||||
|
WHERE |
||||
|
bbuilding.flag != 1 |
||||
|
AND bbuilding.company_id = #{companyId} |
||||
|
<if test="bindBuildingIdList != null"> |
||||
|
AND bbuilding.building_id IN <foreach collection="bindBuildingIdList" item="item" open="(" separator="," close=")">#{item}</foreach> |
||||
|
</if> |
||||
|
order by bbuilding.building_id desc |
||||
|
</select> |
||||
|
|
||||
|
<select id="getExistingCategoryList" resultType="com.dongjian.dashboard.back.vo.data.OverviewCategoryVO"> |
||||
|
SELECT |
||||
|
bbuilding.building_id, |
||||
|
bbuilding.name AS buildingName, |
||||
|
dinfo.device_id, |
||||
|
basic_asset_class_big.id AS monitoringPointCategoryId, |
||||
|
basic_asset_class_big.class_name AS monitoringPointCategoryName |
||||
|
FROM |
||||
|
basic_building bbuilding |
||||
|
INNER JOIN basic_floor on basic_floor.building_id = bbuilding.building_id |
||||
|
INNER JOIN basic_space on basic_space.floor_id = basic_floor.floor_id |
||||
|
INNER JOIN basic_monitoring_asset on basic_monitoring_asset.space_id = basic_space.space_id |
||||
|
INNER JOIN device_info dinfo ON dinfo.asset_id = basic_monitoring_asset.equipment_id |
||||
|
LEFT JOIN basic_asset_class_big on basic_asset_class_big.id = basic_monitoring_asset.class_big_id |
||||
|
LEFT JOIN type ty ON dinfo.type_id = ty.id AND ty.flag = 0 |
||||
|
AND ty.device_category_id in |
||||
|
<foreach collection="categoryIdList" item="categoryId" open="(" separator="," close=")"> |
||||
|
#{categoryId} |
||||
|
</foreach> |
||||
|
WHERE |
||||
|
bbuilding.company_id = #{companyId} AND bbuilding.flag = 0 AND basic_floor.flag = 0 AND basic_space.flag = 0 |
||||
|
AND basic_monitoring_asset.flag = 0 AND dinfo.flag = 0 AND basic_asset_class_big.flag = 0 |
||||
|
|
||||
|
</select> |
||||
|
|
||||
|
</mapper> |
||||
@ -0,0 +1,9 @@ |
|||||
|
package com.dongjian.dashboard.back.bo; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
@Data |
||||
|
public class LatestValueBO { |
||||
|
private Long updateTs; |
||||
|
private Integer value; |
||||
|
} |
||||
@ -0,0 +1,25 @@ |
|||||
|
package com.dongjian.dashboard.back.dto.dashboardnotification; |
||||
|
|
||||
|
import com.dongjian.dashboard.back.dto.BaseSearchParams; |
||||
|
import io.swagger.v3.oas.annotations.media.Schema; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @author Mr.Jiang |
||||
|
* @time 2022年7月21日 下午8:50:31 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class DashboardNotificationCategorySearchParams extends BaseSearchParams{ |
||||
|
|
||||
|
@Schema(description = "IDs, comma-separated", example = "1,47") |
||||
|
private String categoryIds; |
||||
|
|
||||
|
@Schema(description = "name", example = "name47") |
||||
|
private String name; |
||||
|
|
||||
|
@Schema(description = "ID list", hidden = true) |
||||
|
private List<Long> categoryIdList; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,22 @@ |
|||||
|
package com.dongjian.dashboard.back.dto.dashboardnotification; |
||||
|
|
||||
|
import com.dongjian.dashboard.back.dto.BaseSearchParams; |
||||
|
import io.swagger.v3.oas.annotations.media.Schema; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @author Mr.Jiang |
||||
|
* @time 2022年7月21日 下午8:50:31 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class DashboardNotificationSearchParams extends BaseSearchParams{ |
||||
|
|
||||
|
@Schema(description = "DashboardNotification IDs, comma-separated", example = "1,47") |
||||
|
private String dashboardNotificationIds; |
||||
|
|
||||
|
@Schema(description = "DashboardNotification ID list", hidden = true) |
||||
|
private List<Long> dashboardNotificationIdList; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,16 @@ |
|||||
|
package com.dongjian.dashboard.back.dto.dashboardnotification; |
||||
|
|
||||
|
import io.swagger.v3.oas.annotations.media.Schema; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @author Mr.Jiang |
||||
|
* @time 2022年7月21日 下午8:50:31 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class DeleteDashboardNotificationCategoryParams { |
||||
|
|
||||
|
@Schema(description = "IDs, separated by commas", example = "2738967,587") |
||||
|
private String categoryIds; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,16 @@ |
|||||
|
package com.dongjian.dashboard.back.dto.dashboardnotification; |
||||
|
|
||||
|
import io.swagger.v3.oas.annotations.media.Schema; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @author Mr.Jiang |
||||
|
* @time 2022年7月21日 下午8:50:31 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class DeleteDashboardNotificationParams{ |
||||
|
|
||||
|
@Schema(description = "DashboardNotification IDs, separated by commas", example = "2738967,587") |
||||
|
private String dashboardNotificationIds; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,21 @@ |
|||||
|
package com.dongjian.dashboard.back.dto.dashboardnotification; |
||||
|
|
||||
|
import io.swagger.v3.oas.annotations.media.Schema; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
@Data |
||||
|
public class OptDashboardNotificationCategoryParams { |
||||
|
|
||||
|
@Schema(description = "unique identifier ID, not required for new entries", example = "2738967") |
||||
|
private Long categoryId; |
||||
|
|
||||
|
@Schema(description = "Company ID", example = "2738967", hidden = true) |
||||
|
private Long companyId; |
||||
|
|
||||
|
@Schema(description = "name", example = "webhook", required = true) |
||||
|
private String name; |
||||
|
|
||||
|
@Schema(description = "remark", example = "remark") |
||||
|
private String remark; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,26 @@ |
|||||
|
package com.dongjian.dashboard.back.dto.dashboardnotification; |
||||
|
|
||||
|
import io.swagger.v3.oas.annotations.media.Schema; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
@Data |
||||
|
public class OptDashboardNotificationParams { |
||||
|
|
||||
|
@Schema(description = "Provider unique identifier ID, not required for new entries", example = "2738967") |
||||
|
private Long dashboardNotificationId; |
||||
|
|
||||
|
@Schema(description = "Company ID", example = "2738967", hidden = true) |
||||
|
private Long companyId; |
||||
|
|
||||
|
@Schema(description = "demand time", example = "testProvider1") |
||||
|
private String demandTime; |
||||
|
|
||||
|
// @Schema(description = "category", example = "remark")
|
||||
|
// private String category;
|
||||
|
@Schema(description = "Category ID", example = "2738967") |
||||
|
private Long categoryId; |
||||
|
|
||||
|
@Schema(description ="content", example = "2") |
||||
|
private String content; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,10 @@ |
|||||
|
package com.dongjian.dashboard.back.dto.role; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
@Data |
||||
|
public class RoleMenuPermissionDTO { |
||||
|
|
||||
|
private Long menuId; |
||||
|
private Integer permissionType; |
||||
|
} |
||||
@ -0,0 +1,166 @@ |
|||||
|
package com.dongjian.dashboard.back.model; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
public class BaStatusHistory implements Serializable { |
||||
|
/** |
||||
|
* |
||||
|
* This field was generated by MyBatis Generator. |
||||
|
* This field corresponds to the database column ba_status_history.id |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
private Long id; |
||||
|
|
||||
|
/** |
||||
|
* |
||||
|
* This field was generated by MyBatis Generator. |
||||
|
* This field corresponds to the database column ba_status_history.device_info_id |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
private Integer deviceInfoId; |
||||
|
|
||||
|
/** |
||||
|
* |
||||
|
* This field was generated by MyBatis Generator. |
||||
|
* This field corresponds to the database column ba_status_history.is_running |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
private Integer isRunning; |
||||
|
|
||||
|
/** |
||||
|
* |
||||
|
* This field was generated by MyBatis Generator. |
||||
|
* This field corresponds to the database column ba_status_history.update_ts |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
private String updateTs; |
||||
|
|
||||
|
/** |
||||
|
* This field was generated by MyBatis Generator. |
||||
|
* This field corresponds to the database table ba_status_history |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method returns the value of the database column ba_status_history.id |
||||
|
* |
||||
|
* @return the value of ba_status_history.id |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
public Long getId() { |
||||
|
return id; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method sets the value of the database column ba_status_history.id |
||||
|
* |
||||
|
* @param id the value for ba_status_history.id |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
public void setId(Long id) { |
||||
|
this.id = id; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method returns the value of the database column ba_status_history.device_info_id |
||||
|
* |
||||
|
* @return the value of ba_status_history.device_info_id |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
public Integer getDeviceInfoId() { |
||||
|
return deviceInfoId; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method sets the value of the database column ba_status_history.device_info_id |
||||
|
* |
||||
|
* @param deviceInfoId the value for ba_status_history.device_info_id |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
public void setDeviceInfoId(Integer deviceInfoId) { |
||||
|
this.deviceInfoId = deviceInfoId; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method returns the value of the database column ba_status_history.is_running |
||||
|
* |
||||
|
* @return the value of ba_status_history.is_running |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
public Integer getIsRunning() { |
||||
|
return isRunning; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method sets the value of the database column ba_status_history.is_running |
||||
|
* |
||||
|
* @param isRunning the value for ba_status_history.is_running |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
public void setIsRunning(Integer isRunning) { |
||||
|
this.isRunning = isRunning; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method returns the value of the database column ba_status_history.update_ts |
||||
|
* |
||||
|
* @return the value of ba_status_history.update_ts |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
public String getUpdateTs() { |
||||
|
return updateTs; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method sets the value of the database column ba_status_history.update_ts |
||||
|
* |
||||
|
* @param updateTs the value for ba_status_history.update_ts |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
public void setUpdateTs(String updateTs) { |
||||
|
this.updateTs = updateTs == null ? null : updateTs.trim(); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method corresponds to the database table ba_status_history |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
@Override |
||||
|
public String toString() { |
||||
|
StringBuilder sb = new StringBuilder(); |
||||
|
sb.append(getClass().getSimpleName()); |
||||
|
sb.append(" ["); |
||||
|
sb.append("Hash = ").append(hashCode()); |
||||
|
sb.append(", id=").append(id); |
||||
|
sb.append(", deviceInfoId=").append(deviceInfoId); |
||||
|
sb.append(", isRunning=").append(isRunning); |
||||
|
sb.append(", updateTs=").append(updateTs); |
||||
|
sb.append(", serialVersionUID=").append(serialVersionUID); |
||||
|
sb.append("]"); |
||||
|
return sb.toString(); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,552 @@ |
|||||
|
package com.dongjian.dashboard.back.model; |
||||
|
|
||||
|
import java.util.ArrayList; |
||||
|
import java.util.List; |
||||
|
|
||||
|
public class BaStatusHistoryExample { |
||||
|
/** |
||||
|
* This field was generated by MyBatis Generator. |
||||
|
* This field corresponds to the database table ba_status_history |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
protected String orderByClause; |
||||
|
|
||||
|
/** |
||||
|
* This field was generated by MyBatis Generator. |
||||
|
* This field corresponds to the database table ba_status_history |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
protected boolean distinct; |
||||
|
|
||||
|
/** |
||||
|
* This field was generated by MyBatis Generator. |
||||
|
* This field corresponds to the database table ba_status_history |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
protected List<Criteria> oredCriteria; |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method corresponds to the database table ba_status_history |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
public BaStatusHistoryExample() { |
||||
|
oredCriteria = new ArrayList<Criteria>(); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method corresponds to the database table ba_status_history |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
public void setOrderByClause(String orderByClause) { |
||||
|
this.orderByClause = orderByClause; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method corresponds to the database table ba_status_history |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
public String getOrderByClause() { |
||||
|
return orderByClause; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method corresponds to the database table ba_status_history |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
public void setDistinct(boolean distinct) { |
||||
|
this.distinct = distinct; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method corresponds to the database table ba_status_history |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
public boolean isDistinct() { |
||||
|
return distinct; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method corresponds to the database table ba_status_history |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
public List<Criteria> getOredCriteria() { |
||||
|
return oredCriteria; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method corresponds to the database table ba_status_history |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
public void or(Criteria criteria) { |
||||
|
oredCriteria.add(criteria); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method corresponds to the database table ba_status_history |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
public Criteria or() { |
||||
|
Criteria criteria = createCriteriaInternal(); |
||||
|
oredCriteria.add(criteria); |
||||
|
return criteria; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method corresponds to the database table ba_status_history |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
public Criteria createCriteria() { |
||||
|
Criteria criteria = createCriteriaInternal(); |
||||
|
if (oredCriteria.size() == 0) { |
||||
|
oredCriteria.add(criteria); |
||||
|
} |
||||
|
return criteria; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method corresponds to the database table ba_status_history |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
protected Criteria createCriteriaInternal() { |
||||
|
Criteria criteria = new Criteria(); |
||||
|
return criteria; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method corresponds to the database table ba_status_history |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
public void clear() { |
||||
|
oredCriteria.clear(); |
||||
|
orderByClause = null; |
||||
|
distinct = false; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* This class was generated by MyBatis Generator. |
||||
|
* This class corresponds to the database table ba_status_history |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
protected abstract static class GeneratedCriteria { |
||||
|
protected List<Criterion> criteria; |
||||
|
|
||||
|
protected GeneratedCriteria() { |
||||
|
super(); |
||||
|
criteria = new ArrayList<Criterion>(); |
||||
|
} |
||||
|
|
||||
|
public boolean isValid() { |
||||
|
return criteria.size() > 0; |
||||
|
} |
||||
|
|
||||
|
public List<Criterion> getAllCriteria() { |
||||
|
return criteria; |
||||
|
} |
||||
|
|
||||
|
public List<Criterion> getCriteria() { |
||||
|
return criteria; |
||||
|
} |
||||
|
|
||||
|
protected void addCriterion(String condition) { |
||||
|
if (condition == null) { |
||||
|
throw new RuntimeException("Value for condition cannot be null"); |
||||
|
} |
||||
|
criteria.add(new Criterion(condition)); |
||||
|
} |
||||
|
|
||||
|
protected void addCriterion(String condition, Object value, String property) { |
||||
|
if (value == null) { |
||||
|
throw new RuntimeException("Value for " + property + " cannot be null"); |
||||
|
} |
||||
|
criteria.add(new Criterion(condition, value)); |
||||
|
} |
||||
|
|
||||
|
protected void addCriterion(String condition, Object value1, Object value2, String property) { |
||||
|
if (value1 == null || value2 == null) { |
||||
|
throw new RuntimeException("Between values for " + property + " cannot be null"); |
||||
|
} |
||||
|
criteria.add(new Criterion(condition, value1, value2)); |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdIsNull() { |
||||
|
addCriterion("id is null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdIsNotNull() { |
||||
|
addCriterion("id is not null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdEqualTo(Long value) { |
||||
|
addCriterion("id =", value, "id"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdNotEqualTo(Long value) { |
||||
|
addCriterion("id <>", value, "id"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdGreaterThan(Long value) { |
||||
|
addCriterion("id >", value, "id"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdGreaterThanOrEqualTo(Long value) { |
||||
|
addCriterion("id >=", value, "id"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdLessThan(Long value) { |
||||
|
addCriterion("id <", value, "id"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdLessThanOrEqualTo(Long value) { |
||||
|
addCriterion("id <=", value, "id"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdIn(List<Long> values) { |
||||
|
addCriterion("id in", values, "id"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdNotIn(List<Long> values) { |
||||
|
addCriterion("id not in", values, "id"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdBetween(Long value1, Long value2) { |
||||
|
addCriterion("id between", value1, value2, "id"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdNotBetween(Long value1, Long value2) { |
||||
|
addCriterion("id not between", value1, value2, "id"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andDeviceInfoIdIsNull() { |
||||
|
addCriterion("device_info_id is null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andDeviceInfoIdIsNotNull() { |
||||
|
addCriterion("device_info_id is not null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andDeviceInfoIdEqualTo(Integer value) { |
||||
|
addCriterion("device_info_id =", value, "deviceInfoId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andDeviceInfoIdNotEqualTo(Integer value) { |
||||
|
addCriterion("device_info_id <>", value, "deviceInfoId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andDeviceInfoIdGreaterThan(Integer value) { |
||||
|
addCriterion("device_info_id >", value, "deviceInfoId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andDeviceInfoIdGreaterThanOrEqualTo(Integer value) { |
||||
|
addCriterion("device_info_id >=", value, "deviceInfoId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andDeviceInfoIdLessThan(Integer value) { |
||||
|
addCriterion("device_info_id <", value, "deviceInfoId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andDeviceInfoIdLessThanOrEqualTo(Integer value) { |
||||
|
addCriterion("device_info_id <=", value, "deviceInfoId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andDeviceInfoIdIn(List<Integer> values) { |
||||
|
addCriterion("device_info_id in", values, "deviceInfoId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andDeviceInfoIdNotIn(List<Integer> values) { |
||||
|
addCriterion("device_info_id not in", values, "deviceInfoId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andDeviceInfoIdBetween(Integer value1, Integer value2) { |
||||
|
addCriterion("device_info_id between", value1, value2, "deviceInfoId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andDeviceInfoIdNotBetween(Integer value1, Integer value2) { |
||||
|
addCriterion("device_info_id not between", value1, value2, "deviceInfoId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIsRunningIsNull() { |
||||
|
addCriterion("is_running is null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIsRunningIsNotNull() { |
||||
|
addCriterion("is_running is not null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIsRunningEqualTo(Integer value) { |
||||
|
addCriterion("is_running =", value, "isRunning"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIsRunningNotEqualTo(Integer value) { |
||||
|
addCriterion("is_running <>", value, "isRunning"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIsRunningGreaterThan(Integer value) { |
||||
|
addCriterion("is_running >", value, "isRunning"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIsRunningGreaterThanOrEqualTo(Integer value) { |
||||
|
addCriterion("is_running >=", value, "isRunning"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIsRunningLessThan(Integer value) { |
||||
|
addCriterion("is_running <", value, "isRunning"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIsRunningLessThanOrEqualTo(Integer value) { |
||||
|
addCriterion("is_running <=", value, "isRunning"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIsRunningIn(List<Integer> values) { |
||||
|
addCriterion("is_running in", values, "isRunning"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIsRunningNotIn(List<Integer> values) { |
||||
|
addCriterion("is_running not in", values, "isRunning"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIsRunningBetween(Integer value1, Integer value2) { |
||||
|
addCriterion("is_running between", value1, value2, "isRunning"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIsRunningNotBetween(Integer value1, Integer value2) { |
||||
|
addCriterion("is_running not between", value1, value2, "isRunning"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdateTsIsNull() { |
||||
|
addCriterion("update_ts is null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdateTsIsNotNull() { |
||||
|
addCriterion("update_ts is not null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdateTsEqualTo(String value) { |
||||
|
addCriterion("update_ts =", value, "updateTs"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdateTsNotEqualTo(String value) { |
||||
|
addCriterion("update_ts <>", value, "updateTs"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdateTsGreaterThan(String value) { |
||||
|
addCriterion("update_ts >", value, "updateTs"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdateTsGreaterThanOrEqualTo(String value) { |
||||
|
addCriterion("update_ts >=", value, "updateTs"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdateTsLessThan(String value) { |
||||
|
addCriterion("update_ts <", value, "updateTs"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdateTsLessThanOrEqualTo(String value) { |
||||
|
addCriterion("update_ts <=", value, "updateTs"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdateTsLike(String value) { |
||||
|
addCriterion("update_ts like", value, "updateTs"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdateTsNotLike(String value) { |
||||
|
addCriterion("update_ts not like", value, "updateTs"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdateTsIn(List<String> values) { |
||||
|
addCriterion("update_ts in", values, "updateTs"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdateTsNotIn(List<String> values) { |
||||
|
addCriterion("update_ts not in", values, "updateTs"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdateTsBetween(String value1, String value2) { |
||||
|
addCriterion("update_ts between", value1, value2, "updateTs"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdateTsNotBetween(String value1, String value2) { |
||||
|
addCriterion("update_ts not between", value1, value2, "updateTs"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* This class was generated by MyBatis Generator. |
||||
|
* This class corresponds to the database table ba_status_history |
||||
|
* |
||||
|
* @mbg.generated do_not_delete_during_merge |
||||
|
*/ |
||||
|
public static class Criteria extends GeneratedCriteria { |
||||
|
|
||||
|
protected Criteria() { |
||||
|
super(); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* This class was generated by MyBatis Generator. |
||||
|
* This class corresponds to the database table ba_status_history |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
public static class Criterion { |
||||
|
private String condition; |
||||
|
|
||||
|
private Object value; |
||||
|
|
||||
|
private Object secondValue; |
||||
|
|
||||
|
private boolean noValue; |
||||
|
|
||||
|
private boolean singleValue; |
||||
|
|
||||
|
private boolean betweenValue; |
||||
|
|
||||
|
private boolean listValue; |
||||
|
|
||||
|
private String typeHandler; |
||||
|
|
||||
|
public String getCondition() { |
||||
|
return condition; |
||||
|
} |
||||
|
|
||||
|
public Object getValue() { |
||||
|
return value; |
||||
|
} |
||||
|
|
||||
|
public Object getSecondValue() { |
||||
|
return secondValue; |
||||
|
} |
||||
|
|
||||
|
public boolean isNoValue() { |
||||
|
return noValue; |
||||
|
} |
||||
|
|
||||
|
public boolean isSingleValue() { |
||||
|
return singleValue; |
||||
|
} |
||||
|
|
||||
|
public boolean isBetweenValue() { |
||||
|
return betweenValue; |
||||
|
} |
||||
|
|
||||
|
public boolean isListValue() { |
||||
|
return listValue; |
||||
|
} |
||||
|
|
||||
|
public String getTypeHandler() { |
||||
|
return typeHandler; |
||||
|
} |
||||
|
|
||||
|
protected Criterion(String condition) { |
||||
|
super(); |
||||
|
this.condition = condition; |
||||
|
this.typeHandler = null; |
||||
|
this.noValue = true; |
||||
|
} |
||||
|
|
||||
|
protected Criterion(String condition, Object value, String typeHandler) { |
||||
|
super(); |
||||
|
this.condition = condition; |
||||
|
this.value = value; |
||||
|
this.typeHandler = typeHandler; |
||||
|
if (value instanceof List<?>) { |
||||
|
this.listValue = true; |
||||
|
} else { |
||||
|
this.singleValue = true; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
protected Criterion(String condition, Object value) { |
||||
|
this(condition, value, null); |
||||
|
} |
||||
|
|
||||
|
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { |
||||
|
super(); |
||||
|
this.condition = condition; |
||||
|
this.value = value; |
||||
|
this.secondValue = secondValue; |
||||
|
this.typeHandler = typeHandler; |
||||
|
this.betweenValue = true; |
||||
|
} |
||||
|
|
||||
|
protected Criterion(String condition, Object value, Object secondValue) { |
||||
|
this(condition, value, secondValue, null); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,336 @@ |
|||||
|
package com.dongjian.dashboard.back.model; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
public class DashboardNotificationCategory implements Serializable { |
||||
|
/** |
||||
|
* |
||||
|
* This field was generated by MyBatis Generator. |
||||
|
* This field corresponds to the database column dashboard_notification_category.id |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
private Long id; |
||||
|
|
||||
|
/** |
||||
|
* |
||||
|
* This field was generated by MyBatis Generator. |
||||
|
* This field corresponds to the database column dashboard_notification_category.company_id |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
private Long companyId; |
||||
|
|
||||
|
/** |
||||
|
* |
||||
|
* This field was generated by MyBatis Generator. |
||||
|
* This field corresponds to the database column dashboard_notification_category.name |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
private String name; |
||||
|
|
||||
|
/** |
||||
|
* |
||||
|
* This field was generated by MyBatis Generator. |
||||
|
* This field corresponds to the database column dashboard_notification_category.remark |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
private String remark; |
||||
|
|
||||
|
/** |
||||
|
* |
||||
|
* This field was generated by MyBatis Generator. |
||||
|
* This field corresponds to the database column dashboard_notification_category.flag |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
private Integer flag; |
||||
|
|
||||
|
/** |
||||
|
* |
||||
|
* This field was generated by MyBatis Generator. |
||||
|
* This field corresponds to the database column dashboard_notification_category.created_by |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
private Long createdBy; |
||||
|
|
||||
|
/** |
||||
|
* |
||||
|
* This field was generated by MyBatis Generator. |
||||
|
* This field corresponds to the database column dashboard_notification_category.created_at |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
private Long createdAt; |
||||
|
|
||||
|
/** |
||||
|
* |
||||
|
* This field was generated by MyBatis Generator. |
||||
|
* This field corresponds to the database column dashboard_notification_category.updated_at |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
private Long updatedAt; |
||||
|
|
||||
|
/** |
||||
|
* |
||||
|
* This field was generated by MyBatis Generator. |
||||
|
* This field corresponds to the database column dashboard_notification_category.updated_by |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
private Long updatedBy; |
||||
|
|
||||
|
/** |
||||
|
* This field was generated by MyBatis Generator. |
||||
|
* This field corresponds to the database table dashboard_notification_category |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method returns the value of the database column dashboard_notification_category.id |
||||
|
* |
||||
|
* @return the value of dashboard_notification_category.id |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
public Long getId() { |
||||
|
return id; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method sets the value of the database column dashboard_notification_category.id |
||||
|
* |
||||
|
* @param id the value for dashboard_notification_category.id |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
public void setId(Long id) { |
||||
|
this.id = id; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method returns the value of the database column dashboard_notification_category.company_id |
||||
|
* |
||||
|
* @return the value of dashboard_notification_category.company_id |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
public Long getCompanyId() { |
||||
|
return companyId; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method sets the value of the database column dashboard_notification_category.company_id |
||||
|
* |
||||
|
* @param companyId the value for dashboard_notification_category.company_id |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
public void setCompanyId(Long companyId) { |
||||
|
this.companyId = companyId; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method returns the value of the database column dashboard_notification_category.name |
||||
|
* |
||||
|
* @return the value of dashboard_notification_category.name |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
public String getName() { |
||||
|
return name; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method sets the value of the database column dashboard_notification_category.name |
||||
|
* |
||||
|
* @param name the value for dashboard_notification_category.name |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
public void setName(String name) { |
||||
|
this.name = name == null ? null : name.trim(); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method returns the value of the database column dashboard_notification_category.remark |
||||
|
* |
||||
|
* @return the value of dashboard_notification_category.remark |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
public String getRemark() { |
||||
|
return remark; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method sets the value of the database column dashboard_notification_category.remark |
||||
|
* |
||||
|
* @param remark the value for dashboard_notification_category.remark |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
public void setRemark(String remark) { |
||||
|
this.remark = remark == null ? null : remark.trim(); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method returns the value of the database column dashboard_notification_category.flag |
||||
|
* |
||||
|
* @return the value of dashboard_notification_category.flag |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
public Integer getFlag() { |
||||
|
return flag; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method sets the value of the database column dashboard_notification_category.flag |
||||
|
* |
||||
|
* @param flag the value for dashboard_notification_category.flag |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
public void setFlag(Integer flag) { |
||||
|
this.flag = flag; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method returns the value of the database column dashboard_notification_category.created_by |
||||
|
* |
||||
|
* @return the value of dashboard_notification_category.created_by |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
public Long getCreatedBy() { |
||||
|
return createdBy; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method sets the value of the database column dashboard_notification_category.created_by |
||||
|
* |
||||
|
* @param createdBy the value for dashboard_notification_category.created_by |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
public void setCreatedBy(Long createdBy) { |
||||
|
this.createdBy = createdBy; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method returns the value of the database column dashboard_notification_category.created_at |
||||
|
* |
||||
|
* @return the value of dashboard_notification_category.created_at |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
public Long getCreatedAt() { |
||||
|
return createdAt; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method sets the value of the database column dashboard_notification_category.created_at |
||||
|
* |
||||
|
* @param createdAt the value for dashboard_notification_category.created_at |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
public void setCreatedAt(Long createdAt) { |
||||
|
this.createdAt = createdAt; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method returns the value of the database column dashboard_notification_category.updated_at |
||||
|
* |
||||
|
* @return the value of dashboard_notification_category.updated_at |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
public Long getUpdatedAt() { |
||||
|
return updatedAt; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method sets the value of the database column dashboard_notification_category.updated_at |
||||
|
* |
||||
|
* @param updatedAt the value for dashboard_notification_category.updated_at |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
public void setUpdatedAt(Long updatedAt) { |
||||
|
this.updatedAt = updatedAt; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method returns the value of the database column dashboard_notification_category.updated_by |
||||
|
* |
||||
|
* @return the value of dashboard_notification_category.updated_by |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
public Long getUpdatedBy() { |
||||
|
return updatedBy; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method sets the value of the database column dashboard_notification_category.updated_by |
||||
|
* |
||||
|
* @param updatedBy the value for dashboard_notification_category.updated_by |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
public void setUpdatedBy(Long updatedBy) { |
||||
|
this.updatedBy = updatedBy; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method corresponds to the database table dashboard_notification_category |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
@Override |
||||
|
public String toString() { |
||||
|
StringBuilder sb = new StringBuilder(); |
||||
|
sb.append(getClass().getSimpleName()); |
||||
|
sb.append(" ["); |
||||
|
sb.append("Hash = ").append(hashCode()); |
||||
|
sb.append(", id=").append(id); |
||||
|
sb.append(", companyId=").append(companyId); |
||||
|
sb.append(", name=").append(name); |
||||
|
sb.append(", remark=").append(remark); |
||||
|
sb.append(", flag=").append(flag); |
||||
|
sb.append(", createdBy=").append(createdBy); |
||||
|
sb.append(", createdAt=").append(createdAt); |
||||
|
sb.append(", updatedAt=").append(updatedAt); |
||||
|
sb.append(", updatedBy=").append(updatedBy); |
||||
|
sb.append(", serialVersionUID=").append(serialVersionUID); |
||||
|
sb.append("]"); |
||||
|
return sb.toString(); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,862 @@ |
|||||
|
package com.dongjian.dashboard.back.model; |
||||
|
|
||||
|
import java.util.ArrayList; |
||||
|
import java.util.List; |
||||
|
|
||||
|
public class DashboardNotificationCategoryExample { |
||||
|
/** |
||||
|
* This field was generated by MyBatis Generator. |
||||
|
* This field corresponds to the database table dashboard_notification_category |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
protected String orderByClause; |
||||
|
|
||||
|
/** |
||||
|
* This field was generated by MyBatis Generator. |
||||
|
* This field corresponds to the database table dashboard_notification_category |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
protected boolean distinct; |
||||
|
|
||||
|
/** |
||||
|
* This field was generated by MyBatis Generator. |
||||
|
* This field corresponds to the database table dashboard_notification_category |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
protected List<Criteria> oredCriteria; |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method corresponds to the database table dashboard_notification_category |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
public DashboardNotificationCategoryExample() { |
||||
|
oredCriteria = new ArrayList<Criteria>(); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method corresponds to the database table dashboard_notification_category |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
public void setOrderByClause(String orderByClause) { |
||||
|
this.orderByClause = orderByClause; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method corresponds to the database table dashboard_notification_category |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
public String getOrderByClause() { |
||||
|
return orderByClause; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method corresponds to the database table dashboard_notification_category |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
public void setDistinct(boolean distinct) { |
||||
|
this.distinct = distinct; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method corresponds to the database table dashboard_notification_category |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
public boolean isDistinct() { |
||||
|
return distinct; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method corresponds to the database table dashboard_notification_category |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
public List<Criteria> getOredCriteria() { |
||||
|
return oredCriteria; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method corresponds to the database table dashboard_notification_category |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
public void or(Criteria criteria) { |
||||
|
oredCriteria.add(criteria); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method corresponds to the database table dashboard_notification_category |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
public Criteria or() { |
||||
|
Criteria criteria = createCriteriaInternal(); |
||||
|
oredCriteria.add(criteria); |
||||
|
return criteria; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method corresponds to the database table dashboard_notification_category |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
public Criteria createCriteria() { |
||||
|
Criteria criteria = createCriteriaInternal(); |
||||
|
if (oredCriteria.size() == 0) { |
||||
|
oredCriteria.add(criteria); |
||||
|
} |
||||
|
return criteria; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method corresponds to the database table dashboard_notification_category |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
protected Criteria createCriteriaInternal() { |
||||
|
Criteria criteria = new Criteria(); |
||||
|
return criteria; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method corresponds to the database table dashboard_notification_category |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
public void clear() { |
||||
|
oredCriteria.clear(); |
||||
|
orderByClause = null; |
||||
|
distinct = false; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* This class was generated by MyBatis Generator. |
||||
|
* This class corresponds to the database table dashboard_notification_category |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
protected abstract static class GeneratedCriteria { |
||||
|
protected List<Criterion> criteria; |
||||
|
|
||||
|
protected GeneratedCriteria() { |
||||
|
super(); |
||||
|
criteria = new ArrayList<Criterion>(); |
||||
|
} |
||||
|
|
||||
|
public boolean isValid() { |
||||
|
return criteria.size() > 0; |
||||
|
} |
||||
|
|
||||
|
public List<Criterion> getAllCriteria() { |
||||
|
return criteria; |
||||
|
} |
||||
|
|
||||
|
public List<Criterion> getCriteria() { |
||||
|
return criteria; |
||||
|
} |
||||
|
|
||||
|
protected void addCriterion(String condition) { |
||||
|
if (condition == null) { |
||||
|
throw new RuntimeException("Value for condition cannot be null"); |
||||
|
} |
||||
|
criteria.add(new Criterion(condition)); |
||||
|
} |
||||
|
|
||||
|
protected void addCriterion(String condition, Object value, String property) { |
||||
|
if (value == null) { |
||||
|
throw new RuntimeException("Value for " + property + " cannot be null"); |
||||
|
} |
||||
|
criteria.add(new Criterion(condition, value)); |
||||
|
} |
||||
|
|
||||
|
protected void addCriterion(String condition, Object value1, Object value2, String property) { |
||||
|
if (value1 == null || value2 == null) { |
||||
|
throw new RuntimeException("Between values for " + property + " cannot be null"); |
||||
|
} |
||||
|
criteria.add(new Criterion(condition, value1, value2)); |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdIsNull() { |
||||
|
addCriterion("id is null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdIsNotNull() { |
||||
|
addCriterion("id is not null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdEqualTo(Long value) { |
||||
|
addCriterion("id =", value, "id"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdNotEqualTo(Long value) { |
||||
|
addCriterion("id <>", value, "id"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdGreaterThan(Long value) { |
||||
|
addCriterion("id >", value, "id"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdGreaterThanOrEqualTo(Long value) { |
||||
|
addCriterion("id >=", value, "id"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdLessThan(Long value) { |
||||
|
addCriterion("id <", value, "id"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdLessThanOrEqualTo(Long value) { |
||||
|
addCriterion("id <=", value, "id"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdIn(List<Long> values) { |
||||
|
addCriterion("id in", values, "id"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdNotIn(List<Long> values) { |
||||
|
addCriterion("id not in", values, "id"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdBetween(Long value1, Long value2) { |
||||
|
addCriterion("id between", value1, value2, "id"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdNotBetween(Long value1, Long value2) { |
||||
|
addCriterion("id not between", value1, value2, "id"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCompanyIdIsNull() { |
||||
|
addCriterion("company_id is null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCompanyIdIsNotNull() { |
||||
|
addCriterion("company_id is not null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCompanyIdEqualTo(Long value) { |
||||
|
addCriterion("company_id =", value, "companyId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCompanyIdNotEqualTo(Long value) { |
||||
|
addCriterion("company_id <>", value, "companyId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCompanyIdGreaterThan(Long value) { |
||||
|
addCriterion("company_id >", value, "companyId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCompanyIdGreaterThanOrEqualTo(Long value) { |
||||
|
addCriterion("company_id >=", value, "companyId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCompanyIdLessThan(Long value) { |
||||
|
addCriterion("company_id <", value, "companyId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCompanyIdLessThanOrEqualTo(Long value) { |
||||
|
addCriterion("company_id <=", value, "companyId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCompanyIdIn(List<Long> values) { |
||||
|
addCriterion("company_id in", values, "companyId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCompanyIdNotIn(List<Long> values) { |
||||
|
addCriterion("company_id not in", values, "companyId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCompanyIdBetween(Long value1, Long value2) { |
||||
|
addCriterion("company_id between", value1, value2, "companyId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCompanyIdNotBetween(Long value1, Long value2) { |
||||
|
addCriterion("company_id not between", value1, value2, "companyId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andNameIsNull() { |
||||
|
addCriterion("`name` is null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andNameIsNotNull() { |
||||
|
addCriterion("`name` is not null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andNameEqualTo(String value) { |
||||
|
addCriterion("`name` =", value, "name"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andNameNotEqualTo(String value) { |
||||
|
addCriterion("`name` <>", value, "name"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andNameGreaterThan(String value) { |
||||
|
addCriterion("`name` >", value, "name"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andNameGreaterThanOrEqualTo(String value) { |
||||
|
addCriterion("`name` >=", value, "name"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andNameLessThan(String value) { |
||||
|
addCriterion("`name` <", value, "name"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andNameLessThanOrEqualTo(String value) { |
||||
|
addCriterion("`name` <=", value, "name"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andNameLike(String value) { |
||||
|
addCriterion("`name` like", value, "name"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andNameNotLike(String value) { |
||||
|
addCriterion("`name` not like", value, "name"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andNameIn(List<String> values) { |
||||
|
addCriterion("`name` in", values, "name"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andNameNotIn(List<String> values) { |
||||
|
addCriterion("`name` not in", values, "name"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andNameBetween(String value1, String value2) { |
||||
|
addCriterion("`name` between", value1, value2, "name"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andNameNotBetween(String value1, String value2) { |
||||
|
addCriterion("`name` not between", value1, value2, "name"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andRemarkIsNull() { |
||||
|
addCriterion("remark is null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andRemarkIsNotNull() { |
||||
|
addCriterion("remark is not null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andRemarkEqualTo(String value) { |
||||
|
addCriterion("remark =", value, "remark"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andRemarkNotEqualTo(String value) { |
||||
|
addCriterion("remark <>", value, "remark"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andRemarkGreaterThan(String value) { |
||||
|
addCriterion("remark >", value, "remark"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andRemarkGreaterThanOrEqualTo(String value) { |
||||
|
addCriterion("remark >=", value, "remark"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andRemarkLessThan(String value) { |
||||
|
addCriterion("remark <", value, "remark"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andRemarkLessThanOrEqualTo(String value) { |
||||
|
addCriterion("remark <=", value, "remark"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andRemarkLike(String value) { |
||||
|
addCriterion("remark like", value, "remark"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andRemarkNotLike(String value) { |
||||
|
addCriterion("remark not like", value, "remark"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andRemarkIn(List<String> values) { |
||||
|
addCriterion("remark in", values, "remark"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andRemarkNotIn(List<String> values) { |
||||
|
addCriterion("remark not in", values, "remark"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andRemarkBetween(String value1, String value2) { |
||||
|
addCriterion("remark between", value1, value2, "remark"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andRemarkNotBetween(String value1, String value2) { |
||||
|
addCriterion("remark not between", value1, value2, "remark"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andFlagIsNull() { |
||||
|
addCriterion("flag is null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andFlagIsNotNull() { |
||||
|
addCriterion("flag is not null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andFlagEqualTo(Integer value) { |
||||
|
addCriterion("flag =", value, "flag"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andFlagNotEqualTo(Integer value) { |
||||
|
addCriterion("flag <>", value, "flag"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andFlagGreaterThan(Integer value) { |
||||
|
addCriterion("flag >", value, "flag"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andFlagGreaterThanOrEqualTo(Integer value) { |
||||
|
addCriterion("flag >=", value, "flag"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andFlagLessThan(Integer value) { |
||||
|
addCriterion("flag <", value, "flag"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andFlagLessThanOrEqualTo(Integer value) { |
||||
|
addCriterion("flag <=", value, "flag"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andFlagIn(List<Integer> values) { |
||||
|
addCriterion("flag in", values, "flag"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andFlagNotIn(List<Integer> values) { |
||||
|
addCriterion("flag not in", values, "flag"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andFlagBetween(Integer value1, Integer value2) { |
||||
|
addCriterion("flag between", value1, value2, "flag"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andFlagNotBetween(Integer value1, Integer value2) { |
||||
|
addCriterion("flag not between", value1, value2, "flag"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCreatedByIsNull() { |
||||
|
addCriterion("created_by is null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCreatedByIsNotNull() { |
||||
|
addCriterion("created_by is not null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCreatedByEqualTo(Long value) { |
||||
|
addCriterion("created_by =", value, "createdBy"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCreatedByNotEqualTo(Long value) { |
||||
|
addCriterion("created_by <>", value, "createdBy"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCreatedByGreaterThan(Long value) { |
||||
|
addCriterion("created_by >", value, "createdBy"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCreatedByGreaterThanOrEqualTo(Long value) { |
||||
|
addCriterion("created_by >=", value, "createdBy"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCreatedByLessThan(Long value) { |
||||
|
addCriterion("created_by <", value, "createdBy"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCreatedByLessThanOrEqualTo(Long value) { |
||||
|
addCriterion("created_by <=", value, "createdBy"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCreatedByIn(List<Long> values) { |
||||
|
addCriterion("created_by in", values, "createdBy"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCreatedByNotIn(List<Long> values) { |
||||
|
addCriterion("created_by not in", values, "createdBy"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCreatedByBetween(Long value1, Long value2) { |
||||
|
addCriterion("created_by between", value1, value2, "createdBy"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCreatedByNotBetween(Long value1, Long value2) { |
||||
|
addCriterion("created_by not between", value1, value2, "createdBy"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCreatedAtIsNull() { |
||||
|
addCriterion("created_at is null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCreatedAtIsNotNull() { |
||||
|
addCriterion("created_at is not null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCreatedAtEqualTo(Long value) { |
||||
|
addCriterion("created_at =", value, "createdAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCreatedAtNotEqualTo(Long value) { |
||||
|
addCriterion("created_at <>", value, "createdAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCreatedAtGreaterThan(Long value) { |
||||
|
addCriterion("created_at >", value, "createdAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCreatedAtGreaterThanOrEqualTo(Long value) { |
||||
|
addCriterion("created_at >=", value, "createdAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCreatedAtLessThan(Long value) { |
||||
|
addCriterion("created_at <", value, "createdAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCreatedAtLessThanOrEqualTo(Long value) { |
||||
|
addCriterion("created_at <=", value, "createdAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCreatedAtIn(List<Long> values) { |
||||
|
addCriterion("created_at in", values, "createdAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCreatedAtNotIn(List<Long> values) { |
||||
|
addCriterion("created_at not in", values, "createdAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCreatedAtBetween(Long value1, Long value2) { |
||||
|
addCriterion("created_at between", value1, value2, "createdAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCreatedAtNotBetween(Long value1, Long value2) { |
||||
|
addCriterion("created_at not between", value1, value2, "createdAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdatedAtIsNull() { |
||||
|
addCriterion("updated_at is null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdatedAtIsNotNull() { |
||||
|
addCriterion("updated_at is not null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdatedAtEqualTo(Long value) { |
||||
|
addCriterion("updated_at =", value, "updatedAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdatedAtNotEqualTo(Long value) { |
||||
|
addCriterion("updated_at <>", value, "updatedAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdatedAtGreaterThan(Long value) { |
||||
|
addCriterion("updated_at >", value, "updatedAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdatedAtGreaterThanOrEqualTo(Long value) { |
||||
|
addCriterion("updated_at >=", value, "updatedAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdatedAtLessThan(Long value) { |
||||
|
addCriterion("updated_at <", value, "updatedAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdatedAtLessThanOrEqualTo(Long value) { |
||||
|
addCriterion("updated_at <=", value, "updatedAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdatedAtIn(List<Long> values) { |
||||
|
addCriterion("updated_at in", values, "updatedAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdatedAtNotIn(List<Long> values) { |
||||
|
addCriterion("updated_at not in", values, "updatedAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdatedAtBetween(Long value1, Long value2) { |
||||
|
addCriterion("updated_at between", value1, value2, "updatedAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdatedAtNotBetween(Long value1, Long value2) { |
||||
|
addCriterion("updated_at not between", value1, value2, "updatedAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdatedByIsNull() { |
||||
|
addCriterion("updated_by is null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdatedByIsNotNull() { |
||||
|
addCriterion("updated_by is not null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdatedByEqualTo(Long value) { |
||||
|
addCriterion("updated_by =", value, "updatedBy"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdatedByNotEqualTo(Long value) { |
||||
|
addCriterion("updated_by <>", value, "updatedBy"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdatedByGreaterThan(Long value) { |
||||
|
addCriterion("updated_by >", value, "updatedBy"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdatedByGreaterThanOrEqualTo(Long value) { |
||||
|
addCriterion("updated_by >=", value, "updatedBy"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdatedByLessThan(Long value) { |
||||
|
addCriterion("updated_by <", value, "updatedBy"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdatedByLessThanOrEqualTo(Long value) { |
||||
|
addCriterion("updated_by <=", value, "updatedBy"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdatedByIn(List<Long> values) { |
||||
|
addCriterion("updated_by in", values, "updatedBy"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdatedByNotIn(List<Long> values) { |
||||
|
addCriterion("updated_by not in", values, "updatedBy"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdatedByBetween(Long value1, Long value2) { |
||||
|
addCriterion("updated_by between", value1, value2, "updatedBy"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdatedByNotBetween(Long value1, Long value2) { |
||||
|
addCriterion("updated_by not between", value1, value2, "updatedBy"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* This class was generated by MyBatis Generator. |
||||
|
* This class corresponds to the database table dashboard_notification_category |
||||
|
* |
||||
|
* @mbg.generated do_not_delete_during_merge |
||||
|
*/ |
||||
|
public static class Criteria extends GeneratedCriteria { |
||||
|
|
||||
|
protected Criteria() { |
||||
|
super(); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* This class was generated by MyBatis Generator. |
||||
|
* This class corresponds to the database table dashboard_notification_category |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
public static class Criterion { |
||||
|
private String condition; |
||||
|
|
||||
|
private Object value; |
||||
|
|
||||
|
private Object secondValue; |
||||
|
|
||||
|
private boolean noValue; |
||||
|
|
||||
|
private boolean singleValue; |
||||
|
|
||||
|
private boolean betweenValue; |
||||
|
|
||||
|
private boolean listValue; |
||||
|
|
||||
|
private String typeHandler; |
||||
|
|
||||
|
public String getCondition() { |
||||
|
return condition; |
||||
|
} |
||||
|
|
||||
|
public Object getValue() { |
||||
|
return value; |
||||
|
} |
||||
|
|
||||
|
public Object getSecondValue() { |
||||
|
return secondValue; |
||||
|
} |
||||
|
|
||||
|
public boolean isNoValue() { |
||||
|
return noValue; |
||||
|
} |
||||
|
|
||||
|
public boolean isSingleValue() { |
||||
|
return singleValue; |
||||
|
} |
||||
|
|
||||
|
public boolean isBetweenValue() { |
||||
|
return betweenValue; |
||||
|
} |
||||
|
|
||||
|
public boolean isListValue() { |
||||
|
return listValue; |
||||
|
} |
||||
|
|
||||
|
public String getTypeHandler() { |
||||
|
return typeHandler; |
||||
|
} |
||||
|
|
||||
|
protected Criterion(String condition) { |
||||
|
super(); |
||||
|
this.condition = condition; |
||||
|
this.typeHandler = null; |
||||
|
this.noValue = true; |
||||
|
} |
||||
|
|
||||
|
protected Criterion(String condition, Object value, String typeHandler) { |
||||
|
super(); |
||||
|
this.condition = condition; |
||||
|
this.value = value; |
||||
|
this.typeHandler = typeHandler; |
||||
|
if (value instanceof List<?>) { |
||||
|
this.listValue = true; |
||||
|
} else { |
||||
|
this.singleValue = true; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
protected Criterion(String condition, Object value) { |
||||
|
this(condition, value, null); |
||||
|
} |
||||
|
|
||||
|
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { |
||||
|
super(); |
||||
|
this.condition = condition; |
||||
|
this.value = value; |
||||
|
this.secondValue = secondValue; |
||||
|
this.typeHandler = typeHandler; |
||||
|
this.betweenValue = true; |
||||
|
} |
||||
|
|
||||
|
protected Criterion(String condition, Object value, Object secondValue) { |
||||
|
this(condition, value, secondValue, null); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,28 @@ |
|||||
|
package com.dongjian.dashboard.back.vo.dashboardnotification; |
||||
|
|
||||
|
import io.swagger.v3.oas.annotations.media.Schema; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @author Mr.Jiang |
||||
|
* @time 2022年7月21日 下午8:50:31 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class DashboardNotificationCategoryPageVO { |
||||
|
|
||||
|
@Schema(description = "unique identifier ID, not required for new entries", example = "2738967") |
||||
|
private Long categoryId; |
||||
|
|
||||
|
@Schema(description = "Company ID", example = "2738967", hidden = true) |
||||
|
private Long companyId; |
||||
|
|
||||
|
@Schema(description = "name", example = "webhook", required = true) |
||||
|
private String name; |
||||
|
|
||||
|
@Schema(description = "remark", example = "remark") |
||||
|
private String remark; |
||||
|
|
||||
|
@Schema(description = "created time", example = "2738967") |
||||
|
private Long createdAt; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,23 @@ |
|||||
|
package com.dongjian.dashboard.back.vo.data; |
||||
|
|
||||
|
import io.swagger.v3.oas.annotations.media.Schema; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.util.ArrayList; |
||||
|
import java.util.List; |
||||
|
|
||||
|
@Data |
||||
|
public class OverviewCategoryVO { |
||||
|
|
||||
|
private Long buildingId; |
||||
|
|
||||
|
private String buildingName; |
||||
|
|
||||
|
private String deviceId; |
||||
|
|
||||
|
private Long monitoringPointCategoryId; |
||||
|
|
||||
|
private String monitoringPointCategoryName; |
||||
|
|
||||
|
|
||||
|
} |
||||
@ -0,0 +1,32 @@ |
|||||
|
package com.dongjian.dashboard.back.vo.role; |
||||
|
|
||||
|
import com.dongjian.dashboard.back.vo.TreeMenusDTO; |
||||
|
import io.swagger.v3.oas.annotations.media.Schema; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @author Mr.Jiang |
||||
|
* @time 2022年7月29日 下午4:37:50 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class DashboardTreeMenusDTO { |
||||
|
|
||||
|
@Schema(description = "节点ID",example = "11", required = true) |
||||
|
private Long menuId; |
||||
|
|
||||
|
@Schema(description = "父节点ID",example = "2", hidden = true) |
||||
|
private Long parentMenuId; |
||||
|
|
||||
|
@Schema(description = "节点名称",example = "添加", required = true) |
||||
|
private String title; |
||||
|
|
||||
|
@Schema(description = "子节点",example = "[]", required = false) |
||||
|
private List<DashboardTreeMenusDTO> children; |
||||
|
|
||||
|
private Integer permissionType; // 0-拒绝 1-只读 2-全部 null=半选
|
||||
|
|
||||
|
private Integer dashboardLowestNode; // 0-否 1-是
|
||||
|
|
||||
|
} |
||||
@ -0,0 +1,13 @@ |
|||||
|
package com.dongjian.dashboard.back.vo.role; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
@Data |
||||
|
public class MenuEntity { |
||||
|
|
||||
|
private Long id; |
||||
|
private Long parentMenuId; |
||||
|
private String menuName; |
||||
|
private Integer menuLevel; |
||||
|
private Integer flag; |
||||
|
} |
||||
@ -0,0 +1,14 @@ |
|||||
|
package com.dongjian.dashboard.back.vo.role; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
@Data |
||||
|
public class MenuTreeVO { |
||||
|
|
||||
|
private Long id; |
||||
|
private String name; |
||||
|
private Integer permissionType; |
||||
|
private List<MenuTreeVO> children; |
||||
|
} |
||||
@ -0,0 +1,13 @@ |
|||||
|
package com.dongjian.dashboard.back.vo.role; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
@Data |
||||
|
public class RoleMenuPermissionEntity { |
||||
|
|
||||
|
|
||||
|
private Long roleId; |
||||
|
private Long menuId; |
||||
|
private Integer permissionType; |
||||
|
private Long createTime; |
||||
|
} |
||||
@ -0,0 +1,24 @@ |
|||||
|
package com.dongjian.dashboard.back.service; |
||||
|
|
||||
|
import com.dongjian.dashboard.back.common.response.PageInfo; |
||||
|
import com.dongjian.dashboard.back.common.response.SimpleDataResponse; |
||||
|
import com.dongjian.dashboard.back.dto.dashboardnotification.DashboardNotificationCategorySearchParams; |
||||
|
import com.dongjian.dashboard.back.dto.dashboardnotification.DeleteDashboardNotificationCategoryParams; |
||||
|
import com.dongjian.dashboard.back.dto.dashboardnotification.OptDashboardNotificationCategoryParams; |
||||
|
import com.dongjian.dashboard.back.vo.dashboardnotification.DashboardNotificationCategoryPageVO; |
||||
|
|
||||
|
public interface DashboardNotificationCategoryService { |
||||
|
|
||||
|
SimpleDataResponse add(OptDashboardNotificationCategoryParams optDashboardNotificationCategoryParams, Long userId, Long companyId, |
||||
|
Integer languageType); |
||||
|
|
||||
|
SimpleDataResponse edit(OptDashboardNotificationCategoryParams optDashboardNotificationCategoryParams, Long userId, Long companyId, |
||||
|
Integer languageType); |
||||
|
|
||||
|
SimpleDataResponse batchDelete(DeleteDashboardNotificationCategoryParams deleteParams, Long userId, Long companyId, |
||||
|
Integer languageType); |
||||
|
|
||||
|
PageInfo<DashboardNotificationCategoryPageVO> getListPage(DashboardNotificationCategorySearchParams searchParams, Long companyId, Long userId, |
||||
|
Integer languageType, Integer uTCOffset); |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,24 @@ |
|||||
|
package com.dongjian.dashboard.back.service; |
||||
|
|
||||
|
import com.dongjian.dashboard.back.common.response.PageInfo; |
||||
|
import com.dongjian.dashboard.back.common.response.SimpleDataResponse; |
||||
|
import com.dongjian.dashboard.back.dto.dashboardnotification.DashboardNotificationSearchParams; |
||||
|
import com.dongjian.dashboard.back.dto.dashboardnotification.DeleteDashboardNotificationParams; |
||||
|
import com.dongjian.dashboard.back.dto.dashboardnotification.OptDashboardNotificationParams; |
||||
|
import com.dongjian.dashboard.back.vo.dashboardnotification.DashboardNotificationPageVO; |
||||
|
|
||||
|
public interface DashboardNotificationService { |
||||
|
|
||||
|
SimpleDataResponse add(OptDashboardNotificationParams optDashboardNotificationParams, Long userId, Long companyId, |
||||
|
Integer languageType); |
||||
|
|
||||
|
SimpleDataResponse edit(OptDashboardNotificationParams optDashboardNotificationParams, Long userId, Long companyId, |
||||
|
Integer languageType); |
||||
|
|
||||
|
SimpleDataResponse batchDelete(DeleteDashboardNotificationParams deleteParams, Long userId, Long companyId, |
||||
|
Integer languageType); |
||||
|
|
||||
|
PageInfo<DashboardNotificationPageVO> getListPage(DashboardNotificationSearchParams searchParams, Long companyId, Long userId, |
||||
|
Integer languageType, Integer uTCOffset); |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,70 @@ |
|||||
|
package com.dongjian.dashboard.back.service.common; |
||||
|
|
||||
|
import com.dongjian.dashboard.back.vo.role.DashboardTreeMenusDTO; |
||||
|
|
||||
|
import java.util.ArrayList; |
||||
|
import java.util.List; |
||||
|
import java.util.Objects; |
||||
|
|
||||
|
public class DashboardMenuTree { |
||||
|
|
||||
|
private List<DashboardTreeMenusDTO> menuList = new ArrayList<>(); |
||||
|
|
||||
|
public DashboardMenuTree(List<DashboardTreeMenusDTO> menuList) { |
||||
|
this.menuList = menuList; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 构建树 |
||||
|
*/ |
||||
|
public List<DashboardTreeMenusDTO> buildTree(String rootNodeKey) { |
||||
|
List<DashboardTreeMenusDTO> treeMenus = new ArrayList<>(); |
||||
|
|
||||
|
for (DashboardTreeMenusDTO node : getRootNode(rootNodeKey)) { |
||||
|
treeMenus.add(buildChildTree(node)); |
||||
|
} |
||||
|
|
||||
|
return treeMenus; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 构建子树(核心修改点) |
||||
|
*/ |
||||
|
private DashboardTreeMenusDTO buildChildTree(DashboardTreeMenusDTO parent) { |
||||
|
|
||||
|
// 如果是最小节点 → 直接终止
|
||||
|
if (parent.getDashboardLowestNode() != null |
||||
|
&& parent.getDashboardLowestNode() == 1) { |
||||
|
|
||||
|
parent.setChildren(new ArrayList<>()); |
||||
|
return parent; |
||||
|
} |
||||
|
|
||||
|
List<DashboardTreeMenusDTO> children = new ArrayList<>(); |
||||
|
|
||||
|
for (DashboardTreeMenusDTO node : menuList) { |
||||
|
if (node.getParentMenuId().equals(parent.getMenuId())) { |
||||
|
children.add(buildChildTree(node)); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
parent.setChildren(children); |
||||
|
return parent; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 获取根节点 |
||||
|
*/ |
||||
|
private List<DashboardTreeMenusDTO> getRootNode(String rootNodeKey) { |
||||
|
|
||||
|
List<DashboardTreeMenusDTO> roots = new ArrayList<>(); |
||||
|
|
||||
|
for (DashboardTreeMenusDTO node : menuList) { |
||||
|
if (Objects.equals(String.valueOf(node.getParentMenuId()), rootNodeKey)) { |
||||
|
roots.add(node); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
return roots; |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,269 @@ |
|||||
|
package com.dongjian.dashboard.back.service.impl; |
||||
|
|
||||
|
import com.github.pagehelper.PageHelper; |
||||
|
import com.dongjian.dashboard.back.common.exception.MsgCodeException; |
||||
|
import com.dongjian.dashboard.back.common.language.msg.MsgLanguageChange; |
||||
|
import com.dongjian.dashboard.back.common.response.PageInfo; |
||||
|
import com.dongjian.dashboard.back.common.response.ResponseCode; |
||||
|
import com.dongjian.dashboard.back.common.response.SimpleDataResponse; |
||||
|
import com.dongjian.dashboard.back.dao.ex.DashboardNotificationCategoryMapperExt; |
||||
|
import com.dongjian.dashboard.back.dao.ex.DeviceInfoMapperExt; |
||||
|
import com.dongjian.dashboard.back.dto.dashboardnotification.DashboardNotificationCategorySearchParams; |
||||
|
import com.dongjian.dashboard.back.dto.dashboardnotification.DeleteDashboardNotificationCategoryParams; |
||||
|
import com.dongjian.dashboard.back.dto.dashboardnotification.OptDashboardNotificationCategoryParams; |
||||
|
import com.dongjian.dashboard.back.model.DashboardNotificationCategory; |
||||
|
import com.dongjian.dashboard.back.model.DashboardNotificationCategoryExample; |
||||
|
import com.dongjian.dashboard.back.service.DashboardNotificationCategoryService; |
||||
|
import com.dongjian.dashboard.back.service.common.CommonOpt; |
||||
|
import com.dongjian.dashboard.back.util.CommonUtil; |
||||
|
import com.dongjian.dashboard.back.vo.dashboardnotification.DashboardNotificationCategoryPageVO; |
||||
|
import org.apache.commons.lang3.StringUtils; |
||||
|
import org.slf4j.Logger; |
||||
|
import org.slf4j.LoggerFactory; |
||||
|
import org.springframework.beans.BeanUtils; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
import org.springframework.transaction.annotation.Transactional; |
||||
|
import org.springframework.transaction.interceptor.TransactionAspectSupport; |
||||
|
import org.springframework.util.ObjectUtils; |
||||
|
|
||||
|
import java.util.Arrays; |
||||
|
import java.util.List; |
||||
|
import java.util.stream.Collectors; |
||||
|
|
||||
|
/** |
||||
|
* |
||||
|
* @author jwy-style |
||||
|
* |
||||
|
*/ |
||||
|
@Service |
||||
|
public class DashboardNotificationCategoryServiceImpl implements DashboardNotificationCategoryService { |
||||
|
|
||||
|
private static Logger logger = LoggerFactory.getLogger(DashboardNotificationCategoryServiceImpl.class); |
||||
|
|
||||
|
|
||||
|
@Autowired |
||||
|
private CommonOpt commonOpt; |
||||
|
@Autowired |
||||
|
private MsgLanguageChange msgLanguageChange; |
||||
|
@Autowired |
||||
|
private DashboardNotificationCategoryMapperExt dashboardNotificationCategoryMapperExt; |
||||
|
@Autowired |
||||
|
private DeviceInfoMapperExt deviceInfoMapperExt; |
||||
|
|
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* Adds a new dashboardNotificationCategory based on the provided parameters. |
||||
|
* Validates company ownership, performs common verification, and inserts the dashboardNotificationCategory into the database. |
||||
|
* |
||||
|
* @param optDashboardNotificationCategoryParams Parameters for the new dashboardNotificationCategory to be added |
||||
|
* @param userId ID of the user performing the operation |
||||
|
* @param companyId ID of the company associated with the dashboardNotificationCategory |
||||
|
* @param languageType Language type for error messages |
||||
|
* @return SimpleDataResponse indicating success or failure of the operation |
||||
|
*/ |
||||
|
@Override |
||||
|
@Transactional |
||||
|
public SimpleDataResponse add(OptDashboardNotificationCategoryParams optDashboardNotificationCategoryParams, Long userId, Long companyId, |
||||
|
Integer languageType) { |
||||
|
try { |
||||
|
optDashboardNotificationCategoryParams.setCategoryId(null); |
||||
|
try { |
||||
|
// Validate company ownership to prevent unauthorized operations
|
||||
|
if (ObjectUtils.isEmpty(optDashboardNotificationCategoryParams.getCompanyId())) { |
||||
|
optDashboardNotificationCategoryParams.setCompanyId(companyId); |
||||
|
} else { |
||||
|
checkCompany(optDashboardNotificationCategoryParams, languageType, companyId); |
||||
|
} |
||||
|
|
||||
|
// Perform common verification for the dashboardNotificationCategory parameters
|
||||
|
commonVerifyOpt(optDashboardNotificationCategoryParams, companyId, languageType); |
||||
|
|
||||
|
} catch (MsgCodeException e) { |
||||
|
return new SimpleDataResponse(ResponseCode.MSG_ERROR, e.getMessage()); |
||||
|
} |
||||
|
|
||||
|
long currentUnix = System.currentTimeMillis(); |
||||
|
DashboardNotificationCategory dashboardNotificationCategory = new DashboardNotificationCategory(); |
||||
|
BeanUtils.copyProperties(optDashboardNotificationCategoryParams,dashboardNotificationCategory); |
||||
|
dashboardNotificationCategory.setId(null); |
||||
|
dashboardNotificationCategory.setCreatedAt(currentUnix); |
||||
|
dashboardNotificationCategory.setCreatedBy(userId); |
||||
|
dashboardNotificationCategoryMapperExt.insertSelective(dashboardNotificationCategory); |
||||
|
|
||||
|
return SimpleDataResponse.success(); |
||||
|
} catch (Exception e) { |
||||
|
logger.error("Error occurred while adding a new dashboardNotificationCategory", e); |
||||
|
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
||||
|
return new SimpleDataResponse(ResponseCode.SERVER_ERROR, "server error"); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* Performs common verification operations on the dashboardNotificationCategory parameters. |
||||
|
* Checks parameter validity and existence of the dashboardNotificationCategory name. |
||||
|
* |
||||
|
* @param optDashboardNotificationCategoryParams Parameters of the dashboardNotificationCategory to be verified |
||||
|
* @param companyId ID of the company associated with the dashboardNotificationCategory |
||||
|
* @param languageType Language type for error messages |
||||
|
*/ |
||||
|
private void commonVerifyOpt(OptDashboardNotificationCategoryParams optDashboardNotificationCategoryParams, Long companyId, Integer languageType) { |
||||
|
checkParam(optDashboardNotificationCategoryParams, languageType); |
||||
|
checkExist(optDashboardNotificationCategoryParams, languageType); |
||||
|
} |
||||
|
|
||||
|
private void checkExist(OptDashboardNotificationCategoryParams optDashboardNotificationCategoryParams, Integer languageType) { |
||||
|
if (dashboardNotificationCategoryMapperExt.checkExist(optDashboardNotificationCategoryParams) > 0) { |
||||
|
throw new MsgCodeException(msgLanguageChange.getParameterMapByCode(languageType, "categoryHasExisted")); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* Checks if the specified dashboardNotificationCategory's company ID matches the logged-in user's company or its subsidiary. |
||||
|
* Throws a MsgCodeException if the company ID does not match. |
||||
|
* |
||||
|
* @param optDashboardNotificationCategoryParams Parameters of the dashboardNotificationCategory to be checked |
||||
|
* @param languageType Language type for error messages |
||||
|
* @param companyId ID of the company associated with the logged-in user |
||||
|
* @throws MsgCodeException If the operation is not authorized for the given company |
||||
|
*/ |
||||
|
private void checkCompany(OptDashboardNotificationCategoryParams optDashboardNotificationCategoryParams, Integer languageType, Long companyId) { |
||||
|
if (!commonOpt.isSubCompany(companyId, optDashboardNotificationCategoryParams.getCompanyId())) { |
||||
|
throw new MsgCodeException(msgLanguageChange.getParameterMapByCode(languageType, "noOperationAuth")); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* Checks the validity of the dashboardNotificationCategory name parameter. |
||||
|
* Throws a MsgCodeException if the dashboardNotificationCategory name is blank or exceeds 100 characters. |
||||
|
* |
||||
|
* @param optDashboardNotificationCategoryParams Parameters of the dashboardNotificationCategory to be checked |
||||
|
* @param languageType Language type for error messages |
||||
|
* @throws MsgCodeException If the dashboardNotificationCategory name parameter is invalid |
||||
|
*/ |
||||
|
private void checkParam(OptDashboardNotificationCategoryParams optDashboardNotificationCategoryParams, Integer languageType) { |
||||
|
if(StringUtils.isBlank(optDashboardNotificationCategoryParams.getName()) || optDashboardNotificationCategoryParams.getName().length() > 255){ |
||||
|
throw new MsgCodeException("Parameter error [name]"); |
||||
|
} |
||||
|
if(StringUtils.isNotBlank(optDashboardNotificationCategoryParams.getRemark()) && optDashboardNotificationCategoryParams.getRemark().length() > 255){ |
||||
|
throw new MsgCodeException("Parameter error [remark]"); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* Updates an existing dashboardNotificationCategory with the provided parameters. |
||||
|
* Performs validation checks on the dashboardNotificationCategory parameters and authorization. |
||||
|
* |
||||
|
* @param optDashboardNotificationCategoryParams Parameters of the dashboardNotificationCategory to be updated |
||||
|
* @param userId ID of the user performing the update |
||||
|
* @param companyId ID of the company associated with the dashboardNotificationCategory |
||||
|
* @param languageType Language type for error messages |
||||
|
* @return SimpleDataResponse indicating success or failure of the update operation |
||||
|
*/ |
||||
|
@Override |
||||
|
@Transactional |
||||
|
public SimpleDataResponse edit(OptDashboardNotificationCategoryParams optDashboardNotificationCategoryParams, Long userId, Long companyId, |
||||
|
Integer languageType) { |
||||
|
try { |
||||
|
DashboardNotificationCategory oldBP = dashboardNotificationCategoryMapperExt.selectByPrimaryKey(optDashboardNotificationCategoryParams.getCategoryId()); |
||||
|
if (ObjectUtils.isEmpty(oldBP) || 1 == oldBP.getFlag()){ |
||||
|
return new SimpleDataResponse(ResponseCode.MSG_ERROR, "Not found"); |
||||
|
} |
||||
|
try { |
||||
|
List<Long> selfAndSubCompanyList = commonOpt.getSelfAndSubCompanyId(companyId); |
||||
|
if (!selfAndSubCompanyList.contains(oldBP.getCompanyId())){ |
||||
|
throw new MsgCodeException(msgLanguageChange.getParameterMapByCode(languageType, "noOperationAuth")); |
||||
|
} |
||||
|
//
|
||||
|
if (ObjectUtils.isEmpty(optDashboardNotificationCategoryParams.getCompanyId())) { |
||||
|
optDashboardNotificationCategoryParams.setCompanyId(oldBP.getCompanyId()); |
||||
|
} else if(!selfAndSubCompanyList.contains(optDashboardNotificationCategoryParams.getCompanyId())){//设置的所属企业不属于自己权限企业
|
||||
|
throw new MsgCodeException(msgLanguageChange.getParameterMapByCode(languageType, "noOperationAuth")); |
||||
|
} |
||||
|
|
||||
|
commonVerifyOpt(optDashboardNotificationCategoryParams, companyId, languageType); |
||||
|
|
||||
|
} catch (MsgCodeException e) { |
||||
|
return new SimpleDataResponse(ResponseCode.MSG_ERROR, e.getMessage()); |
||||
|
} |
||||
|
|
||||
|
DashboardNotificationCategory dashboardNotificationCategory = new DashboardNotificationCategory(); |
||||
|
BeanUtils.copyProperties(optDashboardNotificationCategoryParams,dashboardNotificationCategory); |
||||
|
dashboardNotificationCategory.setUpdatedAt(System.currentTimeMillis()); |
||||
|
dashboardNotificationCategory.setUpdatedBy(userId); |
||||
|
|
||||
|
DashboardNotificationCategoryExample example = new DashboardNotificationCategoryExample(); |
||||
|
DashboardNotificationCategoryExample.Criteria criteria = example.createCriteria(); |
||||
|
criteria.andIdEqualTo(optDashboardNotificationCategoryParams.getCategoryId()); |
||||
|
|
||||
|
|
||||
|
dashboardNotificationCategoryMapperExt.updateByExampleSelective(dashboardNotificationCategory, example); |
||||
|
|
||||
|
return SimpleDataResponse.success(); |
||||
|
} catch (Exception e) { |
||||
|
logger.error("Edit dashboardNotificationCategory error", e); |
||||
|
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
||||
|
return new SimpleDataResponse(ResponseCode.SERVER_ERROR, "server error"); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* Batch deletes dashboardNotificationCategorys based on the provided dashboardNotificationCategory IDs. |
||||
|
* Performs validation checks on the dashboardNotificationCategory IDs and authorization. |
||||
|
* |
||||
|
* @param deleteDashboardNotificationCategoryParams Parameters containing dashboardNotificationCategory IDs to be deleted |
||||
|
* @param userId ID of the user performing the deletion |
||||
|
* @param companyId ID of the company associated with the dashboardNotificationCategorys |
||||
|
* @param languageType Language type for error messages |
||||
|
* @return SimpleDataResponse indicating success or failure of the batch deletion operation |
||||
|
*/ |
||||
|
@Override |
||||
|
@Transactional |
||||
|
public SimpleDataResponse batchDelete(DeleteDashboardNotificationCategoryParams deleteDashboardNotificationCategoryParams, Long userId, |
||||
|
Long companyId, Integer languageType) { |
||||
|
if (StringUtils.isBlank(deleteDashboardNotificationCategoryParams.getCategoryIds())) { |
||||
|
return SimpleDataResponse.success(); |
||||
|
} |
||||
|
try { |
||||
|
List<Long> ids = Arrays.asList(StringUtils.split(deleteDashboardNotificationCategoryParams.getCategoryIds(), ",")).stream() |
||||
|
.map(id -> CommonUtil.String2Long(id.trim())).collect(Collectors.toList()); |
||||
|
|
||||
|
|
||||
|
DashboardNotificationCategoryExample dashboardNotificationCategoryExample = new DashboardNotificationCategoryExample(); |
||||
|
DashboardNotificationCategoryExample.Criteria criteria = dashboardNotificationCategoryExample.createCriteria(); |
||||
|
criteria.andIdIn(ids).andCompanyIdIn(commonOpt.getSelfAndSubCompanyId(companyId)); |
||||
|
|
||||
|
DashboardNotificationCategory dashboardNotificationCategory = new DashboardNotificationCategory(); |
||||
|
dashboardNotificationCategory.setFlag(1); |
||||
|
dashboardNotificationCategoryMapperExt.updateByExampleSelective(dashboardNotificationCategory, dashboardNotificationCategoryExample); |
||||
|
|
||||
|
return SimpleDataResponse.success(); |
||||
|
} catch (Exception e) { |
||||
|
logger.error("Batch delete dashboardNotificationCategory error", e); |
||||
|
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
||||
|
return new SimpleDataResponse(ResponseCode.SERVER_ERROR, "server error"); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
|
||||
|
@Override |
||||
|
public PageInfo<DashboardNotificationCategoryPageVO> getListPage(DashboardNotificationCategorySearchParams pageSearchParam, Long companyId, |
||||
|
Long userId, Integer languageType, Integer uTCOffset) { |
||||
|
//list防${}注入
|
||||
|
if (StringUtils.isBlank(pageSearchParam.getCompanyIds())) { |
||||
|
pageSearchParam.setCompanyIdList(Arrays.asList(companyId)); |
||||
|
} else { |
||||
|
pageSearchParam.setCompanyIdList(commonOpt.filterCompanyIds(companyId, pageSearchParam.getCompanyIds())); |
||||
|
} |
||||
|
if (StringUtils.isNotBlank(pageSearchParam.getCategoryIds())) { |
||||
|
pageSearchParam.setCategoryIdList(CommonUtil.commaStr2LongList(pageSearchParam.getCategoryIds())); |
||||
|
} |
||||
|
PageHelper.startPage(pageSearchParam.getPageNum() == null ? 1 : pageSearchParam.getPageNum(), pageSearchParam.getPageSize() == null ? 20 : pageSearchParam.getPageSize()); |
||||
|
List<DashboardNotificationCategoryPageVO> resultList = dashboardNotificationCategoryMapperExt.getListPage(pageSearchParam); |
||||
|
|
||||
|
return new PageInfo<>(resultList); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,260 @@ |
|||||
|
package com.dongjian.dashboard.back.service.impl; |
||||
|
|
||||
|
import com.github.pagehelper.PageHelper; |
||||
|
import com.dongjian.dashboard.back.common.exception.MsgCodeException; |
||||
|
import com.dongjian.dashboard.back.common.language.msg.MsgLanguageChange; |
||||
|
import com.dongjian.dashboard.back.common.response.PageInfo; |
||||
|
import com.dongjian.dashboard.back.common.response.ResponseCode; |
||||
|
import com.dongjian.dashboard.back.common.response.SimpleDataResponse; |
||||
|
import com.dongjian.dashboard.back.dao.ex.DashboardNotificationMapperExt; |
||||
|
import com.dongjian.dashboard.back.dao.ex.DeviceInfoMapperExt; |
||||
|
import com.dongjian.dashboard.back.dto.dashboardnotification.DashboardNotificationSearchParams; |
||||
|
import com.dongjian.dashboard.back.dto.dashboardnotification.DeleteDashboardNotificationParams; |
||||
|
import com.dongjian.dashboard.back.dto.dashboardnotification.OptDashboardNotificationParams; |
||||
|
import com.dongjian.dashboard.back.model.DashboardNotification; |
||||
|
import com.dongjian.dashboard.back.model.DashboardNotificationExample; |
||||
|
import com.dongjian.dashboard.back.service.DashboardNotificationService; |
||||
|
import com.dongjian.dashboard.back.service.common.CommonOpt; |
||||
|
import com.dongjian.dashboard.back.util.CommonUtil; |
||||
|
import com.dongjian.dashboard.back.vo.dashboardnotification.DashboardNotificationPageVO; |
||||
|
import org.apache.commons.lang3.StringUtils; |
||||
|
import org.slf4j.Logger; |
||||
|
import org.slf4j.LoggerFactory; |
||||
|
import org.springframework.beans.BeanUtils; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
import org.springframework.transaction.annotation.Transactional; |
||||
|
import org.springframework.transaction.interceptor.TransactionAspectSupport; |
||||
|
import org.springframework.util.ObjectUtils; |
||||
|
|
||||
|
import java.util.Arrays; |
||||
|
import java.util.List; |
||||
|
import java.util.stream.Collectors; |
||||
|
|
||||
|
/** |
||||
|
* |
||||
|
* @author jwy-style |
||||
|
* |
||||
|
*/ |
||||
|
@Service |
||||
|
public class DashboardNotificationServiceImpl implements DashboardNotificationService { |
||||
|
|
||||
|
private static Logger logger = LoggerFactory.getLogger(DashboardNotificationServiceImpl.class); |
||||
|
|
||||
|
|
||||
|
@Autowired |
||||
|
private CommonOpt commonOpt; |
||||
|
@Autowired |
||||
|
private MsgLanguageChange msgLanguageChange; |
||||
|
@Autowired |
||||
|
private DashboardNotificationMapperExt dashboardNotificationMapperExt; |
||||
|
|
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* Adds a new dashboardNotification based on the provided parameters. |
||||
|
* Validates company ownership, performs common verification, and inserts the dashboardNotification into the database. |
||||
|
* |
||||
|
* @param optDashboardNotificationParams Parameters for the new dashboardNotification to be added |
||||
|
* @param userId ID of the user performing the operation |
||||
|
* @param companyId ID of the company associated with the dashboardNotification |
||||
|
* @param languageType Language type for error messages |
||||
|
* @return SimpleDataResponse indicating success or failure of the operation |
||||
|
*/ |
||||
|
@Override |
||||
|
@Transactional |
||||
|
public SimpleDataResponse add(OptDashboardNotificationParams optDashboardNotificationParams, Long userId, Long companyId, |
||||
|
Integer languageType) { |
||||
|
try { |
||||
|
optDashboardNotificationParams.setDashboardNotificationId(null); |
||||
|
try { |
||||
|
// Validate company ownership to prevent unauthorized operations
|
||||
|
if (ObjectUtils.isEmpty(optDashboardNotificationParams.getCompanyId())) { |
||||
|
optDashboardNotificationParams.setCompanyId(companyId); |
||||
|
} else { |
||||
|
checkCompany(optDashboardNotificationParams, languageType, companyId); |
||||
|
} |
||||
|
|
||||
|
// Perform common verification for the dashboardNotification parameters
|
||||
|
commonVerifyOpt(optDashboardNotificationParams, companyId, languageType); |
||||
|
|
||||
|
} catch (MsgCodeException e) { |
||||
|
return new SimpleDataResponse(ResponseCode.MSG_ERROR, e.getMessage()); |
||||
|
} |
||||
|
|
||||
|
long currentUnix = System.currentTimeMillis(); |
||||
|
DashboardNotification dashboardNotification = new DashboardNotification(); |
||||
|
BeanUtils.copyProperties(optDashboardNotificationParams,dashboardNotification); |
||||
|
dashboardNotification.setId(null); |
||||
|
dashboardNotification.setCreatedAt(currentUnix); |
||||
|
dashboardNotification.setCreatedBy(userId); |
||||
|
dashboardNotificationMapperExt.insertSelective(dashboardNotification); |
||||
|
|
||||
|
return SimpleDataResponse.success(); |
||||
|
} catch (Exception e) { |
||||
|
logger.error("Error occurred while adding a new dashboardNotification", e); |
||||
|
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
||||
|
return new SimpleDataResponse(ResponseCode.SERVER_ERROR, "server error"); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* Performs common verification operations on the dashboardNotification parameters. |
||||
|
* Checks parameter validity and existence of the dashboardNotification name. |
||||
|
* |
||||
|
* @param optDashboardNotificationParams Parameters of the dashboardNotification to be verified |
||||
|
* @param companyId ID of the company associated with the dashboardNotification |
||||
|
* @param languageType Language type for error messages |
||||
|
*/ |
||||
|
private void commonVerifyOpt(OptDashboardNotificationParams optDashboardNotificationParams, Long companyId, Integer languageType) { |
||||
|
checkParam(optDashboardNotificationParams, languageType); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* Checks if the specified dashboardNotification's company ID matches the logged-in user's company or its subsidiary. |
||||
|
* Throws a MsgCodeException if the company ID does not match. |
||||
|
* |
||||
|
* @param optDashboardNotificationParams Parameters of the dashboardNotification to be checked |
||||
|
* @param languageType Language type for error messages |
||||
|
* @param companyId ID of the company associated with the logged-in user |
||||
|
* @throws MsgCodeException If the operation is not authorized for the given company |
||||
|
*/ |
||||
|
private void checkCompany(OptDashboardNotificationParams optDashboardNotificationParams, Integer languageType, Long companyId) { |
||||
|
if (!commonOpt.isSubCompany(companyId, optDashboardNotificationParams.getCompanyId())) { |
||||
|
throw new MsgCodeException(msgLanguageChange.getParameterMapByCode(languageType, "noOperationAuth")); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* Checks the validity of the dashboardNotification name parameter. |
||||
|
* Throws a MsgCodeException if the dashboardNotification name is blank or exceeds 100 characters. |
||||
|
* |
||||
|
* @param optDashboardNotificationParams Parameters of the dashboardNotification to be checked |
||||
|
* @param languageType Language type for error messages |
||||
|
* @throws MsgCodeException If the dashboardNotification name parameter is invalid |
||||
|
*/ |
||||
|
private void checkParam(OptDashboardNotificationParams optDashboardNotificationParams, Integer languageType) { |
||||
|
if(StringUtils.isNotBlank(optDashboardNotificationParams.getDemandTime()) && optDashboardNotificationParams.getDemandTime().length() > 100){ |
||||
|
throw new MsgCodeException("Parameter error [demandTime]"); |
||||
|
} |
||||
|
if(null == optDashboardNotificationParams.getCategoryId()){ |
||||
|
throw new MsgCodeException("Parameter error [categoryId]"); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* Updates an existing dashboardNotification with the provided parameters. |
||||
|
* Performs validation checks on the dashboardNotification parameters and authorization. |
||||
|
* |
||||
|
* @param optDashboardNotificationParams Parameters of the dashboardNotification to be updated |
||||
|
* @param userId ID of the user performing the update |
||||
|
* @param companyId ID of the company associated with the dashboardNotification |
||||
|
* @param languageType Language type for error messages |
||||
|
* @return SimpleDataResponse indicating success or failure of the update operation |
||||
|
*/ |
||||
|
@Override |
||||
|
@Transactional |
||||
|
public SimpleDataResponse edit(OptDashboardNotificationParams optDashboardNotificationParams, Long userId, Long companyId, |
||||
|
Integer languageType) { |
||||
|
try { |
||||
|
DashboardNotification oldBP = dashboardNotificationMapperExt.selectByPrimaryKey(optDashboardNotificationParams.getDashboardNotificationId()); |
||||
|
if (ObjectUtils.isEmpty(oldBP) || 1 == oldBP.getFlag()){ |
||||
|
return new SimpleDataResponse(ResponseCode.MSG_ERROR, "Not found"); |
||||
|
} |
||||
|
try { |
||||
|
List<Long> selfAndSubCompanyList = commonOpt.getSelfAndSubCompanyId(companyId); |
||||
|
if (!selfAndSubCompanyList.contains(oldBP.getCompanyId())){ |
||||
|
throw new MsgCodeException(msgLanguageChange.getParameterMapByCode(languageType, "noOperationAuth")); |
||||
|
} |
||||
|
//
|
||||
|
if (ObjectUtils.isEmpty(optDashboardNotificationParams.getCompanyId())) { |
||||
|
optDashboardNotificationParams.setCompanyId(oldBP.getCompanyId()); |
||||
|
} else if(!selfAndSubCompanyList.contains(optDashboardNotificationParams.getCompanyId())){//设置的所属企业不属于自己权限企业
|
||||
|
throw new MsgCodeException(msgLanguageChange.getParameterMapByCode(languageType, "noOperationAuth")); |
||||
|
} |
||||
|
|
||||
|
commonVerifyOpt(optDashboardNotificationParams, companyId, languageType); |
||||
|
|
||||
|
} catch (MsgCodeException e) { |
||||
|
return new SimpleDataResponse(ResponseCode.MSG_ERROR, e.getMessage()); |
||||
|
} |
||||
|
|
||||
|
DashboardNotification dashboardNotification = new DashboardNotification(); |
||||
|
BeanUtils.copyProperties(optDashboardNotificationParams,dashboardNotification); |
||||
|
dashboardNotification.setUpdatedAt(System.currentTimeMillis()); |
||||
|
dashboardNotification.setUpdatedBy(userId); |
||||
|
|
||||
|
DashboardNotificationExample example = new DashboardNotificationExample(); |
||||
|
DashboardNotificationExample.Criteria criteria = example.createCriteria(); |
||||
|
criteria.andIdEqualTo(optDashboardNotificationParams.getDashboardNotificationId()); |
||||
|
|
||||
|
|
||||
|
dashboardNotificationMapperExt.updateByExampleSelective(dashboardNotification, example); |
||||
|
|
||||
|
return SimpleDataResponse.success(); |
||||
|
} catch (Exception e) { |
||||
|
logger.error("Edit dashboardNotification error", e); |
||||
|
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
||||
|
return new SimpleDataResponse(ResponseCode.SERVER_ERROR, "server error"); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* Batch deletes dashboardNotifications based on the provided dashboardNotification IDs. |
||||
|
* Performs validation checks on the dashboardNotification IDs and authorization. |
||||
|
* |
||||
|
* @param deleteDashboardNotificationParams Parameters containing dashboardNotification IDs to be deleted |
||||
|
* @param userId ID of the user performing the deletion |
||||
|
* @param companyId ID of the company associated with the dashboardNotifications |
||||
|
* @param languageType Language type for error messages |
||||
|
* @return SimpleDataResponse indicating success or failure of the batch deletion operation |
||||
|
*/ |
||||
|
@Override |
||||
|
@Transactional |
||||
|
public SimpleDataResponse batchDelete(DeleteDashboardNotificationParams deleteDashboardNotificationParams, Long userId, |
||||
|
Long companyId, Integer languageType) { |
||||
|
if (StringUtils.isBlank(deleteDashboardNotificationParams.getDashboardNotificationIds())) { |
||||
|
return SimpleDataResponse.success(); |
||||
|
} |
||||
|
try { |
||||
|
List<Long> ids = Arrays.asList(StringUtils.split(deleteDashboardNotificationParams.getDashboardNotificationIds(), ",")).stream() |
||||
|
.map(id -> CommonUtil.String2Long(id.trim())).collect(Collectors.toList()); |
||||
|
|
||||
|
|
||||
|
DashboardNotificationExample dashboardNotificationExample = new DashboardNotificationExample(); |
||||
|
DashboardNotificationExample.Criteria criteria = dashboardNotificationExample.createCriteria(); |
||||
|
criteria.andIdIn(ids).andCompanyIdIn(commonOpt.getSelfAndSubCompanyId(companyId)); |
||||
|
|
||||
|
DashboardNotification dashboardNotification = new DashboardNotification(); |
||||
|
dashboardNotification.setFlag(1); |
||||
|
dashboardNotificationMapperExt.updateByExampleSelective(dashboardNotification, dashboardNotificationExample); |
||||
|
|
||||
|
return SimpleDataResponse.success(); |
||||
|
} catch (Exception e) { |
||||
|
logger.error("Batch delete dashboardNotification error", e); |
||||
|
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
||||
|
return new SimpleDataResponse(ResponseCode.SERVER_ERROR, "server error"); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
|
||||
|
@Override |
||||
|
public PageInfo<DashboardNotificationPageVO> getListPage(DashboardNotificationSearchParams pageSearchParam, Long companyId, |
||||
|
Long userId, Integer languageType, Integer uTCOffset) { |
||||
|
//list防${}注入
|
||||
|
if (StringUtils.isBlank(pageSearchParam.getCompanyIds())) { |
||||
|
pageSearchParam.setCompanyIdList(Arrays.asList(companyId)); |
||||
|
} else { |
||||
|
pageSearchParam.setCompanyIdList(commonOpt.filterCompanyIds(companyId, pageSearchParam.getCompanyIds())); |
||||
|
} |
||||
|
if (StringUtils.isNotBlank(pageSearchParam.getDashboardNotificationIds())) { |
||||
|
pageSearchParam.setDashboardNotificationIdList(CommonUtil.commaStr2LongList(pageSearchParam.getDashboardNotificationIds())); |
||||
|
} |
||||
|
PageHelper.startPage(pageSearchParam.getPageNum() == null ? 1 : pageSearchParam.getPageNum(), pageSearchParam.getPageSize() == null ? 20 : pageSearchParam.getPageSize()); |
||||
|
List<DashboardNotificationPageVO> resultList = dashboardNotificationMapperExt.getListPage(pageSearchParam); |
||||
|
|
||||
|
return new PageInfo<>(resultList); |
||||
|
} |
||||
|
} |
||||
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue