This commit is contained in:
2024-01-19 22:08:52 +08:00
parent 44c529686b
commit f855e45813
4 changed files with 4 additions and 3 deletions

View File

@@ -11,5 +11,6 @@ import lombok.Data;
public class ShoppingCartQuery implements Query { public class ShoppingCartQuery implements Query {
private String customerSid; //客户 private String customerSid; //客户
private String affiliation; //类型 private String affiliation; //类型
private String brandId;
} }

View File

@@ -19,5 +19,5 @@ import java.util.List;
*/ */
@Mapper @Mapper
public interface ShoppingCartMapper extends BaseMapper<ShoppingCart> { public interface ShoppingCartMapper extends BaseMapper<ShoppingCart> {
List<ShoppingCartVo> ShoppingCartList(@Param("customerSid")String customerSid,@Param("affiliation")String affiliation); List<ShoppingCartVo> ShoppingCartList(@Param("customerSid")String customerSid,@Param("brandId")String brandId);
} }

View File

@@ -15,7 +15,7 @@
from shopping_cart as r from shopping_cart as r
left join lpk_goods s on s.sid=r.goodsSid left join lpk_goods s on s.sid=r.goodsSid
<where> <where>
r.customerSid =#{customerSid} and r.affiliation=#{affiliation} r.customerSid =#{customerSid} and r.affiliation=#{brandId}
</where> </where>
</select> </select>
</mapper> </mapper>

View File

@@ -92,7 +92,7 @@ public class ShoppingCartService extends MybatisBaseService<ShoppingCartMapper,
} }
public ResultBean getGoodsWeight(ShoppingCartQuery query) { public ResultBean getGoodsWeight(ShoppingCartQuery query) {
ResultBean rb=new ResultBean().fail(); ResultBean rb=new ResultBean().fail();
List<ShoppingCartVo> list= baseMapper.ShoppingCartList(query.getCustomerSid(),query.getAffiliation()); List<ShoppingCartVo> list= baseMapper.ShoppingCartList(query.getCustomerSid(),query.getBrandId());
double price =0; double price =0;
double weight =0; double weight =0;
for(ShoppingCartVo vo:list){ for(ShoppingCartVo vo:list){