代码提交
This commit is contained in:
parent
e3febc2bb8
commit
5af9962c85
|
@ -36,7 +36,7 @@ public class GlobalCacheManager {
|
|||
|
||||
static void initEnum() {
|
||||
//在包下扫描出BaseEnum的子类
|
||||
Set<Class<?>> classes = ClassUtil.scanPackageBySuper("com.changhu.common.db.enums", BaseEnum.class);
|
||||
Set<Class<?>> classes = ClassUtil.scanPackageBySuper(BaseEnum.class.getPackageName(), BaseEnum.class);
|
||||
//序列化方法
|
||||
Method superSerializer = ClassUtil.getDeclaredMethod(BaseEnum.class, "serializer");
|
||||
for (Class<?> aClass : classes) {
|
||||
|
|
|
@ -12,7 +12,6 @@ import com.changhu.module.miniProgram.pojo.params.SaveOrUpdateSecurityUserParams
|
|||
import com.changhu.module.miniProgram.pojo.params.UserRegisterParams;
|
||||
import com.changhu.module.miniProgram.pojo.queryParams.ServiceProjectSecurityUserPagerQueryParams;
|
||||
import com.changhu.module.miniProgram.pojo.vo.ServiceProjectSecurityUserPagerVo;
|
||||
import com.changhu.module.miniProgram.service.ProjectManageIndexService;
|
||||
import com.changhu.module.miniProgram.service.UserService;
|
||||
import com.changhu.pojo.entity.MiniProgramUser;
|
||||
import com.changhu.pojo.entity.SecurityUser;
|
||||
|
@ -34,9 +33,6 @@ public class UserServiceImpl implements UserService {
|
|||
@Autowired
|
||||
private SecurityUserMapper securityUserMapper;
|
||||
|
||||
@Autowired
|
||||
private ProjectManageIndexService projectManageIndexService;
|
||||
|
||||
@Override
|
||||
public void register(UserRegisterParams params) {
|
||||
MiniProgramUser miniProgramUser = BeanUtil.copyProperties(params, MiniProgramUser.class);
|
||||
|
|
|
@ -50,7 +50,7 @@ public class FastJson2Config {
|
|||
* 在fastjson2中 目前找到的方案是使用JSON.register(type,ObjectWriter)去对属性与 序列化/反序列化 进行绑定
|
||||
*/
|
||||
//序列化配置
|
||||
Set<Class<?>> baseEnumClasses = ClassUtil.scanPackageBySuper("com.changhu.common.db", BaseEnum.class);
|
||||
Set<Class<?>> baseEnumClasses = ClassUtil.scanPackageBySuper(BaseEnum.class.getPackageName(), BaseEnum.class);
|
||||
baseEnumClasses.forEach(clazz -> {
|
||||
JSON.register(clazz, DbEnumSerializer.instance);
|
||||
JSON.register(clazz, DbEnumDeserializer.instance);
|
||||
|
|
Loading…
Reference in New Issue