11 Ревизии 50f10e781b ... c5509d502c

Автор SHA1 Съобщение Дата
  fangq c5509d502c 第三方用户关联表代码生成 преди 3 години
  fangq a2b95023ac Merge remote-tracking branch 'origin/master' преди 3 години
  fangq 2d3338383f Merge remote-tracking branch 'origin/master' преди 3 години
  fangq 250c35e34d Merge remote-tracking branch 'origin/master' преди 3 години
  fangq 36052bf9de Merge remote-tracking branch 'origin/master' преди 3 години
  fangq 3838a43065 一个社区或园区多车场处理 преди 4 години
  fangq b08104d7be Merge remote-tracking branch 'origin/master' преди 4 години
  fangq 5b4a473cbc Merge remote-tracking branch 'origin/master' преди 4 години
  fangq 25105eb60a Merge remote-tracking branch 'origin/master' преди 4 години
  fangq c738c9ef0c Merge remote-tracking branch 'origin/master' преди 4 години
  fangq fa1889a066 一个社区或园区多车场处理 преди 4 години
променени са 14 файла, в които са добавени 563 реда и са изтрити 52 реда
  1. 44 3
      smart-city-grid-yinchuan-manage/src/views/community/permanentPeople.vue
  2. 4 2
      smart-city-grid-yinchuan-server/src/main/java/org/springblade/community/parkinglot/service/IParkingLotService.java
  3. 6 4
      smart-city-grid-yinchuan-server/src/main/java/org/springblade/community/parkinglot/service/impl/ParkingLotServiceImpl.java
  4. 20 39
      smart-city-grid-yinchuan-server/src/main/java/org/springblade/community/tdcarrecord/controller/TdCarRecordController.java
  5. 5 4
      smart-city-grid-yinchuan-server/src/main/java/org/springblade/statistics/controller/StatisticsController.java
  6. 129 0
      smart-city-grid-yinchuan-server/src/main/java/org/springblade/third/auth/controller/AccountOauthController.java
  7. 34 0
      smart-city-grid-yinchuan-server/src/main/java/org/springblade/third/auth/dto/AccountOauthDTO.java
  8. 82 0
      smart-city-grid-yinchuan-server/src/main/java/org/springblade/third/auth/entity/AccountOauth.java
  9. 42 0
      smart-city-grid-yinchuan-server/src/main/java/org/springblade/third/auth/mapper/AccountOauthMapper.java
  10. 30 0
      smart-city-grid-yinchuan-server/src/main/java/org/springblade/third/auth/mapper/AccountOauthMapper.xml
  11. 41 0
      smart-city-grid-yinchuan-server/src/main/java/org/springblade/third/auth/service/IAccountOauthService.java
  12. 41 0
      smart-city-grid-yinchuan-server/src/main/java/org/springblade/third/auth/service/impl/AccountOauthServiceImpl.java
  13. 36 0
      smart-city-grid-yinchuan-server/src/main/java/org/springblade/third/auth/vo/AccountOauthVO.java
  14. 49 0
      smart-city-grid-yinchuan-server/src/main/java/org/springblade/third/auth/wrapper/AccountOauthWrapper.java

+ 44 - 3
smart-city-grid-yinchuan-manage/src/views/community/permanentPeople.vue

@@ -40,7 +40,20 @@
           <div class="el-form-item el-form-item--feedback el-form-item--small avue-form__item--">
             <label class="el-form-item__label" style="width: 80px">人员标签:</label>
             <div class="el-form-item__content" style="margin-left: 80px">
-              <avue-select size="small" multiple  v-model="personTagValue"  placeholder="请选择人员标签"   :dic="personTag"></avue-select>
+<!--              <avue-select size="small" multiple  v-model="personTagValue"  placeholder="请选择人员标签"   :dic="personTag"></avue-select>-->
+              <el-select v-model="personTagValue" clearable placeholder="请选择">
+                <el-option-group
+                  v-for="group in personTagOption"
+                  :key="group.label"
+                  :label="group.label">
+                  <el-option
+                    v-for="item in group.options"
+                    :key="item.value"
+                    :label="item.label"
+                    :value="item.value">
+                  </el-option>
+                </el-option-group>
+              </el-select>
             </div>
           </div>
         </div>
