diff --git a/conf/db.properties b/conf/db.properties
index c18a08d..b44e3ac 100644
--- a/conf/db.properties
+++ b/conf/db.properties
@@ -1,10 +1,11 @@
# 数据库服务器配置
type=com.alibaba.druid.pool.DruidDataSource
driver-class-name=com.mysql.cj.jdbc.Driver
-#druid.url=jdbc:mysql://192.168.1.8:3306/szwhtrans?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
-druid.url=jdbc:mysql://localhost:3306/szwhtrans?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+#druid.url=jdbc:mysql://192.168.1.8:3306/szwhtrans?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8
#druid.username=szwhtrans
#druid.password=rRyPkT2XYW6mMRiX
+
+druid.url=jdbc:mysql://localhost:3306/szwhtrans?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
druid.username=root
druid.password=xc1123
druid.initial-size=10
diff --git a/pom.xml b/pom.xml
index 92e10a3..cda5373 100644
--- a/pom.xml
+++ b/pom.xml
@@ -36,6 +36,7 @@
mysql
mysql-connector-java
+ 8.0.29
org.springframework.boot
diff --git a/src/main/java/cn/chjyj/szwh/bean/GoodsDetail.java b/src/main/java/cn/chjyj/szwh/bean/GoodsDetail.java
new file mode 100644
index 0000000..1da0af2
--- /dev/null
+++ b/src/main/java/cn/chjyj/szwh/bean/GoodsDetail.java
@@ -0,0 +1,296 @@
+package cn.chjyj.szwh.bean;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * 商品明细
+ */
+public class GoodsDetail {
+ /**
+ * goods_detail
+ * id,goods_name,goods_image,identifier,identifiers,stock,price,goods_ownership,goods_ownership_str,goods_type
+ * charges_type,goods_islicode,goods_entrust,contractual_period,earnest_money,transaction_class,contract
+ * otherIdentifiers,classification,source_islicode,source_islicode_name,source_url,source_status,data_json
+ * source_json,join_field,sourcedata_islicode,createtime,updatetime,is_deleted,is_join
+ */
+ private Integer id;
+ private String goodsName; // 商品名称
+ private String goodsImage;//商品图片
+ private String identifier; //资源isli
+ private String identifiers; //合约ISLI标志码/商品ISLI编码
+ private Integer stock; //库存
+ private BigDecimal price; //单价
+ private Integer goodsOwnership;//商品类型;1:所有权;2:使用权
+ private String goodsOwnershipStr;//商品权属
+ private Integer goodsType; //商品类型;1:文化资源数据;2:文化数字内容
+ private Integer chargesType; //商品费用类型;1:免费;2:付费
+ private String goodsIslicode; //商品isli标识码
+ private Integer goodsEntrust; //商品委托类型;1:转让;2:许可
+ private Integer contractualPeriod; //委托周期;1:永久,2:单次,3:周期
+ private BigDecimal earnestMoney;//商品保证金
+ private Integer transactionClass; //交易种类;1:权属;2:商品
+ private String contract; //描述
+ private String otheridentifiers; //权属自有标识符(商品自有标识符)
+ private String classification; //标的商品的分类(交易种类为商品时候用的)
+ private String sourceIslicode; //资源isli标识码
+ private String sourceIslicodeName; //资源名称
+ private String sourceUrl; //资源下载链接
+ private Integer sourceStatus; //资源下载状态
+ private String dataJson; //数据;json格式
+ private String sourceJson; //数据;json格式
+ private String joinField;
+ private String sourcedataIslicode;//sourceData里的islicode
+ private Date createtime;//创建时间
+ private Date updatetime;//修改时间
+ private Integer isDeleted;//删除状态;0:未删除;1:已删除
+ private Boolean isJoin;
+
+ public Integer getId() {
+ return id;
+ }
+
+ public void setId(Integer id) {
+ this.id = id;
+ }
+
+ public String getGoodsName() {
+ return goodsName;
+ }
+
+ public void setGoodsName(String goodsName) {
+ this.goodsName = goodsName;
+ }
+
+ public String getGoodsImage() {
+ return goodsImage;
+ }
+
+ public void setGoodsImage(String goodsImage) {
+ this.goodsImage = goodsImage;
+ }
+
+ public String getIdentifier() {
+ return identifier;
+ }
+
+ public void setIdentifier(String identifier) {
+ this.identifier = identifier;
+ }
+
+ public String getIdentifiers() {
+ return identifiers;
+ }
+
+ public void setIdentifiers(String identifiers) {
+ this.identifiers = identifiers;
+ }
+
+ public Integer getStock() {
+ return stock;
+ }
+
+ public void setStock(Integer stock) {
+ this.stock = stock;
+ }
+
+ public BigDecimal getPrice() {
+ return price;
+ }
+
+ public void setPrice(BigDecimal price) {
+ this.price = price;
+ }
+
+ public Integer getGoodsOwnership() {
+ return goodsOwnership;
+ }
+
+ public void setGoodsOwnership(Integer goodsOwnership) {
+ this.goodsOwnership = goodsOwnership;
+ }
+
+ public String getGoodsOwnershipStr() {
+ return goodsOwnershipStr;
+ }
+
+ public void setGoodsOwnershipStr(String goodsOwnershipStr) {
+ this.goodsOwnershipStr = goodsOwnershipStr;
+ }
+
+ public Integer getGoodsType() {
+ return goodsType;
+ }
+
+ public void setGoodsType(Integer goodsType) {
+ this.goodsType = goodsType;
+ }
+
+ public Integer getChargesType() {
+ return chargesType;
+ }
+
+ public void setChargesType(Integer chargesType) {
+ this.chargesType = chargesType;
+ }
+
+ public String getGoodsIslicode() {
+ return goodsIslicode;
+ }
+
+ public void setGoodsIslicode(String goodsIslicode) {
+ this.goodsIslicode = goodsIslicode;
+ }
+
+ public Integer getGoodsEntrust() {
+ return goodsEntrust;
+ }
+
+ public void setGoodsEntrust(Integer goodsEntrust) {
+ this.goodsEntrust = goodsEntrust;
+ }
+
+ public Integer getContractualPeriod() {
+ return contractualPeriod;
+ }
+
+ public void setContractualPeriod(Integer contractualPeriod) {
+ this.contractualPeriod = contractualPeriod;
+ }
+
+ public BigDecimal getEarnestMoney() {
+ return earnestMoney;
+ }
+
+ public void setEarnestMoney(BigDecimal earnestMoney) {
+ this.earnestMoney = earnestMoney;
+ }
+
+ public Integer getTransactionClass() {
+ return transactionClass;
+ }
+
+ public void setTransactionClass(Integer transactionClass) {
+ this.transactionClass = transactionClass;
+ }
+
+ public String getContract() {
+ return contract;
+ }
+
+ public void setContract(String contract) {
+ this.contract = contract;
+ }
+
+ public String getOtheridentifiers() {
+ return otheridentifiers;
+ }
+
+ public void setOtheridentifiers(String otheridentifiers) {
+ this.otheridentifiers = otheridentifiers;
+ }
+
+ public String getClassification() {
+ return classification;
+ }
+
+ public void setClassification(String classification) {
+ this.classification = classification;
+ }
+
+ public String getSourceIslicode() {
+ return sourceIslicode;
+ }
+
+ public void setSourceIslicode(String sourceIslicode) {
+ this.sourceIslicode = sourceIslicode;
+ }
+
+ public String getSourceIslicodeName() {
+ return sourceIslicodeName;
+ }
+
+ public void setSourceIslicodeName(String sourceIslicodeName) {
+ this.sourceIslicodeName = sourceIslicodeName;
+ }
+
+ public String getSourceUrl() {
+ return sourceUrl;
+ }
+
+ public void setSourceUrl(String sourceUrl) {
+ this.sourceUrl = sourceUrl;
+ }
+
+ public Integer getSourceStatus() {
+ return sourceStatus;
+ }
+
+ public void setSourceStatus(Integer sourceStatus) {
+ this.sourceStatus = sourceStatus;
+ }
+
+ public String getDataJson() {
+ return dataJson;
+ }
+
+ public void setDataJson(String dataJson) {
+ this.dataJson = dataJson;
+ }
+
+ public String getSourceJson() {
+ return sourceJson;
+ }
+
+ public void setSourceJson(String sourceJson) {
+ this.sourceJson = sourceJson;
+ }
+
+ public String getJoinField() {
+ return joinField;
+ }
+
+ public void setJoinField(String joinField) {
+ this.joinField = joinField;
+ }
+
+ public String getSourcedataIslicode() {
+ return sourcedataIslicode;
+ }
+
+ public void setSourcedataIslicode(String sourcedataIslicode) {
+ this.sourcedataIslicode = sourcedataIslicode;
+ }
+
+ public Date getCreatetime() {
+ return createtime;
+ }
+
+ public void setCreatetime(Date createtime) {
+ this.createtime = createtime;
+ }
+
+ public Date getUpdatetime() {
+ return updatetime;
+ }
+
+ public void setUpdatetime(Date updatetime) {
+ this.updatetime = updatetime;
+ }
+
+ public Integer getIsDeleted() {
+ return isDeleted;
+ }
+
+ public void setIsDeleted(Integer isDeleted) {
+ this.isDeleted = isDeleted;
+ }
+
+ public Boolean getJoin() {
+ return isJoin;
+ }
+
+ public void setJoin(Boolean join) {
+ isJoin = join;
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/cn/chjyj/szwh/bean/GoodsSource.java b/src/main/java/cn/chjyj/szwh/bean/GoodsSource.java
new file mode 100644
index 0000000..8fbcc1f
--- /dev/null
+++ b/src/main/java/cn/chjyj/szwh/bean/GoodsSource.java
@@ -0,0 +1,306 @@
+package cn.chjyj.szwh.bean;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 商品资源
+ */
+public class GoodsSource {
+ /**
+ * goods_source
+ * id,goods_isli_code,servicecode,linkcode,publisherid,registrant,resolution_url,source_type,source_name_type,
+ * source_name,sourceIdentify,source_fragment,target_name,target_name_type,targetIdentify,target_fragment,targetFormat,
+ * source_data,target_data,metadataXml,cancellation_reason,cancellationtime,allocationtime,datatype,is_deleted
+ *
+ */
+ private Integer id;
+ private String goodsIsliCode;//商品isli标识码
+ private String servicecode;//服务编码
+ private String linkcode;//isli编码
+ private Integer publisherid;//文化单位ID
+ private String registrant;//编码登记者(文化单位)
+ private String resolutionUrl;//解析地址-关联的目标资源地址URL
+ private String sourceType;//源类型;1图书/2:期刊/3:报纸/4:音像/5:音频/6:视频/7:其他文献/8:图片/9:文化产品
+ private String sourceNameType;//源名称类型-->源标识符类型:ISBN/ISLI/CN
+
+ /**
+ * 源名称
+ */
+ private String sourceName;
+
+ /**
+ * 源标识符:源标识符类型 + 源标识符(ISBN000000XXXXXX)
+ */
+ private String sourceidentify;
+
+ /**
+ * 源片段
+ */
+ private String sourceFragment;
+
+ /**
+ * 目标名称-->整体目标作品名称
+ */
+ private String targetName;
+
+ /**
+ * 目标名称类型-->目标标识符类型:ISBN/ISLI
+ */
+ private String targetNameType;
+
+ /**
+ * 目标标识符-->整体目标标识符:目标标识符类型 + 目标标识符(ISBN000000XXXXXX)
+ */
+ private String targetidentify;
+
+ /**
+ * 目标片段
+ */
+ private String targetFragment;
+
+ /**
+ * 目标类型:服务关联创建的实体(1:其他文献/2:音频/3:视频/4:图片/5:文化产品)
+ */
+ private String targetformat;
+
+ /**
+ * isli元数据(其他文献实体/音频实体/视频实体/): json格式
+ */
+ private String sourceData;
+
+ /**
+ * isli元数据(其他文献实体/音频实体/视频实体/): json格式
+ */
+ private String targetData;
+
+ /**
+ * isli元数据(其他文献实体/音频实体/视频实体/): json格式
+ */
+ private String metadataxml;
+
+ /**
+ * 注销说明
+ */
+ private String cancellationReason;
+
+ /**
+ * 注销时间
+ */
+ private Date cancellationtime;
+
+ /**
+ * 分配日期
+ */
+ private Date allocationtime;
+
+ /**
+ * 数据类型;
+ */
+ private Integer datatype;
+
+ /**
+ * 删除状态;0:未删除;1:已删除
+ */
+ private Integer isDeleted;
+
+ public Integer getId() {
+ return id;
+ }
+
+ public void setId(Integer id) {
+ this.id = id;
+ }
+
+ public String getGoodsIsliCode() {
+ return goodsIsliCode;
+ }
+
+ public void setGoodsIsliCode(String goodsIsliCode) {
+ this.goodsIsliCode = goodsIsliCode;
+ }
+
+ 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 Integer getPublisherid() {
+ return publisherid;
+ }
+
+ public void setPublisherid(Integer publisherid) {
+ this.publisherid = publisherid;
+ }
+
+ public String getRegistrant() {
+ return registrant;
+ }
+
+ public void setRegistrant(String registrant) {
+ this.registrant = registrant;
+ }
+
+ public String getResolutionUrl() {
+ return resolutionUrl;
+ }
+
+ public void setResolutionUrl(String resolutionUrl) {
+ this.resolutionUrl = resolutionUrl;
+ }
+
+ public String getSourceType() {
+ return sourceType;
+ }
+
+ public void setSourceType(String sourceType) {
+ this.sourceType = sourceType;
+ }
+
+ public String getSourceNameType() {
+ return sourceNameType;
+ }
+
+ public void setSourceNameType(String sourceNameType) {
+ this.sourceNameType = sourceNameType;
+ }
+
+ public String getSourceName() {
+ return sourceName;
+ }
+
+ public void setSourceName(String sourceName) {
+ this.sourceName = sourceName;
+ }
+
+ public String getSourceidentify() {
+ return sourceidentify;
+ }
+
+ public void setSourceidentify(String sourceidentify) {
+ this.sourceidentify = sourceidentify;
+ }
+
+ public String getSourceFragment() {
+ return sourceFragment;
+ }
+
+ public void setSourceFragment(String sourceFragment) {
+ this.sourceFragment = sourceFragment;
+ }
+
+ public String getTargetName() {
+ return targetName;
+ }
+
+ public void setTargetName(String targetName) {
+ this.targetName = targetName;
+ }
+
+ public String getTargetNameType() {
+ return targetNameType;
+ }
+
+ public void setTargetNameType(String targetNameType) {
+ this.targetNameType = targetNameType;
+ }
+
+ public String getTargetidentify() {
+ return targetidentify;
+ }
+
+ public void setTargetidentify(String targetidentify) {
+ this.targetidentify = targetidentify;
+ }
+
+ public String getTargetFragment() {
+ return targetFragment;
+ }
+
+ public void setTargetFragment(String targetFragment) {
+ this.targetFragment = targetFragment;
+ }
+
+ public String getTargetformat() {
+ return targetformat;
+ }
+
+ public void setTargetformat(String targetformat) {
+ this.targetformat = targetformat;
+ }
+
+ public String getSourceData() {
+ return sourceData;
+ }
+
+ public void setSourceData(String sourceData) {
+ this.sourceData = sourceData;
+ }
+
+ public String getTargetData() {
+ return targetData;
+ }
+
+ public void setTargetData(String targetData) {
+ this.targetData = targetData;
+ }
+
+ public String getMetadataxml() {
+ return metadataxml;
+ }
+
+ public void setMetadataxml(String metadataxml) {
+ this.metadataxml = metadataxml;
+ }
+
+ public String getCancellationReason() {
+ return cancellationReason;
+ }
+
+ public void setCancellationReason(String cancellationReason) {
+ this.cancellationReason = cancellationReason;
+ }
+
+ public Date getCancellationtime() {
+ return cancellationtime;
+ }
+
+ public void setCancellationtime(Date cancellationtime) {
+ this.cancellationtime = cancellationtime;
+ }
+
+ public Date getAllocationtime() {
+ return allocationtime;
+ }
+
+ public void setAllocationtime(Date allocationtime) {
+ this.allocationtime = allocationtime;
+ }
+
+ public Integer getDatatype() {
+ return datatype;
+ }
+
+ public void setDatatype(Integer datatype) {
+ this.datatype = datatype;
+ }
+
+ public Integer getIsDeleted() {
+ return isDeleted;
+ }
+
+ public void setIsDeleted(Integer isDeleted) {
+ this.isDeleted = isDeleted;
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/cn/chjyj/szwh/controller/admin/AdminGoodsController.java b/src/main/java/cn/chjyj/szwh/controller/admin/AdminGoodsController.java
index 01c3548..9d78e53 100644
--- a/src/main/java/cn/chjyj/szwh/controller/admin/AdminGoodsController.java
+++ b/src/main/java/cn/chjyj/szwh/controller/admin/AdminGoodsController.java
@@ -13,7 +13,7 @@ import java.util.List;
@Controller
-@RequestMapping(value = "/admin/goods.Goods",method = {RequestMethod.GET,RequestMethod.POST})
+@RequestMapping(value = "/admin/Goods",method = {RequestMethod.GET,RequestMethod.POST})
public class AdminGoodsController {
@Autowired
private GoodsService goodsService;
@@ -23,7 +23,7 @@ public class AdminGoodsController {
* @return
*/
@RequestMapping("/list")
- public String list(String page){
+ public String list(@RequestParam(name = "page",defaultValue = "1") String page){
int ipage=Integer.parseInt(page);
List goodsList = goodsService.getGoodsList(ipage);
// convert to json
diff --git a/src/main/java/cn/chjyj/szwh/mapper/GoodsDetailMapper.java b/src/main/java/cn/chjyj/szwh/mapper/GoodsDetailMapper.java
new file mode 100644
index 0000000..926209a
--- /dev/null
+++ b/src/main/java/cn/chjyj/szwh/mapper/GoodsDetailMapper.java
@@ -0,0 +1,10 @@
+package cn.chjyj.szwh.mapper;
+
+import org.springframework.stereotype.Component;
+
+/**
+ * 商品详情
+ */
+@Component
+public interface GoodsDetailMapper {
+}
diff --git a/src/main/java/cn/chjyj/szwh/mapper/GoodsSourceMapper.java b/src/main/java/cn/chjyj/szwh/mapper/GoodsSourceMapper.java
new file mode 100644
index 0000000..a406236
--- /dev/null
+++ b/src/main/java/cn/chjyj/szwh/mapper/GoodsSourceMapper.java
@@ -0,0 +1,10 @@
+package cn.chjyj.szwh.mapper;
+
+import org.springframework.stereotype.Component;
+
+/**
+ * 商品来源
+ */
+@Component
+public interface GoodsSourceMapper {
+}
diff --git a/src/main/resources/mapper/szwh/GoodsDetailMapper.xml b/src/main/resources/mapper/szwh/GoodsDetailMapper.xml
new file mode 100644
index 0000000..295d050
--- /dev/null
+++ b/src/main/resources/mapper/szwh/GoodsDetailMapper.xml
@@ -0,0 +1,105 @@
+
+
+
+
+
+ id,goods_name as goodsName,goods_image as goodsImage,identifier,identifiers,stock,price,goods_ownership as goodsOwnership,
+ goods_ownership_str as goodsOwnershipStr,goods_type as goodsType,
+ charges_type as chargesType,goods_islicode as goodsIslicode,goods_entrust as goodsEntrust,
+ contractual_period as contractualPeriod,earnest_money as earnestMoney ,transaction_class as transactionClass,contract,
+ otherIdentifiers,classification,source_islicode as sourceIslicode,
+ source_islicode_name as sourceIslicodeName,source_url as sourceUrl,source_status as sourceStatus,
+ data_json as dataJson,source_json as sourceJson,join_field as joinField,
+ sourcedata_islicode as sourcedataIslicode,createtime,updatetime,is_deleted as isDeleted,is_join as isJoin
+
+
+ goods_detail
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ insert into
+ (uname,password,gender,urealname,ubirth,nickname,avatarurl,platfrom,sessionkey,openid)
+ values (
+ #{uname},
+ #{password},
+ #{gender},
+ #{urealname},
+ #{ubirth},
+ #{nickname},
+ #{avatarurl},
+ #{platfrom},
+ #{sessionkey},
+ #{openid}
+ )
+
+
+
+ update
+ set
+
+
+ password=#{password},
+
+
+ urealname=#{urealname},
+
+
+ ubirth =#{ubirth},
+
+
+ gender=#{gender},
+
+
+ nickname=#{nickName},
+
+
+ avatarurl=#{avatarurl},
+
+
+ nickname=#{nickname},
+
+
+ platfrom=#{platfrom},
+
+
+ sessionkey=#{sessionkey},
+
+
+ openid=#{openid},
+
+ uname=#{uname}
+ where uid=#{uid};
+
+
+
\ No newline at end of file
diff --git a/src/main/resources/mapper/szwh/GoodsSourceMapper.xml b/src/main/resources/mapper/szwh/GoodsSourceMapper.xml
new file mode 100644
index 0000000..ad5a91f
--- /dev/null
+++ b/src/main/resources/mapper/szwh/GoodsSourceMapper.xml
@@ -0,0 +1,103 @@
+
+
+
+
+
+ id,goods_isli_code as goodsIsliCode,servicecode,linkcode,publisherid,registrant,
+ resolution_url as resolutionUrl,source_type as sourceType,source_name_type as sourceNameType,
+ source_name as sourceName,sourceIdentify,source_fragment as sourceFragment,
+ target_name as targetName,target_name_type as targetNameType,targetIdentify,
+ target_fragment as targetFragment,targetFormat,source_data as sourceData,
+ target_data as targetData,metadataXml,cancellation_reason as cancellationReason,
+ cancellationtime,allocationtime,datatype,is_deleted as isDeleted
+
+ goods_source
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ insert into
+ (uname,password,gender,urealname,ubirth,nickname,avatarurl,platfrom,sessionkey,openid)
+ values (
+ #{uname},
+ #{password},
+ #{gender},
+ #{urealname},
+ #{ubirth},
+ #{nickname},
+ #{avatarurl},
+ #{platfrom},
+ #{sessionkey},
+ #{openid}
+ )
+
+
+
+ update
+ set
+
+
+ password=#{password},
+
+
+ urealname=#{urealname},
+
+
+ ubirth =#{ubirth},
+
+
+ gender=#{gender},
+
+
+ nickname=#{nickName},
+
+
+ avatarurl=#{avatarurl},
+
+
+ nickname=#{nickname},
+
+
+ platfrom=#{platfrom},
+
+
+ sessionkey=#{sessionkey},
+
+
+ openid=#{openid},
+
+ uname=#{uname}
+ where uid=#{uid};
+
+
+
\ No newline at end of file