liujc 1 년 전
부모
커밋
c6c4f6c8f9

+ 4 - 0
cooleshow-common/src/main/java/com/yonge/cooleshow/common/constant/SysConfigConstant.java

@@ -386,6 +386,10 @@ public interface SysConfigConstant {
 
 
     /**
+     * 机构人员解绑手机号
+     */
+    String TENANT_USER_UNBIND_PHONE = "tenant_user_unbind_phone";
+    /**
      *  子账户创建回调url
      */
     String SUB_ACCOUNT_CREATE_CALLBACK_URL = "sub_account_create_callback_url";

+ 10 - 0
cooleshow-user/user-admin/src/main/java/com/yonge/cooleshow/admin/controller/UnbindAuthUserController.java

@@ -12,6 +12,7 @@ import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiImplicitParams;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.collections.CollectionUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.validation.annotation.Validated;
@@ -30,6 +31,10 @@ import com.yonge.cooleshow.biz.dal.service.UnbindAuthUserService;
 import com.yonge.cooleshow.biz.dal.wrapper.UnbindAuthUserWrapper;
 import com.yonge.cooleshow.biz.dal.entity.UnbindAuthUser;
 
+import java.util.Collections;
+import java.util.List;
+import java.util.stream.Collectors;
+
 @Slf4j
 @Validated
 @RestController
@@ -57,6 +62,11 @@ public class UnbindAuthUserController {
         if (unbindAuthUser.getUserId() == null) {
             throw new BizException("用户ID不能为空");
         }
+
+        List<UnbindAuthUser> list = unbindAuthUserService.list();
+        if (!CollectionUtils.isEmpty(list)) {
+            unbindAuthUser.setId(list.get(0).getId());
+        }
         // 新增数据
         unbindAuthUserService.save(unbindAuthUser);
         

+ 10 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/entity/PaymentMerchantConfig.java

@@ -97,6 +97,16 @@ public class PaymentMerchantConfig implements Serializable {
 	@TableField(value = "alipay_public_key_")
     private String alipayPublicKey;
 
+
+    @ApiModelProperty("小程序appId")
+    @TableField(value = "mini_app_id_")
+    private String miniAppId;
+
+    @ApiModelProperty("小程序secret")
+    @TableField(value = "mini_app_secret_")
+    private String miniAppSerret;
+
+
     @ApiModelProperty("创建时间") 
 	@TableField(value = "create_time_")
     private Date createTime;

+ 2 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/PaymentMerchantConfigServiceImpl.java

@@ -80,6 +80,8 @@ public class PaymentMerchantConfigServiceImpl extends ServiceImpl<PaymentMerchan
                 yeepayPayConfig.setAlipayAppId(config.getAlipayAppId());
                 yeepayPayConfig.setAlipayPrivateKey(config.getAlipayPrivateKey());
                 yeepayPayConfig.setAlipayPublicKey(config.getAlipayPublicKey());
+                yeepayPayConfig.setMiniAppId(config.getMiniAppId());
+                yeepayPayConfig.setMiniAppSecret(config.getMiniAppSerret());
                 YeepayPaymentServicePlugin plugin;
                 try {
                     plugin = new YeepayPaymentServicePlugin(config.getPaymentVendor(), yeepayPayConfig, false);

+ 2 - 1
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/TenantAlbumServiceImpl.java

@@ -296,7 +296,8 @@ public class TenantAlbumServiceImpl extends ServiceImpl<TenantAlbumMapper, Tenan
                     tenantActivationCode.setTenantId(tenantAlbumContent.getTenantId());
                     tenantActivationCode.setTenantAlbumId(tenantAlbumContent.getTenantAlbumId());
                     tenantActivationCode.setTenantAlbumPurchaseId(tenantAlbumPurchase.getId());
-                    long l = Long.parseLong(new Date().getTime() + i + String.valueOf(tenantAlbumPurchase.getId()));
+                    String s = String.valueOf(tenantAlbumPurchase.getId());
+                    long l = Long.parseLong(new Date().getTime() + i + s.substring(s.length()-6));
                     tenantActivationCode.setActivationCode(StringUtil.DeciamlToThirtySix(l,7));
 //                    tenantActivationCode.setActivationCode(IdWorker.get32UUID());
                     tenantActivationCode.setSendStatus(EActivationCode.WAIT);

+ 3 - 1
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/TenantUnbindRecordServiceImpl.java

@@ -280,11 +280,13 @@ public class TenantUnbindRecordServiceImpl extends ServiceImpl<TenantUnbindRecor
     @Override
     public void sendPlatformAuditMessage() {
         String configValue = sysConfigService.findConfigValue(SysConfigConstant.TENANT_USER_UNBIND_EXPIRE_TIME);
+        String unBindPhone = sysConfigService.findConfigValue(SysConfigConstant.TENANT_USER_UNBIND_PHONE);
         // 默认5天
         long expireTime = 5L;
         try {
             expireTime = Long.parseLong(configValue);
         } catch (Exception e) {
+            expireTime = 5L;
         }
         // 查询机构超出5天未处理的解绑申请
         Integer count = tenantUnbindRecordService.lambdaQuery()
@@ -308,7 +310,7 @@ public class TenantUnbindRecordServiceImpl extends ServiceImpl<TenantUnbindRecor
                     continue;
                 }
                 Map<Long, String> receivers = new HashMap<>();
-                receivers.put(unbindAuthUser.getUserId(), sysUser.getPhone());
+                receivers.put(unbindAuthUser.getUserId(), unBindPhone);
                 sysMessageService.batchSendMessage(MessageSenderPluginContext.MessageSender.AWSMS,
                         MessageTypeEnum.PLATFORM_AUDIT_UNBIND,
                         receivers, null, 0, null, ClientEnum.SYSTEM.getCode(), count, finalExpireTime);

+ 3 - 3
toolset/toolset-base/src/main/java/com/yonge/toolset/base/util/StringUtil.java

@@ -391,13 +391,13 @@ public class StringUtil {
 
         int i = 0;
         int num = 10;
-        int second = LocalDateTime.now().getSecond();
+        long second = new Date().getTime();
         Random random = new Random();
-        int id = 100006;
+        String id = "100000006";
 
         for (int i1 = 0; i1 < num; i1++) {
             second = second + i1;
-            String s = DeciamlToThirtySix(Long.parseLong(second + String.valueOf(id)),7);
+            String s = DeciamlToThirtySix(Long.parseLong(second + id.substring(id.length()-6)),7);
             System.out.println(s);
         }
     }