@@ -94,7 +107,35 @@ import CyExcelImport from "../../components/excel/cy-excel-import";
     data() {
       return {
         personTagValue: '',
-        personTag: [],
+        personTagOption: [{
+          label: '特殊人群',
+          options: [
+            {value: '1', label: '刑满释放'},
+            {value: '2', label: '社区矫正'},
+            {value: '3', label: '重点青少年'},
+            {value: '4', label: '吸毒'},
+            {value: '5', label: '艾滋病'},
+            {value: '6', label: '精神病'},
+          ]
+        }, {
+          label: '重点人群',
+          options: [
+            {value: '7', label: '服刑人群'},
+            {value: '8', label: '非法组织'},
+            {value: '9', label: '上访人员'},
+          ]
+        }, {
+          label: '社会保障',
+          options: [
+            {value: '10', label: '五保'},
+            {value: '11', label: '低保'},
+            {value: '12', label: '孤儿'},
+            {value: '13', label: '残疾'},
+            {value: '14', label: '优抚'},
+            {value: '15', label: '失独老人'},
+            {value: '16', label: '孤寡老人'},
+          ],
+        }],
         desensitize: false,
         personAdd: false,
         selectedPersonId: "",
@@ -923,7 +964,7 @@ import CyExcelImport from "../../components/excel/cy-excel-import";
       },
       searchChange(params, done) {
         this.query = params;
-        params.personTag= this.personTagValue.join(',');
+        params.personTag= this.personTagValue;
         this.page.currentPage = 1;
         this.onLoad(this.page, params);
         done();

+ 4 - 2
smart-city-grid-yinchuan-server/src/main/java/org/springblade/community/parkinglot/service/IParkingLotService.java

@@ -21,6 +21,8 @@ import org.springblade.community.parkinglot.vo.ParkingLotVO;
 import org.springblade.core.mp.base.BaseService;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 
+import java.util.List;
+
 /**
  *  服务类
  *
@@ -38,9 +40,9 @@ public interface IParkingLotService extends BaseService<ParkingLot> {
 	 */
 	IPage<ParkingLotVO> selectParkingLotPage(IPage<ParkingLotVO> page, ParkingLotVO parkingLot);
 
-	ParkingLot getByAgencyId(Long agencyId);
+	List<ParkingLot> getByAgencyId(Long agencyId);
 
-	ParkingLot getByResidentialId(Long residentialId);
+	List<ParkingLot> getByResidentialId(Long residentialId);
 
 	ParkingLot getByKey(String mac);
 

+ 6 - 4
smart-city-grid-yinchuan-server/src/main/java/org/springblade/community/parkinglot/service/impl/ParkingLotServiceImpl.java

@@ -25,6 +25,8 @@ import org.springblade.core.mp.base.BaseServiceImpl;
 import org.springframework.stereotype.Service;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 
+import java.util.List;
+
 /**
  *  服务实现类
  *
@@ -40,17 +42,17 @@ public class ParkingLotServiceImpl extends BaseServiceImpl<ParkingLotMapper, Par
 	}
 
 	@Override
-	public ParkingLot getByAgencyId(Long agencyId) {
+	public List<ParkingLot> getByAgencyId(Long agencyId) {
 		LambdaQueryWrapper<ParkingLot> lambdaQueryWrapper = new LambdaQueryWrapper<>();
 		lambdaQueryWrapper.eq(ParkingLot::getAgencyId, agencyId);
-		return baseMapper.selectOne(lambdaQueryWrapper);
+		return baseMapper.selectList(lambdaQueryWrapper);
 	}
 
 	@Override
-	public ParkingLot getByResidentialId(Long residentialId) {
+	public List<ParkingLot> getByResidentialId(Long residentialId) {
 		LambdaQueryWrapper<ParkingLot> lambdaQueryWrapper = new LambdaQueryWrapper<>();
 		lambdaQueryWrapper.eq(ParkingLot::getResidentialId, residentialId);
-		return baseMapper.selectOne(lambdaQueryWrapper);
+		return baseMapper.selectList(lambdaQueryWrapper);
 	}
 
 	@Override

+ 20 - 39
smart-city-grid-yinchuan-server/src/main/java/org/springblade/community/tdcarrecord/controller/TdCarRecordController.java

@@ -35,8 +35,6 @@ import org.springblade.core.mp.support.Query;
 import org.springblade.core.secure.BladeUser;
 import org.springblade.core.tool.api.R;
 import org.springblade.core.tool.utils.Func;
-import org.springblade.smartapplication.carenterrecord.entity.CarEnterRecord;
-import org.springblade.smartapplication.carenterrecord.service.ICarEnterRecordService;
 import org.springframework.util.Assert;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.bind.annotation.RequestParam;
@@ -47,10 +45,9 @@ import org.springblade.community.tdcarrecord.wrapper.TdCarRecordWrapper;
 import org.springblade.community.tdcarrecord.service.ITdCarRecordService;
 import org.springblade.core.boot.ctrl.BladeController;
 
-import java.lang.reflect.Array;
-import java.text.SimpleDateFormat;
 import java.util.ArrayList;
 import java.util.List;
+import java.util.stream.Collectors;
 
 /**
  *  控制器
@@ -66,7 +63,6 @@ public class TdCarRecordController extends BladeController {
 
 	private final ITdCarRecordService carRecordService;
 	private final IParkingLotService parkingLotService;
-	private final ICarEnterRecordService ankuaiCarEnterRecordService;
 
 	/**
 	 * 详情
@@ -88,24 +84,27 @@ public class TdCarRecordController extends BladeController {
 	public R<IPage<TdCarRecordVO>> list(TdTdCarRecordDTO tdCarRecord, Query query, BladeUser bladeUser) {
 		String tenantId = bladeUser.getTenantId();
 		LambdaQueryWrapper<TdCarRecord> lambdaQueryWrapper = new LambdaQueryWrapper<>();
-		ParkingLot parkingLot = null;
+		List<String> parkingLotKey = null;
 		if(tenantId.equals("000000")){
 			if(tdCarRecord.getResidentialId() == null){
 				return R.data(null);
 			}
-			parkingLot = parkingLotService.getByResidentialId(tdCarRecord.getResidentialId());
-			Assert.notNull(parkingLot, "该小区下没有创建车场");
+			List<ParkingLot> lotList = parkingLotService.getByResidentialId(tdCarRecord.getResidentialId());
+			Assert.isTrue(lotList.size() > 0, "该小区下没有创建车场");
+			parkingLotKey = lotList.stream().map(lot -> lot.getParkKey()).collect(Collectors.toList());
 		}else{
 			if(tdCarRecord.getAgencyId() == null){
 				return R.data(null);
 			}
-			parkingLot = parkingLotService.getByAgencyId(tdCarRecord.getAgencyId());
-			Assert.notNull(parkingLot, "该园区下没有创建车场");
+			List<ParkingLot> lotList = parkingLotService.getByAgencyId(tdCarRecord.getAgencyId());
+			Assert.isTrue(lotList.size() > 0, "该园区下没有创建车场");
+			parkingLotKey = lotList.stream().map(lot -> lot.getParkKey()).collect(Collectors.toList());
 		}
+
 		if(tdCarRecord.getInOrOut() == 1){
-			lambdaQueryWrapper.eq(TdCarRecord::getInMac, parkingLot.getParkKey());
+			lambdaQueryWrapper.in(TdCarRecord::getInMac, parkingLotKey);
 		}else{
-			lambdaQueryWrapper.eq(TdCarRecord::getOutMac, parkingLot.getParkKey());
+			lambdaQueryWrapper.in(TdCarRecord::getOutMac, parkingLotKey);
 		}
 		lambdaQueryWrapper.orderByDesc(TdCarRecord::getCreateTime);
 		IPage<TdCarRecord> pages = carRecordService.page(Condition.getPage(query), lambdaQueryWrapper);
@@ -121,48 +120,30 @@ public class TdCarRecordController extends BladeController {
 	public R<IPage<TdCarRecordVO>> getRecord(TdTdCarRecordDTO tdCarRecord, Query query, BladeUser bladeUser) {
 		String tenantId = bladeUser.getTenantId();
 		LambdaQueryWrapper<TdCarRecord> lambdaQueryWrapper = new LambdaQueryWrapper<>();
-		ParkingLot parkingLot = null;
+		List<String> parkingLotKey = new ArrayList<>();
 		if(tenantId.equals("000000")){
 			if(tdCarRecord.getResidentialId() == null){
 				return R.data(null);
 			}
-			parkingLot = parkingLotService.getByResidentialId(tdCarRecord.getResidentialId());
-			if(parkingLot == null){
+			List<ParkingLot> lotList = parkingLotService.getByResidentialId(tdCarRecord.getResidentialId());
+			if(lotList == null || lotList.size()  == 0){
 				return R.data(new Page<TdCarRecordVO>());
 			}
-		}else if(tenantId.equals("804981")){
-			LambdaQueryWrapper<CarEnterRecord> lambda = new LambdaQueryWrapper<>();
-			lambda.orderByDesc(CarEnterRecord::getCreateTime);
-			lambda.eq(CarEnterRecord::getTenantId, tenantId);
-			IPage<CarEnterRecord> page = ankuaiCarEnterRecordService.page(Condition.getPage(query), lambda);
-			IPage<TdCarRecord> pages = new Page<>();
-			SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
-			List<TdCarRecord> list = new ArrayList();
-			for(CarEnterRecord carEnterRecord : page.getRecords()){
-				TdCarRecord tdCarRecord1 = new TdCarRecord();
-				tdCarRecord1.setPlateNumber(carEnterRecord.getCarNo());
-				tdCarRecord1.setEntrance(carEnterRecord.getEnterGateName());
-				tdCarRecord1.setEnterTime(sdf.format(carEnterRecord.getEnterTime()));
-				tdCarRecord1.setInMac("ak923784322134");
-				tdCarRecord1.setEnterPic(carEnterRecord.getEnterImgPath());
-				list.add(tdCarRecord1);
-			}
-			pages.setRecords(list);
-			pages.setTotal(list.size());
-			return R.data(TdCarRecordWrapper.build().pageVO(pages));
-		} else{
+			parkingLotKey = lotList.stream().map(lot -> lot.getParkKey()).collect(Collectors.toList());
+		}else{
 			LambdaQueryWrapper<ParkingLot> parkLogWrapper = new LambdaQueryWrapper<>();
 			parkLogWrapper.eq(ParkingLot::getTenantId, bladeUser.getTenantId());
-			parkingLot = parkingLotService.getOne(parkLogWrapper);
+			ParkingLot parkingLot = parkingLotService.getOne(parkLogWrapper);
 			if(parkingLot == null){
 				return R.data(new Page<TdCarRecordVO>());
 			}
+			parkingLotKey.add(parkingLot.getParkKey());
 		}
 		if(tdCarRecord.getInOrOut() != null){
 			if(tdCarRecord.getInOrOut() == 1){
-				lambdaQueryWrapper.eq(TdCarRecord::getInMac, parkingLot.getParkKey());
+				lambdaQueryWrapper.in(TdCarRecord::getInMac, parkingLotKey);
 			}else{
-				lambdaQueryWrapper.eq(TdCarRecord::getOutMac, parkingLot.getParkKey());
+				lambdaQueryWrapper.in(TdCarRecord::getOutMac, parkingLotKey);
 			}
 		}
 		lambdaQueryWrapper.orderByDesc(TdCarRecord::getCreateTime);

+ 5 - 4
smart-city-grid-yinchuan-server/src/main/java/org/springblade/statistics/controller/StatisticsController.java

@@ -822,10 +822,11 @@ public class StatisticsController extends BladeController {
 		Integer personInCount = 0;
 		Integer personOutCount = 0;
 		SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
-		ParkingLot parkingLot = parkingLotService.getByAgencyId(Long.valueOf(agencyId));
-		if(parkingLot != null){
-			carInCount = tdCarRecordService.getBaseMapper().selectCount(new QueryWrapper<>(new TdCarRecord()).lambda().eq(TdCarRecord::getInMac, parkingLot.getParkKey()).like(TdCarRecord::getCreateTime, sdf.format(new Date())));
-			carOutCount = tdCarRecordService.getBaseMapper().selectCount(new QueryWrapper<>(new TdCarRecord()).lambda().eq(TdCarRecord::getOutMac, parkingLot.getParkKey()).like(TdCarRecord::getCreateTime, sdf.format(new Date())));
+		List<ParkingLot> lotList = parkingLotService.getByAgencyId(Long.valueOf(agencyId));
+		List<String> lotKeys = lotList.stream().map(lot -> lot.getParkKey()).collect(Collectors.toList());
+		if(lotKeys.size() > 0){
+			carInCount = tdCarRecordService.getBaseMapper().selectCount(new QueryWrapper<>(new TdCarRecord()).lambda().in(TdCarRecord::getInMac, lotKeys).like(TdCarRecord::getCreateTime, sdf.format(new Date())));
+			carOutCount = tdCarRecordService.getBaseMapper().selectCount(new QueryWrapper<>(new TdCarRecord()).lambda().in(TdCarRecord::getOutMac, lotKeys).like(TdCarRecord::getCreateTime, sdf.format(new Date())));
 		}
 		List<SmartVideoMonitor> smartVideoMonitorList = this.smartVideoMonitorService.getByAgencyId(Long.valueOf(agencyId));
 		if(smartVideoMonitorList != null && smartVideoMonitorList.size() > 0){

+ 129 - 0
smart-city-grid-yinchuan-server/src/main/java/org/springblade/third/auth/controller/AccountOauthController.java

@@ -0,0 +1,129 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.third.auth.controller;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import lombok.AllArgsConstructor;
+import javax.validation.Valid;
+
+import org.springblade.core.mp.support.Condition;
+import org.springblade.core.mp.support.Query;
+import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.utils.Func;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.bind.annotation.RequestParam;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.third.auth.entity.AccountOauth;
+import org.springblade.third.auth.vo.AccountOauthVO;
+import org.springblade.third.auth.wrapper.AccountOauthWrapper;
+import org.springblade.third.auth.service.IAccountOauthService;
+import org.springblade.core.boot.ctrl.BladeController;
+
+/**
+ * 账户角色关系表 控制器
+ *
+ * @author BladeX
+ * @since 2022-09-30
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("thirdauth/accountoauth")
+@Api(value = "账户角色关系表", tags = "账户角色关系表接口")
+public class AccountOauthController extends BladeController {
+
+	private final IAccountOauthService accountOauthService;
+
+	/**
+	 * 详情
+	 */
+	@GetMapping("/detail")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "详情", notes = "传入accountOauth")
+	public R<AccountOauthVO> detail(AccountOauth accountOauth) {
+		AccountOauth detail = accountOauthService.getOne(Condition.getQueryWrapper(accountOauth));
+		return R.data(AccountOauthWrapper.build().entityVO(detail));
+	}
+
+	/**
+	 * 分页 账户角色关系表
+	 */
+	@GetMapping("/list")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页", notes = "传入accountOauth")
+	public R<IPage<AccountOauthVO>> list(AccountOauth accountOauth, Query query) {
+		IPage<AccountOauth> pages = accountOauthService.page(Condition.getPage(query), Condition.getQueryWrapper(accountOauth));
+		return R.data(AccountOauthWrapper.build().pageVO(pages));
+	}
+
+
+	/**
+	 * 自定义分页 账户角色关系表
+	 */
+	@GetMapping("/page")
+	@ApiOperationSupport(order = 3)
+	@ApiOperation(value = "分页", notes = "传入accountOauth")
+	public R<IPage<AccountOauthVO>> page(AccountOauthVO accountOauth, Query query) {
+		IPage<AccountOauthVO> pages = accountOauthService.selectAccountOauthPage(Condition.getPage(query), accountOauth);
+		return R.data(pages);
+	}
+
+	/**
+	 * 新增 账户角色关系表
+	 */
+	@PostMapping("/save")
+	@ApiOperationSupport(order = 4)
+	@ApiOperation(value = "新增", notes = "传入accountOauth")
+	public R save(@Valid @RequestBody AccountOauth accountOauth) {
+		return R.status(accountOauthService.save(accountOauth));
+	}
+
+	/**
+	 * 修改 账户角色关系表
+	 */
+	@PostMapping("/update")
+	@ApiOperationSupport(order = 5)
+	@ApiOperation(value = "修改", notes = "传入accountOauth")
+	public R update(@Valid @RequestBody AccountOauth accountOauth) {
+		return R.status(accountOauthService.updateById(accountOauth));
+	}
+
+	/**
+	 * 新增或修改 账户角色关系表
+	 */
+	@PostMapping("/submit")
+	@ApiOperationSupport(order = 6)
+	@ApiOperation(value = "新增或修改", notes = "传入accountOauth")
+	public R submit(@Valid @RequestBody AccountOauth accountOauth) {
+		return R.status(accountOauthService.saveOrUpdate(accountOauth));
+	}
+
+	
+	/**
+	 * 删除 账户角色关系表
+	 */
+	@PostMapping("/remove")
+	@ApiOperationSupport(order = 7)
+	@ApiOperation(value = "逻辑删除", notes = "传入ids")
+	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+		return R.status(accountOauthService.deleteLogic(Func.toLongList(ids)));
+	}
+
+	
+}

