Browse Source

新增收支管理系统

HaXeho 10 months ago
parent
commit
29f8ce28a4
61 changed files with 2365 additions and 1 deletions
  1. 86 0
      errand/springboot/src/main/java/com/example/controller/AddressController.java
  2. 86 0
      errand/springboot/src/main/java/com/example/controller/CertificationController.java
  3. 86 0
      errand/springboot/src/main/java/com/example/controller/RecordsController.java
  4. 75 0
      errand/springboot/src/main/java/com/example/entity/Address.java
  5. 114 0
      errand/springboot/src/main/java/com/example/entity/Certification.java
  6. 76 0
      errand/springboot/src/main/java/com/example/entity/Records.java
  7. 36 0
      errand/springboot/src/main/java/com/example/mapper/AddressMapper.java
  8. 38 0
      errand/springboot/src/main/java/com/example/mapper/CertificationMapper.java
  9. 36 0
      errand/springboot/src/main/java/com/example/mapper/RecordsMapper.java
  10. 75 0
      errand/springboot/src/main/java/com/example/service/AddressService.java
  11. 74 0
      errand/springboot/src/main/java/com/example/service/CertificationService.java
  12. 75 0
      errand/springboot/src/main/java/com/example/service/RecordsService.java
  13. 77 0
      errand/springboot/src/main/resources/mapper/AddressMapper.xml
  14. 110 0
      errand/springboot/src/main/resources/mapper/CertificationMapper.xml
  15. 77 0
      errand/springboot/src/main/resources/mapper/RecordsMapper.xml
  16. BIN
      errand/springboot/target/classes/com/example/common/enums/OrderStatusEnum.class
  17. BIN
      errand/springboot/target/classes/com/example/controller/AddressController.class
  18. BIN
      errand/springboot/target/classes/com/example/controller/CertificationController.class
  19. BIN
      errand/springboot/target/classes/com/example/controller/RecordsController.class
  20. BIN
      errand/springboot/target/classes/com/example/entity/Address.class
  21. BIN
      errand/springboot/target/classes/com/example/entity/Certification.class
  22. BIN
      errand/springboot/target/classes/com/example/entity/Records.class
  23. BIN
      errand/springboot/target/classes/com/example/mapper/AddressMapper.class
  24. BIN
      errand/springboot/target/classes/com/example/mapper/CertificationMapper.class
  25. BIN
      errand/springboot/target/classes/com/example/mapper/RecordsMapper.class
  26. BIN
      errand/springboot/target/classes/com/example/service/AddressService.class
  27. BIN
      errand/springboot/target/classes/com/example/service/CertificationService.class
  28. BIN
      errand/springboot/target/classes/com/example/service/RecordsService.class
  29. 77 0
      errand/springboot/target/classes/mapper/AddressMapper.xml
  30. 110 0
      errand/springboot/target/classes/mapper/CertificationMapper.xml
  31. 77 0
      errand/springboot/target/classes/mapper/RecordsMapper.xml
  32. 0 0
      errand/vue/node_modules/.cache/babel-loader/0ca9d035286f11aa14d9e761220f70ccfbb5491f8bad9ab210880b46b628da1d.json
  33. 0 0
      errand/vue/node_modules/.cache/babel-loader/10e61697a2b815f33d0ccff270ab172b27f922b06c39601c6187529d531e03ca.json
  34. 0 0
      errand/vue/node_modules/.cache/babel-loader/13c277e4430fbbb0bfcfec163969ef946ab9f37f10ef7641f92d1594fe51a76f.json
  35. 0 0
      errand/vue/node_modules/.cache/babel-loader/1545cbea016ba771bf1d8dba471af212e880ef853846532b2d6d5ec210120478.json
  36. 0 0
      errand/vue/node_modules/.cache/babel-loader/16dfc2cfba78d3bb777d7fb5985f1c6ad8d104f5d839a0d0b0aac270c1bba3f1.json
  37. 0 0
      errand/vue/node_modules/.cache/babel-loader/33130777e793c4fde4ba68087d31d4f37a5b61d16ba291a3cd0715c1cfcc4b10.json
  38. 0 0
      errand/vue/node_modules/.cache/babel-loader/3550ed4a6febd5f16f11bbfdea06043af7f6798562424d185e156c29245cdc59.json
  39. 0 0
      errand/vue/node_modules/.cache/babel-loader/39f5c38bb647b7d89d7c738f23daf75dee80b21c367585726089dff0523ad994.json
  40. 0 0
      errand/vue/node_modules/.cache/babel-loader/3b837a8ca66876532d06830ea5490a3b9c04903467333e3370a8d56764ea7f9f.json
  41. 0 0
      errand/vue/node_modules/.cache/babel-loader/45577c8d17ac145e7762c87f3b12b4390c5ef5815aca9176de34379d7e9bac4d.json
  42. 0 0
      errand/vue/node_modules/.cache/babel-loader/5545fff5a8d7439d3238a49ac66146716f84f771e586f1ad65677deb7730d1f6.json
  43. 0 0
      errand/vue/node_modules/.cache/babel-loader/556ef31c1e92592da241856992fa017f561cdfc644591e532b4347a2e093a105.json
  44. 0 0
      errand/vue/node_modules/.cache/babel-loader/5b1f84ccaf5430f14760f121092b724ec59e13023eca7edd8ce4bfce24719f08.json
  45. 0 0
      errand/vue/node_modules/.cache/babel-loader/5b38c3a3a51df17b6df76fa5870c8677b21beb2b0955f551fc877bfe7c3f0395.json
  46. 0 0
      errand/vue/node_modules/.cache/babel-loader/5eb782355fc5aad3b1b57afd1c18fd5fb9ebdf6aaabc3140bd575aec19d542de.json
  47. 0 0
      errand/vue/node_modules/.cache/babel-loader/6c84ee025c0238620b81466aed1707f8d86fbeb0dba839ac3ec7e292f530ac94.json
  48. 0 0
      errand/vue/node_modules/.cache/babel-loader/6f2a11d9b8522b06f8a000c9feb8f0077b1669eaf14ffc89974b502bab224718.json
  49. 0 0
      errand/vue/node_modules/.cache/babel-loader/8076ea2ad7b04c68faabec4bb01b7cd0e3f0cf522d8269b0ead9b8cf2ba6731b.json
  50. 0 0
      errand/vue/node_modules/.cache/babel-loader/89bece80eebaf4dd371b8ec7a12f3f7ae281ecc1f27d3983b22c76682bf535f8.json
  51. 0 0
      errand/vue/node_modules/.cache/babel-loader/beb78b0ac71237f82c2299324b4ba8e29cc1176befdb4bfe60e29dc47074a49e.json
  52. 0 0
      errand/vue/node_modules/.cache/babel-loader/cf1e818ea35faa653bd0f951d58bece257f6e3bb4cabe94e726bc8ff2c6129d6.json
  53. 0 0
      errand/vue/node_modules/.cache/babel-loader/e4a0717daebecc25190dc01e4cdb22a8fe90a9c982296e8c7981052556b2a381.json
  54. 0 0
      errand/vue/node_modules/.cache/babel-loader/ecaf7920aff65ad8ce03c93c672934eb4ecab91c5ad858de5ef6d6148a2f0a91.json
  55. 0 0
      errand/vue/node_modules/.cache/babel-loader/fe7cda2ded61dfd5b1eb494ae9dbf88c2c1545714b4c58967b9b98656c25e24f.json
  56. 4 1
      errand/vue/src/router/index.js
  57. 3 0
      errand/vue/src/views/Manager.vue
  58. 280 0
      errand/vue/src/views/manager/Address.vue
  59. 211 0
      errand/vue/src/views/manager/Certification.vue
  60. 133 0
      errand/vue/src/views/manager/Records.vue
  61. 349 0
      graduation Design.md

+ 86 - 0
errand/springboot/src/main/java/com/example/controller/AddressController.java

@@ -0,0 +1,86 @@
+package com.example.controller;
+
+import com.example.common.Result;
+import com.example.entity.Address;
+import com.example.service.AddressService;
+import com.github.pagehelper.PageInfo;
+import org.springframework.web.bind.annotation.*;
+import javax.annotation.Resource;
+import java.util.List;
+
+/**
+ * 联系人信息前端操作接口
+ **/
+@RestController
+@RequestMapping("/address")
+public class AddressController {
+
+    @Resource
+    private AddressService addressService;
+
+    /**
+     * 新增
+     */
+    @PostMapping("/add")
+    public Result add(@RequestBody Address address) {
+        addressService.add(address);
+        return Result.success(address);
+    }
+
+    /**
+     * 删除
+     */
+    @DeleteMapping("/delete/{id}")
+    public Result deleteById(@PathVariable Integer id) {
+        addressService.deleteById(id);
+        return Result.success();
+    }
+
+    /**
+     * 批量删除
+     */
+    @DeleteMapping("/delete/batch")
+    public Result deleteBatch(@RequestBody List<Integer> ids) {
+        addressService.deleteBatch(ids);
+        return Result.success();
+    }
+
+    /**
+     * 修改
+     */
+    @PutMapping("/update")
+    public Result updateById(@RequestBody Address address) {
+        addressService.updateById(address);
+        return Result.success();
+    }
+
+    /**
+     * 根据ID查询
+     */
+    @GetMapping("/selectById/{id}")
+    public Result selectById(@PathVariable Integer id) {
+        Address address = addressService.selectById(id);
+        return Result.success(address);
+    }
+
+    /**
+     * 查询所有
+     */
+    @GetMapping("/selectAll")
+    public Result selectAll(Address address) {
+        List<Address> list = addressService.selectAll(address);
+        return Result.success(list);
+    }
+
+    /**
+     * 分页查询
+     */
+    @GetMapping("/selectPage")
+    public Result selectPage(Address address,
+                             @RequestParam(defaultValue = "1") Integer pageNum,
+                             @RequestParam(defaultValue = "10") Integer pageSize) {
+        PageInfo<Address> page = addressService.selectPage(address, pageNum, pageSize);
+        return Result.success(page);
+    }
+
+}

