This commit is contained in:
YunaiV 2023-12-29 12:49:13 +08:00
commit 46e60d6b0a
8 changed files with 56 additions and 25 deletions

View File

@ -490,6 +490,37 @@ id,name,type,parentId
441700,阳江市,3,440000
441800,清远市,3,440000
441900,东莞市,3,440000
441901,莞城区,4,441900
441902,南城区,4,441900
441904,万江区,4,441900
441905,石碣镇,4,441900
441906,石龙镇,4,441900
441907,茶山镇,4,441900
441908,石排镇,4,441900
441909,企石镇,4,441900
441910,横沥镇,4,441900
441911,桥头镇,4,441900
441912,谢岗镇,4,441900
441913,东坑镇,4,441900
441914,常平镇,4,441900
441915,寮步镇,4,441900
441916,大朗镇,4,441900
441917,麻涌镇,4,441900
441918,中堂镇,4,441900
441919,高埗镇,4,441900
441920,樟木头镇,4,441900
441921,大岭山镇,4,441900
441922,望牛墩镇,4,441900
441923,黄江镇,4,441900
441924,洪梅镇,4,441900
441925,清溪镇,4,441900
441926,沙田镇,4,441900
441927,道滘镇,4,441900
441928,塘厦镇,4,441900
441929,虎门镇,4,441900
441930,厚街镇,4,441900
441931,凤岗镇,4,441900
441932,长安镇,4,441900
442000,中山市,3,440000
445100,潮州市,3,440000
445200,揭阳市,3,440000

1 id name type parentId
490 441700 阳江市 3 440000
491 441800 清远市 3 440000
492 441900 东莞市 3 440000
493 441901 莞城区 4 441900
494 441902 南城区 4 441900
495 441904 万江区 4 441900
496 441905 石碣镇 4 441900
497 441906 石龙镇 4 441900
498 441907 茶山镇 4 441900
499 441908 石排镇 4 441900
500 441909 企石镇 4 441900
501 441910 横沥镇 4 441900
502 441911 桥头镇 4 441900
503 441912 谢岗镇 4 441900
504 441913 东坑镇 4 441900
505 441914 常平镇 4 441900
506 441915 寮步镇 4 441900
507 441916 大朗镇 4 441900
508 441917 麻涌镇 4 441900
509 441918 中堂镇 4 441900
510 441919 高埗镇 4 441900
511 441920 樟木头镇 4 441900
512 441921 大岭山镇 4 441900
513 441922 望牛墩镇 4 441900
514 441923 黄江镇 4 441900
515 441924 洪梅镇 4 441900
516 441925 清溪镇 4 441900
517 441926 沙田镇 4 441900
518 441927 道滘镇 4 441900
519 441928 塘厦镇 4 441900
520 441929 虎门镇 4 441900
521 441930 厚街镇 4 441900
522 441931 凤岗镇 4 441900
523 441932 长安镇 4 441900
524 442000 中山市 3 440000
525 445100 潮州市 3 440000
526 445200 揭阳市 3 440000

View File

@ -121,8 +121,8 @@ public interface BaseMapperX<T> extends MPJBaseMapper<T> {
*
* @param entities 实体们
*/
default void insertBatch(Collection<T> entities) {
Db.saveBatch(entities);
default Boolean insertBatch(Collection<T> entities) {
return Db.saveBatch(entities);
}
/**
@ -131,28 +131,28 @@ public interface BaseMapperX<T> extends MPJBaseMapper<T> {
* @param entities 实体们
* @param size 插入数量 Db.saveBatch 默认为 1000
*/
default void insertBatch(Collection<T> entities, int size) {
Db.saveBatch(entities, size);
default Boolean insertBatch(Collection<T> entities, int size) {
return Db.saveBatch(entities, size);
}
default void updateBatch(T update) {
update(update, new QueryWrapper<>());
default int updateBatch(T update) {
return update(update, new QueryWrapper<>());
}
default void updateBatch(Collection<T> entities) {
Db.updateBatchById(entities);
default Boolean updateBatch(Collection<T> entities) {
return Db.updateBatchById(entities);
}
default void updateBatch(Collection<T> entities, int size) {
Db.updateBatchById(entities, size);
default Boolean updateBatch(Collection<T> entities, int size) {
return Db.updateBatchById(entities, size);
}
default void insertOrUpdate(T entity) {
Db.saveOrUpdate(entity);
default Boolean insertOrUpdate(T entity) {
return Db.saveOrUpdate(entity);
}
default void insertOrUpdateBatch(Collection<T> collection) {
Db.saveOrUpdateBatch(collection);
default Boolean insertOrUpdateBatch(Collection<T> collection) {
return Db.saveOrUpdateBatch(collection);
}
default int delete(String field, String value) {

View File

@ -66,7 +66,7 @@ public class WebSocketSessionManagerImpl implements WebSocketSessionManager {
@Override
public void removeSession(WebSocketSession session) {
// 移除从 idSessions
idSessions.remove(session.getId(), session);
idSessions.remove(session.getId());
// 移除从 idSessions
LoginUser user = WebSocketFrameworkUtils.getLoginUser(session);
if (user == null) {

View File

@ -1,7 +1,7 @@
package ${basePackage}.module.${table.moduleName}.controller.${sceneEnum.basePackage}.${table.businessName};
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import jakarta.annotation.Resource;
import org.springframework.validation.annotation.Validated;
#if ($sceneEnum.scene == 1)import org.springframework.security.access.prepost.PreAuthorize;#end
@ -9,9 +9,9 @@ import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Operation;
import javax.validation.constraints.*;
import javax.validation.*;
import javax.servlet.http.*;
import jakarta.validation.constraints.*;
import jakarta.validation.*;
import jakarta.servlet.http.*;
import java.util.*;
import java.io.IOException;

View File

@ -3,7 +3,7 @@ package ${basePackage}.module.${table.moduleName}.controller.${sceneEnum.basePac
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import javax.validation.constraints.*;
import jakarta.validation.constraints.*;
## 处理 BigDecimal 字段的引入
import java.util.*;
#foreach ($column in $columns)

View File

@ -1,7 +1,7 @@
package ${basePackage}.module.${table.moduleName}.service.${table.businessName};
import java.util.*;
import javax.validation.*;
import jakarta.validation.*;
import ${basePackage}.module.${table.moduleName}.controller.${sceneEnum.basePackage}.${table.businessName}.vo.*;
import ${basePackage}.module.${table.moduleName}.dal.dataobject.${table.businessName}.${table.className}DO;
## 特殊:主子表专属逻辑

View File

@ -1,7 +1,7 @@
package ${basePackage}.module.${table.moduleName}.service.${table.businessName};
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import jakarta.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import org.springframework.transaction.annotation.Transactional;

View File

@ -4,7 +4,7 @@ import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.mock.mockito.MockBean;
import javax.annotation.Resource;
import jakarta.annotation.Resource;
import ${baseFrameworkPackage}.test.core.ut.BaseDbUnitTest;
@ -13,7 +13,7 @@ import ${basePackage}.module.${table.moduleName}.dal.dataobject.${table.business
import ${basePackage}.module.${table.moduleName}.dal.mysql.${table.businessName}.${table.className}Mapper;
import ${PageResultClassName};
import javax.annotation.Resource;
import jakarta.annotation.Resource;
import org.springframework.context.annotation.Import;
import java.util.*;
import java.time.LocalDateTime;