+ 34 - 0
smart-city-grid-yinchuan-server/src/main/java/org/springblade/third/auth/dto/AccountOauthDTO.java

@@ -0,0 +1,34 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.third.auth.dto;
+
+import org.springblade.third.auth.entity.AccountOauth;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 账户角色关系表数据传输对象实体类
+ *
+ * @author BladeX
+ * @since 2022-09-30
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class AccountOauthDTO extends AccountOauth {
+	private static final long serialVersionUID = 1L;
+
+}

+ 82 - 0
smart-city-grid-yinchuan-server/src/main/java/org/springblade/third/auth/entity/AccountOauth.java

@@ -0,0 +1,82 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.third.auth.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import org.springblade.core.mp.base.BaseEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * 账户角色关系表实体类
+ *
+ * @author BladeX
+ * @since 2022-09-30
+ */
+@Data
+@TableName("yc_account_oauth")
+@EqualsAndHashCode(callSuper = true)
+@ApiModel(value = "AccountOauth对象", description = "账户角色关系表")
+public class AccountOauth extends BaseEntity {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	* 第三方系统用户ID
+	*/
+		@ApiModelProperty(value = "第三方系统用户ID")
+		private String uuid;
+	/**
+	* 系统用户ID
+	*/
+		@ApiModelProperty(value = "系统用户ID")
+		private Long accountId;
+	/**
+	* 账号名,一般是手机号
+	*/
+		@ApiModelProperty(value = "账号名,一般是手机号")
+		private String userName;
+	/**
+	* 用户名
+	*/
+		@ApiModelProperty(value = "用户名")
+		private String nickName;
+	/**
+	* 头像
+	*/
+		@ApiModelProperty(value = "头像")
+		private String avatar;
+	/**
+	* 邮件
+	*/
+		@ApiModelProperty(value = "邮件")
+		private String email;
+	/**
+	* 备注
+	*/
+		@ApiModelProperty(value = "备注")
+		private String mobile;
+	/**
+	* 来源
+	*/
+		@ApiModelProperty(value = "来源")
+		private String source;
+
+
+}

