Explorar o código

接收航通互助组边民app账号组长角色没变bug修改

linbl hai 11 meses
pai
achega
49c56ae405

+ 2 - 2
sp-core/sp-api/src/main/java/com/pj/api/client/admin/AdminInterface.java

@@ -90,8 +90,8 @@ public interface AdminInterface {
     /**
      * 根据fkId查app用户
      */
-    @RequestMapping("/AppUser/rpc/getByFkId")
-    AppUserDto getByFkId(@RequestParam("fkId") Long fkId);
+    @PostMapping("AppUser/rpc/getByFkId")
+    public AppUserDto getByFkId(@RequestParam("fkId") Long fkId);
 
 
     @PostMapping("AppUser/rpc/changeBindShopStatus")

+ 1 - 0
sp-core/sp-api/src/main/java/com/pj/api/client/admin/AdminInterfaceFallback.java

@@ -87,6 +87,7 @@ public class AdminInterfaceFallback implements FallbackFactory<AdminInterface> {
 
             @Override
             public AppUserDto getByFkId(Long fkId) {
+                log.error("getByFkId报错,fkId:{}", fkId);
                 return null;
             }
 

+ 5 - 5
sp-core/sp-api/src/main/java/com/pj/api/dto/AppUserDto.java

@@ -30,7 +30,7 @@ public class AppUserDto {
      */
     private String createUnit;
 
-    public AppUserDto(Long id, String phone, String name, String createUnit, String userType, Long fkId, String status, String auth, String authTime, Long loginCount, String lastLoginTime, Date createTime, String updateById, String updateByName, Date updateTime, Integer deleteStatus, String password) {
+    public AppUserDto(Long id, String phone, String name, String createUnit, Integer userType, Long fkId, String status, String auth, String authTime, Long loginCount, String lastLoginTime, Date createTime, String updateById, String updateByName, Date updateTime, Integer deleteStatus, String password) {
         this.id = id;
         this.phone = phone;
         this.name = name;
@@ -61,7 +61,7 @@ public class AppUserDto {
     /**
      * 类型(1=边民,2=组长,3=商户,4=收购商,5=司机)
      */
-    private String userType;
+    private Integer userType;
 
     /**
      * 外联id,user_type=1=>边民ID;user_type=3=>商户ID
@@ -127,7 +127,7 @@ public class AppUserDto {
     public AppUserDto() {
     }
 
-    public AppUserDto(Long id, String phone, String name, String userType, Long fkId, String status, String auth, String authTime, Long loginCount, String lastLoginTime, Date createTime, String updateById, String updateByName, Date updateTime, Integer deleteStatus, String password) {
+    public AppUserDto(Long id, String phone, String name, Integer userType, Long fkId, String status, String auth, String authTime, Long loginCount, String lastLoginTime, Date createTime, String updateById, String updateByName, Date updateTime, Integer deleteStatus, String password) {
         this.id = id;
         this.phone = phone;
         this.name = name;
@@ -170,11 +170,11 @@ public class AppUserDto {
         this.name = name;
     }
 
-    public String getUserType() {
+    public Integer getUserType() {
         return userType;
     }
 
-    public void setUserType(String userType) {
+    public void setUserType(Integer userType) {
         this.userType = userType;
     }
 

+ 5 - 5
sp-service/level-one-server/src/main/java/com/pj/tb_group/TbGroupService.java

@@ -410,12 +410,12 @@ public class TbGroupService extends ServiceImpl<TbGroupMapper, TbGroup> implemen
             tbPeopleService.saveOrUpdate(tbPeople);
             if (dclBorderList1.size() > 0) {
                 tbGroup.setLeaderId(tbPeople.getId());
-            }
 
-            AppUserDto appUser = adminInterface.getByFkId(tbPeople.getId());
-            if(appUser != null) {
-                appUser.setUserType("2");
-                adminInterface.saveAppUserInfo(appUser);
+                AppUserDto appUser = adminInterface.getByFkId(tbPeople.getId());
+                if (appUser != null) {
+                    appUser.setUserType(2);
+                    adminInterface.saveAppUserInfo(appUser);
+                }
             }
         }
         //修改

+ 1 - 1
sp-service/sp-admin/src/main/java/com/pj/project/app_user/AppUserController.java

@@ -167,7 +167,7 @@ public class AppUserController {
 	}
 
 	/** 根据fkId查app用户 */
-	@RequestMapping("rpc/getByFkId")
+	@PostMapping("rpc/getByFkId")
 	public AppUserDto getAppUserByFkId(@RequestParam("fkId") Long fkId){
 		return appUserService.getAppUserByFkId(fkId);
 	}