|
@@ -0,0 +1,40 @@
|
|
|
+package com.xy.service.impl;
|
|
|
+
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
+import com.xy.dto.SysSystemUserDto;
|
|
|
+import com.xy.entity.SysSystemUser;
|
|
|
+import com.xy.mapper.SysSystemUserMapper;
|
|
|
+import com.xy.service.SysSystemUserService;
|
|
|
+import com.xy.utils.R;
|
|
|
+import io.swagger.annotations.Api;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
+import org.springframework.stereotype.Service;
|
|
|
+import org.springframework.validation.annotation.Validated;
|
|
|
+import org.springframework.web.bind.annotation.RequestBody;
|
|
|
+
|
|
|
+/**
|
|
|
+ * <p>
|
|
|
+ * 权限用户表 服务实现类
|
|
|
+ * </p>
|
|
|
+ *
|
|
|
+ * @author lijin
|
|
|
+ * @since 2022-12-09
|
|
|
+ */
|
|
|
+@Service
|
|
|
+@Api(tags = "权限用户接口")
|
|
|
+public class SysSystemUserServiceImpl extends ServiceImpl<SysSystemUserMapper, SysSystemUser> implements SysSystemUserService {
|
|
|
+
|
|
|
+ @Override
|
|
|
+ @ApiOperation("注册")
|
|
|
+ public R<Boolean> register(@RequestBody @Validated SysSystemUserDto sysSystemUserDto) {
|
|
|
+ long count = count(new LambdaQueryWrapper<SysSystemUser>().eq(SysSystemUser::getAccount, sysSystemUserDto.getAccount()));
|
|
|
+ if (count > 0) {
|
|
|
+ return R.fail("账户已存在");
|
|
|
+ }
|
|
|
+ SysSystemUser sysSystemUser = new SysSystemUser();
|
|
|
+
|
|
|
+
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+}
|