+ 42 - 0
smart-city-grid-yinchuan-server/src/main/java/org/springblade/third/auth/mapper/AccountOauthMapper.java

@@ -0,0 +1,42 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.third.auth.mapper;
+
+import org.springblade.third.auth.entity.AccountOauth;
+import org.springblade.third.auth.vo.AccountOauthVO;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import java.util.List;
+
+/**
+ * 账户角色关系表 Mapper 接口
+ *
+ * @author BladeX
+ * @since 2022-09-30
+ */
+public interface AccountOauthMapper extends BaseMapper<AccountOauth> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param accountOauth
+	 * @return
+	 */
+	List<AccountOauthVO> selectAccountOauthPage(IPage page, AccountOauthVO accountOauth);
+
+}

+ 30 - 0
smart-city-grid-yinchuan-server/src/main/java/org/springblade/third/auth/mapper/AccountOauthMapper.xml

@@ -0,0 +1,30 @@
+<?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="org.springblade.third.auth.mapper.AccountOauthMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="accountOauthResultMap" type="org.springblade.third.auth.entity.AccountOauth">
+        <result column="id" property="id"/>
+        <result column="create_user" property="createUser"/>
+        <result column="create_dept" property="createDept"/>
+        <result column="create_time" property="createTime"/>
+        <result column="update_user" property="updateUser"/>
+        <result column="update_time" property="updateTime"/>
+        <result column="status" property="status"/>
+        <result column="is_deleted" property="isDeleted"/>
+        <result column="uuid" property="uuid"/>
+        <result column="account_id" property="accountId"/>
+        <result column="user_name" property="userName"/>
+        <result column="nick_name" property="nickName"/>
+        <result column="avatar" property="avatar"/>
+        <result column="email" property="email"/>
+        <result column="mobile" property="mobile"/>
+        <result column="source" property="source"/>
+    </resultMap>
+
+
+    <select id="selectAccountOauthPage" resultMap="accountOauthResultMap">
+        select * from yc_account_oauth where is_deleted = 0
+    </select>
+
+</mapper>

