Browse Source

增加机构在开通的时候初始化相关数据

hgw 3 years ago
parent
commit
6750057dd9

+ 3 - 2
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/TenantInfoDao.java

@@ -7,7 +7,6 @@ import com.ym.mec.biz.dal.entity.TenantInfo;
 import com.ym.mec.biz.dal.entity.TenantProductSumm;
 import org.apache.ibatis.annotations.Param;
 
-import java.util.Date;
 import java.util.List;
 import java.util.Map;
 
@@ -23,7 +22,9 @@ public interface TenantInfoDao extends BaseMapper<TenantInfo> {
 
     TenantInfo queryTenantInfoByOrgan(@Param("organId") Integer organId);
 
-    void updatePhone(@Param("newPhone")String newPhone, @Param("oldPhone")String oldPhone);
+    void updatePhone(@Param("newPhone") String newPhone, @Param("oldPhone") String oldPhone);
 
     Integer queryUserByTenantId(@Param("tenantId") Integer tenantId);
+
+    int openInitNewsInformation(@Param("tenantId") Integer tenantId, @Param("orgId") String orgId);
 }

+ 2 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/impl/TenantInfoServiceImpl.java

@@ -403,7 +403,7 @@ public class TenantInfoServiceImpl extends ServiceImpl<TenantInfoDao, TenantInfo
         productInfo.setExpiryDate(expiryDate);
         tenantProductInfoService.updateById(productInfo);
         //关联精彩活动等数据
-
+        baseMapper.openInitNewsInformation(tenantId, orgId.toString());
         //释放锁
         bucket.delete();
 
@@ -504,6 +504,7 @@ public class TenantInfoServiceImpl extends ServiceImpl<TenantInfoDao, TenantInfo
      *
      * @param tenantId 机构id
      */
+    @Override
     public String getContract(Integer tenantId) {
         List<TenantInfoInfoPageVo> tenantInfoList = baseMapper.queryPage(new HashMap<String, Object>() {{
             put("tenantId", tenantId);

File diff suppressed because it is too large
+ 19 - 0
mec-biz/src/main/resources/config/mybatis/TenantInfoMapper.xml


Some files were not shown because too many files changed in this diff