|
|
@@ -24,6 +24,12 @@ public class ProjectUserConfigService extends SuperService {
|
|
|
@Autowired
|
|
|
private ProjectUserConfigDao projectUserConfigDao;
|
|
|
|
|
|
+ /**
|
|
|
+ * 保存小程序用户配置
|
|
|
+ *
|
|
|
+ * @param param
|
|
|
+ * @return
|
|
|
+ */
|
|
|
public ResultContent xcxSaveUserConfig(ProjectUserConfigParam param) {
|
|
|
if (StringUtils.isEmpty(param.getUserId())) {
|
|
|
param.setUserId(getCurrentUserId());
|
|
|
@@ -56,6 +62,12 @@ public class ProjectUserConfigService extends SuperService {
|
|
|
return ResultContent.buildSuccess();
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 得到小程序配置 (主要是从header得到当前用户、项目oid信息)
|
|
|
+ *
|
|
|
+ * @param param
|
|
|
+ * @return
|
|
|
+ */
|
|
|
public ResultContent<ProjectUserConfigModel> xcxGetUserConfig(ProjectUserConfigParam param) {
|
|
|
if (StringUtils.isEmpty(param.getUserId())) {
|
|
|
param.setUserId(getCurrentUserId());
|
|
|
@@ -79,6 +91,9 @@ public class ProjectUserConfigService extends SuperService {
|
|
|
ProjectUserConfig entity = projectUserConfigDao.findTopByProjectOidAndUserIdAndKey(param.getProjectOid(), param.getUserId(), param.getKey());
|
|
|
ProjectUserConfigModel model = toModel(entity);
|
|
|
if (StringUtils.isEmpty(model.getKey())) {
|
|
|
+ if (ObjectUtils.isEmpty(model)) {
|
|
|
+ model = new ProjectUserConfigModel();
|
|
|
+ }
|
|
|
model.setKey(param.getKey());
|
|
|
}
|
|
|
return ResultContent.buildSuccess(model);
|