This commit is contained in:
2024-01-08 08:57:15 +08:00
parent 78ae280381
commit 39aa737a87
7 changed files with 155 additions and 4 deletions

View File

@@ -0,0 +1,22 @@
package com.yxt.yyth.api.lpkgiftcard;
import com.yxt.yyth.api.appletgiftbag.GiftBagGoods;
import lombok.Data;
import java.util.List;
/**
* @author wangpengfei
* @date 2024/1/7 16:00
*/
@Data
public class CardShareDetailVo {
private String code;
private String endDate;
private String startDate;
private String periodValidity;
private String count;
private List<ShareRecord> shareRecordList;
private List<ShareUserVo> shareUserVoList;
private List<GiftBagGoods> goodsVos;
}

View File

@@ -0,0 +1,14 @@
package com.yxt.yyth.api.lpkgiftcard;
import lombok.Data;
/**
* @author wangpengfei
* @date 2024/1/7 16:03
*/
@Data
public class ShareRecord {
private String date;
private String name;
private String operate;
}

View File

@@ -0,0 +1,13 @@
package com.yxt.yyth.api.lpkgiftcard;
import lombok.Data;
/**
* @author wangpengfei
* @date 2024/1/7 16:02
*/
@Data
public class ShareUserVo {
private String iconUrl;
private String name;
}

View File

@@ -169,4 +169,16 @@ public class LpkGiftCardRest {
public ResultBean cardTransfer(String sid) {
return lpkGiftCardService.cardTransfer(sid);
}
@ApiOperation("共享家庭卡详情")
@GetMapping("/cardShareDetail/{sid}")
public ResultBean cardShareDetail(@PathVariable("sid") String sid) {
return lpkGiftCardService.cardShareDetail(sid);
}
@ApiOperation("共享家庭卡蔬菜详情")
@GetMapping("/cardShareGoodsDetail/{sid}")
public ResultBean cardShareGoodsDetail(@PathVariable("sid") String sid) {
return lpkGiftCardService.cardShareGoodsDetail(sid);
}
}

View File

@@ -1581,4 +1581,92 @@ public class LpkGiftCardService extends MybatisBaseService<LpkGiftCardMapper, Lp
baseMapper.updateById(card);
return rb.success().setData("成功");
}
/**
*共享家庭卡详情
* @param sid
* @return
*/
public ResultBean cardShareDetail(String sid ) {
ResultBean rb=new ResultBean().fail();
CardShareDetailVo vo=new CardShareDetailVo();
vo.setCode("11111111111111111111");
vo.setPeriodValidity(vo.getStartDate()+"~"+vo.getEndDate());
vo.setCount("6种蔬菜");
List<ShareUserVo> list=new ArrayList<>();
ShareUserVo vo1=new ShareUserVo();
vo1.setName("测试一");
vo1.setIconUrl("");
ShareUserVo vo2=new ShareUserVo();
vo1.setName("测试二");
vo1.setIconUrl("");
list.add(vo1);
list.add(vo2);
List<ShareRecord> v=new ArrayList<>();
ShareRecord record=new ShareRecord();
record.setDate("2023-12-25 09:30");
record.setOperate("xx接受共享邀请");
ShareRecord record1=new ShareRecord();
record1.setDate("2023-12-27 10:10");
record1.setOperate("xx接受共享邀请");
ShareRecord record2=new ShareRecord();
record2.setDate("2023-12-28 12:30");
record2.setOperate("xx接受共享邀请");
v.add(record);
v.add(record1);
v.add(record2);
vo.setShareUserVoList(list);
vo.setShareRecordList(v);
return rb.success().setData(vo);
}
public ResultBean cardShareGoodsDetail(String sid ) {
ResultBean rb=new ResultBean().fail();
CardShareDetailVo vo=new CardShareDetailVo();
vo.setCode("11111111111111111111");
vo.setPeriodValidity(vo.getStartDate()+"~"+vo.getEndDate());
List<com.yxt.yyth.api.appletgiftbag.GiftBagGoods> goods=new ArrayList<>();
com.yxt.yyth.api.appletgiftbag.GiftBagGoods goodss=new com.yxt.yyth.api.appletgiftbag.GiftBagGoods();
goodss.setRemark("富含蛋白顾、钙、铁、硒等有益元素。");
goodss.setName("西瓜红密薯");
goodss.setUnitName("");
goodss.setGoodsNumber("3");
goodss.setIconUrl("https://lpk.yyundong.com/upload/20231123/64dfc05b0db1f9_20231124100240220734.jpg");
goodss.setJPrice("1.5");
goodss.setSpecificationUnit("");
goodss.setWeight("7");
com.yxt.yyth.api.appletgiftbag.GiftBagGoods goods1=new com.yxt.yyth.api.appletgiftbag.GiftBagGoods();
goods1.setRemark("北方大白菜打过霜后,口感发甜,更加可口");
goods1.setName("北方大白菜");
goods1.setUnitName("");
goods1.setGoodsNumber("3");
goods1.setIconUrl("https://lpk.yyundong.com/upload/20231123/2960ea0741fe500_20231124100318707963.jpg");
goods1.setJPrice("0.5");
goods1.setSpecificationUnit("");
goods1.setWeight("15");
com.yxt.yyth.api.appletgiftbag.GiftBagGoods goods2=new com.yxt.yyth.api.appletgiftbag.GiftBagGoods();
goods2.setRemark("淀粉含量较高,口感更粉、更紧实");
goods2.setName("张北土豆");
goods2.setUnitName("");
goods2.setGoodsNumber("3");
goods2.setIconUrl("https://lpk.yyundong.com/upload/20231123/64e0ca26fd65ab_20231124100217727035.jpg");
goods2.setJPrice("1");
goods2.setSpecificationUnit("");
goods2.setWeight("5");
com.yxt.yyth.api.appletgiftbag.GiftBagGoods goods3=new com.yxt.yyth.api.appletgiftbag.GiftBagGoods();
goods3.setRemark("原料纯正,只有红薯粉,没有其他添加剂");
goods3.setName("纯红薯粉条");
goods3.setUnitName("");
goods3.setGoodsNumber("3");
goods3.setIconUrl("https://lpk.yyundong.com/upload/20231123/64df3f35d0de3f_20231124100252533644.png");
goods3.setJPrice("10");
goods3.setSpecificationUnit("");
goods3.setWeight("2");
goods.add(goodss);
goods.add(goods1);
goods.add(goods2);
goods.add(goods3);
vo.setGoodsVos(goods);
return rb.success().setData(vo);
}
}