+ 41 - 0
smart-city-grid-yinchuan-server/src/main/java/org/springblade/third/auth/service/IAccountOauthService.java

@@ -0,0 +1,41 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.third.auth.service;
+
+import org.springblade.third.auth.entity.AccountOauth;
+import org.springblade.third.auth.vo.AccountOauthVO;
+import org.springblade.core.mp.base.BaseService;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ * 账户角色关系表 服务类
+ *
+ * @author BladeX
+ * @since 2022-09-30
+ */
+public interface IAccountOauthService extends BaseService<AccountOauth> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param accountOauth
+	 * @return
+	 */
+	IPage<AccountOauthVO> selectAccountOauthPage(IPage<AccountOauthVO> page, AccountOauthVO accountOauth);
+
+}

+ 41 - 0
smart-city-grid-yinchuan-server/src/main/java/org/springblade/third/auth/service/impl/AccountOauthServiceImpl.java

@@ -0,0 +1,41 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.third.auth.service.impl;
+
+import org.springblade.third.auth.entity.AccountOauth;
+import org.springblade.third.auth.vo.AccountOauthVO;
+import org.springblade.third.auth.mapper.AccountOauthMapper;
+import org.springblade.third.auth.service.IAccountOauthService;
+import org.springblade.core.mp.base.BaseServiceImpl;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ * 账户角色关系表 服务实现类
+ *
+ * @author BladeX
+ * @since 2022-09-30
+ */
+@Service
+public class AccountOauthServiceImpl extends BaseServiceImpl<AccountOauthMapper, AccountOauth> implements IAccountOauthService {
+
+	@Override
+	public IPage<AccountOauthVO> selectAccountOauthPage(IPage<AccountOauthVO> page, AccountOauthVO accountOauth) {
+		return page.setRecords(baseMapper.selectAccountOauthPage(page, accountOauth));
+	}
+
+}

