Jelajahi Sumber

Merge remote-tracking branch 'origin/feature/asyncOrder' into feature/asyncOrder

Mechrevo 1 tahun lalu
induk
melakukan
64805e20b7

+ 0 - 7
sp-service/async-server/src/main/resources/application.yml

@@ -1,7 +0,0 @@
-
-# 端口
-server:
-  port: 8068
-spring:
-  # 当前环境
-  profiles.active: dev

+ 2 - 2
sp-service/async-server/src/main/resources/bootstrap.yml

@@ -2,8 +2,8 @@
 server:
     port: 8068
 
-spring: 
+spring:
     # 服务名称 
-    application.name: async-serverw
+    application.name: async-server
     # 当前环境
     profiles.active: dev

+ 1 - 1
sp-service/level-one-server/src/main/resources/bootstrap.yml

@@ -3,7 +3,7 @@ server:
     port: 8013
 
 spring: 
-    # 服务名称 
+    # 服务名称
     application.name: level-one-server
     # 当前环境
     profiles.active: dev

+ 0 - 8
sp-service/level-two-server/src/main/resources/application.yml

@@ -1,8 +0,0 @@
-# 端口
-server:
-    port: 8012
-
-spring:
-    # 当前环境
-    profiles.active: dev
-    

+ 2 - 0
sp-service/level-two-server/src/main/resources/bootstrap.yml

@@ -1,3 +1,5 @@
 spring:
   # ????
   application.name: level-two-server
+  # ????
+  profiles.active: dev

+ 4 - 1
sp-service/sp-admin/src/main/java/com/pj/project/app_role/AppRole.java

@@ -3,6 +3,7 @@ package com.pj.project.app_role;
 import java.io.Serializable;
 import com.baomidou.mybatisplus.annotation.*;
 import com.baomidou.mybatisplus.extension.activerecord.Model;
+import io.swagger.models.auth.In;
 import lombok.EqualsAndHashCode;
 
 import lombok.Data;
@@ -58,7 +59,9 @@ public class AppRole extends Model<AppRole> implements Serializable {
 	/**
 	 * 类型(1=边民,2=组长,3=商户,4=收购商,5=司机) 
 	 */
-	private String userType;	
+	private String userType;
+
+	private Integer status=1;
 
 
 

+ 1 - 0
sp-service/sp-admin/src/main/java/com/pj/project/app_role/AppRoleApiController.java

@@ -70,6 +70,7 @@ public class AppRoleApiController {
 //		@SaCheckPermission(AppRole.PERMISSION_CODE)
 	public AjaxJson getList() { 
 		SoMap so = SoMap.getRequestSoMap();
+		so.put("status",1);
 		List<AppRole> list = appRoleService.getList(so.startPage());
 		return AjaxJson.getPageData(so.getDataCount(), list);
 	}

+ 20 - 7
sp-service/sp-admin/src/main/java/com/pj/project/app_role/AppRoleController.java

@@ -1,6 +1,9 @@
 package com.pj.project.app_role;
 
 import java.util.List;
+
+import cn.dev33.satoken.stp.StpUtil;
+import com.pj.current.satoken.AuthConst;
 import com.pj.utils.so.SoMap;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
@@ -75,13 +78,23 @@ public class AppRoleController {
 		List<AppRole> list = appRoleService.getList(so.startPage());
 		return AjaxJson.getPageData(so.getDataCount(), list);
 	}
-	
-	
-	
-	
 
-	
-	
-	
+
+
+	/** 改状态  */
+	@RequestMapping("updateStatus")
+	@SaCheckPermission(AppRole.PERMISSION_CODE)
+	public AjaxJson updateStatus(long id, int status) {
+		// 修改状态
+		SP.publicMapper.updateColumnById(AppRole.TABLE_NAME, "status", status, id);
+		// 如果是禁用,就停掉其秘钥有效果性,使其账号的登录状态立即无效
+		return AjaxJson.getSuccess();
+	}
+
+
+
+
+
+
 
 }

+ 1 - 0
sp-service/sp-admin/src/main/java/com/pj/project/app_role/AppRoleMapper.xml

@@ -24,6 +24,7 @@
 		<where>
 			<if test=' this.has("id") '> and id = #{id} </if>
 			<if test=' this.has("roleName") '> and role_name = #{roleName} </if>
+			<if test=' this.has("status") '> and status = #{status} </if>
 			<if test=' this.has("createTime") '> and create_time = #{createTime} </if>
 			<if test=' this.has("userType") '> and user_type = #{userType} </if>
 		</where>

+ 0 - 8
sp-service/sp-admin/src/main/resources/application.yml

@@ -1,8 +0,0 @@
-# 端口
-server:
-    port: 8011
-
-spring: 
-    # 当前环境
-    profiles.active: debug
-

+ 2 - 0
sp-service/sp-admin/src/main/resources/bootstrap.yml

@@ -1,4 +1,6 @@
 spring:
     # 服务名称
     application.name: sp-admin
+    # 当前环境
+    profiles.active: dev