xuhy
21 小时以前 c6d53fb96a2e7ac88108155b604ddcef83f2fb37
ruoyi-service/ruoyi-admin/src/main/java/com/ruoyi/admin/controller/FranchiseeController.java
@@ -52,6 +52,7 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
@@ -908,6 +909,11 @@
        if(!list1.isEmpty()){
            return R.passwordError("该管理员账号已存在!");
        }
        // 设置加盟商初始密码
        List<Franchisee> franchiseeList = franchiseeService.list();
        if (!CollectionUtils.isEmpty(franchiseeList)){
            franchisee.setPayPassword(franchiseeList.get(0).getPayPassword());
        }
        boolean save = franchiseeService.save(franchisee);
        // 生成sysUser账号
        SysUser sysUser = new SysUser();