kongdeqiang
2024-05-14 148e04dc92807b5465fd17a5891390b53e2bd16b
xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/FingerprintController.java
@@ -18,6 +18,9 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.transaction.annotation.Transactional;
import java.nio.charset.StandardCharsets;
import java.util.Base64;
import java.util.List;
/**
@@ -144,9 +147,11 @@
        wrapper.eq("code",code);
        wrapper.isNotNull("user_id");
        Fingerprint one = iFingerprintService.getOne(wrapper);
        User byUsername = userService.findByUsername(one.getUsername());
        if(byUsername==null){
        User user = userService.findByUsername(one.getUsername());
        if(user==null){
            return ResultUtil.error("用户已删除");
        }else{
            one.setPassword(Base64.getEncoder().encodeToString(user.getDescription().getBytes(StandardCharsets.UTF_8)));
        }
        return new ResultUtil<Object>().setData(one);
    }
@@ -212,6 +217,7 @@
        }
    }
    @RequestMapping(value = "/insertOrUpdate", method = RequestMethod.POST)
    @ApiOperation(value = "编辑或更新数据")
    public Result<Fingerprint> saveOrUpdate(Fingerprint fingerprint) {