【mybatis】mybatis多表聯查,存在一對多關系的,實體中使用List作為字段接收查詢結果的寫法...

?

實體如下:

IntegralGoods? 積分商品

IntegralGoodsImg  積分商品圖片

ShelfLog    積分商品自動上架記錄

?

IntegralGoods :IntegralGoodsImg:ShelfLog  = 1:n:1

1:1的多表聯查或者m:n的多表聯查 很簡單,

現在出現1:n的情況,一種積分商品可能有多張圖片

所以在最后的返回結果里想用LIst<IntegralGoodsImg>作為IntegralGoods 的一個字段作為參數進行接收

?

那mybatis怎么實現查詢呢?

=========================================================

1.IntegralGoods 實體【只關注字段即可】,尤其是

?

@Transient

private List<IntegralGoodsImg> imgList;//圖片們?

這個字段就是用來接收多個圖片實體的

package com.pisen.cloud.luna.ms.jifen.base.domain;import java.util.ArrayList;
import java.util.Date;
import java.util.List;import javax.persistence.*;
import javax.persistence.criteria.CriteriaBuilder;
import javax.persistence.criteria.CriteriaQuery;
import javax.persistence.criteria.Predicate;
import javax.persistence.criteria.Root;import org.apache.commons.lang3.StringUtils;
import org.hibernate.annotations.Type;
import org.springframework.data.jpa.domain.Specification;import com.pisen.cloud.luna.ms.jifen.base.common.BaseDomain;/*** 積分商品表*/
@Entity
@Table(uniqueConstraints = { @UniqueConstraint(columnNames = { "uid" })})
public class IntegralGoods extends BaseDomain {public static final int DELETE_FLAG_DELETE = 1;//刪除public static final int DELETE_FLAG_DISDELETE = 0;//未刪除public static final int SHELF_ON = 1;//上架public static final int SHELF_OFF = 0;//下架public static final int SHOW_HOME_FLAG_YES = 1;//首頁展示public static final int SHOW_HOME_FLAG_NO = 0;//不在首頁展示
@Type(type = "text")private String description; //商品描述private String cdKey;//虛擬物品激活碼 ---棄用
@Column(nullable = false)private String name; // 名稱
@Column(nullable = false)private Float marketValue; // 原價
@Column(nullable = false)private Integer integral; // 兌換積分private Integer type; // (1:實物 2:虛擬)
@Column(nullable = false)private Integer stock; // 庫存數量(-1時無限量 : 正常扣除)
@Column(nullable = false)private Integer saleNum; // 銷量 已兌換數量private Integer version;/*** ========新增字段===================*/@Column(nullable = false)private Integer limitNum;//限兌數量private String goodsCode;//商品編號
@Column(nullable = false)private String specification;//商品規格  實物商品必填private Integer deleteFlag;//刪除標識
@Column(nullable = false)private Integer shelfFlag;//上架標識
@Column(nullable = false)private Integer homeShowFlag;//是否首頁展示private String remark;    //備注
@Transientprivate String order;//排序字段
    @Transientprivate String orderType;//排序方法
    @Transientprivate String headImg;//首頁圖片
@Transientprivate List<String> imgUrlList;//接收前臺URL集合使用
@Transientprivate Date shelfDate;//上架時間    接收前臺字段
@Transientprivate Date obtainedDate;//下架時間        接收前臺字段private String shelfRemark;//上架信息  備注
@Transientprivate List<IntegralGoodsImg> imgList;//圖片們public String getRemark() {return remark;}public void setRemark(String remark) {this.remark = remark;}public String getShelfRemark() {return shelfRemark;}public void setShelfRemark(String shelfRemark) {this.shelfRemark = shelfRemark;}public Integer getHomeShowFlag() {return homeShowFlag;}public void setHomeShowFlag(Integer homeShowFlag) {this.homeShowFlag = homeShowFlag;}public Integer getShelfFlag() {return shelfFlag;}public void setShelfFlag(Integer shelfFlag) {this.shelfFlag = shelfFlag;}public Integer getLimitNum() {return limitNum;}public void setLimitNum(Integer limitNum) {this.limitNum = limitNum;}public String getGoodsCode() {return goodsCode;}public void setGoodsCode(String goodsCode) {this.goodsCode = goodsCode;}public String getSpecification() {return specification;}public void setSpecification(String specification) {this.specification = specification;}public Integer getDeleteFlag() {return deleteFlag;}public void setDeleteFlag(Integer deleteFlag) {this.deleteFlag = deleteFlag;}public List<IntegralGoodsImg> getImgList() {return imgList;}public void setImgList(List<IntegralGoodsImg> imgList) {this.imgList = imgList;}public Integer getVersion() {return version;}public void setVersion(Integer version) {this.version = version;}public String getOrder() {return order;}public void setOrder(String order) {this.order = order;}public String getOrderType() {return orderType;}public void setOrderType(String orderType) {this.orderType = orderType;}public String getName() {return name;}public void setName(String name) {this.name = name;}public Integer getIntegral() {return integral;}public void setIntegral(Integer integral) {this.integral = integral;}public String getDescription() {return description;}public void setDescription(String description) {this.description = description;}public String getCdKey() {return cdKey;}public void setCdKey(String cdKey) {this.cdKey = cdKey;}public Integer getType() {return type;}public void setType(Integer type) {this.type = type;}public Integer getStock() {return stock;}public void setStock(Integer stock) {this.stock = stock;}public Float getMarketValue() {return marketValue;}public void setMarketValue(Float marketValue) {this.marketValue = marketValue;}public String getHeadImg() {if(imgList != null){for (IntegralGoodsImg integralGoodsImg : imgList) {if(integralGoodsImg.getType() == 1){headImg = integralGoodsImg.getSrc();break;}}}return headImg;}public void setHeadImg(String headImg) {this.headImg = headImg;}public Integer getSaleNum() {return saleNum;}public void setSaleNum(Integer saleNum) {this.saleNum = saleNum;}public List<String> getImgUrlList() {return imgUrlList;}public void setImgUrlList(List<String> imgUrlList) {this.imgUrlList = imgUrlList;}public Date getShelfDate() {return shelfDate;}public void setShelfDate(Date shelfDate) {this.shelfDate = shelfDate;}public Date getObtainedDate() {return obtainedDate;}public void setObtainedDate(Date obtainedDate) {this.obtainedDate = obtainedDate;}public static Specification<IntegralGoods> where(final IntegralGoods entity) {return new Specification<IntegralGoods>() {@Overridepublic Predicate toPredicate(Root<IntegralGoods> root, CriteriaQuery<?> query, CriteriaBuilder cb) {List<Predicate> predicates = new ArrayList<Predicate>();//商品名稱String name = entity.getName();if (StringUtils.isNotBlank(name)) {predicates.add(cb.like(root.<String>get("name"), "%" + name + "%"));}// ===========等于====================// uidString uid = entity.getUid();if (StringUtils.isNotBlank(uid)) {predicates.add(cb.equal(root.<String>get("uid"), uid));}// tidString tid = entity.getTid();if (StringUtils.isNotBlank(tid)) {predicates.add(cb.equal(root.<String>get("tid"), tid));}// 積分Integer integral = entity.getIntegral();if (integral != null) {predicates.add(cb.equal(root.<String>get("integral"), integral));}// 類型Integer type = entity.getType();if (type != null) {predicates.add(cb.equal(root.<String>get("type"), type));}//庫存Integer stock = entity.getStock();if (stock != null) {predicates.add(cb.equal(root.<String>get("stock"), stock));}//激活碼String cdKey = entity.getCdKey();if (StringUtils.isNotBlank(cdKey)){predicates.add(cb.equal(root.get("cdKey"),cdKey));}//商品編號String goodsCode = entity.getGoodsCode();if (StringUtils.isNotBlank(goodsCode)){predicates.add(cb.equal(root.get("goodsCode"),goodsCode));}//上架標識Integer shelfFlag = entity.getShelfFlag();if (shelfFlag != null){predicates.add(cb.equal(root.get("shelfFlag"),shelfFlag));}return query.where(predicates.toArray(new Predicate[predicates.size()])).getRestriction();}};}}
View Code

?

2.IntegralGoodsImg實體

package com.pisen.cloud.luna.ms.jifen.base.domain;import java.util.ArrayList;
import java.util.List;import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;
import javax.persistence.criteria.CriteriaBuilder;
import javax.persistence.criteria.CriteriaQuery;
import javax.persistence.criteria.Predicate;
import javax.persistence.criteria.Root;import org.apache.commons.lang3.StringUtils;
import org.springframework.data.jpa.domain.Specification;import com.pisen.cloud.luna.ms.jifen.base.common.BaseDomain;@Entity
@Table(uniqueConstraints = { @UniqueConstraint(columnNames = { "uid" }),@UniqueConstraint(columnNames = { "imgKey" })})
public class IntegralGoodsImg extends BaseDomain {public static final int IMG_TYPE_MAIN = 1;//商品主圖public static final int IMG_TYPE_OTHER = 2;//其他商品圖片private String integralGoodsId; //積分商品idprivate Integer type; // 圖片類型(1:首頁展示,2:詳情圖片,3:自定義圖片)private String src; // 圖片路徑private Integer sort; // 圖片順序private String tid;//租戶idprivate String imgKey;//七牛云存儲圖片的keyprivate String imgName; //用戶上傳的文件名public String getIntegralGoodsId() {return integralGoodsId;}public void setIntegralGoodsId(String integralGoodsId) {this.integralGoodsId = integralGoodsId;}public Integer getType() {return type;}public void setType(Integer type) {this.type = type;}public String getSrc() {return src;}public void setSrc(String src) {this.src = src;}public Integer getSort() {return sort;}public void setSort(Integer sort) {this.sort = sort;}public String getTid() {return tid;}public void setTid(String tid) {this.tid = tid;}public String getImgKey() {return imgKey;}public void setImgKey(String imgKey) {this.imgKey = imgKey;}public String getImgName() {return imgName;}public void setImgName(String imgName) {this.imgName = imgName;}public static Specification<IntegralGoodsImg> where(final IntegralGoodsImg entity) {return new Specification<IntegralGoodsImg>() {@Overridepublic Predicate toPredicate(Root<IntegralGoodsImg> root, CriteriaQuery<?> query, CriteriaBuilder cb) {List<Predicate> predicates = new ArrayList<Predicate>();// ===========等于====================// uidString uid = entity.getUid();if (StringUtils.isNotBlank(uid)) {predicates.add(cb.equal(root.<String>get("uid"), uid));}// 積分商品idString integralGoodsId = entity.getIntegralGoodsId();if (StringUtils.isNotBlank(integralGoodsId)) {predicates.add(cb.equal(root.<String>get("integralGoodsId"), integralGoodsId));}// 圖片類型Integer type = entity.getType();if (type != null) {predicates.add(cb.equal(root.<String>get("type"), type));}//tidString tid = entity.getTid();if (StringUtils.isNotBlank(tid)) {predicates.add(cb.equal(root.<String>get("tid"), tid));}return query.where(predicates.toArray(new Predicate[predicates.size()])).getRestriction();}};}}
View Code

?

3.ShelfLog實體

package com.pisen.cloud.luna.ms.jifen.base.domain;import javax.persistence.*;
import java.util.Date;/*** 自動上架 下架時間 記錄表** 單位控制到天** 定時任務每天定時掃描 完成積分商品自動上架下架狀態的改變*/
@Entity
@Table(uniqueConstraints = { @UniqueConstraint(columnNames = { "integralGoodsUid" })})
public class ShelfLog {public static final int DEAL_FLAG_DO = 1;//已處理public static final int DEAL_FLAG_NOT_HAVING_DO = 0;//未處理
@Id@GeneratedValue(strategy = GenerationType.IDENTITY)private Long id;// 主鍵 自增
@Column(nullable = false)private String integralGoodsUid;//積分商品ID    本記錄表中唯一private Date shelfDate;//自定義自動上架時間private Date obtainedDate;//自定義自動下架時間private Integer shelfDealFlag;//上架是否處理private Integer obtainedFlag;//下架是否處理public Long getId() {return id;}public void setId(Long id) {this.id = id;}public String getIntegralGoodsUid() {return integralGoodsUid;}public void setIntegralGoodsUid(String integralGoodsUid) {this.integralGoodsUid = integralGoodsUid;}public Date getShelfDate() {return shelfDate;}public void setShelfDate(Date shelfDate) {this.shelfDate = shelfDate;}public Date getObtainedDate() {return obtainedDate;}public void setObtainedDate(Date obtainedDate) {this.obtainedDate = obtainedDate;}public Integer getShelfDealFlag() {return shelfDealFlag;}public void setShelfDealFlag(Integer shelfDealFlag) {this.shelfDealFlag = shelfDealFlag;}public Integer getObtainedFlag() {return obtainedFlag;}public void setObtainedFlag(Integer obtainedFlag) {this.obtainedFlag = obtainedFlag;}}
View Code

?

?

4.最后著重看mybatis的xml怎么寫

<select id="find" parameterType="com.pisen.cloud.luna.ms.jifen.base.domain.IntegralGoods" resultMap="baseResBean">select a.id as 'id',a.uid as 'uid',a.create_date as 'createDate',a.update_date as 'updateDate',a.update_id as 'updateId',a.create_id as 'createId',a.brand_uid as 'brandUid',a.tid as 'tid',a.stock as 'stock',a.name as 'name',a.goods_code as 'goodsCode',a.market_value as 'marketValue',a.specification as 'specification',a.remark as 'remark',a.integral as 'integral',a.description as 'description',a.sale_num as 'saleNum',a.limit_num as 'limitNum',a.shelf_flag as 'shelfFlag',a.home_show_flag as 'homeShowFlag',sl.shelf_date as 'shelfDate',sl.obtained_date as 'obtainedDate',b.src b_src,b.type b_type,b.sort  b_sortfrom integral_goods aleft joinintegral_goods_img bon a.uid = b.integral_goods_idleft joinshelf_log slon a.uid = sl.integral_goods_uid<where>a.delete_flag = ${@com.pisen.cloud.luna.ms.jifen.base.domain.IntegralGoods@DELETE_FLAG_DISDELETE}and a.tid = #{tid}<if test="uid != null and uid != '' ">and a.uid = #{uid}</if><if test="brandUid != null and brandUid != '' ">and a.brand_uid = #{brandUid}</if><if test="name != null and name != '' ">and a.name like CONCAT('%',#{name},'%')</if></where></select><resultMap type="com.pisen.cloud.luna.ms.jifen.base.domain.IntegralGoods" id="baseResBean"><id column="id" property="id"/><result column="uid" property="uid"/><result column="createDate" property="createDate"/><result column="updateDate" property="updateDate"/><result column="createId" property="createId"/><result column="updateId" property="updateId"/><result column="type" property="type"/><result column="tid" property="tid"/><result column="stock" property="stock"/><result column="name" property="name"/><result column="goodsCode" property="goodsCode"/><result column="marketValue" property="marketValue"/><result column="specification" property="specification"/><result column="brandUid" property="brandUid"/><result column="remark" property="remark"/><result column="integral" property="integral"/><result column="description" property="description"/><result column="saleNum" property="saleNum"/><result column="limitNum" property="limitNum"/><result column="shelfFlag" property="shelfFlag"/><result column="homeShowFlag" property="homeShowFlag"/><result column="shelfDate" property="shelfDate"/><result column="obtainedDate" property="obtainedDate"/><collection property="imgList" columnPrefix="b_"ofType="com.pisen.cloud.luna.ms.jifen.base.domain.IntegralGoodsImg"><id column="id" property="id"/><result column="src" property="src"/><result column="type" property="type"/><result column="sort" property="sort"/></collection></resultMap>
View Code

?

5.最后補充一下mapper.java

List<IntegralGoods> find(IntegralGoods entity);

?

展示一下最后的查詢結果:【注意最后的total總數有問題,需要單獨處理一下】

【total=8表示數據庫中查出的數據是8條,在組裝返回List以后,就是3條了】

{"success": true,"msg": "successful","code": 200,"total": 8,"rows": [{"fields": null,"orders": null,"pageSize": 10,"pageNum": 0,"id": 48,"createDate": 1533689800000,"updateDate": 1533689800000,"updateId": "defUserId","createId": "defUserId","uid": "42832f275248456f8a8ff6b855f55e95","tid": "9f63f84f-52c6-4c8e-b3c3-66b9f1f283ba","brandUid": "974fcd3a139f4b19a632bc40b6eec7b9","description": null,"cdKey": null,"name": "統一方便面","marketValue": 100,"integral": 100,"type": null,"stock": 200,"saleNum": 0,"version": null,"limitNum": 2,"goodsCode": null,"specification": "105g/桶*12桶/件","deleteFlag": null,"shelfFlag": 0,"homeShowFlag": 1,"remark": null,"order": null,"orderType": null,"headImg": "http://p2ognrwoi.bkt.clouddn.com/fed69bb7be9416ed56916aea8ffad38f_UI_UPLOAD_IMG?e=1533562337&token=lPDJgKX4JP-SQBa1EWaSt88UJAOpkW1n0JGv3gCQ:96nPcK9nruoaT3s_rNEzlQJrQeQ=?imageView2/1/w/50/h/50","imgUrlList": null,"shelfDate": 1533859200000,"obtainedDate": 1533945600000,"shelfRemark": null,"imgList": [{"fields": null,"orders": null,"pageSize": 10,"pageNum": 0,"id": null,"createDate": 1533698803047,"updateDate": 1533698803047,"updateId": null,"createId": null,"uid": null,"tid": null,"brandUid": null,"integralGoodsId": null,"type": 1,"src": "http://p2ognrwoi.bkt.clouddn.com/fed69bb7be9416ed56916aea8ffad38f_UI_UPLOAD_IMG?e=1533562337&token=lPDJgKX4JP-SQBa1EWaSt88UJAOpkW1n0JGv3gCQ:96nPcK9nruoaT3s_rNEzlQJrQeQ=?imageView2/1/w/50/h/50","sort": 1,"imgKey": null,"imgName": null},{"fields": null,"orders": null,"pageSize": 10,"pageNum": 0,"id": null,"createDate": 1533698803052,"updateDate": 1533698803052,"updateId": null,"createId": null,"uid": null,"tid": null,"brandUid": null,"integralGoodsId": null,"type": 2,"src": "http://p2ognrwoi.bkt.clouddn.com/b07121eeadc1e42dbde765af569356a3_UI_UPLOAD_IMG?e=1533563250&token=lPDJgKX4JP-SQBa1EWaSt88UJAOpkW1n0JGv3gCQ:W_EObH6d7O_QrqRQeX1CSmba0KE=?imageView2/1/w/50/h/50","sort": 2,"imgKey": null,"imgName": null},{"fields": null,"orders": null,"pageSize": 10,"pageNum": 0,"id": null,"createDate": 1533698803055,"updateDate": 1533698803055,"updateId": null,"createId": null,"uid": null,"tid": null,"brandUid": null,"integralGoodsId": null,"type": 2,"src": "http://p2ognrwoi.bkt.clouddn.com/237d4a191de7b25897cdb49117dfb9ec_UI_UPLOAD_IMG?e=1533563617&token=lPDJgKX4JP-SQBa1EWaSt88UJAOpkW1n0JGv3gCQ:M3FJDLzza80U72934OT7B8ya_Yw=?imageView2/1/w/50/h/50","sort": 3,"imgKey": null,"imgName": null}]},{"fields": null,"orders": null,"pageSize": 10,"pageNum": 0,"id": 49,"createDate": 1533698513000,"updateDate": 1533698513000,"updateId": "defUserId","createId": "defUserId","uid": "17c2050b247a45f0ae092d48b035c9e5","tid": "9f63f84f-52c6-4c8e-b3c3-66b9f1f283ba","brandUid": "974fcd3a139f4b19a632bc40b6eec7b9","description": null,"cdKey": null,"name": "統一方便面","marketValue": 100,"integral": 100,"type": null,"stock": 200,"saleNum": 0,"version": null,"limitNum": 2,"goodsCode": null,"specification": "105g/桶*12桶/件","deleteFlag": null,"shelfFlag": 0,"homeShowFlag": 1,"remark": null,"order": null,"orderType": null,"headImg": "http://p2ognrwoi.bkt.clouddn.com/fed69bb7be9416ed56916aea8ffad38f_UI_UPLOAD_IMG?e=1533562337&token=lPDJgKX4JP-SQBa1EWaSt88UJAOpkW1n0JGv3gCQ:96nPcK9nruoaT3s_rNEzlQJrQeQ=?imageView2/1/w/50/h/50","imgUrlList": null,"shelfDate": 1533859200000,"obtainedDate": null,"shelfRemark": null,"imgList": [{"fields": null,"orders": null,"pageSize": 10,"pageNum": 0,"id": null,"createDate": 1533698803068,"updateDate": 1533698803068,"updateId": null,"createId": null,"uid": null,"tid": null,"brandUid": null,"integralGoodsId": null,"type": 1,"src": "http://p2ognrwoi.bkt.clouddn.com/fed69bb7be9416ed56916aea8ffad38f_UI_UPLOAD_IMG?e=1533562337&token=lPDJgKX4JP-SQBa1EWaSt88UJAOpkW1n0JGv3gCQ:96nPcK9nruoaT3s_rNEzlQJrQeQ=?imageView2/1/w/50/h/50","sort": 1,"imgKey": null,"imgName": null},{"fields": null,"orders": null,"pageSize": 10,"pageNum": 0,"id": null,"createDate": 1533698803070,"updateDate": 1533698803070,"updateId": null,"createId": null,"uid": null,"tid": null,"brandUid": null,"integralGoodsId": null,"type": 2,"src": "http://p2ognrwoi.bkt.clouddn.com/b07121eeadc1e42dbde765af569356a3_UI_UPLOAD_IMG?e=1533563250&token=lPDJgKX4JP-SQBa1EWaSt88UJAOpkW1n0JGv3gCQ:W_EObH6d7O_QrqRQeX1CSmba0KE=?imageView2/1/w/50/h/50","sort": 2,"imgKey": null,"imgName": null}]},{"fields": null,"orders": null,"pageSize": 10,"pageNum": 0,"id": 46,"createDate": 1533689464000,"updateDate": 1533689464000,"updateId": "defUserId","createId": "defUserId","uid": "629669683bf34ecdbb81ac8bbc236845","tid": "9f63f84f-52c6-4c8e-b3c3-66b9f1f283ba","brandUid": "974fcd3a139f4b19a632bc40b6eec7b9","description": null,"cdKey": null,"name": "統一方便面","marketValue": 100,"integral": 100,"type": null,"stock": 200,"saleNum": 0,"version": null,"limitNum": 2,"goodsCode": null,"specification": "105g/桶*12桶/件","deleteFlag": null,"shelfFlag": 0,"homeShowFlag": 1,"remark": null,"order": null,"orderType": null,"headImg": "http://p2ognrwoi.bkt.clouddn.com/fed69bb7be9416ed56916aea8ffad38f_UI_UPLOAD_IMG?e=1533562337&token=lPDJgKX4JP-SQBa1EWaSt88UJAOpkW1n0JGv3gCQ:96nPcK9nruoaT3s_rNEzlQJrQeQ=?imageView2/1/w/50/h/50","imgUrlList": null,"shelfDate": null,"obtainedDate": null,"shelfRemark": null,"imgList": [{"fields": null,"orders": null,"pageSize": 10,"pageNum": 0,"id": null,"createDate": 1533698803082,"updateDate": 1533698803082,"updateId": null,"createId": null,"uid": null,"tid": null,"brandUid": null,"integralGoodsId": null,"type": 1,"src": "http://p2ognrwoi.bkt.clouddn.com/fed69bb7be9416ed56916aea8ffad38f_UI_UPLOAD_IMG?e=1533562337&token=lPDJgKX4JP-SQBa1EWaSt88UJAOpkW1n0JGv3gCQ:96nPcK9nruoaT3s_rNEzlQJrQeQ=?imageView2/1/w/50/h/50","sort": 1,"imgKey": null,"imgName": null},{"fields": null,"orders": null,"pageSize": 10,"pageNum": 0,"id": null,"createDate": 1533698803085,"updateDate": 1533698803085,"updateId": null,"createId": null,"uid": null,"tid": null,"brandUid": null,"integralGoodsId": null,"type": 2,"src": "http://p2ognrwoi.bkt.clouddn.com/b07121eeadc1e42dbde765af569356a3_UI_UPLOAD_IMG?e=1533563250&token=lPDJgKX4JP-SQBa1EWaSt88UJAOpkW1n0JGv3gCQ:W_EObH6d7O_QrqRQeX1CSmba0KE=?imageView2/1/w/50/h/50","sort": 2,"imgKey": null,"imgName": null},{"fields": null,"orders": null,"pageSize": 10,"pageNum": 0,"id": null,"createDate": 1533698803088,"updateDate": 1533698803088,"updateId": null,"createId": null,"uid": null,"tid": null,"brandUid": null,"integralGoodsId": null,"type": 2,"src": "http://p2ognrwoi.bkt.clouddn.com/237d4a191de7b25897cdb49117dfb9ec_UI_UPLOAD_IMG?e=1533563617&token=lPDJgKX4JP-SQBa1EWaSt88UJAOpkW1n0JGv3gCQ:M3FJDLzza80U72934OT7B8ya_Yw=?imageView2/1/w/50/h/50","sort": 3,"imgKey": null,"imgName": null}]}]
}

?

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/news/277503.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/277503.shtml
英文地址,請注明出處:http://en.pswp.cn/news/277503.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

lr java腳本_【上海校區】 LR Java腳本編寫方法

之前在某一家銀行也接觸過java寫的性能接口腳本&#xff0c;最近因項目&#xff0c;也需編寫java接口性能測試腳本&#xff0c;腦袋一下懵逼了&#xff0c;有點不知道從何入手。隨后上網查了相關資料&#xff0c;自己又稍微總結了一下&#xff0c;與大家共同分享哈~   首先&a…

Flask Web表單

title: flask學習筆記 subtitle: 3. flask Web表單 date: 2018-12-14 10:17:28 --- Web表單 HTML表單是用戶和web站點或應用程序之間交互的主要內容之一。它們允許用戶將數據發送到web站點。大多數情況下&#xff0c;數據被發送到web服務器&#xff0c;但是web頁面也可以自己攔…

一些PHP函數功能

函數 描述 PHP basename() 返回路徑中的文件名部分。 3 chgrp() 改變文件組。 3 chmod() 改變文件模式。 3 chown() 改變文件所有者。 3 clearstatcache() 清除文件狀態緩存。 3 copy() 復制文件。 3 delete() 參見 unlink() 或 unset()。 dirname() 返回路徑中的目錄名稱部分…

mac java tomcat_mac idea 配置tomcat

mac idea 配置tomcat一、下載安裝tomcat二、有一個 javaWeb項目創建一個javaWeb項目 ,參考第一條&#xff0c;只是在第二步的時候選中java Web就行三、完善web項目在WEB-INF 下新建兩個文件夾&#xff0c;lib(存放jar包)和classes(存放編譯后的文件)打開項目結構設置配置classe…

30342程序格式

1.匯編語言程序格式 2.表達式操作符 轉載于:https://www.cnblogs.com/ZanderZhao/p/11055237.html

初識docker,弄清鏡像和容器

前言&#xff1a; 之前總是有人拿虛擬機和容器做比較。我之前一直理解的容器&#xff0c;就類似于虛擬機快照類似。拿別人的東西就直接用了。在我的虛擬機中安裝一下&#xff0c;環境就搞好了。其實容器是一個徹底解耦的東西。各個軟件相互獨立互不影響 什么是鏡像 從docker本身…

configure 查找依賴庫_Rust在編譯Android的庫時,如何設定依賴的第三方庫引用的C/C++的動態庫的搜索路徑?...

謝邀。不懂android&#xff0c;也不懂OpenCL。但是我嘗試了解了一下你的問題。既然你用了第三方庫&#xff0c;那就得查源碼了。翻開ocl 庫的源碼搜android關鍵字&#xff0c;很容易定位到下面代碼。#https://github.com/cogciprocate/ocl/blob/master/ocl-interop/build.rs}el…

SprinBoot易學難精

Spring Boot易學難精 易學 組件自動裝配&#xff1a;規約大于配置&#xff0c;專注核心業務外部化配置&#xff1a;一次構建、按需調配&#xff0c;到處運行嵌入式容器&#xff1a;內紙容器、無序部署、獨立運行Spring Boot Stater&#xff1a;簡化依賴、按需裝配、自我包含Pro…

一道沒人搞得定的趣味Shell編程游戲題!,看看你會不會?

1.1猜數字編程游戲首先讓系統隨機生成一個數字&#xff0c;給這個數字定一個范圍&#xff08;1-60&#xff09;&#xff0c;讓用戶輸入猜的數字&#xff0c;對輸入進行判斷&#xff0c;如果不符合要求&#xff0c;就給予高或低的提示。其他要求&#xff1a;1、全部猜對后則給出…

java中拷貝文件的代碼_拷貝文件夾中的所有文件到另外一個文件夾

[java]代碼庫/**** 拷貝文件夾中的所有文件到另外一個文件夾** param srcDirector* 源文件夾** param desDirector* 目標文件夾**/public static void copyFileWithDirector(String srcDirector,String desDirector) throws IOException {(new File(desDirector)).mkdirs();Fil…

數據庫IN查詢參數化改造的方法

// 批量查詢的 2019-05-14 if (!string.IsNullOrWhiteSpace(Request["userCodes"])){string userCodes Request["userCodes"].Replace("\r", "").Replace("&#xff0c;", ",").Replace(" ", "&q…

Docker鏡像構成和定制

Docker鏡像構成和定制 利用 commit 理解鏡像構成 docker commit 命令應用場合 docker commit 命令除了學習之外&#xff0c;還有一些特殊的應用場合&#xff0c;比如被***后保存現場等。但是&#xff0c;不要使用 docker commit 定制鏡像&#xff0c;定制鏡像應該使用 Dockerfi…

孿生網絡跟蹤

github: https://github.com/foolwood/DaSiamRPN paper: https://arxiv.org/pdf/1808.06048.pdf http://openaccess.thecvf.com/content_cvpr_2018/papers/Li_High_Performance_Visual_CVPR_2018_paper.pdf轉載于:https://www.cnblogs.com/heixialee/p/11064568.html

infoseccrypto_java下載_關於php接ICBC的支付接口的解決方案

一&#xff1a;背景&#xff1a; 目前項目使用的是php語言開發&#xff0c;需要接入中國工商銀行的ICBC的線上支付接口。二&#xff1a;遇到的問題&#xff1a;支付時需要對數據簽名&#xff0c;但是銀行那邊不提供php版本的程序&#xff0c;只有java版本的&#xff0c;以下是對…

AS 中 Plugin for Gradle 和 Gradle 之間的版本對應關系

Plugin for Gradle 和 Gradle 之間的版本對應關系 來源&#xff1a;https://developer.android.com/studio/releases/gradle-plugin.html Plugin versionRequired Gradle version1.0.0 - 1.1.32.2.1 - 2.31.2.0 - 1.3.12.2.1 - 2.91.5.02.2.1 - 2.132.0.0 - 2.1.22.10 - 2.132.…

java bean 工廠模式_深入理解Java的三種工廠模式

一、簡單工廠模式簡單工廠的定義&#xff1a;提供一個創建對象實例的功能&#xff0c;而無須關心其具體實現。被創建實例的類型可以是接口、抽象類&#xff0c;也可以是具體的類實現汽車接口public interfaceCar {String getName();}奔馳類public class Benz implementsCar {Ov…

java windows 取所有任務_Win下,通過Jstack截取Java進程中的堆棧信息

在Java軟件的使用過程中&#xff0c;有時會莫名的出現奇怪的問題。而這些問題常常無法使用日志信息定位&#xff0c;這時我們就需要通過查看進程內部線程的堆棧調用關系來分析問題出在哪里。舉個例子&#xff0c;當我們在做某個操作時&#xff0c;莫名的會彈出多個警告框&#…

docker mysql Exit 1

用laradock啟動mysql時&#xff0c;state總是 Exit 1 &#xff0c;docker-compose build后也沒有效果 這時應該在&#xff5e;/.laradock/data&#xff08;.env的DATA_PATH_HOST路徑&#xff09;下&#xff0c;把mysql的數據文件刪除 這種情況常見于mysql安裝多版本&#xff0c…

redis基礎一_常用指令

# Redis configuration file example. # # Note that in order to read the configuration file, Redis must be # started with the file path as first argument: #./redis-server /path/to/redis.conf docker啟動redis: docker run -d -p 6379:6379 -v /home/anmin/Desktop/…

滴滴Booster移動APP質量優化框架 學習之旅 三

推薦閱讀&#xff1a; 滴滴Booster移動App質量優化框架-學習之旅 一 Android 模塊Api化演練 不一樣視角的Glide剖析(一) 滴滴Booster移動App質量優化框架-學習之旅 二對重復資源優化和無用資源優化進行了討論。這里對不可編譯無用assets資源優化進行討論。 先看微信Matrix-ApkC…