Merge remote-tracking branch 'origin/master'

This commit is contained in:
@QQNZX 2024-03-05 13:55:17 +08:00
commit 2009625867
8 changed files with 32 additions and 5 deletions

View File

@ -12,6 +12,7 @@ public class ActiveOneCouponDTO extends ActiveOneCoupon implements Serializable
private List<Integer> cardFavorableIds;
//兑换券ids
private List<Integer> cardExchangeIds;
private Integer condition;
//会员等级ids
private Integer[] gradeIds;
}

View File

@ -4,7 +4,9 @@ import java.util.Date;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.io.Serializable;
@ -17,24 +19,30 @@ import java.io.Serializable;
*/
@SuppressWarnings("serial")
@Data
@TableName("active_one_coupon")
public class ActiveOneCoupon extends Model<ActiveOneCoupon> {
//主键id
@TableId(type = IdType.AUTO)
private Integer id;
private Integer storeId;
private String activeName;
//会员等级id
private String gradeId;
private Integer condition;
//会员等级名字
private String gradeName;
private Integer conditions;
//创建者
private String createBy;
//创建时间
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
private Date createTime;
//更新者
private String updateBy;
//更新时间
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
private Date updateTime;
/**

View File

@ -1,7 +1,12 @@
package com.fuint.business.marketingActivity.activeOneCoupon.entity;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.io.Serializable;
@ -14,8 +19,10 @@ import java.io.Serializable;
*/
@SuppressWarnings("serial")
@Data
@TableName("active_one_coupon_child")
public class ActiveOneCouponChild extends Model<ActiveOneCouponChild> {
//主键id
@TableId(type = IdType.AUTO)
private Integer id;
private Integer storeId;
//消费有礼活动id
@ -31,10 +38,12 @@ public class ActiveOneCouponChild extends Model<ActiveOneCouponChild> {
//创建者
private String createBy;
//创建时间
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
private Date createTime;
//更新者
private String updateBy;
//更新时间
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
private Date updateTime;

View File

@ -82,7 +82,8 @@ public class ActiveOneCouponServiceImpl extends ServiceImpl<ActiveOneCouponMappe
activeOneCoupon.setGradeId(gradeIdStr);
activeOneCoupon.setGradeName(gradeIdName);
activeOneCoupon.setStoreId(nowAccountInfo.getStoreId());
activeOneCoupon.setCondition(activeOneCouponDTO.getCondition());
activeOneCoupon.setConditions(activeOneCouponDTO.getCondition());
activeOneCoupon.setActiveName(activeOneCouponDTO.getActiveName());
flag = save(activeOneCoupon);
//优惠券
List<Integer> cardFavorableIds = activeOneCouponDTO.getCardFavorableIds();
@ -137,7 +138,7 @@ public class ActiveOneCouponServiceImpl extends ServiceImpl<ActiveOneCouponMappe
List<LJUserVo> userLists = userService.getUserCountList(ljUserVo);
ljUserVos.setCountAll(userLists.size());
ljUserVo.setDays(record.getCondition());
ljUserVo.setDays(record.getConditions());
List<LJUserVo> userListss = userService.getUserLists(ljUserVo);
ljUserVos.setCount(userListss.size());
if (ObjectUtils.isNotEmpty(ljUserVos.getCountAll()) && ObjectUtils.isNotEmpty(ljUserVos.getCount()) && ljUserVos.getCountAll()!=0){
@ -145,6 +146,7 @@ public class ActiveOneCouponServiceImpl extends ServiceImpl<ActiveOneCouponMappe
}
userList.add(ljUserVos);
}
activeOneCouponVO.setUserVos(userList);
//优惠券
LambdaQueryWrapper<CardFavorableRecord> queryWrapper1 = new LambdaQueryWrapper<>();

View File

@ -34,4 +34,5 @@ public class ActiveOneCouponVO extends ActiveOneCoupon implements Serializable {
private List<ActiveOneCouponChild> activeOneCouponChildren;
private List<CardFavorable> cardFavorableList;
private List<CardExchange> cardExchangeList;
private List<LJUserVos> userVos;
}

View File

@ -351,7 +351,7 @@ public class CardFavorableRecordServiceImpl extends ServiceImpl<CardFavorableRec
for (String gradeId : split) {
LJUserVo ljUserVo = new LJUserVo();
ljUserVo.setGradeId(Integer.parseInt(gradeId));
ljUserVo.setDays(activeOneCoupon.getCondition());
ljUserVo.setDays(activeOneCoupon.getConditions());
List<LJUserVo> userLists = userService.getUserLists(ljUserVo);
ljUserVosList.addAll(userLists);
}

View File

@ -337,4 +337,10 @@ public class BackendStoreController extends BaseController {
public ResponseObject loginVerification(@RequestBody String flag) {
return getSuccessResult(storeService.loginVerification(flag));
}
@GetMapping("getById/id")
public ResponseObject getById(@PathVariable("id") Integer id) {
//return getSuccessResult(storeService.loginVerification(flag));
return null;
}
}

View File

@ -3,6 +3,6 @@
<mapper namespace="com.fuint.repository.mapper.MtUserGradeMapper">
<select id="selectByGradeId" resultType="com.fuint.repository.model.MtUserGradeVO">
select id,grade,name from mt_user_grade where grade_id = #{gradeId}
select id,grade,name from mt_user_grade where id = #{gradeId}
</select>
</mapper>