+ 36 - 0
smart-city-grid-yinchuan-server/src/main/java/org/springblade/third/auth/vo/AccountOauthVO.java

@@ -0,0 +1,36 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.third.auth.vo;
+
+import org.springblade.third.auth.entity.AccountOauth;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+
+/**
+ * 账户角色关系表视图实体类
+ *
+ * @author BladeX
+ * @since 2022-09-30
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ApiModel(value = "AccountOauthVO对象", description = "账户角色关系表")
+public class AccountOauthVO extends AccountOauth {
+	private static final long serialVersionUID = 1L;
+
+}

+ 49 - 0
smart-city-grid-yinchuan-server/src/main/java/org/springblade/third/auth/wrapper/AccountOauthWrapper.java

@@ -0,0 +1,49 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.third.auth.wrapper;
+
+import org.springblade.core.mp.support.BaseEntityWrapper;
+import org.springblade.core.tool.utils.BeanUtil;
+import org.springblade.third.auth.entity.AccountOauth;
+import org.springblade.third.auth.vo.AccountOauthVO;
+import java.util.Objects;
+
+/**
+ * 账户角色关系表包装类,返回视图层所需的字段
+ *
+ * @author BladeX
+ * @since 2022-09-30
+ */
+public class AccountOauthWrapper extends BaseEntityWrapper<AccountOauth, AccountOauthVO>  {
+
+	public static AccountOauthWrapper build() {
+		return new AccountOauthWrapper();
+ 	}
+
+	@Override
+	public AccountOauthVO entityVO(AccountOauth accountOauth) {
+		AccountOauthVO accountOauthVO = Objects.requireNonNull(BeanUtil.copy(accountOauth, AccountOauthVO.class));
+
+		//User createUser = UserCache.getUser(accountOauth.getCreateUser());
+		//User updateUser = UserCache.getUser(accountOauth.getUpdateUser());
+		//accountOauthVO.setCreateUserName(createUser.getName());
+		//accountOauthVO.setUpdateUserName(updateUser.getName());
+
+		return accountOauthVO;
+	}
+
+}