@@ -32,4 +32,12 @@ public class MyController { | |||
public JsonResult exchange(UserPointsDetailQuery userPointsDetailQuery) { | |||
return userPointsDetailService.exchange(userPointsDetailQuery); | |||
} | |||
/** | |||
* 我的积分明细 | |||
*/ | |||
@GetMapping("/pointsDetail") | |||
public JsonResult pointsDetail(UserPointsDetailQuery userPointsDetailQuery){ | |||
return userPointsDetailService.pointsDetail(userPointsDetailQuery); | |||
} | |||
} |
@@ -61,6 +61,11 @@ public class UserPointsDetail extends BaseEntity implements Serializable { | |||
* 操作人名称 | |||
*/ | |||
private String operatorName; | |||
/** | |||
* 变动活动名称 | |||
*/ | |||
private String changeName; | |||
/** | |||
* 商铺名称 |
@@ -13,4 +13,6 @@ import com.tuoheng.common.utils.JsonResult; | |||
*/ | |||
public interface IUserPointsDetailService extends IBaseService<UserPointsDetail> { | |||
JsonResult exchange(UserPointsDetailQuery userPointsDetailQuery); | |||
JsonResult pointsDetail(UserPointsDetailQuery userPointsDetailQuery); | |||
} |
@@ -17,6 +17,9 @@ import com.tuoheng.common.utils.StringUtils; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.stereotype.Service; | |||
import java.util.ArrayList; | |||
import java.util.List; | |||
/** | |||
* 全民护河公告表 服务实现类 | |||
* | |||
@@ -72,4 +75,27 @@ public class UserPointsDetailServiceImpl extends BaseServiceImpl<UserPointsDetai | |||
} | |||
return JsonResult.success(pageData); | |||
} | |||
@Override | |||
public JsonResult pointsDetail(UserPointsDetailQuery userPointsDetailQuery) { | |||
Integer tenantId = userPointsDetailQuery.getTenantId(); | |||
String openid = userPointsDetailQuery.getOpenid(); | |||
List<UserPointsDetail> userPointsDetailResult = new ArrayList<>(); | |||
List<UserPointsDetail> userPointsDetailList = userPointsDetailMapper.selectList(new LambdaQueryWrapper<UserPointsDetail>() | |||
.eq(UserPointsDetail::getTenantId, tenantId) | |||
.eq(UserPointsDetail::getOpenid, openid) | |||
.eq(UserPointsDetail::getMark, 1) | |||
.isNotNull(UserPointsDetail::getChangeName)); | |||
for (UserPointsDetail userPointsDetail : userPointsDetailList) { | |||
UserPointsDetail userPointsDetail1 = new UserPointsDetail(); | |||
userPointsDetail1.setChangeName(userPointsDetail.getChangeName()); | |||
userPointsDetail1.setCreateTime(userPointsDetail.getCreateTime()); | |||
if(userPointsDetail.getType().equals(1)){ | |||
userPointsDetail1.setPointsChange(userPointsDetail.getPointsChange()); | |||
}else{ | |||
userPointsDetail1.setPointsChange(-1 * userPointsDetail.getPointsChange()); | |||
} | |||
} | |||
return null; | |||
} | |||
} |
@@ -0,0 +1,25 @@ | |||
package com.tuoheng.api.utils; | |||
/** | |||
* @Description | |||
* @Author douzhenjun | |||
* @DATE 2023/6/6 | |||
**/ | |||
public class PointsTitleConstants { | |||
public static final String EXCHANGE_PRODUCTS = "兑换商品"; | |||
public static final String SUBMIT_PICTURE = "上传美拍"; | |||
public static final String SUBMIT_FEEDBACK = "河湖问题反馈"; | |||
public static final String VOLUNTEER_ACTIVITY = "参与志愿者活动"; | |||
public static final String PROTECT_RIVER_SUGGESTION = "护河建议"; | |||
public static final String FOLLOW_TIKTOK = "关注抖音"; | |||
public static final String WATCH_VIDEO = "观看学习视频"; | |||
public static final String USER_REGISTRY = "用户注册"; | |||
} |