Compare commits

...

3 Commits
main ... master

  1. 1
      pom.xml
  2. 23
      src/main/java/com/despisctionsystem/code4/Controller/ControllerServer.java
  3. 20
      src/main/java/com/despisctionsystem/code4/Mapper/BlogbjectMapper.java
  4. 29
      src/main/java/com/despisctionsystem/code4/Mapper/BoObjectMapper.java
  5. 7
      src/main/java/com/despisctionsystem/code4/Mapper/UserQueueMapper.java
  6. 6
      src/main/java/com/despisctionsystem/code4/Mapper/UsersMapper.java
  7. 52
      src/main/java/com/despisctionsystem/code4/Pojo/Person.java
  8. 81
      src/main/java/com/despisctionsystem/code4/Pojo/Users.java
  9. 110
      src/main/java/com/despisctionsystem/code4/Service/Impl/UsersImpl.java
  10. 13
      src/main/java/com/despisctionsystem/code4/Service/TransactionServer.java
  11. 14
      src/main/java/com/despisctionsystem/code4/UtilTool/checkcode.java

1
pom.xml

@ -150,6 +150,7 @@ @@ -150,6 +150,7 @@
<mainClass>com.despisctionsystem.code4.Code4Application</mainClass>
</configuration>
<executions>
<!-- 这里是干嘛? -->
<execution>
<id>repackage</id>
<goals>

23
src/main/java/com/despisctionsystem/code4/Controller/ControllerServer.java

@ -7,7 +7,13 @@ @@ -7,7 +7,13 @@
package com.despisctionsystem.code4.Controller;
import com.despisctionsystem.code4.Pojo.Users;
import com.despisctionsystem.code4.Service.TransactionServer;
import org.apache.ibatis.annotations.Param;
import org.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
/**
* Does anyone need help here
@ -17,4 +23,21 @@ import org.springframework.stereotype.Controller; @@ -17,4 +23,21 @@ import org.springframework.stereotype.Controller;
@Controller
public class ControllerServer {
/**
*
*/
@Autowired
TransactionServer server;
@GetMapping("/adduser")
public void addUserqueue(@Param("id") Integer id, @Param("Object") JSONObject Object) {
//Person person = server.getPerson();
Users userinfo = server.getPerson().userinfo();
boolean equals = userinfo.getUserId().equals(id);
if (equals) {
}
}
}

20
src/main/java/com/despisctionsystem/code4/Mapper/BlogbjectMapper.java

@ -1,20 +0,0 @@ @@ -1,20 +0,0 @@
/**
* @author JOJO
* @class oneObjectMapper
* @date 2022/10/30
* @apiNote
*/
package com.despisctionsystem.code4.Mapper;
public interface BlogbjectMapper {
/**
* function1
*
* @return
*/
default String getPermissions() {
return null;
}
}

29
src/main/java/com/despisctionsystem/code4/Mapper/BoObjectMapper.java

@ -1,29 +0,0 @@ @@ -1,29 +0,0 @@
package com.despisctionsystem.code4.Mapper;
/**
* 单一
*
* @author adiao
*/
public interface BoObjectMapper {
/**
* get user info function;
*/
void getUserinfo();
/**
* getUserQueue info function;
*/
void getUserQueue();
/**
* set userinfo function
*/
void setUserinfo();
/**
* set userqueue info function;
*/
void setUserQueue();
}

7
src/main/java/com/despisctionsystem/code4/Mapper/UserQueueMapper.java

@ -0,0 +1,7 @@ @@ -0,0 +1,7 @@
package com.despisctionsystem.code4.Mapper;
import com.despisctionsystem.code4.Pojo.Users;
public interface UserQueueMapper {
public Users userinfo();
}

6
src/main/java/com/despisctionsystem/code4/Mapper/UsersMapper.java

