修改id js精度丢失

master
xiaoning 1 month ago
parent 1d86ef3d03
commit 53a13352cd

@ -248,7 +248,7 @@
<module>ruoyi-quartz</module>
<module>ruoyi-generator</module>
<module>ruoyi-common</module>
<module>ruoyi-mall</module>
<!-- <module>ruoyi-mall</module>-->
</modules>
<packaging>pom</packaging>

@ -91,11 +91,11 @@
<version>${ruoyi.version}</version>
</dependency>
<dependency>
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-mall</artifactId>
<version>${ruoyi.version}</version>
</dependency>
<!-- <dependency>-->
<!-- <groupId>com.ruoyi</groupId>-->
<!-- <artifactId>ruoyi-mall</artifactId>-->
<!-- <version>${ruoyi.version}</version>-->
<!-- </dependency>-->
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>

@ -1,6 +1,8 @@
package cn.xluobo.business.sc.student.domain.resp;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;
import java.io.Serializable;
@ -19,6 +21,7 @@ public class RespSearchStudent implements Serializable {
@JsonSerialize(using = ToStringSerializer.class)
private Long studentId;
private Long schoolId;

@ -1,10 +1,9 @@
package cn.xluobo.business.sc.student.repo.model;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
@ -34,7 +33,8 @@ public class ScStudent implements Serializable {
/**
* id
*/
@TableId(value = "student_id")
@TableId(value = "student_id", type = IdType.ASSIGN_ID)
@JsonSerialize(using = ToStringSerializer.class)
private Long studentId;
/**

@ -122,6 +122,7 @@ public class BusinessScStudentService {
if (null != contactList && contactList.size() > 0) {
scStudent.setPhone(contactList.get(0).getContactPhone());
}
scStudent.setTenantId(SecurityUtils.getLoginUser().getNowTenantId());
scStudent.setCreateUser(loginUser.getUserId());
scStudentService.save(scStudent);
@ -141,7 +142,7 @@ public class BusinessScStudentService {
scStudent.setPhone(contactList.get(0).getContactPhone());
}
return APIResponse.toOkResponse();
return APIResponse.toAPIResponse(scStudent.getStudentId().toString());
}
/**

@ -1,11 +1,11 @@
package cn.xluobo.business.sys.address;
import cn.hutool.core.util.ObjectUtil;
import cn.xluobo.core.page.RespPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.cyl.manager.ums.domain.entity.Address;
import com.cyl.manager.ums.mapper.AddressMapper;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.page.RespPage;
import com.ruoyi.mall.domain.Address;
import com.ruoyi.mall.mapper.AddressMapper;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@ -12,6 +12,7 @@ import com.google.common.collect.Lists;
import com.ruoyi.common.core.domain.entity.SysDept;
import com.ruoyi.common.core.domain.model.LoginUser;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.system.mapper.SysDeptMapper;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -30,6 +31,9 @@ public class BusinessSysDeptService {
@Autowired
private ISysDeptService sysDeptService;
@Autowired
private SysDeptMapper deptMapper;
@Autowired
private ISysUserDeptService userDeptService;
@Autowired
@ -180,8 +184,9 @@ public class BusinessSysDeptService {
// sysDept.setDeptType("2");
LoginUser loginUser = SecurityUtils.getLoginUser();
sysDept.setTenantId(loginUser.getNowTenantId());
QueryWrapper<SysDept> qw = new QueryWrapper<>(sysDept);
List<SysDept> list = sysDeptService.list(qw);
// QueryWrapper<SysDept> qw = new QueryWrapper<>(sysDept);
// List<SysDept> list = sysDeptService.list(qw);
List<SysDept> list = deptMapper.selectDeptList(sysDept);
return list.stream().map(RespTreeSelect::new).collect(Collectors.toList());
}

@ -1,8 +1,11 @@
package com.ruoyi;
import cn.xluobo.config.properties.AddressProperties;
import cn.xluobo.config.properties.UploadConfigProperties;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.scheduling.annotation.EnableScheduling;
/**
@ -14,6 +17,7 @@ import org.springframework.scheduling.annotation.EnableScheduling;
exclude = {DataSourceAutoConfiguration.class},
scanBasePackages = {"com.ruoyi","cn.xluobo"}
)
@EnableConfigurationProperties({UploadConfigProperties.class, AddressProperties.class})
@EnableScheduling
public class RuoYiApplication {
public static void main(String[] args) {

@ -40,11 +40,6 @@ public class UserDetailsServiceImpl implements UserDetailsService
public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException
{
SysUser user = userService.selectUserByUserName(username);
SysTenant tenant=tenantService.getById(user.getTenantId());
if (ObjectUtil.isEmpty(tenant) || !tenant.getInUse().equals("0") || !DateUtil.date().before(tenant.getEndTime()) ){
log.info("用户所属租户:{} 异常.", tenant.getTenantName());
throw new ServiceException("用户所属租户:" + tenant.getTenantName() + " 异常");
}
if (StringUtils.isNull(user))
{
log.info("登录用户:{} 不存在.", username);
@ -60,6 +55,11 @@ public class UserDetailsServiceImpl implements UserDetailsService
log.info("登录用户:{} 已被停用.", username);
throw new ServiceException("对不起,您的账号:" + username + " 已停用");
}
SysTenant tenant=tenantService.getById(user.getTenantId());
if (ObjectUtil.isEmpty(tenant) || !tenant.getInUse().equals("0") || !DateUtil.date().before(tenant.getEndTime()) ){
log.info("用户所属租户:{} 异常.", tenant.getTenantName());
throw new ServiceException("用户所属租户:" + tenant.getTenantName() + " 异常");
}
return createLoginUser(user);
}

Loading…
Cancel
Save