midway-fatcms 0.0.1-beta.46 → 0.0.1-beta.47

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -35,7 +35,6 @@ let CurdMixByAccountService = class CurdMixByAccountService {
35
35
  if (accountId) {
36
36
  const fatcmsUserAccountId = toFatcmsUserAccountId(accountId);
37
37
  accountIds.add(fatcmsUserAccountId);
38
- row['__fatcmsUserAccountId__'] = fatcmsUserAccountId;
39
38
  }
40
39
  }
41
40
  });
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.RelatedType = exports.CrudMixUtils = void 0;
4
4
  const keys_1 = require("../../libs/crud-pro/models/keys");
5
5
  const MixinUtils_1 = require("../../libs/crud-pro/utils/MixinUtils");
6
+ const global_config_1 = require("../../libs/global-config/global-config");
6
7
  const _ = require("lodash");
7
8
  const functions_1 = require("../../libs/utils/functions");
8
9
  var RelatedType;
@@ -248,15 +249,16 @@ class CrudMixUtils {
248
249
  * @param columnRelation
249
250
  */
250
251
  copyUserInfoToRowNoRelatedCode(row, map, columnRelation) {
251
- const { targetColumns } = columnRelation;
252
+ const { targetColumns, sourceColumn } = columnRelation;
252
253
  if (!targetColumns) {
253
254
  return;
254
255
  }
255
- const tmpSourceColumn = '__fatcmsUserAccountId__';
256
- const sourceValue = _.get(row, tmpSourceColumn);
257
- if (!sourceValue) {
256
+ const accountId = _.get(row, sourceColumn);
257
+ if (!accountId) {
258
258
  return;
259
259
  }
260
+ const { toFatcmsUserAccountId } = global_config_1.GLOBAL_STATIC_CONFIG.getConfig();
261
+ const fatcmsUserAccountId = toFatcmsUserAccountId(accountId);
260
262
  const getValue = (code) => {
261
263
  if (!map) {
262
264
  return null;
@@ -266,9 +268,9 @@ class CrudMixUtils {
266
268
  }
267
269
  return map[code];
268
270
  };
269
- const isSetArray = copyByArraySourceValue(row, sourceValue, targetColumns, getValue);
271
+ const isSetArray = copyByArraySourceValue(row, fatcmsUserAccountId, targetColumns, getValue);
270
272
  if (!isSetArray) {
271
- copyBySingleSourceValue(row, sourceValue, targetColumns, getValue);
273
+ copyBySingleSourceValue(row, fatcmsUserAccountId, targetColumns, getValue);
272
274
  }
273
275
  }
274
276
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "midway-fatcms",
3
- "version": "0.0.1-beta.46",
3
+ "version": "0.0.1-beta.47",
4
4
  "description": "This is a midway component sample",
5
5
  "main": "dist/index.js",
6
6
  "typings": "index.d.ts",