@ -5,11 +5,13 @@ import com.despisctionsystem.code4.Pojo.Users; @@ -5,11 +5,13 @@ import com.despisctionsystem.code4.Pojo.Users;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;
/** 接口映射 数据库
/**
* 接口映射 数据库
*
* @author adiao
*/
@Mapper
@Repository
public interface UsersMapper extends BaseMapper<Users> {
}

52
src/main/java/com/despisctionsystem/code4/Pojo/Person.java

@ -7,57 +7,13 @@ @@ -7,57 +7,13 @@
package com.despisctionsystem.code4.Pojo;
import com.despisctionsystem.code4.Mapper.BlogbjectMapper;
import com.despisctionsystem.code4.Mapper.BoObjectMapper;
import lombok.Getter;
import lombok.Setter;
import com.despisctionsystem.code4.Mapper.UserQueueMapper;
@Getter
@Setter
public class Person implements BlogbjectMapper, BoObjectMapper {
private int id;
private String name;
public class Person implements UserQueueMapper {
/**
* 重写获取权限方法
*
* @return
*/
@Override
public String getPermissions() {
return "access";
}
/**
* get user info function;
*/
@Override
public void getUserinfo() {
}
/**
* getUserQueue info function;
*/
@Override
public void getUserQueue() {
}
/**
* set userinfo function
*/
@Override
public void setUserinfo() {
}
/**
* set userqueue info function;
*/
@Override
public void setUserQueue() {
public Users userinfo() {
return new Users();
}
}

81
src/main/java/com/despisctionsystem/code4/Pojo/Users.java

@ -14,7 +14,6 @@ import com.baomidou.mybatisplus.core.conditions.Wrapper; @@ -14,7 +14,6 @@ import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.despisctionsystem.code4.Mapper.UsersMapper;
import lombok.Data;
import org.apache.catalina.User;
import java.io.Serializable;
import java.util.Collection;
@ -27,15 +26,15 @@ public class Users implements UsersMapper { @@ -27,15 +26,15 @@ public class Users implements UsersMapper {
/**
* 重新自定义字段映射
* private String user_type=null;
* private String user_name=null;
* private String user_nicheng=null;
* private String user_password=null;
* private String user_iphone=null;
* private String user_permissions=null;
* private String user_image=null;
*/
@TableId(value = "user_id",type = IdType.AUTO)
* private String user_type=null;
* private String user_name=null;
* private String user_nicheng=null;
* private String user_password=null;
* private String user_iphone=null;
* private String user_permissions=null;
* private String user_image=null;
*/
@TableId(value = "user_id", type = IdType.AUTO)
private Integer userId;
@TableField("user_type")
private String userType;
@ -53,7 +52,9 @@ public class Users implements UsersMapper { @@ -53,7 +52,9 @@ public class Users implements UsersMapper {
private String userImage;
/** 添加
/**
* 添加
*
* @param entity
* @return
*/
@ -61,18 +62,20 @@ public class Users implements UsersMapper { @@ -61,18 +62,20 @@ public class Users implements UsersMapper {
public int insert(Users entity) {
int result = 0;
try {
if (entity.equals(entity.getUserId())){
if (entity.equals(entity.getUserId())) {
result = entity.insert(entity);
}else {
} else {
return -1;
}
}catch (Exception e){
} catch (Exception e) {
e.printStackTrace();
}
return result;
}
/** 根据ID进行删除 删除操作
/**
* 根据ID进行删除 删除操作
*
* @param id
* @return
*/
@ -81,7 +84,9 @@ public class Users implements UsersMapper { @@ -81,7 +84,9 @@ public class Users implements UsersMapper {
return 0;
}
/** 根据对象进行删除 删除操作
/**
* 根据对象进行删除 删除操作
*
* @param entity
* @return
*/
@ -90,8 +95,10 @@ public class Users implements UsersMapper { @@ -90,8 +95,10 @@ public class Users implements UsersMapper {
return 0;
}
/** 根据集合进行删除 删除操作
/**
* 根据集合进行删除 删除操作
* map 是Spring boot的一个接口同时也仿佛像高中数学里面的集合概念但是它这在
*
* @param columnMap
* @return
*/
@ -100,7 +107,9 @@ public class Users implements UsersMapper { @@ -100,7 +107,9 @@ public class Users implements UsersMapper {
return 0;
}
/** 根据构造器进行删除 删除操作
/**
* 根据构造器进行删除 删除操作
*
* @param queryWrapper
* @return
*/
@ -120,7 +129,9 @@ public class Users implements UsersMapper { @@ -120,7 +129,9 @@ public class Users implements UsersMapper {
return 0;
}
/** 根据ID 更新数据
/**
* 根据ID 更新数据
*
* @param entity
* @return
*/
@ -129,7 +140,9 @@ public class Users implements UsersMapper { @@ -129,7 +140,9 @@ public class Users implements UsersMapper {
return 0;
}
/** 根据类构造器 更新数据
/**
* 根据类构造器 更新数据
*
* @param entity
* @param updateWrapper
* @return
@ -139,7 +152,9 @@ public class Users implements UsersMapper { @@ -139,7 +152,9 @@ public class Users implements UsersMapper {
return 0;
}
/** 根据ID 查询数据
/**
* 根据ID 查询数据
*
* @param id
* @return
*/
@ -157,7 +172,9 @@ public class Users implements UsersMapper { @@ -157,7 +172,9 @@ public class Users implements UsersMapper {
return null;
}
/** 根据map 查询数据
/**
* 根据map 查询数据
*
* @param columnMap
* @return
*/
@ -167,7 +184,9 @@ public class Users implements UsersMapper { @@ -167,7 +184,9 @@ public class Users implements UsersMapper {
return null;
}
/** 根据构造器 查询单条数据
/**
* 根据构造器 查询单条数据
*
* @param queryWrapper
* @return
*/
@ -176,7 +195,9 @@ public class Users implements UsersMapper { @@ -176,7 +195,9 @@ public class Users implements UsersMapper {
return UsersMapper.super.selectOne(queryWrapper);
}
/** 根据构造 查询数据
/**
* 根据构造 查询数据
*
* @param queryWrapper
* @return
*/
@ -185,7 +206,9 @@ public class Users implements UsersMapper { @@ -185,7 +206,9 @@ public class Users implements UsersMapper {
return null;
}
/** 根据构造器 查询数据
/**
* 根据构造器 查询数据
*
* @param queryWrapper
* @return
*/
@ -212,7 +235,9 @@ public class Users implements UsersMapper { @@ -212,7 +235,9 @@ public class Users implements UsersMapper {
return null;
}
/** 查询分页数据
/**
* 查询分页数据
*
* @param page
* @param queryWrapper
* @param <P>
@ -223,7 +248,9 @@ public class Users implements UsersMapper { @@ -223,7 +248,9 @@ public class Users implements UsersMapper {
return null;
}
/** 根据构造器 查询分页数据
/**
* 根据构造器 查询分页数据
*
* @param page
* @param queryWrapper
* @param <P>

110
src/main/java/com/despisctionsystem/code4/Service/Impl/UsersImpl.java

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
/**
* 获取用户
*
* <p>
* 将自己编写的方法放在这个的底部
*
* @author JOJO
@ -12,49 +12,83 @@ @@ -12,49 +12,83 @@
package com.despisctionsystem.code4.Service.Impl;
import com.despisctionsystem.code4.Pojo.Users;
import java.util.List;
public class UsersImpl extends Users {
Object userinfo;
// ----------------------------------------分割线-------------------------------------------------------
/**
* 初始化
*/
public UsersImpl(){
List<Users> users = selectList(null);
this.userinfo = users;
}
/**
* 初始化
* @param id
* @param object
*/
public UsersImpl(int id, Object object){
this.userinfo = object;
this.setUserId(id);
}
Users usersinfo;
/**
* 获取用户信息
* @param id 传入ID
* @return
*/
public Users getUsersInfo(int id){
return selectById(id);
public Users getUsersinfo() {
return usersinfo;
}
// ----------------------------------------分割线-------------------------------------------------------
/**
* 获取用户权限
* @param id
* @return
*/
public String getUsersPermission(int id){
Users users = selectById(id);
return users.getUserPermissions();
public Users getUserQueue() {
return new Users() {
/**
* Creates and returns a copy of this object. The precise meaning
* of "copy" may depend on the class of the object. The general
* intent is that, for any object {@code x}, the expression:
* <blockquote>
* <pre>
* x.clone() != x</pre></blockquote>
* will be true, and that the expression:
* <blockquote>
* <pre>
* x.clone().getClass() == x.getClass()</pre></blockquote>
* will be {@code true}, but these are not absolute requirements.
* While it is typically the case that:
* <blockquote>
* <pre>
* x.clone().equals(x)</pre></blockquote>
* will be {@code true}, this is not an absolute requirement.
* <p>
* By convention, the returned object should be obtained by calling
* {@code super.clone}. If a class and all of its superclasses (except
* {@code Object}) obey this convention, it will be the case that
* {@code x.clone().getClass() == x.getClass()}.
* <p>
* By convention, the object returned by this method should be independent
* of this object (which is being cloned). To achieve this independence,
* it may be necessary to modify one or more fields of the object returned
* by {@code super.clone} before returning it. Typically, this means
* copying any mutable objects that comprise the internal "deep structure"
* of the object being cloned and replacing the references to these
* objects with references to the copies. If a class contains only
* primitive fields or references to immutable objects, then it is usually
* the case that no fields in the object returned by {@code super.clone}
* need to be modified.
* <p>
* The method {@code clone} for class {@code Object} performs a
* specific cloning operation. First, if the class of this object does
* not implement the interface {@code Cloneable}, then a
* {@code CloneNotSupportedException} is thrown. Note that all arrays
* are considered to implement the interface {@code Cloneable} and that
* the return type of the {@code clone} method of an array type {@code T[]}
* is {@code T[]} where T is any reference or primitive type.
* Otherwise, this method creates a new instance of the class of this
* object and initializes all its fields with exactly the contents of
* the corresponding fields of this object, as if by assignment; the
* contents of the fields are not themselves cloned. Thus, this method
* performs a "shallow copy" of this object, not a "deep copy" operation.
* <p>
* The class {@code Object} does not itself implement the interface
* {@code Cloneable}, so calling the {@code clone} method on an object
* whose class is {@code Object} will result in throwing an
* exception at run time.
*
* @return a clone of this instance.
* @throws CloneNotSupportedException if the object's class does not
* support the {@code Cloneable} interface. Subclasses
* that override the {@code clone} method can also
* throw this exception to indicate that an instance cannot
* be cloned.
* @see Cloneable
*/
@Override
protected Object clone() throws CloneNotSupportedException {
return super.clone();
}
};
}

13
src/main/java/com/despisctionsystem/code4/Service/TransactionServer.java

@ -1,5 +1,7 @@ @@ -1,5 +1,7 @@
/** 事务服务
/**
* 事务服务
* 校验
*
* @author JOJO
* @class TransactionServer
* @date 2022/10/25
@ -8,7 +10,14 @@ @@ -8,7 +10,14 @@
package com.despisctionsystem.code4.Service;
import com.despisctionsystem.code4.Pojo.Person;
public class TransactionServer {
private String str;
Person person = new Person();
public Person getPerson() {
return person;
}
}

14
src/main/java/com/despisctionsystem/code4/UtilTool/checkcode.java

@ -0,0 +1,14 @@ @@ -0,0 +1,14 @@
/**
* @author JOJO
* @class checkcode
* @date 2022/12/12
* @apiNote
*/
package com.despisctionsystem.code4.UtilTool;
public class checkcode {
public void check() {
}
}
Loading…
Cancel
Save