+ 86 - 0
errand/springboot/src/main/java/com/example/controller/CertificationController.java

@@ -0,0 +1,86 @@
+package com.example.controller;
+
+import com.example.common.Result;
+import com.example.entity.Certification;
+import com.example.service.CertificationService;
+import com.github.pagehelper.PageInfo;
+import org.springframework.web.bind.annotation.*;
+import javax.annotation.Resource;
+import java.util.List;
+
+/**
+ * 前端操作接口
+ **/
+@RestController
+@RequestMapping("/certification")
+public class CertificationController {
+
+    @Resource
+    private CertificationService certificationService;
+
+    /**
+     * 新增
+     */
+    @PostMapping("/add")
+    public Result add(@RequestBody Certification certification) {
+        certificationService.add(certification);
+        return Result.success();
+    }
+
+    /**
+     * 删除
+     */
+    @DeleteMapping("/delete/{id}")
+    public Result deleteById(@PathVariable Integer id) {
+        certificationService.deleteById(id);
+        return Result.success();
+    }
+
+    /**
+     * 批量删除
+     */
+    @DeleteMapping("/delete/batch")
+    public Result deleteBatch(@RequestBody List<Integer> ids) {
+        certificationService.deleteBatch(ids);
+        return Result.success();
+    }
+
+    /**
+     * 修改
+     */
+    @PutMapping("/update")
+    public Result updateById(@RequestBody Certification certification) {
+        certificationService.updateById(certification);
+        return Result.success();
+    }
+
+    /**
+     * 根据ID查询
+     */
+    @GetMapping("/selectById/{id}")
+    public Result selectById(@PathVariable Integer id) {
+        Certification certification = certificationService.selectById(id);
+        return Result.success(certification);
+    }
+
+    /**
+     * 查询所有
+     */
+    @GetMapping("/selectAll")
+    public Result selectAll(Certification certification) {
+        List<Certification> list = certificationService.selectAll(certification);
+        return Result.success(list);
+    }
+
+    /**
+     * 分页查询
+     */
+    @GetMapping("/selectPage")
+    public Result selectPage(Certification certification,
+                             @RequestParam(defaultValue = "1") Integer pageNum,
+                             @RequestParam(defaultValue = "10") Integer pageSize) {
+        PageInfo<Certification> page = certificationService.selectPage(certification, pageNum, pageSize);
+        return Result.success(page);
+    }
+
+}

+ 86 - 0
errand/springboot/src/main/java/com/example/controller/RecordsController.java

@@ -0,0 +1,86 @@
+package com.example.controller;
+
+import com.example.common.Result;
+import com.example.entity.Records;
+import com.example.service.RecordsService;
+import com.github.pagehelper.PageInfo;
+import org.springframework.web.bind.annotation.*;
+import javax.annotation.Resource;
+import java.util.List;
+
+/**
+ * 收支明细前端操作接口
+ **/
+@RestController
+@RequestMapping("/records")
+public class RecordsController {
+
+    @Resource
+    private RecordsService recordsService;
+
+    /**
+     * 新增
+     */
+    @PostMapping("/add")
+    public Result add(@RequestBody Records records) {
+        recordsService.add(records);
+        return Result.success();
+    }
+
+    /**
+     * 删除
+     */
+    @DeleteMapping("/delete/{id}")
+    public Result deleteById(@PathVariable Integer id) {
+        recordsService.deleteById(id);
+        return Result.success();
+    }
+
+    /**
+     * 批量删除
+     */
+    @DeleteMapping("/delete/batch")
+    public Result deleteBatch(@RequestBody List<Integer> ids) {
+        recordsService.deleteBatch(ids);
+        return Result.success();
+    }
+
+    /**
+     * 修改
+     */
+    @PutMapping("/update")
+    public Result updateById(@RequestBody Records records) {
+        recordsService.updateById(records);
+        return Result.success();
+    }
+
+    /**
+     * 根据ID查询
+     */
+    @GetMapping("/selectById/{id}")
+    public Result selectById(@PathVariable Integer id) {
+        Records records = recordsService.selectById(id);
+        return Result.success(records);
+    }
+
+    /**
+     * 查询所有
+     */
+    @GetMapping("/selectAll")
+    public Result selectAll(Records records) {
+        List<Records> list = recordsService.selectAll(records);
+        return Result.success(list);
+    }
+
+    /**
+     * 分页查询
+     */
+    @GetMapping("/selectPage")
+    public Result selectPage(Records records,
+                             @RequestParam(defaultValue = "1") Integer pageNum,
+                             @RequestParam(defaultValue = "10") Integer pageSize) {
+        PageInfo<Records> page = recordsService.selectPage(records, pageNum, pageSize);
+        return Result.success(page);
+    }
+
+}

+ 75 - 0
errand/springboot/src/main/java/com/example/entity/Address.java

@@ -0,0 +1,75 @@
+package com.example.entity;
+
+public class Address {
+    /** ID */
+    private Integer id;
+    /** 地址 */
+    private String address;
+    /** 门牌号 */
+    private String doorNo;
+    /** 联系人 */
+    private String userName;
+    /** 联系电话 */
+    private String phone;
+    /** 关联用户ID */
+    private Integer userId;
+    /** 关联用户名称 */
+    //  关联用户名称
+    private String user;
+
+    public String getUser() {
+        return user;
+    }
+
+    public void setUser(String user) {
+        this.user = user;
+    }
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public String getAddress() {
+        return address;
+    }
+
+    public void setAddress(String address) {
+        this.address = address;
+    }
+
+    public String getDoorNo() {
+        return doorNo;
+    }
+
+    public void setDoorNo(String doorNo) {
+        this.doorNo = doorNo;
+    }
+
+    public String getUserName() {
+        return userName;
+    }
+
+    public void setUserName(String userName) {
+        this.userName = userName;
+    }
+
+    public String getPhone() {
+        return phone;
+    }
+
+    public void setPhone(String phone) {
+        this.phone = phone;
+    }
+
+    public Integer getUserId() {
+        return userId;
+    }
+
+    public void setUserId(Integer userId) {
+        this.userId = userId;
+    }
+}

+ 114 - 0
errand/springboot/src/main/java/com/example/entity/Certification.java

