切换店铺 无权限问题
角色模板 关闭却新增问题 会员加入 时间
This commit is contained in:
@@ -11,7 +11,7 @@ import org.springframework.validation.annotation.Validated;
|
|||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 私域引流配置
|
* 管理端/私域引流配置
|
||||||
*
|
*
|
||||||
* @author Administrator
|
* @author Administrator
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,17 +1,16 @@
|
|||||||
package com.czg.controller.user;
|
package com.czg.controller.user;
|
||||||
|
|
||||||
import com.czg.annotation.SaAdminCheckPermission;
|
|
||||||
import com.czg.market.dto.MkDrainageConfigDTO;
|
|
||||||
import com.czg.market.service.MkDrainageConfigService;
|
import com.czg.market.service.MkDrainageConfigService;
|
||||||
import com.czg.market.vo.MkDrainageConfigVO;
|
import com.czg.market.vo.MkDrainageConfigVO;
|
||||||
import com.czg.resp.CzgResult;
|
import com.czg.resp.CzgResult;
|
||||||
import com.czg.sa.StpKit;
|
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 私域引流配置
|
* 用户端/私域引流配置
|
||||||
* @author Administrator
|
* @author Administrator
|
||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
|
|||||||
@@ -208,7 +208,8 @@ public class AuthorizationServiceImpl implements AuthorizationService {
|
|||||||
Long headId = StpKit.USER.getHeadId();
|
Long headId = StpKit.USER.getHeadId();
|
||||||
long shopId = StpKit.USER.getLoginIdAsLong();
|
long shopId = StpKit.USER.getLoginIdAsLong();
|
||||||
ShopInfo currentInfo = shopInfoService.getById(shopId);
|
ShopInfo currentInfo = shopInfoService.getById(shopId);
|
||||||
if (headId != null && currentInfo.getIsHeadShop() != YesNoEnum.YES.value()) {
|
// if (headId != null && currentInfo.getIsHeadShop() != YesNoEnum.YES.value()) {
|
||||||
|
if (currentInfo.getIsHeadShop() != YesNoEnum.YES.value()) {
|
||||||
throw new CzgException("登录账号无权限切换");
|
throw new CzgException("登录账号无权限切换");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -217,7 +218,7 @@ public class AuthorizationServiceImpl implements AuthorizationService {
|
|||||||
throw new CzgException("用户不存在");
|
throw new CzgException("用户不存在");
|
||||||
}
|
}
|
||||||
|
|
||||||
ShopInfo shopInfo = shopInfoService.getById(sysUser.getId());
|
ShopInfo shopInfo = shopInfoService.getById(sysUserId);
|
||||||
if (shopInfo == null) {
|
if (shopInfo == null) {
|
||||||
throw new CzgException("店铺信息不存在");
|
throw new CzgException("店铺信息不存在");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -251,7 +251,7 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> impl
|
|||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional
|
||||||
public Boolean saveByTemplate(long shopId, RoleSaveTemplateDTO dto) {
|
public Boolean saveByTemplate(long shopId, RoleSaveTemplateDTO dto) {
|
||||||
roleTemplateService.list(new QueryWrapper().eq(SysRoleTemplate::getPid, dto.getId())).forEach(item -> {
|
roleTemplateService.list(new QueryWrapper().eq(SysRoleTemplate::getPid, dto.getId()).eq(SysRoleTemplate::getIsEnable, 1)).forEach(item -> {
|
||||||
SysRole role = getById(item.getRoleId());
|
SysRole role = getById(item.getRoleId());
|
||||||
role.setShopId(shopId);
|
role.setShopId(shopId);
|
||||||
role.setCreateUserId(shopId);
|
role.setCreateUserId(shopId);
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.czg;
|
package com.czg;
|
||||||
|
|
||||||
|
import cn.hutool.crypto.SecureUtil;
|
||||||
import com.czg.market.entity.MkLimitTimeDiscount;
|
import com.czg.market.entity.MkLimitTimeDiscount;
|
||||||
import com.mybatisflex.codegen.Generator;
|
import com.mybatisflex.codegen.Generator;
|
||||||
import com.mybatisflex.codegen.config.*;
|
import com.mybatisflex.codegen.config.*;
|
||||||
@@ -27,6 +28,8 @@ public class Main {
|
|||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
//or条件sql写法示例
|
//or条件sql写法示例
|
||||||
// orSqlTest();
|
// orSqlTest();
|
||||||
|
//修改密码
|
||||||
|
// getPassword(1L, "czg2303");
|
||||||
|
|
||||||
|
|
||||||
// String packageName = "system";
|
// String packageName = "system";
|
||||||
@@ -39,7 +42,7 @@ public class Main {
|
|||||||
//是否生成DTO实体 默认生成
|
//是否生成DTO实体 默认生成
|
||||||
boolean isGenerateDto = true;
|
boolean isGenerateDto = true;
|
||||||
|
|
||||||
initTableEntity(packageName, tableName, author, isGenerateDto);
|
// initTableEntity(packageName, tableName, author, isGenerateDto);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void initTableEntity(String packageName, String tableName, String author, boolean isGenerateDto) {
|
public static void initTableEntity(String packageName, String tableName, String author, boolean isGenerateDto) {
|
||||||
@@ -252,4 +255,11 @@ public class Main {
|
|||||||
|
|
||||||
return globalConfig;
|
return globalConfig;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void getPassword(Long sysUserId, String accountPwd) {
|
||||||
|
System.out.println("将生成的密码 替换sys_user表中的密码即可");
|
||||||
|
System.out.println(SecureUtil.md5(sysUserId + accountPwd));
|
||||||
|
System.out.println("-------------------------------------");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -79,14 +79,13 @@ public class ChatCouponServiceImpl extends ServiceImpl<ChatCouponMapper, ChatCou
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Page<ChatCouponVO> pageChatCoupon(Long shopId, Integer page, Integer size, Integer status) {
|
public Page<ChatCouponVO> pageChatCoupon(Long shopId, Integer page, Integer size, Integer status) {
|
||||||
Page<ChatCouponVO> pages = pageAs(Page.of(page, size),
|
return pageAs(Page.of(page, size),
|
||||||
QueryWrapper.create()
|
QueryWrapper.create()
|
||||||
.eq(ChatCoupon::getShopId, shopId)
|
.eq(ChatCoupon::getShopId, shopId)
|
||||||
.eq(ChatCoupon::getStatus, status)
|
.eq(ChatCoupon::getStatus, status)
|
||||||
.orderBy(ChatCoupon::getStatus).asc()
|
.orderBy(ChatCoupon::getStatus).asc()
|
||||||
.orderBy(ChatCoupon::getId).desc(),
|
.orderBy(ChatCoupon::getId).desc(),
|
||||||
ChatCouponVO.class);
|
ChatCouponVO.class);
|
||||||
return pages;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@@ -518,6 +519,7 @@ public class TbMemberConfigServiceImpl extends ServiceImpl<TbMemberConfigMapper,
|
|||||||
shopUser.setMemberCircleReward(memberOrder.getReward());
|
shopUser.setMemberCircleReward(memberOrder.getReward());
|
||||||
shopUser.setIsVip(1);
|
shopUser.setIsVip(1);
|
||||||
shopUser.setOpenType("PAY");
|
shopUser.setOpenType("PAY");
|
||||||
|
shopUser.setJoinTime(LocalDateTime.now());
|
||||||
if (memberOrder.getReward() != null) {
|
if (memberOrder.getReward() != null) {
|
||||||
//购买开通
|
//购买开通
|
||||||
deliver(shopUser, TableValueConstant.MemberExpFlow.Type.PAY, memberOrder.getAmount(), memberOrder.getReward(), memberOrderId);
|
deliver(shopUser, TableValueConstant.MemberExpFlow.Type.PAY, memberOrder.getAmount(), memberOrder.getReward(), memberOrderId);
|
||||||
|
|||||||
Reference in New Issue
Block a user