Commit 487dcc6b authored by jiaorz's avatar jiaorz

活动记录

parent 5627e09b
......@@ -116,17 +116,20 @@ public class ActivityPopularizeBiz extends BaseBiz<ActivityPopularizeMapper, Act
Integer num = relationBiz.getByUserIdAndPopularizeId(activityPopularizeRelation);
double amount = 0;
JSONObject jsonObject = JSONObject.parseObject(activityPopularizeItem.getDetail());
if (jsonObject != null && StringUtils.isNotBlank(jsonObject.getString("detail"))) {
JSONArray jsonArray = JSONArray.parseArray(jsonObject.getString("detail"));
if (jsonArray != null) {
JSONObject jsonObject1 = jsonArray.getJSONObject(num - 1);
if (jsonObject1 != null) {
double amountString = jsonObject1.getDouble("amount");
amount = amount + amountString;
if (num <= 10) {
JSONObject jsonObject = JSONObject.parseObject(activityPopularizeItem.getDetail());
if (jsonObject != null && StringUtils.isNotBlank(jsonObject.getString("detail"))) {
JSONArray jsonArray = JSONArray.parseArray(jsonObject.getString("detail"));
if (jsonArray != null) {
JSONObject jsonObject1 = jsonArray.getJSONObject(num - 1);
if (jsonObject1 != null) {
double amountString = jsonObject1.getDouble("amount");
amount = amount + amountString;
}
}
}
}
double a = amount;
//添加活动关系
relationBiz.insertSelective(new ActivityPopularizeRelation() {{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment