diff --git a/src/main/java/cn/chjyj/szwh/bean/GoodsSource.java b/src/main/java/cn/chjyj/szwh/bean/GoodsSource.java index 9926f73..5f1ab88 100644 --- a/src/main/java/cn/chjyj/szwh/bean/GoodsSource.java +++ b/src/main/java/cn/chjyj/szwh/bean/GoodsSource.java @@ -1,5 +1,7 @@ package cn.chjyj.szwh.bean; +import com.alibaba.fastjson2.annotation.JSONField; + import java.io.Serializable; import java.util.Date; @@ -20,6 +22,7 @@ public class GoodsSource { private String linkcode;//isli编码 private Integer publisherid;//文化单位ID private String registrant;//编码登记者(文化单位) + @JSONField(name = "resolution_url") private String resolutionUrl;//解析地址-关联的目标资源地址URL private String sourceType;//源类型;1图书/2:期刊/3:报纸/4:音像/5:音频/6:视频/7:其他文献/8:图片/9:文化产品 private String sourceNameType;//源名称类型-->源标识符类型:ISBN/ISLI/CN @@ -102,6 +105,7 @@ public class GoodsSource { /** * 删除状态;0:未删除;1:已删除 */ + @JSONField(serialize=false) private Integer isDeleted; public Integer getId() { diff --git a/src/main/java/cn/chjyj/szwh/mapper/GoodsSourceMapper.java b/src/main/java/cn/chjyj/szwh/mapper/GoodsSourceMapper.java index 401986d..84b4ea4 100644 --- a/src/main/java/cn/chjyj/szwh/mapper/GoodsSourceMapper.java +++ b/src/main/java/cn/chjyj/szwh/mapper/GoodsSourceMapper.java @@ -1,6 +1,7 @@ package cn.chjyj.szwh.mapper; import cn.chjyj.szwh.bean.GoodsSource; +import cn.chjyj.szwh.vo.GoodsSourceVo; import org.apache.ibatis.annotations.Param; import org.springframework.stereotype.Component; @@ -19,6 +20,13 @@ public interface GoodsSourceMapper { */ List getGoodsSourceByIsli(String goodsIsli); + /** + * query goods source -> goodssourcevo + * @param goodsIsli + * @return + */ + List getGoodsSourceVOByIsli(String goodsIsli); + /** * 统计某关键词类型的数量 * @param goodsIsli diff --git a/src/main/java/cn/chjyj/szwh/service/impl/GoodsServiceImpl.java b/src/main/java/cn/chjyj/szwh/service/impl/GoodsServiceImpl.java index 0477a29..ada02e0 100644 --- a/src/main/java/cn/chjyj/szwh/service/impl/GoodsServiceImpl.java +++ b/src/main/java/cn/chjyj/szwh/service/impl/GoodsServiceImpl.java @@ -8,6 +8,7 @@ import cn.chjyj.szwh.service.GoodsService; import cn.chjyj.szwh.utils.*; import cn.chjyj.szwh.vo.GoodsDetailVo; import cn.chjyj.szwh.vo.GoodsListVo; +import cn.chjyj.szwh.vo.GoodsSourceVo; import cn.chjyj.szwh.vo.OrderDetailVo; import com.alibaba.fastjson2.JSON; import com.alibaba.fastjson2.JSONArray; @@ -708,7 +709,7 @@ public class GoodsServiceImpl implements GoodsService { //goods detail GoodsDetail goodsDetail = goodsDetailMapper.getGoodsDetailBygid(goods.getGoodsDetailId()); Map gdmap = new HashMap(); - gdmap.put("goods_iamge",goodsDetail.getGoodsImage()); + gdmap.put("goods_image",goodsDetail.getGoodsImage()); gdmap.put("goods_name",goodsDetail.getGoodsName()); gdmap.put("goods_entrust",goodsDetail.getGoodsEntrust()); gdmap.put("charges_type",goodsDetail.getChargesType()); @@ -745,8 +746,8 @@ public class GoodsServiceImpl implements GoodsService { retmap.put("transaction_count", count); } //GOODS SOURCE - List goodsSource = goodsSourceMapper.getGoodsSourceByIsli(goods.getGoodsIslicode()); - retmap.put("source", goodsSource); + List goodsSourcevo = goodsSourceMapper.getGoodsSourceVOByIsli(goods.getGoodsIslicode()); + retmap.put("source", goodsSourcevo); // JSONObject userjson = SzwhApiUtils.getApiUser(userIsli); Map umap = JSONObject.parseObject(userjson.getString("data")); diff --git a/src/main/java/cn/chjyj/szwh/vo/GoodsSourceVo.java b/src/main/java/cn/chjyj/szwh/vo/GoodsSourceVo.java new file mode 100644 index 0000000..8a21aaa --- /dev/null +++ b/src/main/java/cn/chjyj/szwh/vo/GoodsSourceVo.java @@ -0,0 +1,206 @@ +package cn.chjyj.szwh.vo; + +/** + * 商品资源 VO + * + */ +public class GoodsSourceVo { + private String goods_isli_code; + private String servicecode; + private String linkcode; + private String publisherid; + private String registrant; + private String resolution_url; + private String source_type; + private String source_name_type; + private String source_name; + private String sourceIdentify; + private String source_fragment; + private String target_name; + private String target_name_type; + private String targetIdentify; + private String target_fragment; + private String targetFormat; + private String source_data; + private String target_data; + private String metadataXml; + private String cancellation_reason; + private String cancellationtime; + private String allocationtime; + + public String getGoods_isli_code() { + return goods_isli_code; + } + + public void setGoods_isli_code(String goods_isli_code) { + this.goods_isli_code = goods_isli_code; + } + + public String getServicecode() { + return servicecode; + } + + public void setServicecode(String servicecode) { + this.servicecode = servicecode; + } + + public String getLinkcode() { + return linkcode; + } + + public void setLinkcode(String linkcode) { + this.linkcode = linkcode; + } + + public String getPublisherid() { + return publisherid; + } + + public void setPublisherid(String publisherid) { + this.publisherid = publisherid; + } + + public String getRegistrant() { + return registrant; + } + + public void setRegistrant(String registrant) { + this.registrant = registrant; + } + + public String getResolution_url() { + return resolution_url; + } + + public void setResolution_url(String resolution_url) { + this.resolution_url = resolution_url; + } + + public String getSource_type() { + return source_type; + } + + public void setSource_type(String source_type) { + this.source_type = source_type; + } + + public String getSource_name_type() { + return source_name_type; + } + + public void setSource_name_type(String source_name_type) { + this.source_name_type = source_name_type; + } + + public String getSource_name() { + return source_name; + } + + public void setSource_name(String source_name) { + this.source_name = source_name; + } + + public String getSourceIdentify() { + return sourceIdentify; + } + + public void setSourceIdentify(String sourceIdentify) { + this.sourceIdentify = sourceIdentify; + } + + public String getSource_fragment() { + return source_fragment; + } + + public void setSource_fragment(String source_fragment) { + this.source_fragment = source_fragment; + } + + public String getTarget_name() { + return target_name; + } + + public void setTarget_name(String target_name) { + this.target_name = target_name; + } + + public String getTarget_name_type() { + return target_name_type; + } + + public void setTarget_name_type(String target_name_type) { + this.target_name_type = target_name_type; + } + + public String getTargetIdentify() { + return targetIdentify; + } + + public void setTargetIdentify(String targetIdentify) { + this.targetIdentify = targetIdentify; + } + + public String getTarget_fragment() { + return target_fragment; + } + + public void setTarget_fragment(String target_fragment) { + this.target_fragment = target_fragment; + } + + public String getTargetFormat() { + return targetFormat; + } + + public void setTargetFormat(String targetFormat) { + this.targetFormat = targetFormat; + } + + public String getSource_data() { + return source_data; + } + + public void setSource_data(String source_data) { + this.source_data = source_data; + } + + public String getTarget_data() { + return target_data; + } + + public void setTarget_data(String target_data) { + this.target_data = target_data; + } + + public String getMetadataXml() { + return metadataXml; + } + + public void setMetadataXml(String metadataXml) { + this.metadataXml = metadataXml; + } + + public String getCancellation_reason() { + return cancellation_reason; + } + + public void setCancellation_reason(String cancellation_reason) { + this.cancellation_reason = cancellation_reason; + } + + public String getCancellationtime() { + return cancellationtime; + } + + public void setCancellationtime(String cancellationtime) { + this.cancellationtime = cancellationtime; + } + + public String getAllocationtime() { + return allocationtime; + } + + public void setAllocationtime(String allocationtime) { + this.allocationtime = allocationtime; + } +} diff --git a/src/main/resources/mapper/szwh/GoodsSourceMapper.xml b/src/main/resources/mapper/szwh/GoodsSourceMapper.xml index f8188f5..dc9e584 100644 --- a/src/main/resources/mapper/szwh/GoodsSourceMapper.xml +++ b/src/main/resources/mapper/szwh/GoodsSourceMapper.xml @@ -23,6 +23,13 @@ AND is_deleted=0 + + +