Browse Source

fix 1.版本接口完善 2.部分bug修改

classic_blue 1 week ago
parent
commit
1bac4f3dec

+ 1 - 1
fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/VersionDto.java

@@ -44,7 +44,7 @@ public class VersionDto extends Page implements Serializable {
     private Date effectiveDate;
 
     @ApiModelProperty("版本id")
-    @TableId(value = "ID", type = IdType.AUTO)
+    @TableId(value = "id", type = IdType.ID_WORKER)
     private Long id;
 
     @ApiModelProperty("是否强制更新 0否 1是")

+ 9 - 0
fuintBackend/fuint-application/src/main/java/com/fuint/common/service/impl/AccountServiceImpl.java

@@ -362,6 +362,10 @@ public class AccountServiceImpl extends ServiceImpl<TAccountMapper, TAccount> im
         String password = loginRequest.getPassword();
         String captchaCode = loginRequest.getCaptchaCode();
         String uuid = loginRequest.getUuid();
+        String loginFrom = loginRequest.getLoginFrom();
+
+
+
 
         Boolean captchaVerify = captchaService.checkCodeByUuid(captchaCode, uuid);
         if (!captchaVerify) {
@@ -377,6 +381,11 @@ public class AccountServiceImpl extends ServiceImpl<TAccountMapper, TAccount> im
             }
 
             TAccount tAccount = getAccountInfoById(accountInfo.getId());
+
+            if (StringUtils.equals("cashier", loginFrom) && ( tAccount.getStoreId() == null || tAccount.getStoreId() == 0L) ){
+                throw new BusinessCheckException("平台账号暂无权限登录");
+            }
+
             String myPassword = tAccount.getPassword();
             String inputPassword = getEntryptPassword(password, tAccount.getSalt());
             if (!myPassword.equals(inputPassword) || !tAccount.getAccountStatus().toString().equals("1")) {

+ 3 - 5
fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendAccountController.java

@@ -1,5 +1,6 @@
 package com.fuint.module.backendApi.controller;
 
+import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
 import com.fuint.common.Constants;
 import com.fuint.common.dto.AccountDto;
 import com.fuint.common.dto.AccountInfo;
@@ -27,10 +28,7 @@ import lombok.AllArgsConstructor;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.*;
 import javax.servlet.http.HttpServletRequest;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
 
 /**
  * 后台管理员管理
@@ -317,7 +315,7 @@ public class BackendAccountController extends BaseController {
         }
 
         AccountInfo accountInfo = tAccountService.getAccountByName(accountName);
-        if (accountInfo != null && accountInfo.getId() != id.intValue()) {
+        if (accountInfo != null && !Objects.equals(accountInfo.getId(),id)) {
             return getFailureResult(201, "该用户名已存在");
         }
 

+ 1 - 1
fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendStoreController.java

@@ -211,7 +211,7 @@ public class BackendStoreController extends BaseController {
 		String contact = CommonUtil.replaceXSS(params.get("contact").toString());
 		String phone = CommonUtil.replaceXSS(params.get("phone").toString());
 		String countryId = params.get("countryId") == null ? "" : CommonUtil.replaceXSS(params.get("countryId").toString());
-		String currencyId = params.get("currencyId") == null ? YesOrNoEnum.NO.getKey() : CommonUtil.replaceXSS(params.get("currencyId").toString());
+		String currencyId = params.get("currencyId") == null ? null : CommonUtil.replaceXSS(params.get("currencyId").toString());
 		String serviceFeeRate = params.get("serviceFeeRate") == null ? "" : CommonUtil.replaceXSS(params.get("serviceFeeRate").toString());
 		String description = params.get("description") == null ? "" : CommonUtil.replaceXSS(params.get("description").toString());
 		String isDefault = params.get("isDefault") == null ? YesOrNoEnum.NO.getKey() : CommonUtil.replaceXSS(params.get("isDefault").toString());

+ 3 - 0
fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/request/LoginRequest.java

@@ -24,4 +24,7 @@ public class LoginRequest implements Serializable {
 
     @ApiModelProperty(value="图形验证码uuid", name="uuid")
     private String uuid;
+
+    @ApiModelProperty(value="登录入口", name="loginFrom")
+    private String loginFrom;
 }

+ 9 - 7
fuintBackend/fuint-repository/src/main/java/com/fuint/repository/model/MtVersion.java

@@ -33,6 +33,14 @@ public class MtVersion implements Serializable {
     @TableField(value = "create_user_id",fill = FieldFill.INSERT)
     private String createUserId;
 
+    @ApiModelProperty("更新时间")
+    @TableField(value = "update_time",fill = FieldFill.INSERT_UPDATE)
+    private Date updateTime;
+
+    @ApiModelProperty("修改用户id")
+    @TableField(value = "update_user_id",fill = FieldFill.INSERT_UPDATE)
+    private String updateUserId;
+
     @ApiModelProperty("是否删除 0否 1是")
     private Integer deleteFlag;
 
@@ -46,7 +54,7 @@ public class MtVersion implements Serializable {
     private Date effectiveDate;
 
     @ApiModelProperty("版本id")
-    @TableId(value = "ID", type = IdType.AUTO)
+    @TableId(value = "id", type = IdType.ID_WORKER)
     private Long id;
 
     @ApiModelProperty("是否强制更新 0否 1是")
@@ -70,12 +78,6 @@ public class MtVersion implements Serializable {
     @ApiModelProperty("版本类型")
     private String type;
 
-    @ApiModelProperty("更新时间")
-//    @TableField(value = "update_time",fill = FieldFill.INSERT_UPDATE)
-    private Date updateTime;
 
-    @ApiModelProperty("修改用户id")
-//    @TableField(value = "update_user_id",fill = FieldFill.INSERT_UPDATE)
-    private String updateUserId;
 
 }