1.修复部分bug

master
x_z 3 years ago
parent 4fcebd49d8
commit 5ed0e12151

@ -364,7 +364,7 @@ public class AuthAdminController {
return authAdminRoleResponse;
}).collect(Collectors.toList());
pageSimpleResponse.setList(authAdminRoleResponses);
return ResultVOUtils.success(authAdminRoleResponses);
return ResultVOUtils.success(pageSimpleResponse);
}
}

@ -1,6 +1,7 @@
package com.glxp.udi.admin.controller.auth;
import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.glxp.udi.admin.annotation.AuthRuleAnnotation;
@ -93,6 +94,9 @@ public class RegisterController {
@PostMapping("udiwarehouse/register/getCheckcode")
public BaseResponse getCheckcode(@RequestBody CheckCodeRequest checkCodeRequest, HttpSession httpSession) {
if (StrUtil.isBlank(checkCodeRequest.getPhoneNum())) {
return ResultVOUtils.error(500, "请输入手机号!");
}
if (checkCodeRequest.getUserName() != null) {
AuthAdmin authAdmin = authAdminService.findByUserName(checkCodeRequest.getUserName());
@ -110,7 +114,7 @@ public class RegisterController {
int mobile_code = (int) ((Math.random() * 9 + 1) * 100000);
MultiValueMap<String, Object> postParameters = new LinkedMultiValueMap<>();
int time = 5;
String content = new String("您正在进行手机验证,验证码是" + mobile_code + "" + time + "分钟内有效。");
String content = "您正在进行手机验证,验证码是" + mobile_code + "" + time + "分钟内有效。";
postParameters.add("account", "C07086222");
postParameters.add("password", "2dddbbf73636c193c5903324bdb47c5c");
postParameters.add("mobile", checkCodeRequest.getPhoneNum());

@ -160,10 +160,6 @@ public class BussinessTypeController {
}
List<BussinessTypeEntity> bussinessTypeEntities = bussinessTypeService.candidateBussinessType(cndidateRequest.getMainAction(), cndidateRequest.getCustomerId());
if (!StrUtil.isEmpty(cndidateRequest.getCurAction())) {
BussinessTypeEntity bussinessTypeEntity = bussinessTypeService.findBTByAction(cndidateRequest.getCurAction(), cndidateRequest.getCustomerId());
bussinessTypeEntities.add(bussinessTypeEntity);
}
//查询补单单据类型
return ResultVOUtils.success(bussinessTypeEntities);
}

@ -32,5 +32,5 @@ public interface DeviceKeyDao extends BaseMapper<DeviceKeyEntity> {
* @param customerId
* @return
*/
IPage<DeviceKeyResponse> findDeviceKeyByCustomerId(IPage<DeviceKeyResponse> page, @Param("imei") String imei, @Param("isCheck") String isCheck, @Param("customerIds") List<String> customerIds);
IPage<DeviceKeyResponse> findDeviceKeyByCustomerId(@Param("page") IPage<DeviceKeyResponse> page, @Param("imei") String imei, @Param("isCheck") String isCheck, @Param("customerIds") List<String> customerIds);
}

@ -42,13 +42,4 @@ public interface InvWarehouseDao extends BaseMapper<InvWarehouseEntity> {
String selectNameByCode(@Param("code") String code);
/**
* ID
*
* @param name
* @param customerId
* @param code
* @return
*/
int count(@Param("name") String name, @Param("customerId") String customerId, @Param("code") String code);
}

@ -21,8 +21,10 @@ public class AuthPermissionRule {
private String title;
@TableField("`status`")
private Integer status;
@TableField("`condition`")
private String condition;
private Integer listorder;

@ -4,6 +4,8 @@ import lombok.Data;
@Data
public class CheckCodeRequest {
private String phoneNum;
private String userName;
}

@ -20,7 +20,7 @@ import java.util.List;
@Slf4j
@Service
@Transactional(rollbackFor = Exception.class)
public class DeviceKeyService {
public class DeviceKeyService {
@Resource
private DeviceKeyDao deviceKeyDao;
@ -62,6 +62,6 @@ public class DeviceKeyService {
}
}
IPage<DeviceKeyResponse> page = new Page<>(filterDeviceKeyRequest.getPage(), filterDeviceKeyRequest.getLimit());
return deviceKeyDao.findDeviceKeyByCustomerId(page, filterDeviceKeyRequest.getImei(), filterDeviceKeyRequest.getIsCheck(),filterDeviceKeyRequest.getCustomerIds());
return deviceKeyDao.findDeviceKeyByCustomerId(page, filterDeviceKeyRequest.getImei(), filterDeviceKeyRequest.getIsCheck(), filterDeviceKeyRequest.getCustomerIds());
}
}

@ -87,10 +87,11 @@ public class InvWarehouseService {
if (filterInvWarehouseRequest == null) {
return Collections.emptyList();
}
Page<WarehouseUserEntity> page = new Page<>(filterInvWarehouseRequest.getPage(), filterInvWarehouseRequest.getLimit());
Page<WarehouseUserEntity> pageResult = warehouseUserDao.selectCodeByUser(page, String.valueOf(filterInvWarehouseRequest.getUserId()));
QueryWrapper<WarehouseUserEntity> wrapper = new QueryWrapper<>();
wrapper.eq("userId", filterInvWarehouseRequest.getUserId());
List<WarehouseUserEntity> warehouseUserEntities = warehouseUserDao.selectList(wrapper);
List<InvWarehouseEntity> invWarehouseEntities = new ArrayList<>();
for (WarehouseUserEntity warehouseUserEntity : pageResult.getRecords()) {
for (WarehouseUserEntity warehouseUserEntity : warehouseUserEntities) {
filterInvWarehouseRequest.setCode(warehouseUserEntity.getCode());
invWarehouseEntities.addAll(invWarehouseDao.filterGroupInvWarehouse(filterInvWarehouseRequest));
}
@ -175,11 +176,16 @@ public class InvWarehouseService {
* @return
*/
public boolean checkNameExist(String name, String customerId, String code) {
if (StrUtil.isBlank(code)) {
QueryWrapper<InvWarehouseEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StrUtil.isNotBlank(name), "name", name)
.eq(StrUtil.isNotBlank(customerId), "customerId", customerId)
.eq(StrUtil.isNotBlank(code), "code", code);
long count = invWarehouseDao.selectCount(wrapper);
if (count == 1 && StrUtil.isNotBlank(code)) {
return false;
}
int count = invWarehouseDao.count(name, customerId, code);
if (count == 1) {
} else if (count == 0 && StrUtil.isBlank(code)) {
return false;
} else if (count == 0 && StrUtil.isNotBlank(code)) {
return false;
}
return true;

@ -210,11 +210,4 @@
where code = #{code}
</select>
<select id="count" resultType="java.lang.Integer">
select count(*)
from inv_warehouse
where name = #{name}
and customerId = #{customerId}
and code = #{code}
</select>
</mapper>
Loading…
Cancel
Save