Browse Source

修改

master
cgx 6 months ago
parent
commit
f898f82f06
2 changed files with 26 additions and 4 deletions
  1. +19
    -1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/alUser/service/impl/UserServiceImpl.java
  2. +7
    -3
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/postBean/ProductOrderReq.java

+ 19
- 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/alUser/service/impl/UserServiceImpl.java View File

@ -3,6 +3,7 @@ package org.jeecg.modules.alUser.service.impl;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import org.hibernate.cache.spi.support.CollectionNonStrictReadWriteAccess;
import org.jeecg.common.api.vo.Result; import org.jeecg.common.api.vo.Result;
import org.jeecg.common.constant.CommonConstant; import org.jeecg.common.constant.CommonConstant;
import org.jeecg.common.exception.JeecgBootException; import org.jeecg.common.exception.JeecgBootException;
@ -80,7 +81,7 @@ public class UserServiceImpl implements UserService {
result.error500("手机验证码错误"); result.error500("手机验证码错误");
} }
if (!smscode.equals(code)) { if (!smscode.equals(code)) {
result.setMessage("手机验证码错误");
result.error500("手机验证码错误");
return result; return result;
} }
redisUtil.del(CommonConstant.PHONE_CODE + username); redisUtil.del(CommonConstant.PHONE_CODE + username);
@ -97,7 +98,20 @@ public class UserServiceImpl implements UserService {
JSONObject obj = new JSONObject(); JSONObject obj = new JSONObject();
obj.put("token", token); obj.put("token", token);
obj.put("userInfo", one); obj.put("userInfo", one);
LambdaQueryWrapper<TbUserRole> objectLambdaQueryWrapper = new LambdaQueryWrapper<>();
objectLambdaQueryWrapper.eq(TbUserRole::getUserId,one.getId()).
eq(TbUserRole::getRole,0).eq(TbUserRole::getAuditStatus,1);
TbUserRole cg= tbUserRoleService.getOne(objectLambdaQueryWrapper);
LambdaQueryWrapper<TbUserRole> queryWrapper1 = new LambdaQueryWrapper<>();
queryWrapper1.eq(TbUserRole::getUserId,one.getId()).
eq(TbUserRole::getRole,1).eq(TbUserRole::getAuditStatus,1);
TbUserRole shop= tbUserRoleService.getOne(queryWrapper1);
// 返回采购商身份信息
obj.put("buy", cg);
// 返回供应商身份信息
obj.put("shop", shop);
result.setResult(obj); result.setResult(obj);
result.setCode(CommonConstant.SC_OK_200);
result.success("登录成功"); result.success("登录成功");
return result; return result;
} }
@ -133,6 +147,7 @@ public class UserServiceImpl implements UserService {
obj.put("token", token); obj.put("token", token);
obj.put("userInfo", newUser); obj.put("userInfo", newUser);
result.setResult(obj); result.setResult(obj);
result.setCode(CommonConstant.SC_OK_200);
return result; return result;
} }
@ -155,6 +170,8 @@ public class UserServiceImpl implements UserService {
result.error500("用户名或密码错误"); result.error500("用户名或密码错误");
return result; return result;
} }
//getAuditStatus 0审核中 1 审核通过 2审核未通过
LambdaQueryWrapper<TbUserRole> objectLambdaQueryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<TbUserRole> objectLambdaQueryWrapper = new LambdaQueryWrapper<>();
objectLambdaQueryWrapper.eq(TbUserRole::getUserName,reqUserRole.getUserName()). objectLambdaQueryWrapper.eq(TbUserRole::getUserName,reqUserRole.getUserName()).
eq(TbUserRole::getRole,reqUserRole.getRole()).in(TbUserRole::getAuditStatus,1,0); eq(TbUserRole::getRole,reqUserRole.getRole()).in(TbUserRole::getAuditStatus,1,0);
@ -173,6 +190,7 @@ public class UserServiceImpl implements UserService {
JSONObject obj = new JSONObject(); JSONObject obj = new JSONObject();
obj.put("role", tbUserRole); obj.put("role", tbUserRole);
result.setResult(obj); result.setResult(obj);
result.setCode(CommonConstant.SC_OK_200);
return result; return result;
} }


+ 7
- 3
jeecg-boot-module-system/src/main/java/org/jeecg/modules/postBean/ProductOrderReq.java View File

@ -52,12 +52,16 @@ public class ProductOrderReq implements Serializable {
@ApiModelProperty(value = "单价") @ApiModelProperty(value = "单价")
private BigDecimal price; private BigDecimal price;
/**暂定数量、*/
/**保证金*/
@Excel(name = "保证金", width = 15)
@ApiModelProperty(value = "保证金")
private BigDecimal deposit;
/**暂定数量、*/
@Excel(name = "暂定数量、", width = 15) @Excel(name = "暂定数量、", width = 15)
@ApiModelProperty(value = "暂定数量、") @ApiModelProperty(value = "暂定数量、")
private Integer num; private Integer num;
@Excel(name = "保证金", width = 15)
private java.math.BigDecimal deposit;
/**提货时间*/ /**提货时间*/
@Excel(name = "提货时间", width = 15, format = "yyyy-MM-dd") @Excel(name = "提货时间", width = 15, format = "yyyy-MM-dd")


Loading…
Cancel
Save