diff --git a/chenhai-system/src/main/resources/mapper/system/CommentsMapper.xml b/chenhai-system/src/main/resources/mapper/system/CommentsMapper.xml new file mode 100644 index 0000000..3d5d875 --- /dev/null +++ b/chenhai-system/src/main/resources/mapper/system/CommentsMapper.xml @@ -0,0 +1,101 @@ + + + + + + + + + + + + + + + + + + + + select comment_id, post_id, author_id, parent_id, content, images, status, is_sensitive, sensitive_words, created_at, updated_at from comments + + + + + + + + insert into comments + + post_id, + author_id, + parent_id, + content, + images, + status, + is_sensitive, + sensitive_words, + created_at, + updated_at, + + + #{postId}, + #{authorId}, + #{parentId}, + #{content}, + #{images}, + #{status}, + #{isSensitive}, + #{sensitiveWords}, + #{createdAt}, + #{updatedAt}, + + + + + update comments + + post_id = #{postId}, + author_id = #{authorId}, + parent_id = #{parentId}, + content = #{content}, + images = #{images}, + status = #{status}, + is_sensitive = #{isSensitive}, + sensitive_words = #{sensitiveWords}, + created_at = #{createdAt}, + updated_at = #{updatedAt}, + + where comment_id = #{commentId} + + + + delete from comments where comment_id = #{commentId} + + + + delete from comments where comment_id in + + #{commentId} + + + \ No newline at end of file diff --git a/chenhai-system/src/main/resources/mapper/system/ConsultationFormsMapper.xml b/chenhai-system/src/main/resources/mapper/system/ConsultationFormsMapper.xml new file mode 100644 index 0000000..c6659e3 --- /dev/null +++ b/chenhai-system/src/main/resources/mapper/system/ConsultationFormsMapper.xml @@ -0,0 +1,101 @@ + + + + + + + + + + + + + + + + + + + + select form_id, farmer_id, title, description, animal_type, images, status, is_sensitive, sensitive_words, view_count, reply_count from consultation_forms + + + + + + + + insert into consultation_forms + + farmer_id, + title, + description, + animal_type, + images, + status, + is_sensitive, + sensitive_words, + view_count, + reply_count, + + + #{farmerId}, + #{title}, + #{description}, + #{animalType}, + #{images}, + #{status}, + #{isSensitive}, + #{sensitiveWords}, + #{viewCount}, + #{replyCount}, + + + + + update consultation_forms + + farmer_id = #{farmerId}, + title = #{title}, + description = #{description}, + animal_type = #{animalType}, + images = #{images}, + status = #{status}, + is_sensitive = #{isSensitive}, + sensitive_words = #{sensitiveWords}, + view_count = #{viewCount}, + reply_count = #{replyCount}, + + where form_id = #{formId} + + + + delete from consultation_forms where form_id = #{formId} + + + + delete from consultation_forms where form_id in + + #{formId} + + + \ No newline at end of file diff --git a/chenhai-system/src/main/resources/mapper/system/ExpertMessagesMapper.xml b/chenhai-system/src/main/resources/mapper/system/ExpertMessagesMapper.xml new file mode 100644 index 0000000..c4080ad --- /dev/null +++ b/chenhai-system/src/main/resources/mapper/system/ExpertMessagesMapper.xml @@ -0,0 +1,96 @@ + + + + + + + + + + + + + + + + + + + select message_id, chat_id, sender_id, receiver_id, content, is_read, read_time, is_sensitive, sensitive_words, created_at from expert_messages + + + + + + + + insert into expert_messages + + chat_id, + sender_id, + receiver_id, + content, + is_read, + read_time, + is_sensitive, + sensitive_words, + created_at, + + + #{chatId}, + #{senderId}, + #{receiverId}, + #{content}, + #{isRead}, + #{readTime}, + #{isSensitive}, + #{sensitiveWords}, + #{createdAt}, + + + + + update expert_messages + + chat_id = #{chatId}, + sender_id = #{senderId}, + receiver_id = #{receiverId}, + content = #{content}, + is_read = #{isRead}, + read_time = #{readTime}, + is_sensitive = #{isSensitive}, + sensitive_words = #{sensitiveWords}, + created_at = #{createdAt}, + + where message_id = #{messageId} + + + + delete from expert_messages where message_id = #{messageId} + + + + delete from expert_messages where message_id in + + #{messageId} + + + \ No newline at end of file diff --git a/chenhai-system/src/main/resources/mapper/system/PostsMapper.xml b/chenhai-system/src/main/resources/mapper/system/PostsMapper.xml new file mode 100644 index 0000000..b81776b --- /dev/null +++ b/chenhai-system/src/main/resources/mapper/system/PostsMapper.xml @@ -0,0 +1,131 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + select post_id, author_id, post_type, title, content, category, images, video_url, status, is_sensitive, sensitive_words, audit_remark, view_count, published_at, last_reply_at, created_at, updated_at from posts + + + + + + + + insert into posts + + author_id, + post_type, + title, + content, + category, + images, + video_url, + status, + is_sensitive, + sensitive_words, + audit_remark, + view_count, + published_at, + last_reply_at, + created_at, + updated_at, + + + #{authorId}, + #{postType}, + #{title}, + #{content}, + #{category}, + #{images}, + #{videoUrl}, + #{status}, + #{isSensitive}, + #{sensitiveWords}, + #{auditRemark}, + #{viewCount}, + #{publishedAt}, + #{lastReplyAt}, + #{createdAt}, + #{updatedAt}, + + + + + update posts + + author_id = #{authorId}, + post_type = #{postType}, + title = #{title}, + content = #{content}, + category = #{category}, + images = #{images}, + video_url = #{videoUrl}, + status = #{status}, + is_sensitive = #{isSensitive}, + sensitive_words = #{sensitiveWords}, + audit_remark = #{auditRemark}, + view_count = #{viewCount}, + published_at = #{publishedAt}, + last_reply_at = #{lastReplyAt}, + created_at = #{createdAt}, + updated_at = #{updatedAt}, + + where post_id = #{postId} + + + + delete from posts where post_id = #{postId} + + + + delete from posts where post_id in + + #{postId} + + + \ No newline at end of file diff --git a/chenhai-system/src/main/resources/mapper/system/SensitiveWordsLibraryMapper.xml b/chenhai-system/src/main/resources/mapper/system/SensitiveWordsLibraryMapper.xml new file mode 100644 index 0000000..0fd8376 --- /dev/null +++ b/chenhai-system/src/main/resources/mapper/system/SensitiveWordsLibraryMapper.xml @@ -0,0 +1,81 @@ + + + + + + + + + + + + + + + + select word_id, word, word_type, level, replace_word, created_at, updated_at from sensitive_words_library + + + + + + + + insert into sensitive_words_library + + word, + word_type, + level, + replace_word, + created_at, + updated_at, + + + #{word}, + #{wordType}, + #{level}, + #{replaceWord}, + #{createdAt}, + #{updatedAt}, + + + + + update sensitive_words_library + + word = #{word}, + word_type = #{wordType}, + level = #{level}, + replace_word = #{replaceWord}, + created_at = #{createdAt}, + updated_at = #{updatedAt}, + + where word_id = #{wordId} + + + + delete from sensitive_words_library where word_id = #{wordId} + + + + delete from sensitive_words_library where word_id in + + #{wordId} + + + \ No newline at end of file diff --git a/chenhai-system/src/main/resources/mapper/system/SysConfigMapper.xml b/chenhai-system/src/main/resources/mapper/system/SysConfigMapper.xml new file mode 100644 index 0000000..859cecf --- /dev/null +++ b/chenhai-system/src/main/resources/mapper/system/SysConfigMapper.xml @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + select config_id, config_name, config_key, config_value, config_type, create_by, create_time, update_by, update_time, remark + from sys_config + + + + + + + and config_id = #{configId} + + + and config_key = #{configKey} + + + + + + + + + + + + + + insert into sys_config ( + config_name, + config_key, + config_value, + config_type, + create_by, + remark, + create_time + )values( + #{configName}, + #{configKey}, + #{configValue}, + #{configType}, + #{createBy}, + #{remark}, + sysdate() + ) + + + + update sys_config + + config_name = #{configName}, + config_key = #{configKey}, + config_value = #{configValue}, + config_type = #{configType}, + update_by = #{updateBy}, + remark = #{remark}, + update_time = sysdate() + + where config_id = #{configId} + + + + delete from sys_config where config_id = #{configId} + + + + delete from sys_config where config_id in + + #{configId} + + + + \ No newline at end of file diff --git a/chenhai-system/src/main/resources/mapper/system/SysDeptMapper.xml b/chenhai-system/src/main/resources/mapper/system/SysDeptMapper.xml new file mode 100644 index 0000000..547f994 --- /dev/null +++ b/chenhai-system/src/main/resources/mapper/system/SysDeptMapper.xml @@ -0,0 +1,248 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + select d.dept_id, + d.parent_id, + d.ancestors, + d.dept_name, + d.order_num, + d.leader, + d.phone, + d.email, + d.status, + d.area_code, + d.del_flag, + d.create_by, + d.create_time, + LENGTH(d.ancestors) - LENGTH(REPLACE(d.ancestors, ',', '')) + 1 AS char_num + from sys_dept d + + + + + + + + + + + + + + + + + + + + + + + + + + + insert into sys_dept( + dept_id, + parent_id, + dept_name, + ancestors, + order_num, + leader, + phone, + email, + status, + area_code, + create_by, + create_time + )values( + #{deptId}, + #{parentId}, + #{deptName}, + #{ancestors}, + #{orderNum}, + #{leader}, + #{phone}, + #{email}, + #{status}, + #{areaCode}, + #{createBy}, + sysdate() + ) + + + + update sys_dept + + parent_id = #{parentId}, + dept_name = #{deptName}, + ancestors = #{ancestors}, + order_num = #{orderNum}, + leader = #{leader}, + phone = #{phone}, + email = #{email}, + status = #{status}, + area_code = #{areaCode}, + update_by = #{updateBy}, + update_time = sysdate() + + where dept_id = #{deptId} + + + + update sys_dept set ancestors = + + when #{item.deptId} then #{item.ancestors} + + where dept_id in + + #{item.deptId} + + + + + update sys_dept set status = '0' where dept_id in + + #{deptId} + + + + + update sys_dept + set del_flag = '2' + where dept_id = #{deptId} + + + diff --git a/chenhai-system/src/main/resources/mapper/system/SysDictDataMapper.xml b/chenhai-system/src/main/resources/mapper/system/SysDictDataMapper.xml new file mode 100644 index 0000000..19dc335 --- /dev/null +++ b/chenhai-system/src/main/resources/mapper/system/SysDictDataMapper.xml @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark + from sys_dict_data + + + + + + + + + + + + + + delete from sys_dict_data where dict_code = #{dictCode} + + + + delete from sys_dict_data where dict_code in + + #{dictCode} + + + + + update sys_dict_data + + dict_sort = #{dictSort}, + dict_label = #{dictLabel}, + dict_value = #{dictValue}, + dict_type = #{dictType}, + css_class = #{cssClass}, + list_class = #{listClass}, + is_default = #{isDefault}, + status = #{status}, + remark = #{remark}, + update_by = #{updateBy}, + update_time = sysdate() + + where dict_code = #{dictCode} + + + + update sys_dict_data set dict_type = #{newDictType} where dict_type = #{oldDictType} + + + + insert into sys_dict_data( + dict_sort, + dict_label, + dict_value, + dict_type, + css_class, + list_class, + is_default, + status, + remark, + create_by, + create_time + )values( + #{dictSort}, + #{dictLabel}, + #{dictValue}, + #{dictType}, + #{cssClass}, + #{listClass}, + #{isDefault}, + #{status}, + #{remark}, + #{createBy}, + sysdate() + ) + + + \ No newline at end of file diff --git a/chenhai-system/src/main/resources/mapper/system/SysDictTypeMapper.xml b/chenhai-system/src/main/resources/mapper/system/SysDictTypeMapper.xml new file mode 100644 index 0000000..fdd7760 --- /dev/null +++ b/chenhai-system/src/main/resources/mapper/system/SysDictTypeMapper.xml @@ -0,0 +1,105 @@ + + + + + + + + + + + + + + + + + select dict_id, dict_name, dict_type, status, create_by, create_time, remark + from sys_dict_type + + + + + + + + + + + + + + delete from sys_dict_type where dict_id = #{dictId} + + + + delete from sys_dict_type where dict_id in + + #{dictId} + + + + + update sys_dict_type + + dict_name = #{dictName}, + dict_type = #{dictType}, + status = #{status}, + remark = #{remark}, + update_by = #{updateBy}, + update_time = sysdate() + + where dict_id = #{dictId} + + + + insert into sys_dict_type( + dict_name, + dict_type, + status, + remark, + create_by, + create_time + )values( + #{dictName}, + #{dictType}, + #{status}, + #{remark}, + #{createBy}, + sysdate() + ) + + + \ No newline at end of file diff --git a/chenhai-system/src/main/resources/mapper/system/SysLogininforMapper.xml b/chenhai-system/src/main/resources/mapper/system/SysLogininforMapper.xml new file mode 100644 index 0000000..7e51ae7 --- /dev/null +++ b/chenhai-system/src/main/resources/mapper/system/SysLogininforMapper.xml @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + insert into sys_logininfor (user_name, status, ipaddr, login_location, browser, os, msg, login_time) + values (#{userName}, #{status}, #{ipaddr}, #{loginLocation}, #{browser}, #{os}, #{msg}, sysdate()) + + + + + + delete from sys_logininfor where info_id in + + #{infoId} + + + + + truncate table sys_logininfor + + + \ No newline at end of file diff --git a/chenhai-system/src/main/resources/mapper/system/SysMenuMapper.xml b/chenhai-system/src/main/resources/mapper/system/SysMenuMapper.xml new file mode 100644 index 0000000..a4db88f --- /dev/null +++ b/chenhai-system/src/main/resources/mapper/system/SysMenuMapper.xml @@ -0,0 +1,202 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select menu_id, menu_name, parent_id, order_num, path, component, `query`, is_frame, is_cache, menu_type, visible, status, ifnull(perms,'') as perms, icon, create_time + from sys_menu + + + + + + + + + + + + + + + + + + + + + + + + + + update sys_menu + + menu_name = #{menuName}, + parent_id = #{parentId}, + order_num = #{orderNum}, + path = #{path}, + component = #{component}, + `query` = #{query}, + is_frame = #{isFrame}, + is_cache = #{isCache}, + menu_type = #{menuType}, + visible = #{visible}, + status = #{status}, + perms = #{perms}, + icon = #{icon}, + remark = #{remark}, + update_by = #{updateBy}, + update_time = sysdate() + + where menu_id = #{menuId} + + + + insert into sys_menu( + menu_id, + parent_id, + menu_name, + order_num, + path, + component, + `query`, + is_frame, + is_cache, + menu_type, + visible, + status, + perms, + icon, + remark, + create_by, + create_time + )values( + #{menuId}, + #{parentId}, + #{menuName}, + #{orderNum}, + #{path}, + #{component}, + #{query}, + #{isFrame}, + #{isCache}, + #{menuType}, + #{visible}, + #{status}, + #{perms}, + #{icon}, + #{remark}, + #{createBy}, + sysdate() + ) + + + + delete from sys_menu where menu_id = #{menuId} + + + \ No newline at end of file diff --git a/chenhai-system/src/main/resources/mapper/system/SysNoticeMapper.xml b/chenhai-system/src/main/resources/mapper/system/SysNoticeMapper.xml new file mode 100644 index 0000000..aceaa04 --- /dev/null +++ b/chenhai-system/src/main/resources/mapper/system/SysNoticeMapper.xml @@ -0,0 +1,112 @@ + + + + + + + + + + + + + + + + + + + + + select notice_id, + notice_title, + notice_type, + cast(notice_content as char) as notice_content, + status, + create_by, + create_time, + update_by, + update_time, + remark, + cover, + view_num + from sys_notice + + + + + + + + insert into sys_notice ( + notice_title, + notice_type, + notice_content, + status, + remark, + create_by, + cover, + view_num, + create_time + )values( + #{noticeTitle}, + #{noticeType}, + #{noticeContent}, + #{status}, + #{remark}, + #{createBy}, + #{cover}, + #{viewNum}, + sysdate() + + ) + + + + update sys_notice + + notice_title = #{noticeTitle}, + notice_type = #{noticeType}, + notice_content = #{noticeContent}, + status = #{status}, + update_by = #{updateBy}, + cover = #{cover}, + view_num = #{viewNum}, + update_time = sysdate() + + where notice_id = #{noticeId} + + + + delete + from sys_notice + where notice_id = #{noticeId} + + + + delete from sys_notice where notice_id in + + #{noticeId} + + + + diff --git a/chenhai-system/src/main/resources/mapper/system/SysOperLogMapper.xml b/chenhai-system/src/main/resources/mapper/system/SysOperLogMapper.xml new file mode 100644 index 0000000..279ae50 --- /dev/null +++ b/chenhai-system/src/main/resources/mapper/system/SysOperLogMapper.xml @@ -0,0 +1,84 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + select oper_id, title, business_type, method, request_method, operator_type, oper_name, dept_name, oper_url, oper_ip, oper_location, oper_param, json_result, status, error_msg, oper_time, cost_time + from sys_oper_log + + + + insert into sys_oper_log(title, business_type, method, request_method, operator_type, oper_name, dept_name, oper_url, oper_ip, oper_location, oper_param, json_result, status, error_msg, cost_time, oper_time) + values (#{title}, #{businessType}, #{method}, #{requestMethod}, #{operatorType}, #{operName}, #{deptName}, #{operUrl}, #{operIp}, #{operLocation}, #{operParam}, #{jsonResult}, #{status}, #{errorMsg}, #{costTime}, sysdate()) + + + + + + delete from sys_oper_log where oper_id in + + #{operId} + + + + + + + truncate table sys_oper_log + + + \ No newline at end of file diff --git a/chenhai-system/src/main/resources/mapper/system/SysPostMapper.xml b/chenhai-system/src/main/resources/mapper/system/SysPostMapper.xml new file mode 100644 index 0000000..be1ef43 --- /dev/null +++ b/chenhai-system/src/main/resources/mapper/system/SysPostMapper.xml @@ -0,0 +1,122 @@ + + + + + + + + + + + + + + + + + + + select post_id, post_code, post_name, post_sort, status, create_by, create_time, remark + from sys_post + + + + + + + + + + + + + + + + + + update sys_post + + post_code = #{postCode}, + post_name = #{postName}, + post_sort = #{postSort}, + status = #{status}, + remark = #{remark}, + update_by = #{updateBy}, + update_time = sysdate() + + where post_id = #{postId} + + + + insert into sys_post( + post_id, + post_code, + post_name, + post_sort, + status, + remark, + create_by, + create_time + )values( + #{postId}, + #{postCode}, + #{postName}, + #{postSort}, + #{status}, + #{remark}, + #{createBy}, + sysdate() + ) + + + + delete from sys_post where post_id = #{postId} + + + + delete from sys_post where post_id in + + #{postId} + + + + \ No newline at end of file diff --git a/chenhai-system/src/main/resources/mapper/system/SysRoleDeptMapper.xml b/chenhai-system/src/main/resources/mapper/system/SysRoleDeptMapper.xml new file mode 100644 index 0000000..9441cca --- /dev/null +++ b/chenhai-system/src/main/resources/mapper/system/SysRoleDeptMapper.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + delete from sys_role_dept where role_id=#{roleId} + + + + + + delete from sys_role_dept where role_id in + + #{roleId} + + + + + insert into sys_role_dept(role_id, dept_id) values + + (#{item.roleId},#{item.deptId}) + + + + \ No newline at end of file diff --git a/chenhai-system/src/main/resources/mapper/system/SysRoleMapper.xml b/chenhai-system/src/main/resources/mapper/system/SysRoleMapper.xml new file mode 100644 index 0000000..59bbbbf --- /dev/null +++ b/chenhai-system/src/main/resources/mapper/system/SysRoleMapper.xml @@ -0,0 +1,152 @@ + + + + + + + + + + + + + + + + + + + + + + + select distinct r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.menu_check_strictly, r.dept_check_strictly, + r.status, r.del_flag, r.create_time, r.remark + from sys_role r + left join sys_user_role ur on ur.role_id = r.role_id + left join sys_user u on u.user_id = ur.user_id + left join sys_dept d on u.dept_id = d.dept_id + + + + + + + + + + + + + + + + + + + + insert into sys_role( + role_id, + role_name, + role_key, + role_sort, + data_scope, + menu_check_strictly, + dept_check_strictly, + status, + remark, + create_by, + create_time + )values( + #{roleId}, + #{roleName}, + #{roleKey}, + #{roleSort}, + #{dataScope}, + #{menuCheckStrictly}, + #{deptCheckStrictly}, + #{status}, + #{remark}, + #{createBy}, + sysdate() + ) + + + + update sys_role + + role_name = #{roleName}, + role_key = #{roleKey}, + role_sort = #{roleSort}, + data_scope = #{dataScope}, + menu_check_strictly = #{menuCheckStrictly}, + dept_check_strictly = #{deptCheckStrictly}, + status = #{status}, + remark = #{remark}, + update_by = #{updateBy}, + update_time = sysdate() + + where role_id = #{roleId} + + + + update sys_role set del_flag = '2' where role_id = #{roleId} + + + + update sys_role set del_flag = '2' where role_id in + + #{roleId} + + + + \ No newline at end of file diff --git a/chenhai-system/src/main/resources/mapper/system/SysRoleMenuMapper.xml b/chenhai-system/src/main/resources/mapper/system/SysRoleMenuMapper.xml new file mode 100644 index 0000000..104fd6e --- /dev/null +++ b/chenhai-system/src/main/resources/mapper/system/SysRoleMenuMapper.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + delete from sys_role_menu where role_id=#{roleId} + + + + delete from sys_role_menu where role_id in + + #{roleId} + + + + + insert into sys_role_menu(role_id, menu_id) values + + (#{item.roleId},#{item.menuId}) + + + + \ No newline at end of file diff --git a/chenhai-system/src/main/resources/mapper/system/SysUserMapper.xml b/chenhai-system/src/main/resources/mapper/system/SysUserMapper.xml new file mode 100644 index 0000000..69abcf5 --- /dev/null +++ b/chenhai-system/src/main/resources/mapper/system/SysUserMapper.xml @@ -0,0 +1,222 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.avatar, u.phonenumber, u.password, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, + d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.status as dept_status, d.area_code, + r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status + from sys_user u + left join sys_dept d on u.dept_id = d.dept_id + left join sys_user_role ur on u.user_id = ur.user_id + left join sys_role r on r.role_id = ur.role_id + + + + + + + + + + + + + + + + + + + + insert into sys_user( + user_id, + dept_id, + user_name, + nick_name, + email, + avatar, + phonenumber, + sex, + password, + status, + create_by, + remark, + create_time + )values( + #{userId}, + #{deptId}, + #{userName}, + #{nickName}, + #{email}, + #{avatar}, + #{phonenumber}, + #{sex}, + #{password}, + #{status}, + #{createBy}, + #{remark}, + sysdate() + ) + + + + update sys_user + + dept_id = #{deptId}, + user_name = #{userName}, + nick_name = #{nickName}, + email = #{email}, + phonenumber = #{phonenumber}, + sex = #{sex}, + avatar = #{avatar}, + password = #{password}, + status = #{status}, + login_ip = #{loginIp}, + login_date = #{loginDate}, + update_by = #{updateBy}, + remark = #{remark}, + update_time = sysdate() + + where user_id = #{userId} + + + + update sys_user set status = #{status} where user_id = #{userId} + + + + update sys_user set avatar = #{avatar} where user_name = #{userName} + + + + update sys_user set password = #{password} where user_name = #{userName} + + + + update sys_user set del_flag = '2' where user_id = #{userId} + + + + update sys_user set del_flag = '2' where user_id in + + #{userId} + + + + \ No newline at end of file diff --git a/chenhai-system/src/main/resources/mapper/system/SysUserPostMapper.xml b/chenhai-system/src/main/resources/mapper/system/SysUserPostMapper.xml new file mode 100644 index 0000000..fedf57d --- /dev/null +++ b/chenhai-system/src/main/resources/mapper/system/SysUserPostMapper.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + delete from sys_user_post where user_id=#{userId} + + + + + + delete from sys_user_post where user_id in + + #{userId} + + + + + insert into sys_user_post(user_id, post_id) values + + (#{item.userId},#{item.postId}) + + + + \ No newline at end of file diff --git a/chenhai-system/src/main/resources/mapper/system/SysUserRoleMapper.xml b/chenhai-system/src/main/resources/mapper/system/SysUserRoleMapper.xml new file mode 100644 index 0000000..88bc49d --- /dev/null +++ b/chenhai-system/src/main/resources/mapper/system/SysUserRoleMapper.xml @@ -0,0 +1,44 @@ + + + + + + + + + + + delete from sys_user_role where user_id=#{userId} + + + + + + delete from sys_user_role where user_id in + + #{userId} + + + + + insert into sys_user_role(user_id, role_id) values + + (#{item.userId},#{item.roleId}) + + + + + delete from sys_user_role where user_id=#{userId} and role_id=#{roleId} + + + + delete from sys_user_role where role_id=#{roleId} and user_id in + + #{userId} + + + \ No newline at end of file diff --git a/chenhai-system/src/main/resources/mapper/system/VetOnlineStatusMapper.xml b/chenhai-system/src/main/resources/mapper/system/VetOnlineStatusMapper.xml new file mode 100644 index 0000000..afb87d2 --- /dev/null +++ b/chenhai-system/src/main/resources/mapper/system/VetOnlineStatusMapper.xml @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + select status_id, vet_id, is_online, online_status, last_online_time, last_active_time, current_session_id, ip_address from vet_online_status + + + + + + + + insert into vet_online_status + + vet_id, + is_online, + online_status, + last_online_time, + last_active_time, + current_session_id, + ip_address, + + + #{vetId}, + #{isOnline}, + #{onlineStatus}, + #{lastOnlineTime}, + #{lastActiveTime}, + #{currentSessionId}, + #{ipAddress}, + + + + + update vet_online_status + + vet_id = #{vetId}, + is_online = #{isOnline}, + online_status = #{onlineStatus}, + last_online_time = #{lastOnlineTime}, + last_active_time = #{lastActiveTime}, + current_session_id = #{currentSessionId}, + ip_address = #{ipAddress}, + + where status_id = #{statusId} + + + + delete from vet_online_status where status_id = #{statusId} + + + + delete from vet_online_status where status_id in + + #{statusId} + + + \ No newline at end of file diff --git a/chenhai-system/src/main/resources/mapper/system/VetQualificationMapper.xml b/chenhai-system/src/main/resources/mapper/system/VetQualificationMapper.xml new file mode 100644 index 0000000..406c392 --- /dev/null +++ b/chenhai-system/src/main/resources/mapper/system/VetQualificationMapper.xml @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + select qualification_id, vet_id, real_name, id_card, qualification_type, certificate_no, certificate_files, apply_time, audit_time, audit_status, audit_opinion, auditor_id, create_by, create_time, update_by, update_time, remark from vet_qualification + + + + + + + + insert into vet_qualification + + vet_id, + real_name, + id_card, + qualification_type, + certificate_no, + certificate_files, + apply_time, + audit_time, + audit_status, + audit_opinion, + auditor_id, + create_by, + create_time, + update_by, + update_time, + remark, + + + #{vetId}, + #{realName}, + #{idCard}, + #{qualificationType}, + #{certificateNo}, + #{certificateFiles}, + #{applyTime}, + #{auditTime}, + #{auditStatus}, + #{auditOpinion}, + #{auditorId}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + #{remark}, + + + + + update vet_qualification + + vet_id = #{vetId}, + real_name = #{realName}, + id_card = #{idCard}, + qualification_type = #{qualificationType}, + certificate_no = #{certificateNo}, + certificate_files = #{certificateFiles}, + apply_time = #{applyTime}, + audit_time = #{auditTime}, + audit_status = #{auditStatus}, + audit_opinion = #{auditOpinion}, + auditor_id = #{auditorId}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + remark = #{remark}, + + where qualification_id = #{qualificationId} + + + + delete from vet_qualification where qualification_id = #{qualificationId} + + + + delete from vet_qualification where qualification_id in + + #{qualificationId} + + + \ No newline at end of file diff --git a/chenhai-system/src/main/resources/mapper/system/VetRepliesMapper.xml b/chenhai-system/src/main/resources/mapper/system/VetRepliesMapper.xml new file mode 100644 index 0000000..c93527e --- /dev/null +++ b/chenhai-system/src/main/resources/mapper/system/VetRepliesMapper.xml @@ -0,0 +1,81 @@ + + + + + + + + + + + + + + + + select reply_id, form_id, vet_id, diagnosis, is_sensitive, created_at, updated_at from vet_replies + + + + + + + + insert into vet_replies + + form_id, + vet_id, + diagnosis, + is_sensitive, + created_at, + updated_at, + + + #{formId}, + #{vetId}, + #{diagnosis}, + #{isSensitive}, + #{createdAt}, + #{updatedAt}, + + + + + update vet_replies + + form_id = #{formId}, + vet_id = #{vetId}, + diagnosis = #{diagnosis}, + is_sensitive = #{isSensitive}, + created_at = #{createdAt}, + updated_at = #{updatedAt}, + + where reply_id = #{replyId} + + + + delete from vet_replies where reply_id = #{replyId} + + + + delete from vet_replies where reply_id in + + #{replyId} + + + \ No newline at end of file