feat:bug修改
This commit is contained in:
1 parent
7d6a670ad5
commit
32cac3558b
5 files changed
+47
-36
No files matched your search
+15
-7
@@ -810,17 +810,25 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
|
||||
sysUser.setProcessStatus(TaskCheckStatusEnum.RESULT.getCode());
|
||||
sysUser.setProcessTime(LocalDateTime.now());
|
||||
sysUser.setStaffingType(UserStaffingTypeEnum.NONE_STAFFING.getType());
|
||||
// 把用户放到默认部门
|
||||
Long defaultDeptIdLong = null;
|
||||
String defaultDeptId = ParamResolver.getStr("DEFAULT_DEPT");
|
||||
try {
|
||||
defaultDeptIdLong = Long.parseLong(defaultDeptId);
|
||||
} catch (Exception e) {
|
||||
}
|
||||
if (ObjectUtil.isNotEmpty(defaultDeptIdLong)) {
|
||||
sysUser.setDeptId(defaultDeptIdLong);
|
||||
}
|
||||
baseMapper.insert(sysUser);
|
||||
|
||||
// 如果角色为空,赋默认角色
|
||||
if (CollUtil.isEmpty(userDto.getRole())) {
|
||||
// 获取默认角色编码
|
||||
String defaultRole = ParamResolver.getStr("USER_DEFAULT_ROLE");
|
||||
// 默认角色
|
||||
SysRole sysRole = sysRoleService.getOne(Wrappers.<SysRole>lambdaQuery().eq(SysRole::getRoleCode, defaultRole));
|
||||
userDto.setRole(Collections.singletonList(sysRole.getRoleId()));
|
||||
List<SysRole> roleList = sysRoleService.list();
|
||||
String walletAutoCreate = ParamResolver.getStr("WALLET_AUTO_CREATE");
|
||||
String userDefaultRole = ParamResolver.getStr("USER_DEFAULT_ROLE");
|
||||
List<Long> roleIds = roleList.stream().filter(v -> ObjectUtil.equals(v.getRoleCode(), walletAutoCreate) || ObjectUtil.equals(v.getRoleCode(), userDefaultRole)).map(SysRole::getRoleId).toList();
|
||||
userDto.setRole(roleIds);
|
||||
}
|
||||
|
||||
// 插入用户角色关系表
|
||||
userDto.getRole().stream().map(roleId -> {
|
||||
SysUserRole userRole = new SysUserRole();
|
||||
|
||||
+1
-3
@@ -11,9 +11,6 @@ import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 钱包管理
|
||||
*
|
||||
* @author dzc
|
||||
* @date 2024-12-30 09:06:35
|
||||
*/
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@@ -95,6 +92,7 @@ public class WalletManageEntity extends Model<WalletManageEntity> {
|
||||
|
||||
/**
|
||||
* 饭卡绑定状态
|
||||
*
|
||||
* @see WalleCardStatusEnum
|
||||
*/
|
||||
@Schema(description = "饭卡绑定状态")
|
||||
|
||||
+30
-1
@@ -2,6 +2,7 @@ package com.bsd.pjcloud.wallet.api.entity.mch;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
@@ -17,7 +18,7 @@ import java.time.LocalDateTime;
|
||||
*/
|
||||
@Data
|
||||
@TenantTable
|
||||
@TableName("mch_manage")
|
||||
@TableName(value = "mch_manage", autoResultMap = true)
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Schema(description = "商户管理")
|
||||
public class MchManageEntity extends Model<MchManageEntity> {
|
||||
@@ -159,6 +160,13 @@ public class MchManageEntity extends Model<MchManageEntity> {
|
||||
@Schema(description = "分店数量")
|
||||
private Long mchCount;
|
||||
|
||||
/**
|
||||
* 功能范围
|
||||
*/
|
||||
@Schema(description = "功能范围")
|
||||
@TableField(typeHandler = JacksonTypeHandler.class)
|
||||
private FunctionScope functionScope;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@@ -200,4 +208,25 @@ public class MchManageEntity extends Model<MchManageEntity> {
|
||||
*/
|
||||
@Schema(description = "租户ID")
|
||||
private Long tenantId;
|
||||
|
||||
@Data
|
||||
public static class FunctionScope {
|
||||
|
||||
/**
|
||||
* 是否启用报餐
|
||||
*/
|
||||
private Boolean orderingFoodEnable;
|
||||
|
||||
/**
|
||||
* 是否启用订餐
|
||||
*/
|
||||
private Boolean tableReservation;
|
||||
|
||||
/**
|
||||
* 是否启用外卖
|
||||
*/
|
||||
private Boolean takeOutEnable;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
-2
@@ -24,10 +24,8 @@ import com.bsd.pjcloud.common.core.util.CollectionUtils;
|
||||
import com.bsd.pjcloud.common.core.util.R;
|
||||
import com.bsd.pjcloud.common.data.datascope.DataScope;
|
||||
import com.bsd.pjcloud.common.data.datascope.PjcloudDefaultDataScopeHandle;
|
||||
import com.bsd.pjcloud.hard.api.constant.HardTypeEnum;
|
||||
import com.bsd.pjcloud.wallet.api.constant.WalletBizEnum;
|
||||
import com.bsd.pjcloud.wallet.api.constant.WalletTypeEnum;
|
||||
import com.bsd.pjcloud.wallet.api.constant.mch.WalletMchSupType;
|
||||
import com.bsd.pjcloud.wallet.api.dto.MchManageDto;
|
||||
import com.bsd.pjcloud.wallet.api.dto.WalletManageDto;
|
||||
import com.bsd.pjcloud.wallet.api.dto.WalletTransactionDto;
|
||||
|
||||
+1
-23
@@ -2,29 +2,6 @@
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.bsd.pjcloud.wallet.mapper.MchManageMapper">
|
||||
<resultMap id="mchManageMap" type="com.bsd.pjcloud.wallet.api.entity.mch.MchManageEntity">
|
||||
<id property="id" column="id"/>
|
||||
<result property="deptId" column="dept_id"/>
|
||||
<result property="defaultWalletTypeId" column="default_wallet_type_id"/>
|
||||
<result property="name" column="name"/>
|
||||
<result property="types" column="types"/>
|
||||
<result property="logoPic" column="logo_pic"/>
|
||||
<result property="collectionCode" column="collection_code"/>
|
||||
<result property="swiperPic" column="swiper_pic"/>
|
||||
<result property="phone" column="phone"/>
|
||||
<result property="jobTime" column="job_time"/>
|
||||
<result property="addressDes" column="address_des"/>
|
||||
<result property="supType" column="sup_type"/>
|
||||
<result property="discountsPrice" column="discounts_price"/>
|
||||
<result property="cooperationStatus" column="cooperation_status"/>
|
||||
<result property="mchCount" column="mch_count"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<result property="tenantId" column="tenant_id"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectA">
|
||||
select a.id,
|
||||
@@ -49,6 +26,7 @@
|
||||
a.discounts_price,
|
||||
a.cooperation_status,
|
||||
a.mch_count,
|
||||
a.function_scope,
|
||||
a.create_by,
|
||||
a.create_time,
|
||||
a.update_by,
|
||||
|
||||
Reference in new issue
Block a user