This commit is contained in:
hucs
2024-08-19 18:05:26 +08:00
parent 31b921fa5a
commit 8ced591cac
2 changed files with 5 additions and 3 deletions

View File

@@ -40,6 +40,7 @@ import com.starry.common.result.R;
import com.starry.common.utils.ConvertUtil; import com.starry.common.utils.ConvertUtil;
import com.starry.common.utils.VerificationCodeUtils; import com.starry.common.utils.VerificationCodeUtils;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
@@ -191,6 +192,7 @@ public class WxClerkController {
@ClerkUserLogin @ClerkUserLogin
@PostMapping("/user/add") @PostMapping("/user/add")
@Transactional(rollbackFor = Exception.class)
public R userAdd(@Validated @RequestBody PlayClerkUserByWxAddVo vo) { public R userAdd(@Validated @RequestBody PlayClerkUserByWxAddVo vo) {
String clerkId = ThreadLocalRequestDetail.getClerkUserInfo().getId(); String clerkId = ThreadLocalRequestDetail.getClerkUserInfo().getId();
PlayClerkUserInfoEntity userInfo = playClerkUserInfoService.selectById(clerkId); PlayClerkUserInfoEntity userInfo = playClerkUserInfoService.selectById(clerkId);
@@ -211,7 +213,7 @@ public class WxClerkController {
entity.setClerkId(clerkId); entity.setClerkId(clerkId);
entity.setAddTime(LocalDateTime.now()); entity.setAddTime(LocalDateTime.now());
playClerkUserReviewInfoService.create(entity); playClerkUserReviewInfoService.create(entity);
wxCustomMpService.sendClerkApplyNoticeForAdmin(entity); wxCustomMpService.sendClerkApplyNoticeForAdmin(entity, userInfo.getTenantId());
return R.ok("申请成功"); return R.ok("申请成功");
} }

View File

@@ -227,8 +227,8 @@ public class WxCustomMpService {
} }
public void sendClerkApplyNoticeForAdmin(PlayClerkUserReviewInfoEntity entity) { public void sendClerkApplyNoticeForAdmin(PlayClerkUserReviewInfoEntity entity, String tenantId) {
SysTenantEntity tenant = tenantService.selectSysTenantByTenantId(entity.getTenantId()); SysTenantEntity tenant = tenantService.selectSysTenantByTenantId(tenantId);
String template_id = tenant.getRzsqAdminTemplateId(); String template_id = tenant.getRzsqAdminTemplateId();
String tenantKey = tenant.getTenantKey(); String tenantKey = tenant.getTenantKey();
String url = "http://" + tenantKey + ".july.hucs.top/clerk/#/admin/clerk-apply-list"; String url = "http://" + tenantKey + ".july.hucs.top/clerk/#/admin/clerk-apply-list";