修改了动态多条件查询的县级查询
This commit is contained in:
parent
aa5b920dd9
commit
85ffb7d594
@ -100,6 +100,7 @@ public class CustomAuthenticationProvider implements AuthenticationProvider {
|
||||
for(SysAuthorityEntity sysAuthorityEntity : permissionList) {
|
||||
permissions.add(new GrantedAuthorityImpl(sysAuthorityEntity.getAuthorityName()));
|
||||
}
|
||||
|
||||
// 生成令牌
|
||||
Authentication authToken = new UsernamePasswordAuthenticationToken(userName, encryptPassword, permissions);
|
||||
return authToken;
|
||||
|
@ -51,6 +51,7 @@ class WebSecurityConfig extends WebSecurityConfigurerAdapter {
|
||||
.antMatchers(HttpMethod.GET,"/websocketTest").permitAll()
|
||||
.antMatchers(HttpMethod.GET,"/selectCityName").permitAll()
|
||||
.antMatchers(HttpMethod.GET,"/weather/cityName").permitAll()
|
||||
.antMatchers(HttpMethod.GET,"/weather/cityId").permitAll()
|
||||
.antMatchers(HttpMethod.GET,"/selectFirePoint").permitAll()
|
||||
.antMatchers(HttpMethod.POST,"/updateTypeByFireCode").permitAll()
|
||||
.antMatchers(HttpMethod.GET,"/api/user/verificationCode").permitAll()
|
||||
|
@ -136,7 +136,7 @@ public class FirePointController {
|
||||
return outputEncapsulationObject(PromptMessageEnum.SUCCESS,firePointEntities,locale);
|
||||
// 查询县
|
||||
}else {
|
||||
List<FirePointEntity> firePointEntities = firePointService.selectFirePointByCounty(cityCode, satelliteType, landType, startTime, endTime);
|
||||
List<FirePointEntity> firePointEntities = firePointService.selectFirePointByCounty(sysUserEntity.getCountyCode(), satelliteType, landType, startTime, endTime);
|
||||
if(firePointEntities == null || firePointEntities.size() == 0){
|
||||
return outputEncapsulationObject(PromptMessageEnum.DATA_NONE,"暂时还没有火点数据",locale);
|
||||
}
|
||||
|
@ -82,7 +82,7 @@ public interface SysUserDao extends JpaRepository<SysUserEntity,Integer> {
|
||||
* 查询用户信息
|
||||
* @return
|
||||
*/
|
||||
@Query(value = "select new com.xkrs.model.vo.SysUserVo (id,reallyName,telephone,countyCode,activeFlag,addTime,overTime,dayNum,accountType) " +
|
||||
@Query(value = "select new com.xkrs.model.vo.SysUserVo (id,reallyName,telephone,countyCode,activeFlag,addTime,overTime,dayNum,accountType,countyName) " +
|
||||
"from SysUserEntity")
|
||||
List<SysUserVo> selectAll();
|
||||
|
||||
@ -91,7 +91,7 @@ public interface SysUserDao extends JpaRepository<SysUserEntity,Integer> {
|
||||
* @param userName
|
||||
* @return
|
||||
*/
|
||||
@Query(value = "select new com.xkrs.model.vo.SysUserVo (id,reallyName,telephone,countyCode,activeFlag,addTime,overTime,dayNum,accountType) " +
|
||||
@Query(value = "select new com.xkrs.model.vo.SysUserVo (id,reallyName,telephone,countyCode,activeFlag,addTime,overTime,dayNum,accountType,countyName) " +
|
||||
"from SysUserEntity where userName = :userName")
|
||||
SysUserVo selectUserByUserName(String userName);
|
||||
|
||||
|
@ -84,6 +84,14 @@ public class SysUserEntity implements Serializable {
|
||||
@Column(length = 64,columnDefinition = "varchar(64)")
|
||||
private String accountType;
|
||||
|
||||
@Column(length = 64,columnDefinition = "varchar(64)")
|
||||
private String countyName;
|
||||
|
||||
/**
|
||||
* 登录次数
|
||||
*/
|
||||
private Integer loginNum;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
@ -220,6 +228,22 @@ public class SysUserEntity implements Serializable {
|
||||
this.accountType = accountType;
|
||||
}
|
||||
|
||||
public String getCountyName() {
|
||||
return countyName;
|
||||
}
|
||||
|
||||
public void setCountyName(String countyName) {
|
||||
this.countyName = countyName;
|
||||
}
|
||||
|
||||
public Integer getLoginNum() {
|
||||
return loginNum;
|
||||
}
|
||||
|
||||
public void setLoginNum(Integer loginNum) {
|
||||
this.loginNum = loginNum;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "SysUserEntity{" +
|
||||
@ -240,6 +264,8 @@ public class SysUserEntity implements Serializable {
|
||||
", dayNum=" + dayNum +
|
||||
", overTime='" + overTime + '\'' +
|
||||
", accountType='" + accountType + '\'' +
|
||||
", countyName='" + countyName + '\'' +
|
||||
", loginNum=" + loginNum +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
@ -60,6 +60,8 @@ public class SysUserQo {
|
||||
|
||||
private String accountType;
|
||||
|
||||
private String countyName;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
@ -155,4 +157,12 @@ public class SysUserQo {
|
||||
public void setAccountType(String accountType) {
|
||||
this.accountType = accountType;
|
||||
}
|
||||
|
||||
public String getCountyName() {
|
||||
return countyName;
|
||||
}
|
||||
|
||||
public void setCountyName(String countyName) {
|
||||
this.countyName = countyName;
|
||||
}
|
||||
}
|
||||
|
@ -26,7 +26,9 @@ public class SysUserVo implements Serializable {
|
||||
|
||||
private String accountType;
|
||||
|
||||
public SysUserVo(Integer id, String reallyName, String telephone, String countyCode, Integer activeFlag, String addTime, String overTime, Integer dayNum, String accountType) {
|
||||
private String countyName;
|
||||
|
||||
public SysUserVo(Integer id, String reallyName, String telephone, String countyCode, Integer activeFlag, String addTime, String overTime, Integer dayNum, String accountType, String countyName) {
|
||||
this.id = id;
|
||||
this.reallyName = reallyName;
|
||||
this.telephone = telephone;
|
||||
@ -36,6 +38,7 @@ public class SysUserVo implements Serializable {
|
||||
this.overTime = overTime;
|
||||
this.dayNum = dayNum;
|
||||
this.accountType = accountType;
|
||||
this.countyName = countyName;
|
||||
}
|
||||
|
||||
public Integer getId() {
|
||||
@ -109,5 +112,13 @@ public class SysUserVo implements Serializable {
|
||||
public void setAccountType(String accountType) {
|
||||
this.accountType = accountType;
|
||||
}
|
||||
|
||||
public String getCountyName() {
|
||||
return countyName;
|
||||
}
|
||||
|
||||
public void setCountyName(String countyName) {
|
||||
this.countyName = countyName;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -259,7 +259,6 @@ public class FirePointServiceImpl implements FirePointService {
|
||||
}
|
||||
List<FireTaskPhoto> fireTaskPhotos = PhotoUtil.uploadImage(files, appTaskBodyVo.getFireCode());
|
||||
List<FireTaskPhoto> fireTaskPhotos1 = fireTaskPhotoDao.saveAll(fireTaskPhotos);
|
||||
//List<FireTaskPhoto> fireTaskPhotos1 = jdbcUtils.batchWithJdbcTemplate(fireTaskPhotos);
|
||||
if(fireTaskPhotos1 == null || fireTaskPhotos1.size() == 0){
|
||||
return outputEncapsulationObject(PromptMessageEnum.PROCESS_FAIL,"图片上传失败,任务提交失败",locale);
|
||||
}
|
||||
|
@ -100,6 +100,7 @@ public class SysUserServiceImpl implements SysUserService {
|
||||
sysUserEntity.setDayNum(7);
|
||||
String string = dateTimeToString(LocalDateTime.now().plusDays(7L));
|
||||
sysUserEntity.setOverTime(string);
|
||||
sysUserEntity.setCountyName(sysUserQo.getCountyName());
|
||||
|
||||
sysUserDao.save(sysUserEntity);
|
||||
|
||||
|
@ -38,7 +38,7 @@ spring.cache.type = redis
|
||||
spring.redis.database = 8
|
||||
spring.redis.host = localhost
|
||||
spring.redis.port = 6379
|
||||
spring.redis.password=sdust2020
|
||||
#spring.redis.password=sdust2020
|
||||
spring.redis.timeout = 10000
|
||||
spring.redis.lettuce.pool.max-active = 100
|
||||
spring.redis.lettuce.pool.max-wait = 10000
|
||||
|
Loading…
Reference in New Issue
Block a user