@@ -0,0 +1,114 @@
+package com.example.entity;
+
+public class Certification {
+    /** ID */
+    private Integer id;
+    /** 账号 */
+    private Integer userId;
+    /** 名称 */
+    private String name;
+    /** 本人照片 */
+    private String avatar;
+    /** 联系方式 */
+    private String phone;
+    /** 身份证号码 */
+    private String cardNo;
+    /** 身份证正面 */
+    private String card1;
+    /** 身份证反面 */
+    private String card2;
+    /** 常住地址 */
+    private String address;
+    /** 审核状态 */
+    private String status;
+    /** 审核理由 */
+    private String reason;
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public Integer getUserId() {
+        return userId;
+    }
+
+    public void setUserId(Integer userId) {
+        this.userId = userId;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getAvatar() {
+        return avatar;
+    }
+
+    public void setAvatar(String avatar) {
+        this.avatar = avatar;
+    }
+
+    public String getPhone() {
+        return phone;
+    }
+
+    public void setPhone(String phone) {
+        this.phone = phone;
+    }
+
+    public String getCardNo() {
+        return cardNo;
+    }
+
+    public void setCardNo(String cardNo) {
+        this.cardNo = cardNo;
+    }
+
+    public String getCard1() {
+        return card1;
+    }
+
+    public void setCard1(String card1) {
+        this.card1 = card1;
+    }
+
+    public String getCard2() {
+        return card2;
+    }
+
+    public void setCard2(String card2) {
+        this.card2 = card2;
+    }
+
+    public String getAddress() {
+        return address;
+    }
+
+    public void setAddress(String address) {
+        this.address = address;
+    }
+
+    public String getStatus() {
+        return status;
+    }
+
+    public void setStatus(String status) {
+        this.status = status;
+    }
+
+    public String getReason() {
+        return reason;
+    }
+
+    public void setReason(String reason) {
+        this.reason = reason;
+    }
+}

+ 76 - 0
errand/springboot/src/main/java/com/example/entity/Records.java

@@ -0,0 +1,76 @@
+package com.example.entity;
+
+import java.math.BigDecimal;
+
+public class Records {
+    /** ID */
+    private Integer id;
+    /** 事件 */
+    private String content;
+    /** 金额 */
+    private BigDecimal money;
+    /** 用户 */
+    private Integer userId;
+    /** 时间 */
+    private String time;
+    /** 类型 */
+    private String type;
+
+    private String userName;
+
+    public String getUserName() {
+        return userName;
+    }
+
+    public void setUserName(String userName) {
+        this.userName = userName;
+    }
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public String getContent() {
+        return content;
+    }
+
+    public void setContent(String content) {
+        this.content = content;
+    }
+
+    public BigDecimal getMoney() {
+        return money;
+    }
+
+    public void setMoney(BigDecimal money) {
+        this.money = money;
+    }
+
+    public Integer getUserId() {
+        return userId;
+    }
+
+    public void setUserId(Integer userId) {
+        this.userId = userId;
+    }
+
+    public String getTime() {
+        return time;
+    }
+
+    public void setTime(String time) {
+        this.time = time;
+    }
+
+    public String getType() {
+        return type;
+    }
+
+    public void setType(String type) {
+        this.type = type;
+    }
+}

+ 36 - 0
errand/springboot/src/main/java/com/example/mapper/AddressMapper.java

@@ -0,0 +1,36 @@
+package com.example.mapper;
+
+import com.example.entity.Address;
+import java.util.List;
+
+/**
+ * 操作address相关数据接口
+ */
+public interface AddressMapper {
+
+    /**
+     * 新增
+     */
+    int insert(Address address);
+
+    /**
+     * 删除
+     */
+    int deleteById(Integer id);
+
+    /**
+     * 修改
+     */
+    int updateById(Address address);
+
+    /**
+     * 根据ID查询
+     */
+    Address selectById(Integer id);
+
+    /**
+     * 查询所有
+     */
+    List<Address> selectAll(Address address);
+
+}

+ 38 - 0
errand/springboot/src/main/java/com/example/mapper/CertificationMapper.java

@@ -0,0 +1,38 @@
+package com.example.mapper;
+
+import com.example.entity.Certification;
+import org.apache.ibatis.annotations.Select;
+
+import java.util.List;
+
+/**
+ * 操作certification相关数据接口
+ */
+public interface CertificationMapper {
+
+    /**
+     * 新增
+     */
+    int insert(Certification certification);
+
+    /**
+     * 删除
+     */
+    int deleteById(Integer id);
+
+    /**
+     * 修改
+     */
+    int updateById(Certification certification);
+
+    /**
+     * 根据ID查询
+     */
+    Certification selectById(Integer id);
+
+    /**
+     * 查询所有
+     */
+    List<Certification> selectAll(Certification certification);
+
+}

+ 36 - 0
errand/springboot/src/main/java/com/example/mapper/RecordsMapper.java

@@ -0,0 +1,36 @@
+package com.example.mapper;
+
+import com.example.entity.Records;
+import java.util.List;
+
+/**
+ * 操作records相关数据接口
+ */
+public interface RecordsMapper {
+
+    /**
+     * 新增
+     */
+    int insert(Records records);
+
+    /**
+     * 删除
+     */
+    int deleteById(Integer id);
+
+    /**
+     * 修改
+     */
+    int updateById(Records records);
+
+    /**
+     * 根据ID查询
+     */
+    Records selectById(Integer id);
+
+    /**
+     * 查询所有
+     */
+    List<Records> selectAll(Records records);
+
+}

+ 75 - 0
errand/springboot/src/main/java/com/example/service/AddressService.java

@@ -0,0 +1,75 @@
+package com.example.service;
+
+import com.example.entity.Account;
+import com.example.entity.Address;
+import com.example.mapper.AddressMapper;
+import com.example.utils.TokenUtils;
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import javax.annotation.Resource;
+import org.springframework.stereotype.Service;
+import java.util.List;
+
+/**
+ * 联系人信息业务处理
+ **/
+@Service
+public class AddressService {
+
+    @Resource
+    private AddressMapper addressMapper;
+
+    /**
+     * 新增
+     */
+    public void add(Address address) {
+        addressMapper.insert(address);
+    }
+
+    /**
+     * 删除
+     */
+    public void deleteById(Integer id) {
+        addressMapper.deleteById(id);
+    }
+
+    /**
+     * 批量删除
+     */
+    public void deleteBatch(List<Integer> ids) {
+        for (Integer id : ids) {
+            addressMapper.deleteById(id);
+        }
+    }
+
+    /**
+     * 修改
+     */
+    public void updateById(Address address) {
+        addressMapper.updateById(address);
+    }
+
+    /**
+     * 根据ID查询
+     */
+    public Address selectById(Integer id) {
+        return addressMapper.selectById(id);
+    }
+
+    /**
+     * 查询所有
+     */
+    public List<Address> selectAll(Address address) {
+        return addressMapper.selectAll(address);
+    }
+
+    /**
+     * 分页查询
+     */
+    public PageInfo<Address> selectPage(Address address, Integer pageNum, Integer pageSize) {
+        PageHelper.startPage(pageNum, pageSize);
+        List<Address> list = addressMapper.selectAll(address);
+        return PageInfo.of(list);
+    }
+
+}

+ 74 - 0
errand/springboot/src/main/java/com/example/service/CertificationService.java

@@ -0,0 +1,74 @@
+package com.example.service;
+
+import com.example.entity.Certification;
+import com.example.mapper.CertificationMapper;
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+/**
+ * 业务处理
+ **/
+@Service
+public class CertificationService {
+
+    @Resource
+    private CertificationMapper certificationMapper;
+
+    /**
+     * 新增
+     */
+    public void add(Certification certification) {
+        certificationMapper.insert(certification);
+    }
+
+    /**
+     * 删除
+     */
+    public void deleteById(Integer id) {
+        certificationMapper.deleteById(id);
+    }
+
+    /**
+     * 批量删除
+     */
+    public void deleteBatch(List<Integer> ids) {
+        for (Integer id : ids) {
+            certificationMapper.deleteById(id);
+        }
+    }
+
+    /**
+     * 修改
+     */
+    public void updateById(Certification certification) {
+        certificationMapper.updateById(certification);
+    }
+
+    /**
+     * 根据ID查询
+     */
+    public Certification selectById(Integer id) {
+        return certificationMapper.selectById(id);
+    }
+
+    /**
+     * 查询所有
+     */
+    public List<Certification> selectAll(Certification certification) {
+        return certificationMapper.selectAll(certification);
+    }
+
+    /**
+     * 分页查询
+     */
+    public PageInfo<Certification> selectPage(Certification certification, Integer pageNum, Integer pageSize) {
+        PageHelper.startPage(pageNum, pageSize);
+        List<Certification> list = certificationMapper.selectAll(certification);
+        return PageInfo.of(list);
+    }
+
+}

+ 75 - 0
errand/springboot/src/main/java/com/example/service/RecordsService.java

@@ -0,0 +1,75 @@
+package com.example.service;
+
+import com.example.entity.Records;
+import com.example.mapper.RecordsMapper;
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+/**
+ * 收支明细业务处理
+ **/
+@Service
+public class RecordsService {
+
+    @Resource
+    private RecordsMapper recordsMapper;
+
+
+    /**
+     * 新增
+     */
+    public void add(Records records) {
+        recordsMapper.insert(records);
+    }
+
+    /**
+     * 删除
+     */
+    public void deleteById(Integer id) {
+        recordsMapper.deleteById(id);
+    }
+
+    /**
+     * 批量删除
+     */
+    public void deleteBatch(List<Integer> ids) {
+        for (Integer id : ids) {
+            recordsMapper.deleteById(id);
+        }
+    }
+
+    /**
+     * 修改
+     */
+    public void updateById(Records records) {
+        recordsMapper.updateById(records);
+    }
+
+    /**
+     * 根据ID查询
+     */
+    public Records selectById(Integer id) {
+        return recordsMapper.selectById(id);
+    }
+
+    /**
+     * 查询所有
+     */
+    public List<Records> selectAll(Records records) {
+        return recordsMapper.selectAll(records);
+    }
+
+    /**
+     * 分页查询
+     */
+    public PageInfo<Records> selectPage(Records records, Integer pageNum, Integer pageSize) {
+        PageHelper.startPage(pageNum, pageSize);
+        List<Records> list = recordsMapper.selectAll(records);
+        return PageInfo.of(list);
+    }
+
+}

+ 77 - 0
errand/springboot/src/main/resources/mapper/AddressMapper.xml

@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.example.mapper.AddressMapper">
+
+    <sql id="Base_Column_List">
+        id,address,door_no,user_name,phone,user_id
+    </sql>
+
+    <select id="selectAll" resultType="com.example.entity.Address">
+        select
+        address.*, user.name as `user`
+        from address
+        left join user
+        on address.user_id = user.id
+        <where>
+            <if test="userName != null"> and user.name like concat('%', #{userName}, '%')</if>
+        </where>
+        order by id desc
+    </select>
+
+    <select id="selectById" resultType="com.example.entity.Address">
+        select
+        <include refid="Base_Column_List" />
+        from address
+        where id = #{id}
+    </select>
+
+    <delete id="deleteById">
+        delete from address
+        where  id = #{id}
+    </delete>
+
+    <insert id="insert" parameterType="com.example.entity.Address" useGeneratedKeys="true" keyProperty="id">
+        insert into address
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id != null">id,</if>
+            <if test="address != null">address,</if>
+            <if test="doorNo != null">door_no,</if>
+            <if test="userName != null">user_name,</if>
+            <if test="phone != null">phone,</if>
+            <if test="userId != null">user_id,</if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">#{id},</if>
+            <if test="address != null">#{address},</if>
+            <if test="doorNo != null">#{doorNo},</if>
+            <if test="userName != null">#{userName},</if>
+            <if test="phone != null">#{phone},</if>
+            <if test="userId != null">#{userId},</if>
+        </trim>
+    </insert>
+
+    <update id="updateById" parameterType="com.example.entity.Address">
+        update address
+        <set>
+            <if test="address != null">
+                address = #{address},
+            </if>
+            <if test="doorNo != null">
+                door_no = #{doorNo},
+            </if>
+            <if test="userName != null">
+                user_name = #{userName},
+            </if>
+            <if test="phone != null">
+                phone = #{phone},
+            </if>
+            <if test="userId != null">
+                user_id = #{userId},
+            </if>
+        </set>
+        where id = #{id}
+    </update>
+
+</mapper>

+ 110 - 0
errand/springboot/src/main/resources/mapper/CertificationMapper.xml

@@ -0,0 +1,110 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.example.mapper.CertificationMapper">
+
+    <sql id="Base_Column_List">
+        id,user_id,name,avatar,phone,card_no,card1,card2,address,status,reason
+    </sql>
+
+    <select id="selectAll" resultType="com.example.entity.Certification">
+        select
+        <include refid="Base_Column_List" />
+        from certification
+        <where>
+            <if test="id != null"> and id = #{id}</if>
+            <if test="userId != null"> and user_id = #{userId}</if>
+            <if test="name != null"> and name like concat('%', #{name}, '%')</if>
+            <if test="avatar != null"> and avatar like concat('%', #{avatar}, '%')</if>
+            <if test="phone != null"> and phone like concat('%', #{phone}, '%')</if>
+            <if test="cardNo != null"> and card_no like concat('%', #{cardNo}, '%')</if>
+            <if test="card1 != null"> and card1 like concat('%', #{card1}, '%')</if>
+            <if test="card2 != null"> and card2 like concat('%', #{card2}, '%')</if>
+            <if test="address != null"> and address like concat('%', #{address}, '%')</if>
+            <if test="status != null"> and status like concat('%', #{status}, '%')</if>
+            <if test="reason != null"> and reason like concat('%', #{reason}, '%')</if>
+        </where>
+        order by id desc
+    </select>
+
+    <select id="selectById" resultType="com.example.entity.Certification">
+        select
+        <include refid="Base_Column_List" />
+        from certification
+        where id = #{id}
+    </select>
+
+    <delete id="deleteById">
+        delete from certification
+        where  id = #{id}
+    </delete>
+
+    <insert id="insert" parameterType="com.example.entity.Certification" useGeneratedKeys="true">
+        insert into certification
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id != null">id,</if>
+            <if test="userId != null">user_id,</if>
+            <if test="name != null">name,</if>
+            <if test="avatar != null">avatar,</if>
+            <if test="phone != null">phone,</if>
+            <if test="cardNo != null">card_no,</if>
+            <if test="card1 != null">card1,</if>
+            <if test="card2 != null">card2,</if>
+            <if test="address != null">address,</if>
+            <if test="status != null">status,</if>
+            <if test="reason != null">reason,</if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">#{id},</if>
+            <if test="userId != null">#{userId},</if>
+            <if test="name != null">#{name},</if>
+            <if test="avatar != null">#{avatar},</if>
+            <if test="phone != null">#{phone},</if>
+            <if test="cardNo != null">#{cardNo},</if>
+            <if test="card1 != null">#{card1},</if>
+            <if test="card2 != null">#{card2},</if>
+            <if test="address != null">#{address},</if>
+            <if test="status != null">#{status},</if>
+            <if test="reason != null">#{reason},</if>
+        </trim>
+    </insert>
+
+    <update id="updateById" parameterType="com.example.entity.Certification">
+        update certification
+        <set>
+            <if test="userId != null">
+                user_id = #{userId},
+            </if>
+            <if test="name != null">
+                name = #{name},
+            </if>
+            <if test="avatar != null">
+                avatar = #{avatar},
+            </if>
+            <if test="phone != null">
+                phone = #{phone},
+            </if>
+            <if test="cardNo != null">
+                card_no = #{cardNo},
+            </if>
+            <if test="card1 != null">
+                card1 = #{card1},
+            </if>
+            <if test="card2 != null">
+                card2 = #{card2},
+            </if>
+            <if test="address != null">
+                address = #{address},
+            </if>
+            <if test="status != null">
+                status = #{status},
+            </if>
+            <if test="reason != null">
+                reason = #{reason},
+            </if>
+        </set>
+        where id = #{id}
+    </update>
+
+</mapper>

+ 77 - 0
errand/springboot/src/main/resources/mapper/RecordsMapper.xml

@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.example.mapper.RecordsMapper">
+
+    <sql id="Base_Column_List">
+        id,content,money,user_id,time,type
+    </sql>
+
+    <select id="selectAll" resultType="com.example.entity.Records">
+        select
+        records.*, user.name as userName
+        from records
+        left join user
+        on records.user_id = user.id
+        <where>
+            <if test="userName != null"> and user.name like concat('%', #{userName}, '%')</if>
+        </where>
+        order by id desc
+    </select>
+
+    <select id="selectById" resultType="com.example.entity.Records">
+        select
+        <include refid="Base_Column_List" />
+        from records
+        where id = #{id}
+    </select>
+
+    <delete id="deleteById">
+        delete from records
+        where  id = #{id}
+    </delete>
+
+    <insert id="insert" parameterType="com.example.entity.Records" useGeneratedKeys="true">
+        insert into records
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id != null">id,</if>
+            <if test="content != null">content,</if>
+            <if test="money != null">money,</if>
+            <if test="userId != null">user_id,</if>
+            <if test="time != null">time,</if>
+            <if test="type != null">type,</if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">#{id},</if>
+            <if test="content != null">#{content},</if>
+            <if test="money != null">#{money},</if>
+            <if test="userId != null">#{userId},</if>
+            <if test="time != null">#{time},</if>
+            <if test="type != null">#{type},</if>
+        </trim>
+    </insert>
+
+    <update id="updateById" parameterType="com.example.entity.Records">
+        update records
+        <set>
+            <if test="content != null">
+                content = #{content},
+            </if>
+            <if test="money != null">
+                money = #{money},
+            </if>
+            <if test="userId != null">
+                user_id = #{userId},
+            </if>
+            <if test="time != null">
+                time = #{time},
+            </if>
+            <if test="type != null">
+                type = #{type},
+            </if>
+        </set>
+        where id = #{id}
+    </update>
+
+</mapper>

BIN
errand/springboot/target/classes/com/example/common/enums/OrderStatusEnum.class


BIN
errand/springboot/target/classes/com/example/controller/AddressController.class


BIN
errand/springboot/target/classes/com/example/controller/CertificationController.class


BIN
errand/springboot/target/classes/com/example/controller/RecordsController.class


BIN
errand/springboot/target/classes/com/example/entity/Address.class


BIN
errand/springboot/target/classes/com/example/entity/Certification.class


BIN
errand/springboot/target/classes/com/example/entity/Records.class


BIN
errand/springboot/target/classes/com/example/mapper/AddressMapper.class


BIN
errand/springboot/target/classes/com/example/mapper/CertificationMapper.class


BIN
errand/springboot/target/classes/com/example/mapper/RecordsMapper.class


BIN
errand/springboot/target/classes/com/example/service/AddressService.class


BIN
errand/springboot/target/classes/com/example/service/CertificationService.class


BIN
errand/springboot/target/classes/com/example/service/RecordsService.class


+ 77 - 0
errand/springboot/target/classes/mapper/AddressMapper.xml

@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.example.mapper.AddressMapper">
+
+    <sql id="Base_Column_List">
+        id,address,door_no,user_name,phone,user_id
+    </sql>
+
+    <select id="selectAll" resultType="com.example.entity.Address">
+        select
+        address.*, user.name as `user`
+        from address
+        left join user
+        on address.user_id = user.id
+        <where>
+            <if test="userName != null"> and user.name like concat('%', #{userName}, '%')</if>
+        </where>
+        order by id desc
+    </select>
+
+    <select id="selectById" resultType="com.example.entity.Address">
+        select
+        <include refid="Base_Column_List" />
+        from address
+        where id = #{id}
+    </select>
+
+    <delete id="deleteById">
+        delete from address
+        where  id = #{id}
+    </delete>
+
+    <insert id="insert" parameterType="com.example.entity.Address" useGeneratedKeys="true" keyProperty="id">
+        insert into address
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id != null">id,</if>
+            <if test="address != null">address,</if>
+            <if test="doorNo != null">door_no,</if>
+            <if test="userName != null">user_name,</if>
+            <if test="phone != null">phone,</if>
+            <if test="userId != null">user_id,</if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">#{id},</if>
+            <if test="address != null">#{address},</if>
+            <if test="doorNo != null">#{doorNo},</if>
+            <if test="userName != null">#{userName},</if>
+            <if test="phone != null">#{phone},</if>
+            <if test="userId != null">#{userId},</if>
+        </trim>
+    </insert>
+
+    <update id="updateById" parameterType="com.example.entity.Address">
+        update address
+        <set>
+            <if test="address != null">
+                address = #{address},
+            </if>
+            <if test="doorNo != null">
+                door_no = #{doorNo},
+            </if>
+            <if test="userName != null">
+                user_name = #{userName},
+            </if>
+            <if test="phone != null">
+                phone = #{phone},
+            </if>
+            <if test="userId != null">
+                user_id = #{userId},
+            </if>
+        </set>
+        where id = #{id}
+    </update>
+
+</mapper>

+ 110 - 0
errand/springboot/target/classes/mapper/CertificationMapper.xml

@@ -0,0 +1,110 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.example.mapper.CertificationMapper">
+
+    <sql id="Base_Column_List">
+        id,user_id,name,avatar,phone,card_no,card1,card2,address,status,reason
+    </sql>
+
+    <select id="selectAll" resultType="com.example.entity.Certification">
+        select
+        <include refid="Base_Column_List" />
+        from certification
+        <where>
+            <if test="id != null"> and id = #{id}</if>
+            <if test="userId != null"> and user_id = #{userId}</if>
+            <if test="name != null"> and name like concat('%', #{name}, '%')</if>
+            <if test="avatar != null"> and avatar like concat('%', #{avatar}, '%')</if>
+            <if test="phone != null"> and phone like concat('%', #{phone}, '%')</if>
+            <if test="cardNo != null"> and card_no like concat('%', #{cardNo}, '%')</if>
+            <if test="card1 != null"> and card1 like concat('%', #{card1}, '%')</if>
+            <if test="card2 != null"> and card2 like concat('%', #{card2}, '%')</if>
+            <if test="address != null"> and address like concat('%', #{address}, '%')</if>
+            <if test="status != null"> and status like concat('%', #{status}, '%')</if>
+            <if test="reason != null"> and reason like concat('%', #{reason}, '%')</if>
+        </where>
+        order by id desc
+    </select>
+
+    <select id="selectById" resultType="com.example.entity.Certification">
+        select
+        <include refid="Base_Column_List" />
+        from certification
+        where id = #{id}
+    </select>
+
+    <delete id="deleteById">
+        delete from certification
+        where  id = #{id}
+    </delete>
+
+    <insert id="insert" parameterType="com.example.entity.Certification" useGeneratedKeys="true">
+        insert into certification
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id != null">id,</if>
+            <if test="userId != null">user_id,</if>
+            <if test="name != null">name,</if>
+            <if test="avatar != null">avatar,</if>
+            <if test="phone != null">phone,</if>
+            <if test="cardNo != null">card_no,</if>
+            <if test="card1 != null">card1,</if>
+            <if test="card2 != null">card2,</if>
+            <if test="address != null">address,</if>
+            <if test="status != null">status,</if>
+            <if test="reason != null">reason,</if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">#{id},</if>
+            <if test="userId != null">#{userId},</if>
+            <if test="name != null">#{name},</if>
+            <if test="avatar != null">#{avatar},</if>
+            <if test="phone != null">#{phone},</if>
+            <if test="cardNo != null">#{cardNo},</if>
+            <if test="card1 != null">#{card1},</if>
+            <if test="card2 != null">#{card2},</if>
+            <if test="address != null">#{address},</if>
+            <if test="status != null">#{status},</if>
+            <if test="reason != null">#{reason},</if>
+        </trim>
+    </insert>
+
+    <update id="updateById" parameterType="com.example.entity.Certification">
+        update certification
+        <set>
+            <if test="userId != null">
+                user_id = #{userId},
+            </if>
+            <if test="name != null">
+                name = #{name},
+            </if>
+            <if test="avatar != null">
+                avatar = #{avatar},
+            </if>
+            <if test="phone != null">
+                phone = #{phone},
+            </if>
+            <if test="cardNo != null">
+                card_no = #{cardNo},
+            </if>
+            <if test="card1 != null">
+                card1 = #{card1},
+            </if>
+            <if test="card2 != null">
+                card2 = #{card2},
+            </if>
+            <if test="address != null">
+                address = #{address},
+            </if>
+            <if test="status != null">
+                status = #{status},
+            </if>
+            <if test="reason != null">
+                reason = #{reason},
+            </if>
+        </set>
+        where id = #{id}
+    </update>
+
+</mapper>

+ 77 - 0
errand/springboot/target/classes/mapper/RecordsMapper.xml

@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.example.mapper.RecordsMapper">
+
+    <sql id="Base_Column_List">
+        id,content,money,user_id,time,type
+    </sql>
+
+    <select id="selectAll" resultType="com.example.entity.Records">
+        select
+        records.*, user.name as userName
+        from records
+        left join user
+        on records.user_id = user.id
+        <where>
+            <if test="userName != null"> and user.name like concat('%', #{userName}, '%')</if>
+        </where>
+        order by id desc
+    </select>
+
+    <select id="selectById" resultType="com.example.entity.Records">
+        select
+        <include refid="Base_Column_List" />
+        from records
+        where id = #{id}
+    </select>
+
+    <delete id="deleteById">
+        delete from records
+        where  id = #{id}
+    </delete>
+
+    <insert id="insert" parameterType="com.example.entity.Records" useGeneratedKeys="true">
+        insert into records
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id != null">id,</if>
+            <if test="content != null">content,</if>
+            <if test="money != null">money,</if>
+            <if test="userId != null">user_id,</if>
+            <if test="time != null">time,</if>
+            <if test="type != null">type,</if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">#{id},</if>
+            <if test="content != null">#{content},</if>
+            <if test="money != null">#{money},</if>
+            <if test="userId != null">#{userId},</if>
+            <if test="time != null">#{time},</if>
+            <if test="type != null">#{type},</if>
+        </trim>
+    </insert>
+
+    <update id="updateById" parameterType="com.example.entity.Records">
+        update records
+        <set>
+            <if test="content != null">
+                content = #{content},
+            </if>
+            <if test="money != null">
+                money = #{money},
+            </if>
+            <if test="userId != null">
+                user_id = #{userId},
+            </if>
+            <if test="time != null">
+                time = #{time},
+            </if>
+            <if test="type != null">
+                type = #{type},
+            </if>
+        </set>
+        where id = #{id}
+    </update>
+
+</mapper>

File diff suppressed because it is too large
+ 0 - 0
errand/vue/node_modules/.cache/babel-loader/0ca9d035286f11aa14d9e761220f70ccfbb5491f8bad9ab210880b46b628da1d.json


File diff suppressed because it is too large
+ 0 - 0
errand/vue/node_modules/.cache/babel-loader/10e61697a2b815f33d0ccff270ab172b27f922b06c39601c6187529d531e03ca.json


File diff suppressed because it is too large
+ 0 - 0
errand/vue/node_modules/.cache/babel-loader/13c277e4430fbbb0bfcfec163969ef946ab9f37f10ef7641f92d1594fe51a76f.json


File diff suppressed because it is too large
+ 0 - 0
errand/vue/node_modules/.cache/babel-loader/1545cbea016ba771bf1d8dba471af212e880ef853846532b2d6d5ec210120478.json


File diff suppressed because it is too large
+ 0 - 0
errand/vue/node_modules/.cache/babel-loader/16dfc2cfba78d3bb777d7fb5985f1c6ad8d104f5d839a0d0b0aac270c1bba3f1.json


File diff suppressed because it is too large
+ 0 - 0
errand/vue/node_modules/.cache/babel-loader/33130777e793c4fde4ba68087d31d4f37a5b61d16ba291a3cd0715c1cfcc4b10.json


File diff suppressed because it is too large
+ 0 - 0
errand/vue/node_modules/.cache/babel-loader/3550ed4a6febd5f16f11bbfdea06043af7f6798562424d185e156c29245cdc59.json


File diff suppressed because it is too large
+ 0 - 0
errand/vue/node_modules/.cache/babel-loader/39f5c38bb647b7d89d7c738f23daf75dee80b21c367585726089dff0523ad994.json


File diff suppressed because it is too large
+ 0 - 0
errand/vue/node_modules/.cache/babel-loader/3b837a8ca66876532d06830ea5490a3b9c04903467333e3370a8d56764ea7f9f.json


File diff suppressed because it is too large
+ 0 - 0
errand/vue/node_modules/.cache/babel-loader/45577c8d17ac145e7762c87f3b12b4390c5ef5815aca9176de34379d7e9bac4d.json


File diff suppressed because it is too large
+ 0 - 0
errand/vue/node_modules/.cache/babel-loader/5545fff5a8d7439d3238a49ac66146716f84f771e586f1ad65677deb7730d1f6.json


File diff suppressed because it is too large
+ 0 - 0
errand/vue/node_modules/.cache/babel-loader/556ef31c1e92592da241856992fa017f561cdfc644591e532b4347a2e093a105.json


File diff suppressed because it is too large
+ 0 - 0
errand/vue/node_modules/.cache/babel-loader/5b1f84ccaf5430f14760f121092b724ec59e13023eca7edd8ce4bfce24719f08.json


File diff suppressed because it is too large
+ 0 - 0
errand/vue/node_modules/.cache/babel-loader/5b38c3a3a51df17b6df76fa5870c8677b21beb2b0955f551fc877bfe7c3f0395.json


File diff suppressed because it is too large
+ 0 - 0
errand/vue/node_modules/.cache/babel-loader/5eb782355fc5aad3b1b57afd1c18fd5fb9ebdf6aaabc3140bd575aec19d542de.json


File diff suppressed because it is too large
+ 0 - 0
errand/vue/node_modules/.cache/babel-loader/6c84ee025c0238620b81466aed1707f8d86fbeb0dba839ac3ec7e292f530ac94.json


File diff suppressed because it is too large
+ 0 - 0
errand/vue/node_modules/.cache/babel-loader/6f2a11d9b8522b06f8a000c9feb8f0077b1669eaf14ffc89974b502bab224718.json


File diff suppressed because it is too large
+ 0 - 0
errand/vue/node_modules/.cache/babel-loader/8076ea2ad7b04c68faabec4bb01b7cd0e3f0cf522d8269b0ead9b8cf2ba6731b.json


File diff suppressed because it is too large
+ 0 - 0
errand/vue/node_modules/.cache/babel-loader/89bece80eebaf4dd371b8ec7a12f3f7ae281ecc1f27d3983b22c76682bf535f8.json


File diff suppressed because it is too large
+ 0 - 0
errand/vue/node_modules/.cache/babel-loader/beb78b0ac71237f82c2299324b4ba8e29cc1176befdb4bfe60e29dc47074a49e.json


File diff suppressed because it is too large
+ 0 - 0
errand/vue/node_modules/.cache/babel-loader/cf1e818ea35faa653bd0f951d58bece257f6e3bb4cabe94e726bc8ff2c6129d6.json


File diff suppressed because it is too large
+ 0 - 0
errand/vue/node_modules/.cache/babel-loader/e4a0717daebecc25190dc01e4cdb22a8fe90a9c982296e8c7981052556b2a381.json


File diff suppressed because it is too large
+ 0 - 0
errand/vue/node_modules/.cache/babel-loader/ecaf7920aff65ad8ce03c93c672934eb4ecab91c5ad858de5ef6d6148a2f0a91.json


File diff suppressed because it is too large
+ 0 - 0
errand/vue/node_modules/.cache/babel-loader/fe7cda2ded61dfd5b1eb494ae9dbf88c2c1545714b4c58967b9b98656c25e24f.json


+ 4 - 1
errand/vue/src/router/index.js

@@ -22,8 +22,11 @@ const routes = [
       { path: 'adminPerson', name: 'AdminPerson', meta: { name: '个人信息' }, component: () => import('../views/manager/AdminPerson') },
       { path: 'password', name: 'Password', meta: { name: '修改密码' }, component: () => import('../views/manager/Password') },
       { path: 'notice', name: 'Notice', meta: { name: '公告信息' }, component: () => import('../views/manager/Notice') },
-      { path: 'User', name: 'Notice', meta: { name: '用户信息' }, component: () => import('../views/manager/User') },
+      { path: 'user', name: 'User', meta: { name: '用户信息' }, component: () => import('../views/manager/User') },
       { path: 'orders', name: 'Orders', meta: { name: '订单信息' }, component: () => import('../views/manager/Orders') },
+      { path: 'address', name: 'Address', meta: { name: '地址信息' }, component: () => import('../views/manager/Address') },
+      { path: 'certification', name: 'Certification', meta: { name: '骑手认证' }, component: () => import('../views/manager/Certification') },
+      { path: 'records', name: 'Records', meta: { name: '收支明细管理' }, component: () => import('../views/manager/Records') },
     ]
   },
   {

+ 3 - 0
errand/vue/src/views/Manager.vue

@@ -43,7 +43,10 @@
               <i class="el-icon-menu"></i><span>信息管理</span>
             </template>
             <el-menu-item index="/orders">订单信息</el-menu-item>
+            <el-menu-item index="/address">地址信息</el-menu-item>
+            <el-menu-item index="/certification">骑手认证</el-menu-item>
             <el-menu-item index="/notice">公告信息</el-menu-item>
+            <el-menu-item index="/records">收支明细管理</el-menu-item>
           </el-submenu>
 
           <el-submenu index="user">

+ 280 - 0
errand/vue/src/views/manager/Address.vue

@@ -0,0 +1,280 @@
+<template>
+  <div>
+    <div class="search">
+      <el-input placeholder="请输入联系人查询" style="width: 200px" v-model="userName"></el-input>
+      <el-button type="info" plain style="margin-left: 10px" @click="load(1)">查询</el-button>
+      <el-button type="warning" plain style="margin-left: 10px" @click="reset">重置</el-button>
+    </div>
+
+    <div class="operation">
+      <el-button type="primary" plain @click="handleAdd">新增</el-button>
+      <el-button type="danger" plain @click="delBatch">批量删除</el-button>
+    </div>
+
+    <div class="table">
+      <el-table :data="tableData" strip @selection-change="handleSelectionChange">
+        <el-table-column type="selection" width="55" align="center"></el-table-column>
+        <el-table-column prop="id" label="序号" width="70" align="center" sortable></el-table-column>
+        <el-table-column prop="address" label="地址"></el-table-column>
+        <el-table-column prop="doorNo" label="门牌号"></el-table-column>
+        <el-table-column prop="userName" label="联系人"></el-table-column>
+        <el-table-column prop="phone" label="联系电话"></el-table-column>
+        <el-table-column prop="userId" label="关联用户ID" align="center"></el-table-column>
+        <el-table-column prop="user" label="关联用户"></el-table-column>
+        <el-table-column label="操作" align="center" width="180">
+          <template v-slot="scope">
+            <el-button size="mini" type="primary" plain @click="handleEdit(scope.row)">编辑</el-button>
+            <el-button size="mini" type="danger" plain @click="del(scope.row.id)">删除</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+
+      <div class="pagination">
+        <el-pagination
+            background
+            @current-change="handleCurrentChange"
+            :current-page="pageNum"
+            :page-sizes="[5, 10, 20]"
+            :page-size="pageSize"
+            layout="total, prev, pager, next"
+            :total="total">
+        </el-pagination>
+      </div>
+    </div>
+
+
+    <el-dialog title="信息" :visible.sync="fromVisible" width="40%" :close-on-click-modal="false" destroy-on-close>
+      <el-form :model="form" label-width="100px" style="padding-right: 50px" :rules="rules" ref="formRef">
+        <el-form-item label="地址" prop="address">
+          <el-input v-model="form.address" placeholder="地址"></el-input>
+        </el-form-item>
+        <el-form-item label="门牌号" prop="doorNo">
+          <el-input v-model="form.doorNo" placeholder="门牌号"></el-input>
+        </el-form-item>
+        <el-form-item label="联系人" prop="userName">
+          <el-input v-model="form.userName" placeholder="联系人"></el-input>
+        </el-form-item>
+        <el-form-item label="联系电话" prop="phone">
+          <el-input v-model="form.phone" placeholder="联系电话"></el-input>
+        </el-form-item>
+        <el-form-item label="关联用户" prop="userId">
+          <el-select style="width: 100%" v-model="form.userId">
+            <el-option v-for="item in userList" :key="item.id" :label="item.name" :value="item.id"></el-option>
+          </el-select>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="fromVisible = false">取 消</el-button>
+        <el-button type="primary" @click="save">确 定</el-button>
+      </div>
+    </el-dialog>
+
+
+  </div>
+</template>
+
+<script>
+export default {
+  name: "Address",
+  data() {
+    return {
+      tableData: [],  // 所有的数据
+      userList: [],
+      pageNum: 1,   // 当前的页码
+      pageSize: 10,  // 每页显示的个数
+      total: 0,
+      userName: null,
+      fromVisible: false,
+      form: {},
+      user: JSON.parse(localStorage.getItem('xm-user') || '{}'),
+      rules: {
+        address: [
+          {required: true, message: '请输入地址', trigger: 'blur'},
+        ],
+        doorNo: [
+          {required: true, message: '请输入门牌号', trigger: 'blur'},
+        ],
+        userName: [
+          {required: true, message: '请输入联系人', trigger: 'blur'},
+        ],
+        phone: [
+          {required: true, message: '请输入电话', trigger: 'blur'},
+        ]
+      },
+      ids: []
+    }
+  },
+  created() {
+    this.load(1)
+  },
+  methods: {
+    handleAdd() {   // 新增数据
+      this.form = {}  // 新增数据的时候清空数据
+      this.fromVisible = true   // 打开弹窗
+    },
+    handleEdit(row) {   // 编辑数据
+      this.form = JSON.parse(JSON.stringify(row))  // 给form对象赋值  注意要深拷贝数据
+      this.$request.get('/user/selectAll').then(res => {
+        this.userList = res.data || []
+
+        this.fromVisible = true   // 打开弹窗
+      })
+    },
+    save() {   // 保存按钮触发的逻辑  它会触发新增或者更新
+      this.$refs.formRef.validate((valid) => {
+        if (valid) {
+          this.$request({
+            url: this.form.id ? '/address/update' : '/address/add',
+            method: this.form.id ? 'PUT' : 'POST',
+            data: this.form
+          }).then(res => {
+            if (res.code === '200') {  // 表示成功保存
+              this.$message.success('保存成功')
+              this.load(1)
+              this.fromVisible = false
+            } else {
+              this.$message.error(res.msg)  // 弹出错误的信息
+            }
+          })
+        }
+      })
+    },
+    del(id) {   // 单个删除
+      this.$confirm('您确定删除吗?', '确认删除', {type: "warning"}).then(response => {
+        this.$request.delete('/address/delete/' + id).then(res => {
+          if (res.code === '200') {   // 表示操作成功
+            this.$message.success('操作成功')
+            this.load(1)
+          } else {
+            this.$message.error(res.msg)  // 弹出错误的信息
+          }
+        })
+      }).catch(() => {
+      })
+    },
+    handleSelectionChange(rows) {   // 当前选中的所有的行数据
+      this.ids = rows.map(v => v.id)   //  [1,2]
+    },
+    delBatch() {   // 批量删除
+      if (!this.ids.length) {
+        this.$message.warning('请选择数据')
+        return
+      }
+      this.$confirm('您确定批量删除这些数据吗?', '确认删除', {type: "warning"}).then(response => {
+        this.$request.delete('/address/delete/batch', {data: this.ids}).then(res => {
+          if (res.code === '200') {   // 表示操作成功
+            this.$message.success('操作成功')
+            this.load(1)
+          } else {
+            this.$message.error(res.msg)  // 弹出错误的信息
+          }
+        })
+      }).catch(() => {
+      })
+    },
+    load(pageNum) {  // 分页查询
+      if (pageNum) this.pageNum = pageNum
+      this.$request.get('/address/selectPage', {
+        params: {
+          pageNum: this.pageNum,
+          pageSize: this.pageSize,
+          userName: this.userName,
+        }
+      }).then(res => {
+        this.tableData = res.data?.list
+        this.total = res.data?.total
+      })
+    },
+    reset() {
+      this.userName = null
+      this.load(1)
+    },
+    handleCurrentChange(pageNum) {
+      this.load(pageNum)
+    },
+  }
+}
+</script>
+
+<style scoped>
+
+</style><?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper
+    PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+    "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.example.mapper.AddressMapper">
+
+<sql id="Base_Column_List">
+  id,address,door_no,user_name,phone,user_id
+</sql>
+
+<select id="selectAll" resultType="com.example.entity.Address">
+  select
+  <include refid="Base_Column_List" />
+  from address
+  <where>
+    <if test="id != null"> and id = #{id}</if>
+    <if test="address != null"> and address like concat('%', #{address}, '%')</if>
+    <if test="doorNo != null"> and door_no like concat('%', #{doorNo}, '%')</if>
+    <if test="userName != null"> and user_name like concat('%', #{userName}, '%')</if>
+    <if test="phone != null"> and phone like concat('%', #{phone}, '%')</if>
+    <if test="userId != null"> and user_id = #{userId}</if>
+  </where>
+  order by id desc
+</select>
+
+<select id="selectById" resultType="com.example.entity.Address">
+  select
+  <include refid="Base_Column_List" />
+  from address
+  where id = #{id}
+</select>
+
+<delete id="deleteById">
+  delete from address
+  where  id = #{id}
+</delete>
+
+<insert id="insert" parameterType="com.example.entity.Address" useGeneratedKeys="true" keyProperty="id">
+  insert into address
+  <trim prefix="(" suffix=")" suffixOverrides=",">
+    <if test="id != null">id,</if>
+    <if test="address != null">address,</if>
+    <if test="doorNo != null">door_no,</if>
+    <if test="userName != null">user_name,</if>
+    <if test="phone != null">phone,</if>
+    <if test="userId != null">user_id,</if>
+  </trim>
+  <trim prefix="values (" suffix=")" suffixOverrides=",">
+    <if test="id != null">#{id},</if>
+    <if test="address != null">#{address},</if>
+    <if test="doorNo != null">#{doorNo},</if>
+    <if test="userName != null">#{userName},</if>
+    <if test="phone != null">#{phone},</if>
+    <if test="userId != null">#{userId},</if>
+  </trim>
+</insert>
+
+<update id="updateById" parameterType="com.example.entity.Address">
+  update address
+  <set>
+    <if test="address != null">
+      address = #{address},
+    </if>
+    <if test="doorNo != null">
+      door_no = #{doorNo},
+    </if>
+    <if test="userName != null">
+      user_name = #{userName},
+    </if>
+    <if test="phone != null">
+      phone = #{phone},
+    </if>
+    <if test="userId != null">
+      user_id = #{userId},
+    </if>
+  </set>
+  where id = #{id}
+</update>
+
+</mapper>

+ 211 - 0
errand/vue/src/views/manager/Certification.vue

@@ -0,0 +1,211 @@
+<template>
+  <div>
+    <div class="search">
+      <el-input placeholder="请输入名称查询" style="width: 200px" v-model="name"></el-input>
+      <el-button type="info" plain style="margin-left: 10px" @click="load(1)">查询</el-button>
+      <el-button type="warning" plain style="margin-left: 10px" @click="reset">重置</el-button>
+    </div>
+
+    <div class="operation">
+      <el-button type="danger" plain @click="delBatch">批量删除</el-button>
+    </div>
+
+    <div class="table">
+      <el-table :data="tableData" stripe @selection-change="handleSelectionChange">
+        <el-table-column type="selection" width="55" align="center"></el-table-column>
+        <el-table-column prop="id" label="序号" width="70" align="center" sortable></el-table-column>
+        <el-table-column prop="userId" label="账号ID"></el-table-column>
+        <el-table-column prop="name" label="名称"></el-table-column>
+        <el-table-column label="本人照片">
+          <template v-slot="scope">
+            <el-image :src="scope.row.avatar" style="width: 50px; border-radius: 5px"
+                      :preview-src-list="[scope.row.avatar]"></el-image>
+          </template>
+        </el-table-column>
+        <el-table-column prop="phone" label="联系方式"></el-table-column>
+        <el-table-column prop="cardNo" label="身份证号码"></el-table-column>
+        <el-table-column prop="card1" label="身份证正面">
+          <template v-slot="scope">
+            <el-image :src="scope.row.card1" style="width: 50px; border-radius: 5px" :preview-src-list="[scope.row.card1]"></el-image>
+          </template>
+        </el-table-column>
+        <el-table-column prop="card2" label="身份证反面">
+          <template v-slot="scope">
+            <el-image :src="scope.row.card2" style="width: 50px; border-radius: 5px" :preview-src-list="[scope.row.card2]"></el-image>
+          </template>
+        </el-table-column>
+        <el-table-column prop="address" label="常住地址"></el-table-column>
+        <el-table-column prop="status" label="审核状态">
+          <template v-slot="scope">
+            <el-tag type="info" v-if="scope.row.status === '待审核'">待审核</el-tag>
+            <el-tag type="success" v-if="scope.row.status === '通过'">通过</el-tag>
+            <el-tag type="danger" v-if="scope.row.status === '拒绝'">拒绝</el-tag>
+          </template>
+        </el-table-column>
+        <el-table-column prop="reason" label="审核理由"></el-table-column>
+        <el-table-column label="操作" align="center" width="180">
+          <template v-slot="scope">
+            <el-button size="mini" type="primary" plain @click="handleEdit(scope.row)">审核</el-button>
+            <el-button size="mini" type="danger" plain @click="del(scope.row.id)">删除</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+
+      <div class="pagination">
+        <el-pagination
+            background
+            @current-change="handleCurrentChange"
+            :current-page="pageNum"
+            :page-sizes="[5, 10, 20]"
+            :page-size="pageSize"
+            layout="total, prev, pager, next"
+            :total="total">
+        </el-pagination>
+      </div>
+    </div>
+
+    <el-dialog title="信息" :visible.sync="fromVisible" width="40%" :close-on-click-modal="false" destroy-on-close>
+      <el-form :model="form" label-width="100px" style="padding-right: 50px" :rules="rules" ref="formRef">
+        <el-form-item label="名称" prop="name">
+          <el-input v-model="form.name" placeholder="名称" disabled></el-input>
+        </el-form-item>
+        <el-form-item label="审核状态" prop="status">
+          <el-select style="width: 100%" v-model="form.status">
+            <el-option v-for="item in ['待审核', '通过', '拒绝']" :key="item" :value="item" :label="item"></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="审核理由" prop="reason">
+          <el-input type="textarea" v-model="form.reason" placeholder="审核理由"></el-input>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="fromVisible = false">取 消</el-button>
+        <el-button type="primary" @click="save">确 定</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "Certification",
+  data() {
+    return {
+      tableData: [],  // 所有的数据
+      pageNum: 1,   // 当前的页码
+      pageSize: 10,  // 每页显示的个数
+      total: 0,
+      name: null,
+      fromVisible: false,
+      form: {},
+      user: JSON.parse(localStorage.getItem('xm-user') || '{}'),
+      rules: {
+        name: [
+          { required: true, message: '请输入名称', trigger: 'blur' }
+        ],
+        status: [
+          { required: true, message: '请选择审核状态', trigger: 'change' }
+        ],
+        reason: [
+          { required: true, message: '请输入审核理由', trigger: 'blur' }
+        ]
+      },
+      ids: []
+    }
+  },
+  created() {
+    this.load(1)
+  },
+  methods: {
+    handleAdd() {   // 新增数据
+      this.form = {}  // 新增数据的时候清空数据
+      this.fromVisible = true   // 打开弹窗
+    },
+    handleEdit(row) {   // 编辑数据
+      this.form = JSON.parse(JSON.stringify(row))  // 给form对象赋值  注意要深拷贝数据
+      this.fromVisible = true   // 打开弹窗
+    },
+    save() {   // 保存按钮触发的逻辑  它会触发新增或者更新
+      this.$refs.formRef.validate((valid) => {
+        if (valid) {
+          this.$request({
+            url: this.form.id ? '/certification/update' : '/certification/add',
+            method: this.form.id ? 'PUT' : 'POST',
+            data: this.form
+          }).then(res => {
+            if (res.code === '200') {  // 表示成功保存
+              this.$message.success('保存成功')
+              this.load(1)
+              this.fromVisible = false
+            } else {
+              this.$message.error(res.msg)  // 弹出错误的信息
+            }
+          }).catch(error => {
+            this.$message.error('请求失败,请稍后重试')  // 请求失败处理
+          })
+        }
+      })
+    },
+    del(id) {   // 单个删除
+      this.$confirm('您确定删除吗?', '确认删除', {type: "warning"}).then(response => {
+        this.$request.delete('/certification/delete/' + id).then(res => {
+          if (res.code === '200') {   // 表示操作成功
+            this.$message.success('操作成功')
+            this.load(1)
+          } else {
+            this.$message.error(res.msg)  // 弹出错误的信息
+          }
+        }).catch(error => {
+          this.$message.error('请求失败,请稍后重试')  // 请求失败处理
+        })
+      }).catch(() => {})
+    },
+    handleSelectionChange(rows) {   // 当前选中的所有的行数据
+      this.ids = rows.map(v => v.id)   //  [1,2]
+    },
+    delBatch() {   // 批量删除
+      if (!this.ids.length) {
+        this.$message.warning('请选择数据')
+        return
+      }
+      this.$confirm('您确定批量删除这些数据吗?', '确认删除', {type: "warning"}).then(response => {
+        this.$request.delete('/certification/delete/batch', {data: this.ids}).then(res => {
+          if (res.code === '200') {   // 表示操作成功
+            this.$message.success('操作成功')
+            this.load(1)
+          } else {
+            this.$message.error(res.msg)  // 弹出错误的信息
+          }
+        }).catch(error => {
+          this.$message.error('请求失败,请稍后重试')  // 请求失败处理
+        })
+      }).catch(() => {})
+    },
+    load(pageNum) {  // 分页查询
+      if (pageNum) this.pageNum = pageNum
+      this.$request.get('/certification/selectPage', {
+        params: {
+          pageNum: this.pageNum,
+          pageSize: this.pageSize,
+          name: this.name,
+        }
+      }).then(res => {
+        this.tableData = res.data?.list || []
+        this.total = res.data?.total || 0
+      }).catch(error => {
+        this.$message.error('加载数据失败,请稍后重试')  // 请求失败处理
+      })
+    },
+    reset() {
+      this.name = null
+      this.load(1)
+    },
+    handleCurrentChange(pageNum) {
+      this.load(pageNum)
+    },
+  }
+}
+</script>
+
+<style scoped>
+</style>

+ 133 - 0
errand/vue/src/views/manager/Records.vue

@@ -0,0 +1,133 @@
+<template>
+  <div>
+    <div class="search">
+      <el-input placeholder="请输入用户名称查询" style="width: 200px" v-model="userName"></el-input>
+      <el-button type="info" plain style="margin-left: 10px" @click="load(1)">查询</el-button>
+      <el-button type="warning" plain style="margin-left: 10px" @click="reset">重置</el-button>
+    </div>
+
+    <div class="operation">
+      <el-button type="danger" plain @click="delBatch">批量删除</el-button>
+    </div>
+
+    <div class="table">
+      <el-table :data="tableData" strip @selection-change="handleSelectionChange">
+        <el-table-column type="selection" width="55" align="center"></el-table-column>
+        <el-table-column prop="id" label="序号" width="70" align="center" sortable></el-table-column>
+        <el-table-column prop="content" label="事件"></el-table-column>
+        <el-table-column prop="money" label="金额"></el-table-column>
+        <el-table-column prop="userName" label="用户"></el-table-column>
+        <el-table-column prop="time" label="时间"></el-table-column>
+        <el-table-column prop="type" label="类型">
+          <template v-slot="scope">
+            <el-tag type="primary" v-if="scope.row.type === '骑手'">骑手</el-tag>
+            <el-tag type="danger" v-if="scope.row.type === '支出'">支出</el-tag>
+            <el-tag type="success" v-if="scope.row.type === '充值'">充值</el-tag>
+          </template>
+        </el-table-column>
+        <el-table-column label="操作" align="center" width="180">
+          <template v-slot="scope">
+            <el-button size="mini" type="danger" plain @click="del(scope.row.id)">删除</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+
+      <div class="pagination">
+        <el-pagination
+            background
+            @current-change="handleCurrentChange"
+            :current-page="pageNum"
+            :page-sizes="[5, 10, 20]"
+            :page-size="pageSize"
+            layout="total, prev, pager, next"
+            :total="total">
+        </el-pagination>
+      </div>
+    </div>
+
+
+  </div>
+</template>
+
+<script>
+export default {
+  name: "Records",
+  data() {
+    return {
+      tableData: [],  // 所有的数据
+      pageNum: 1,   // 当前的页码
+      pageSize: 10,  // 每页显示的个数
+      total: 0,
+      userName: null,
+      fromVisible: false,
+      form: {},
+      user: JSON.parse(localStorage.getItem('xm-user') || '{}'),
+      rules: {
+      },
+      ids: []
+    }
+  },
+  created() {
+    this.load(1)
+  },
+  methods: {
+    del(id) {   // 单个删除
+      this.$confirm('您确定删除吗?', '确认删除', {type: "warning"}).then(response => {
+        this.$request.delete('/records/delete/' + id).then(res => {
+          if (res.code === '200') {   // 表示操作成功
+            this.$message.success('操作成功')
+            this.load(1)
+          } else {
+            this.$message.error(res.msg)  // 弹出错误的信息
+          }
+        })
+      }).catch(() => {
+      })
+    },
+    handleSelectionChange(rows) {   // 当前选中的所有的行数据
+      this.ids = rows.map(v => v.id)   //  [1,2]
+    },
+    delBatch() {   // 批量删除
+      if (!this.ids.length) {
+        this.$message.warning('请选择数据')
+        return
+      }
+      this.$confirm('您确定批量删除这些数据吗?', '确认删除', {type: "warning"}).then(response => {
+        this.$request.delete('/records/delete/batch', {data: this.ids}).then(res => {
+          if (res.code === '200') {   // 表示操作成功
+            this.$message.success('操作成功')
+            this.load(1)
+          } else {
+            this.$message.error(res.msg)  // 弹出错误的信息
+          }
+        })
+      }).catch(() => {
+      })
+    },
+    load(pageNum) {  // 分页查询
+      if (pageNum) this.pageNum = pageNum
+      this.$request.get('/records/selectPage', {
+        params: {
+          pageNum: this.pageNum,
+          pageSize: this.pageSize,
+          userName: this.userName,
+        }
+      }).then(res => {
+        this.tableData = res.data?.list
+        this.total = res.data?.total
+      })
+    },
+    reset() {
+      this.userName = null
+      this.load(1)
+    },
+    handleCurrentChange(pageNum) {
+      this.load(pageNum)
+    },
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 349 - 0
graduation Design.md

@@ -0,0 +1,349 @@
+# 项目开始
+
+## 整体思路
+
+### 1.设计SQL
+
+### 2.开发后台
+
+1. 开发业务功能方法 List selectAll();
+2. 开发业务功能方法 List selectAll();
+3. 开发数据库接口 List selectAll();
+4. sql:** select * from user 查询用户信息**
+
+3.前台页面	
+
+1. 搜索框查询
+2. 操作按钮:新增、批量删除、编辑、删除
+3. 数据渲染 Table + 分页
+4. Form表单
+
+
+
+# 学习记录
+
+## 6.1 模块1-开发用户管理功能
+
+### 导入脚手架
+
+修改配置文件后在浏览器验证
+
+![image-20240601203116396](E:\Typora\images\image-20240601203116396.png)
+
+新建MySQL表
+
+管理员表:
+
+![image-20240601203227510](E:\Typora\images\image-20240601203227510.png)
+
+用户表:
+
+![image-20240601203251242](E:\Typora\images\image-20240601203251242.png)
+
+信息表:
+
+![image-20240601203318470](E:\Typora\images\image-20240601203318470.png)
+
+创建User实体类:
+
+```java
+package com.example.entity;
+
+import java.math.BigDecimal;
+
+public class User extends Account{
+    /** ID */
+    private Integer id;
+    /** 用户名 */
+    private String username;
+    /** 密码 */
+    private String password;
+    /** 姓名 */
+    private String name;
+    /** 电话 */
+    private String phone;
+    /** 邮箱 */
+    private String email;
+    /** 头像 */
+    private String avatar;
+    /** 角色标识 */
+    private String role;
+    /** 性别 */
+    private String sex;
+    /** 账户余额 */
+    private BigDecimal account;
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public String getUsername() {
+        return username;
+    }
+
+    public void setUsername(String username) {
+        this.username = username;
+    }
+
+    public String getPassword() {
+        return password;
+    }
+
+    public void setPassword(String password) {
+        this.password = password;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getPhone() {
+        return phone;
+    }
+
+    public void setPhone(String phone) {
+        this.phone = phone;
+    }
+
+    public String getEmail() {
+        return email;
+    }
+
+    public void setEmail(String email) {
+        this.email = email;
+    }
+
+    public String getAvatar() {
+        return avatar;
+    }
+
+    public void setAvatar(String avatar) {
+        this.avatar = avatar;
+    }
+
+    public String getRole() {
+        return role;
+    }
+
+    public void setRole(String role) {
+        this.role = role;
+    }
+
+    public String getSex() {
+        return sex;
+    }
+
+    public void setSex(String sex) {
+        this.sex = sex;
+    }
+
+    public BigDecimal getAccount() {
+        return account;
+    }
+
+    public void setAccount(BigDecimal account) {
+        this.account = account;
+    }
+}
+```
+
+
+
+## 创建UserController:
+
+```java
+package com.example.controller;
+
+import com.example.common.Result;
+import com.example.entity.Admin;
+import com.example.entity.User;
+import com.example.service.UserService;
+import com.github.pagehelper.PageInfo;
+import org.springframework.web.bind.annotation.*;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+/**
+ * 用户的http接口
+ */
+@RestController
+@RequestMapping("/user")
+public class UserController {
+
+    @Resource
+    private UserService userService;
+
+    /**
+     * 新增
+     */
+    @PostMapping("/add")
+    public Result add(@RequestBody User user) {
+        userService.add(user);
+        return Result.success();
+    }
+
+    /**
+     * 删除
+     */
+    @DeleteMapping("/delete/{id}")
+    public Result deleteById(@PathVariable Integer id) {
+
+        return Result.success();
+    }
+
+    /**
+     * 批量删除
+     */
+    @DeleteMapping("/delete/batch")
+    public Result deleteBatch(@RequestBody List<Integer> ids) {
+
+        return Result.success();
+    }
+
+    /**
+     * 修改
+     */
+    @PutMapping("/update")
+    public Result updateById(@RequestBody User user) {
+
+        return Result.success();
+    }
+
+    /**
+     * 根据ID查询
+     */
+    @GetMapping("/selectById/{id}")
+    public Result selectById(@PathVariable Integer id) {
+
+        return Result.success();
+    }
+
+    /**
+     * 查询所有
+     */
+    @GetMapping("/selectAll")
+    public Result selectAll(User user) {
+
+        return Result.success();
+    }
+
+    /**
+     * 分页查询
+     */
+    @GetMapping("/selectPage")
+    public Result selectPage(User user,
+                             @RequestParam(defaultValue = "1") Integer pageNum,
+                             @RequestParam(defaultValue = "10") Integer pageSize) {
+
+        return Result.success();
+    }
+}
+```
+
+## 创建UserService:
+
+```java
+package com.example.service;
+
+import cn.hutool.core.util.ObjectUtil;
+import com.example.common.Constants;
+import com.example.common.enums.ResultCodeEnum;
+import com.example.common.enums.RoleEnum;
+import com.example.entity.Admin;
+import com.example.entity.User;
+import com.example.exception.CustomException;
+import com.example.mapper.UserMapper;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+/**
+ * 用户业务处理
+ **/
+@Service
+public class UserService {
+
+    @Resource
+    private UserMapper userMapper;
+
+    public void add(User user) {
+        userMapper.insert(user);
+    }
+
+
+
+}
+```
+
+## 创建UserMapper.xml
+
+```xml
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.example.mapper.UserMapper">
+
+```
+
+```xml-dtd
+<insert id="insert" parameterType="com.example.entity.User" useGeneratedKeys="true">
+    insert into user
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+         <if test="id != null">id,</if>
+         <if test="username != null">username,</if>
+         <if test="password != null">password,</if>
+         <if test="name != null">name,</if>
+         <if test="avatar != null">avatar,</if>
+         <if test="role != null">role,</if>
+         <if test="sex != null">sex,</if>
+         <if test="phone != null">phone,</if>
+         <if test="account != null">account,</if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+        <if test="id != null">#{id},</if>
+        <if test="username != null">#{username},</if>
+        <if test="password != null">#{password},</if>
+        <if test="name != null">#{name},</if>
+        <if test="avatar != null">#{avatar},</if>
+        <if test="role != null">#{role},</if>
+        <if test="sex != null">#{sex},</if>
+        <if test="phone != null">#{phone},</if>
+        <if test="account != null">#{account},</if>
+    </trim>
+```
+
+## 动态sql:此段代码用于防止数据提交不完整导致下面语句自动赋null值从而使预设的默认值失效!
+
+```xml
+insert into user (username,password,name,avatar,role,sex,phone,account)values
+(#{username},#{password},#{name},#{avatar},#{role},#{sex},#{phone},#{account})
+</insert>
+</mapper>
+```
+# 模块2:开发后台用户管理功能
+
+### 测试上述接口:
+
+![image-20240601204005887](E:\Typora\images\image-20240601204005887.png)
+
+使用admin账号获取token,使用获取的token新建一个用户测试:
+
+![image-20240601204106952](E:\Typora\images\image-20240601204106952.png)
+
+完善删除接口并测试:
+
+![image-20240601205841057](E:\Typora\images\image-20240601205841057.png)
+
+批量删除:![image-20240601211255269](E:\Typora\images\image-20240601211255269.png)
+

Some files were not shown because too many files changed in this diff