View File

@@ -49,7 +49,7 @@
and date_format(o.reserveDate,'%Y-%m-%d')>=date_format(#{qw.startDate},'%Y-%m-%d')
</if>
<if test="qw.endDate !='' and qw.endDate!=null">
and date_format(o.reserveDate,'%Y-%m-%d') &lt; date_format(#{qw.endDate},'%Y-%m-%d')
and date_format(o.reserveDate,'%Y-%m-%d') &lt;= date_format(#{qw.endDate},'%Y-%m-%d')
</if>
</where>
union
@@ -83,7 +83,7 @@
and date_format(o.reserveDate,'%Y-%m-%d')>=date_format(#{qw.startDate},'%Y-%m-%d')
</if>
<if test="qw.endDate !='' and qw.endDate!=null">
and date_format(o.reserveDate,'%Y-%m-%d') &lt; date_format(#{qw.endDate},'%Y-%m-%d')
and date_format(o.reserveDate,'%Y-%m-%d') &lt;= date_format(#{qw.endDate},'%Y-%m-%d')
</if>
</where>
order by reserveDate asc,dsid desc,ssid desc,serialNumber asc
@@ -275,7 +275,7 @@
and date_format(o.reserveDate,'%Y-%m-%d')>=date_format(#{qw.startDate},'%Y-%m-%d')
</if>
<if test="qw.endDate !='' and qw.endDate!=null">
and date_format(o.reserveDate,'%Y-%m-%d') &lt; date_format(#{qw.endDate},'%Y-%m-%d')
and date_format(o.reserveDate,'%Y-%m-%d') &lt;= date_format(#{qw.endDate},'%Y-%m-%d')
</if>
</where>
union
@@ -310,7 +310,7 @@
and date_format(o.reserveDate,'%Y-%m-%d')>=date_format(#{qw.startDate},'%Y-%m-%d')
</if>
<if test="qw.endDate !='' and qw.endDate!=null">
and date_format(o.reserveDate,'%Y-%m-%d') &lt; date_format(#{qw.endDate},'%Y-%m-%d')
and date_format(o.reserveDate,'%Y-%m-%d') &lt;= date_format(#{qw.endDate},'%Y-%m-%d')
</if>
</where>
order by reserveDate asc,dsid desc,ssid desc,serialNumber asc

View File

@@ -51,6 +51,8 @@ public class SaTokenConfigure implements WebMvcConfigurer {
.excludePathPatterns("/lpkgoods/getAllGiftBag")
.excludePathPatterns("/appletgiftbag/getGiftBagBySid/**")
.excludePathPatterns("/appletgiftbag/appletGiftBagList")
.excludePathPatterns("/lpkgiftcard/cardShareDetail/**")
.excludePathPatterns("/lpkgiftcard/cardShareGoodsDetail/**")
.excludePathPatterns("/lpkgiftcard/bindAllCard");
}
}