244 Achegas b1407d8849 ... 1c4c12f106

Autor SHA1 Mensaxe Data
  guozhaoshun 1c4c12f106 fix %!s(int64=6) %!d(string=hai) anos
  guozhaoshun 925d3e0715 fix resource/list find by type %!s(int64=6) %!d(string=hai) anos
  guozhaoshun a3c1fea9d7 API support audioImg resource %!s(int64=6) %!d(string=hai) anos
  xuchaolang ce6c7b8208 Merge branch 'master' of http://gogs.efunbox.cn:3000/Rankin/rankin %!s(int64=6) %!d(string=hai) anos
  xuchaolang 4e69f04b87 Merge branch 'release/1.0.0' %!s(int64=6) %!d(string=hai) anos
  guozhaoshun 0eea46bf57 courseware support audioImg resource %!s(int64=6) %!d(string=hai) anos
  guozhaoshun 81538f7bf4 courseware support audioImg resource %!s(int64=6) %!d(string=hai) anos
  guozhaoshun 21518e8d80 fix url AudioImg %!s(int64=6) %!d(string=hai) anos
  guozhaoshun bdc6143ab5 Merge branch 'dev20180611' %!s(int64=6) %!d(string=hai) anos
  guozhaoshun 78120e41c4 support AudioImg %!s(int64=6) %!d(string=hai) anos
  guozhaoshun af8fd89f3b UserTag support copy from tag %!s(int64=6) %!d(string=hai) anos
  guozhaoshun 2e09eec0bf support AudioImg %!s(int64=6) %!d(string=hai) anos
  guozhaoshun c18b9479e5 CMS add AudioImg module %!s(int64=6) %!d(string=hai) anos
  guozhaoshun 4ffe74f10f support AudioImg %!s(int64=6) %!d(string=hai) anos
  guozhaoshun 2bce02f682 fix change video resource url | https:// %!s(int64=6) %!d(string=hai) anos
  guozhaoshun 1e5447c99c fix change video resource url | https:// %!s(int64=6) %!d(string=hai) anos
  guozhaoshun 8c6c5e2f6f fix %!s(int64=6) %!d(string=hai) anos
  guozhaoshun 84fcec2c52 fix %!s(int64=6) %!d(string=hai) anos
  guozhaoshun addf733cef optimize change video resource url | https:// %!s(int64=6) %!d(string=hai) anos
  guozhaoshun e25a1087b2 API support UserTag UserRecommend module %!s(int64=6) %!d(string=hai) anos
  guozhaoshun c1cafa0dde CMS support UserTag UserRecommend module %!s(int64=6) %!d(string=hai) anos
  guozhaoshun b7f7ae4fbd CMS support UserTag UserRecommend module %!s(int64=6) %!d(string=hai) anos
  guozhaoshun 68e668299a change ItemController package %!s(int64=6) %!d(string=hai) anos
  guozhaoshun 179ebf9818 support UserTag UserRecommend module %!s(int64=6) %!d(string=hai) anos
  guozhaoshun 53870c5081 add UserTag UserRecommend module %!s(int64=6) %!d(string=hai) anos
  guozhaoshun 9a91434191 add UserTag module %!s(int64=6) %!d(string=hai) anos
  guozhaoshun 3f669d5d8d add UserRecommend module %!s(int64=6) %!d(string=hai) anos
  guozhaoshun f342259060 UserTag UserRecommend UserTagProductRelation %!s(int64=6) %!d(string=hai) anos
  guozhaoshun bcf2a31407 img resource replace the blank space %!s(int64=6) %!d(string=hai) anos
  guozhaoshun f222501fd2 optimize poster %!s(int64=6) %!d(string=hai) anos
  guozhaoshun 13173f2b4d optimize poster %!s(int64=6) %!d(string=hai) anos
  guozhaoshun e9a0dde366 optimize %!s(int64=6) %!d(string=hai) anos
  guozhaoshun bac3f345a1 video list sort by createTime DESC %!s(int64=6) %!d(string=hai) anos
  guozhaoshun 7553ae7a1e video list sort by updateTime DESC %!s(int64=6) %!d(string=hai) anos
  guozhaoshun 394cf45ea7 video list sort by createTime DESC %!s(int64=6) %!d(string=hai) anos
  guozhaoshun 4e742c737a restore file %!s(int64=6) %!d(string=hai) anos
  guozhaoshun 1549a46a4d fix tag support update typeCode,merchant; %!s(int64=6) %!d(string=hai) anos
  guozhaoshun 33b5c15d60 change video resource url | https:// %!s(int64=6) %!d(string=hai) anos
  guozhaoshun 506effdb57 change video resource url | https:// %!s(int64=6) %!d(string=hai) anos
  guozhaoshun 9e8234ef28 terminalUser add deviceStatus %!s(int64=6) %!d(string=hai) anos
  guozhaoshun 816b823469 change video resource url | https:// %!s(int64=6) %!d(string=hai) anos
  guozhaoshun 6272cefc73 fix optimize the recommended course %!s(int64=6) %!d(string=hai) anos
  guozhaoshun b9de4f6722 optimize the recommended course %!s(int64=6) %!d(string=hai) anos
  guozhaoshun 3ffe8c3f5e fix updateResource %!s(int64=6) %!d(string=hai) anos
  guozhaoshun f3fb2065fc fix updateResource %!s(int64=6) %!d(string=hai) anos
  guozhaoshun a387a6d808 fix updateResource %!s(int64=6) %!d(string=hai) anos
  guozhaoshun f477dadf3d fix updateResource %!s(int64=6) %!d(string=hai) anos
  guozhaoshun 9311a32594 fix updateResource %!s(int64=6) %!d(string=hai) anos
  guozhaoshun f9b5490ab0 fix updateResource %!s(int64=6) %!d(string=hai) anos
  guozhaoshun 9d1b06ca5e fix poster %!s(int64=6) %!d(string=hai) anos
  guozhaoshun b1444f5476 fix poster %!s(int64=6) %!d(string=hai) anos
  guozhaoshun 6bdbf70ab7 fix picture list sort by gmtModified DESC %!s(int64=6) %!d(string=hai) anos
  guozhaoshun f7dd51ab62 from the update resource document; 1 video | 0 audio %!s(int64=6) %!d(string=hai) anos
  xuchaolang 9933ecdbfe Merge branch 'fix_bug.0525' %!s(int64=6) %!d(string=hai) anos
  xuchaolang 28d6e829ce Merge branch 'master' of http://gogs.efunbox.cn:3000/Rankin/rankin %!s(int64=6) %!d(string=hai) anos
  xuchaolang 56ef2ae8da Fix bug, check idList if empty while find in repo %!s(int64=6) %!d(string=hai) anos
  guozhaoshun 1a88c54723 fix tag support update typeCode,merchant; %!s(int64=6) %!d(string=hai) anos
  guozhaoshun 7d2928ebf6 fix poster %!s(int64=6) %!d(string=hai) anos
  guozhaoshun c8a3defbf6 fix poster %!s(int64=6) %!d(string=hai) anos
  guozhaoshun fef1be4ad4 fix saveRemoteResource %!s(int64=6) %!d(string=hai) anos
  guozhaoshun 2232e69783 fix poster %!s(int64=6) %!d(string=hai) anos
  guozhaoshun d64df3cd1d fix poster %!s(int64=6) %!d(string=hai) anos
  guozhaoshun c6323af106 Merge branch 'dev001' %!s(int64=6) %!d(string=hai) anos
  xuchaolang 33f4ed14cc cms-web-api, /resource PUT, id pass in body %!s(int64=6) %!d(string=hai) anos
  xuchaolang 42d7a7fde9 web-api, /package/<pid>, return goods %!s(int64=6) %!d(string=hai) anos
  xuchaolang 80337f7aee Merge branch 'master' of http://gogs.efunbox.cn:3000/Rankin/rankin %!s(int64=6) %!d(string=hai) anos
  xuchaolang e0359d50e8 Accomplish /user/messages/productExpiredAlert, /package/<pid> %!s(int64=6) %!d(string=hai) anos
  xuchaolang 4f2db3edf5 Merge branch 'master' of http://gogs.efunbox.cn:3000/Rankin/rankin %!s(int64=6) %!d(string=hai) anos
  xuchaolang a6153d0f3e ProductService.getRelatedPackages, filter offline pkgs by status %!s(int64=6) %!d(string=hai) anos
  xuchaolang 5b06485ee2 return code in /product/<pid>/relatedPkg, move shopQR into Goods %!s(int64=6) %!d(string=hai) anos
  xuchaolang a6a6614946 ProductService.getRelatedPkgs, set goods %!s(int64=6) %!d(string=hai) anos
  xuchaolang 4c631931cd ProductService.getRelatedPackges, check pkgId but not productId while scaning relatedPkgs %!s(int64=6) %!d(string=hai) anos
  xuchaolang 6991a10393 ProductService, move ProductController from controller.cms package to controller package %!s(int64=6) %!d(string=hai) anos
  xuchaolang c6b6a14078 Accomplish Api /product/<pid>/relatedPkg %!s(int64=6) %!d(string=hai) anos
  xuchaolang e06c345575 Add /merchant prefix to Api /merchant/<merchantId>/posters %!s(int64=6) %!d(string=hai) anos
  xuchaolang cdc99ef674 service /user/<uid>/product/valid Resturn [] while user have no valid products %!s(int64=6) %!d(string=hai) anos
  xuchaolang 9e62064f53 Print product Log while get valid product from service %!s(int64=6) %!d(string=hai) anos
  xuchaolang 9ca21fe5ad Print User %!s(int64=6) %!d(string=hai) anos
  xuchaolang 6d90ff45c9 Temporarily add /user/product/valid in product service %!s(int64=6) %!d(string=hai) anos
  xuchaolang 027257e268 Merge branch 'dev.3.0' %!s(int64=6) %!d(string=hai) anos
  guozhaoshun 279f88c027 change TagTypeController /controller/app to /controller/ %!s(int64=6) %!d(string=hai) anos
  guozhaoshun f3ca8a50f5 add support video upload %!s(int64=6) %!d(string=hai) anos
  guozhaoshun d8011a4be3 tag create/update support tagType %!s(int64=6) %!d(string=hai) anos
  guozhaoshun 2f51c018ab tagType %!s(int64=6) %!d(string=hai) anos
  guozhaoshun 3d0665565c Tag create/update support typeCode %!s(int64=6) %!d(string=hai) anos
  guozhaoshun 671925bb7c merchant product name change source %!s(int64=6) %!d(string=hai) anos
  guozhaoshun 4f4b2067cd add /tagType/{code} %!s(int64=6) %!d(string=hai) anos
  guozhaoshun 150ce1a65d add %!s(int64=6) %!d(string=hai) anos
  guozhaoshun ebb60529f4 add %!s(int64=6) %!d(string=hai) anos
  xuchaolang fdcb5a30ea Fix getTagType request mapping value %!s(int64=6) %!d(string=hai) anos
  xuchaolang bb4f968336 restore pom.xml %!s(int64=6) %!d(string=hai) anos
  xuchaolang c3df828bef check if sign is empty while get it from header %!s(int64=6) %!d(string=hai) anos
  xuchaolang 00103a8f10 use Authentication while sign not Exist, For compatition with 2.x app verions %!s(int64=6) %!d(string=hai) anos
  guozhaoshun e35f33f816 recover yml %!s(int64=6) %!d(string=hai) anos
  guozhaoshun 967949bded test commit %!s(int64=6) %!d(string=hai) anos
  guozhaoshun eec791684a Merge remote-tracking branch 'origin/master' into dev %!s(int64=6) %!d(string=hai) anos
  guozhaoshun 75b5a94017 repair bug %!s(int64=6) %!d(string=hai) anos
  xuchaolang e554490545 skip shelf in relatedSupport %!s(int64=6) %!d(string=hai) anos
  xuchaolang 0ee63c8bde set dateDesc,openTime,closeTime %!s(int64=6) %!d(string=hai) anos
  xuchaolang 1cf7041a5d fix /training/{id} request map bug %!s(int64=6) %!d(string=hai) anos
  xuchaolang a5feaf286d change service api /app/training/{id} to /training/{id} %!s(int64=6) %!d(string=hai) anos
  xuchaolang d55840f63b TrainingController add log %!s(int64=6) %!d(string=hai) anos
  xuchaolang 150e531e17 check productid is null in findByIds %!s(int64=6) %!d(string=hai) anos
  xuchaolang c01366a887 fix training update %!s(int64=6) %!d(string=hai) anos
  xuchaolang 926e20469b return Training type in ProductService %!s(int64=6) %!d(string=hai) anos
  xuchaolang c35e78559c training.get only return training entity %!s(int64=6) %!d(string=hai) anos
  xuchaolang ba6772a241 add traing cms api %!s(int64=6) %!d(string=hai) anos
  xuchaolang 2a2b0f02ff add traing cms api %!s(int64=6) %!d(string=hai) anos
  xuchaolang 0839854e30 加入/training/<id>接口 %!s(int64=6) %!d(string=hai) anos
  xuchaolang 1c593901be add course title to course/lesson %!s(int64=6) %!d(string=hai) anos
  huodongdong 8fb41e9d7e fix %!s(int64=6) %!d(string=hai) anos
  huodongdong 33dfe9086d fix white user search %!s(int64=6) %!d(string=hai) anos
  huodongdong 12ee9bd962 fix white user search request body %!s(int64=6) %!d(string=hai) anos
  huodongdong 46bb611eac fix %!s(int64=6) %!d(string=hai) anos
  huodongdong a7c33c52fe fix feign pathvariable error %!s(int64=6) %!d(string=hai) anos
  huodongdong 7450e47d4f fix %!s(int64=6) %!d(string=hai) anos
  huodongdong c9ecf201a9 add merchantId of white user %!s(int64=6) %!d(string=hai) anos
  huodongdong 8bb7d1122a add merchant name of white user %!s(int64=6) %!d(string=hai) anos
  huodongdong 50a2dd42d0 add api binder cms white user %!s(int64=6) %!d(string=hai) anos
  huodongdong ac39c034af add white user model %!s(int64=6) %!d(string=hai) anos
  huodongdong 2798495bf0 add white user table %!s(int64=6) %!d(string=hai) anos
  huodongdong e03a581e5a fix %!s(int64=6) %!d(string=hai) anos
  huodongdong de4cb52101 cms log level %!s(int64=6) %!d(string=hai) anos
  huodongdong 445c3c5ae5 cms delete redis app login data %!s(int64=6) %!d(string=hai) anos
  huodongdong 83fe73e0b3 add cms unbind device %!s(int64=6) %!d(string=hai) anos
  huodongdong db8ea62107 fix tag product sort bug %!s(int64=6) %!d(string=hai) anos
  huodongdong aeee85f461 add timeout session %!s(int64=6) %!d(string=hai) anos
  huodongdong 973392ebf0 fix %!s(int64=6) %!d(string=hai) anos
  huodongdong 6757e24f70 remove session %!s(int64=6) %!d(string=hai) anos
  huodongdong 938ebbaf0c fix lesson search %!s(int64=6) %!d(string=hai) anos
  huodongdong f37e9b6eb4 fix lesson empty exception %!s(int64=6) %!d(string=hai) anos
  huodongdong c635cbc670 add log %!s(int64=6) %!d(string=hai) anos
  huodongdong 9edd40418a fix %!s(int64=6) %!d(string=hai) anos
  huodongdong 9637fee49d fix group code %!s(int64=6) %!d(string=hai) anos
  huodongdong 27c762f9a1 add field of merchant simple %!s(int64=6) %!d(string=hai) anos
  huodongdong 473394bd12 fix %!s(int64=6) %!d(string=hai) anos
  huodongdong 9e1fe10b8f fix video url error %!s(int64=6) %!d(string=hai) anos
  huodongdong 190f0e601b fix bing terminal field null and log error %!s(int64=6) %!d(string=hai) anos
  huodongdong c27e8c256a add web login force %!s(int64=6) %!d(string=hai) anos
  huodongdong 73c7c88a25 fix terminal name %!s(int64=6) %!d(string=hai) anos
  huodongdong 19d3c3e4f7 modifiy terminal name to campusName + terminalName %!s(int64=6) %!d(string=hai) anos
  huodongdong fb221ea346 fix campus name remove - %!s(int64=6) %!d(string=hai) anos
  huodongdong c561799f73 fix %!s(int64=6) %!d(string=hai) anos
  huodongdong e9f308a413 fix %!s(int64=6) %!d(string=hai) anos
  huodongdong 5bc08795d5 fix %!s(int64=6) %!d(string=hai) anos
  huodongdong 69fe592df2 fix %!s(int64=6) %!d(string=hai) anos
  huodongdong 74f882a885 完成pushmsg push %!s(int64=6) %!d(string=hai) anos
  huodongdong 9585210305 complete app api %!s(int64=6) %!d(string=hai) anos
  huodongdong ed9f6583d9 fix device_code null %!s(int64=6) %!d(string=hai) anos
  huodongdong 8b7fc151e6 refresh token not signature %!s(int64=6) %!d(string=hai) anos
  huodongdong 53d28c7191 fix api recommend %!s(int64=6) %!d(string=hai) anos
  huodongdong 1c36c05943 fix recommend %!s(int64=6) %!d(string=hai) anos
  huodongdong 9bca91cc2a add refresh token %!s(int64=6) %!d(string=hai) anos
  huodongdong 05927ed824 remove test intercepter, same the terminal user id %!s(int64=6) %!d(string=hai) anos
  huodongdong b96f1f4298 fix %!s(int64=6) %!d(string=hai) anos
  huodongdong 5913d3072d valid login %!s(int64=6) %!d(string=hai) anos
  huodongdong 9c3aaf41f5 fix %!s(int64=6) %!d(string=hai) anos
  huodongdong b300458a22 fix %!s(int64=6) %!d(string=hai) anos
  huodongdong 5a764d1100 fix %!s(int64=6) %!d(string=hai) anos
  huodongdong c817e33b16 add status terminal user filter search %!s(int64=6) %!d(string=hai) anos
  huodongdong 4c5881db37 add product merchantId when search %!s(int64=6) %!d(string=hai) anos
  huodongdong ca84c38189 add tag sort %!s(int64=6) %!d(string=hai) anos
  huodongdong f813b6b318 deploy %!s(int64=6) %!d(string=hai) anos
  huodongdong cfbbf4c3c8 fix header and option request bug %!s(int64=6) %!d(string=hai) anos
  huodongdong 61522ff50e fix %!s(int64=6) %!d(string=hai) anos
  huodongdong 1f54a29d64 fix receive %!s(int64=6) %!d(string=hai) anos
  huodongdong 0a7d232e36 web api stash and fix charge %!s(int64=6) %!d(string=hai) anos
  huodongdong 8dfc0d3ea3 fix %!s(int64=6) %!d(string=hai) anos
  huodongdong b1908c474c add code and name order goods %!s(int64=6) %!d(string=hai) anos
  huodongdong 4f2560e16a order detail api %!s(int64=6) %!d(string=hai) anos
  huodongdong 1cd5f51282 fix transactional %!s(int64=6) %!d(string=hai) anos
  huodongdong 74b94275b4 add charge %!s(int64=6) %!d(string=hai) anos
  huodongdong a71b1653d0 add charge api %!s(int64=6) %!d(string=hai) anos
  huodongdong 9f8ce28658 fix MySQL5DialectUTF8 %!s(int64=6) %!d(string=hai) anos
  huodongdong 29fbd94fa5 fix create table utf8 %!s(int64=6) %!d(string=hai) anos
  huodongdong 23569b09dd fix %!s(int64=6) %!d(string=hai) anos
  huodongdong 2e49f4d8bd fix %!s(int64=6) %!d(string=hai) anos
  huodongdong 42bb7557bd modified yml config %!s(int64=6) %!d(string=hai) anos
  huodongdong 54ebcd3e0c fix %!s(int64=6) %!d(string=hai) anos
  huodongdong 43b3b23379 add merchantPrice of pakcageProductVo %!s(int64=6) %!d(string=hai) anos
  huodongdong af3de4ab65 add merchant price of product in package %!s(int64=6) %!d(string=hai) anos
  huodongdong c73ae0883f add category of courseware %!s(int64=6) %!d(string=hai) anos
  huodongdong e3bc647fdb fix %!s(int64=6) %!d(string=hai) anos
  huodongdong 504b10c476 config test %!s(int64=6) %!d(string=hai) anos
  huodongdong 4ddca8254e profile act %!s(int64=6) %!d(string=hai) anos
  huodongdong cc65c80444 test %!s(int64=6) %!d(string=hai) anos
  huodongdong 7ed2337ea0 add sub title %!s(int64=6) %!d(string=hai) anos
  huodongdong c36277375e modified cancel order api %!s(int64=6) %!d(string=hai) anos
  huodongdong 08bd31ccdf order search to post feign %!s(int64=6) %!d(string=hai) anos
  huodongdong c2cabfc0ac add goods type auto %!s(int64=6) %!d(string=hai) anos
  huodongdong 6b8d5122d3 same order status and order detail status %!s(int64=6) %!d(string=hai) anos
  huodongdong 75c5cd1338 fix %!s(int64=7) %!d(string=hai) anos
  huodongdong 4ef6d6bb47 add terminal user address %!s(int64=7) %!d(string=hai) anos
  huodongdong aa34b15a14 add merchant product list package info %!s(int64=7) %!d(string=hai) anos
  huodongdong 049d6eb4c8 add oderdetail and snapshot search api %!s(int64=7) %!d(string=hai) anos
  huodongdong d6aef08774 fix log %!s(int64=7) %!d(string=hai) anos
  huodongdong 30ccda2563 complete task %!s(int64=7) %!d(string=hai) anos
  huodongdong 4a50d6038c size %!s(int64=7) %!d(string=hai) anos
  huodongdong db4847d06a fix name %!s(int64=7) %!d(string=hai) anos
  huodongdong aa15ceede3 fix %!s(int64=7) %!d(string=hai) anos
  huodongdong b28be55f44 add status of goods package when put on sale %!s(int64=7) %!d(string=hai) anos
  huodongdong d20807fba1 fix %!s(int64=7) %!d(string=hai) anos
  huodongdong 072ea17be3 add sort when put on sale product %!s(int64=7) %!d(string=hai) anos
  huodongdong 21aa6d4df2 add cms merchantProduct %!s(int64=7) %!d(string=hai) anos
  huodongdong 466c98dfe4 add package update and on sale goods relation add and update %!s(int64=7) %!d(string=hai) anos
  huodongdong fc7f9598dd fix lesson api cms %!s(int64=7) %!d(string=hai) anos
  huodongdong bd88622c1f fix %!s(int64=7) %!d(string=hai) anos
  huodongdong 503a8f4481 fix lesson warelist %!s(int64=7) %!d(string=hai) anos
  huodongdong 3c50ba20cd add tag and group info %!s(int64=7) %!d(string=hai) anos
  huodongdong ea7d4da2c7 no %!s(int64=7) %!d(string=hai) anos
  huodongdong 72c1434dc3 @Modifying remove clearAutomatically=true %!s(int64=7) %!d(string=hai) anos
  huodongdong 72ae842ea9 add status product create %!s(int64=7) %!d(string=hai) anos
  huodongdong f99e29af74 fix %!s(int64=7) %!d(string=hai) anos
  huodongdong 47afdb4c32 product search string format error %!s(int64=7) %!d(string=hai) anos
  huodongdong 6b421cec99 fix support %!s(int64=7) %!d(string=hai) anos
  huodongdong 446296f16f fix ware data structure %!s(int64=7) %!d(string=hai) anos
  huodongdong 187f7f622b 订单分拆初版 %!s(int64=7) %!d(string=hai) anos
  huodongdong ac7e27719b modified table name and createtime %!s(int64=7) %!d(string=hai) anos
  huodongdong 97e636322c api web test remove token check %!s(int64=7) %!d(string=hai) anos
  huodongdong 012209cc64 fix resource name %!s(int64=7) %!d(string=hai) anos
  huodongdong 723cceb4bb fix %!s(int64=7) %!d(string=hai) anos
  huodongdong 3214cf4a72 fix pom config %!s(int64=7) %!d(string=hai) anos
  huodongdong 76798122fa fix pom config %!s(int64=7) %!d(string=hai) anos
  huodongdong 7f082bf582 fix pom build config %!s(int64=7) %!d(string=hai) anos
  huodongdong 120f9de598 tmp %!s(int64=7) %!d(string=hai) anos
  huodongdong 1fe47abcc0 complete pay ok %!s(int64=7) %!d(string=hai) anos
  huodongdong 2bd43244b7 save %!s(int64=7) %!d(string=hai) anos
  huodongdong 857b5bb181 add package %!s(int64=7) %!d(string=hai) anos
  huodongdong 3b6e896596 complete product and goods recoding %!s(int64=7) %!d(string=hai) anos
  huodongdong 225693bfc7 product idea period 1 %!s(int64=7) %!d(string=hai) anos
  huodongdong f15b6dbe00 stash %!s(int64=7) %!d(string=hai) anos
  huodongdong bbb144a1c9 campus and termianl user complete %!s(int64=7) %!d(string=hai) anos
  huodongdong 2ddd9d23e8 add cms web %!s(int64=7) %!d(string=hai) anos
  huodongdong 31ca7939f3 tag %!s(int64=7) %!d(string=hai) anos
  huodongdong 98f4431dcf version 1.0 dev %!s(int64=7) %!d(string=hai) anos
  huodongdong 1d57b2f9f0 shit commit and reset %!s(int64=7) %!d(string=hai) anos
  huodongdong 34a6cad675 nothing %!s(int64=7) %!d(string=hai) anos
  huodongdong d69395e6a7 version 1.1: id string and relation; hibernate relation %!s(int64=7) %!d(string=hai) anos
  huodongdong e428f275b5 resource service complete %!s(int64=7) %!d(string=hai) anos
  huodongdong 2f57ba34a8 first version %!s(int64=7) %!d(string=hai) anos
  huodongdong 05dfbac277 fix %!s(int64=7) %!d(string=hai) anos
  huodongdong bdc9fa3299 rename %!s(int64=7) %!d(string=hai) anos
  huodongdong 08fb34581d add ignore %!s(int64=7) %!d(string=hai) anos
  huodongdong dd01ec7ace first framework %!s(int64=7) %!d(string=hai) anos
Modificáronse 21 ficheiros con 631 adicións e 36 borrados
  1. 4 0
      rankin-api-web/src/main/java/cn/rankin/apiweb/service/resource/ResourceService.java
  2. 31 0
      rankin-cms-web/src/main/java/cn/rankin/cmsweb/controller/resource/ResourceController.java
  3. 30 0
      rankin-cms-web/src/main/java/cn/rankin/cmsweb/controller/user/UserTagController.java
  4. 3 0
      rankin-cms-web/src/main/java/cn/rankin/cmsweb/service/product/TagService.java
  5. 3 0
      rankin-cms-web/src/main/java/cn/rankin/cmsweb/service/product/proxy/WareServiceProxy.java
  6. 12 0
      rankin-cms-web/src/main/java/cn/rankin/cmsweb/service/resource/ResourceService.java
  7. 2 0
      rankin-common-utils/src/main/java/cn/rankin/common/utils/constant/ResourceType.java
  8. 38 0
      rankin-common-utils/src/main/java/cn/rankin/common/utils/vo/resource/Resource.java
  9. 4 0
      rankin-common-utils/src/main/java/cn/rankin/common/utils/vo/resource/ResourceVo.java
  10. 6 0
      rankin-data-api/src/main/java/cn/rankin/data/api/app/vo/ResourceItemVo.java
  11. 56 0
      rankin-data-api/src/main/java/cn/rankin/data/api/resource/dto/AudioImgDTO.java
  12. 51 0
      rankin-data-api/src/main/java/cn/rankin/data/api/resource/entity/AudioImg.java
  13. 6 0
      rankin-data-api/src/main/java/cn/rankin/data/api/resource/entity/Resource.java
  14. 5 6
      rankin-product-service/src/main/java/cn/rankin/productservice/controller/app/ItemControllerV0.java
  15. 5 0
      rankin-product-service/src/main/java/cn/rankin/productservice/controller/cms/TagController.java
  16. 9 0
      rankin-product-service/src/main/java/cn/rankin/productservice/service/TagService.java
  17. 173 1
      rankin-resource-service/src/main/java/cn/rankin/resourceservice/controller/ResourceController.java
  18. 1 1
      rankin-resource-service/src/main/java/cn/rankin/resourceservice/dto/ResourceRemote.java
  19. 20 0
      rankin-resource-service/src/main/java/cn/rankin/resourceservice/repository/AudioImgRepository.java
  20. 77 0
      rankin-resource-service/src/main/java/cn/rankin/resourceservice/service/AudioImgService.java
  21. 95 28
      rankin-resource-service/src/main/java/cn/rankin/resourceservice/service/ResourceService.java

+ 4 - 0
rankin-api-web/src/main/java/cn/rankin/apiweb/service/resource/ResourceService.java

@@ -80,6 +80,10 @@ public class ResourceService {
                     resourceItemVo.setType(resourceType);
                     if (resourceType.equals(ResourceType.VIDEO)) {
                         type = ResourceType.VIDEO;
+                    }else if (resourceType.equals(ResourceType.AUDIO_IMG)) {
+                        type = ResourceType.AUDIO_IMG;
+                        resourceItemVo.setImg(resourceVo.getImg());
+                        resourceItemVo.setAudio(resourceVo.getAudio());
                     }
                     resourceVoList.add(resourceItemVo);
                 }

+ 31 - 0
rankin-cms-web/src/main/java/cn/rankin/cmsweb/controller/resource/ResourceController.java

@@ -8,6 +8,8 @@ import cn.rankin.common.utils.dto.resource.ResourceDTO;
 import cn.rankin.common.utils.dto.resource.ResourceSearchDTO;
 import cn.rankin.common.utils.util.BeanUtil;
 import cn.rankin.common.utils.vo.resource.ResourceVo;
+import cn.rankin.data.api.resource.dto.AudioImgDTO;
+import cn.rankin.data.api.resource.entity.AudioImg;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.RequestBody;
@@ -42,4 +44,33 @@ public class ResourceController {
         }
         return resourceService.update(id,resourceDTO);
     }
+
+
+    //创建有声读物
+    @RequestMapping(value="/audioImg",method = RequestMethod.POST)
+    public APIResult<AudioImg> createAudioImg(@RequestBody AudioImgDTO dto) {
+        AudioImg audioImg = resourceService.createAudioImg(dto);
+        if(null == audioImg){
+            return APIResult.error(CmsWebAPICode.PARAMETER_ERROR);
+        }else{
+            return APIResult.ok(audioImg);
+        }
+    }
+
+    //修改有声读物
+    @RequestMapping(value="/audioImg",method = RequestMethod.PUT)
+    public APIResult<AudioImg> updateAudioImg(@RequestBody AudioImgDTO dto) {
+        String id = dto.getId();
+        if (null == id || id.isEmpty()){
+            log.error("id Is Null");
+            return APIResult.error(CmsWebAPICode.PARAMETER_ERROR);
+        }
+
+        AudioImg audioImg = resourceService.updateAudioImg(dto);
+        if(null == audioImg){
+            return APIResult.error(CmsWebAPICode.PARAMETER_ERROR);
+        }else{
+            return APIResult.ok(audioImg);
+        }
+    }
 }

+ 30 - 0
rankin-cms-web/src/main/java/cn/rankin/cmsweb/controller/user/UserTagController.java

@@ -3,6 +3,7 @@ package cn.rankin.cmsweb.controller.user;
 import cn.rankin.cmsweb.assist.resolver.NeedUser;
 import cn.rankin.cmsweb.entity.UserDetails;
 import cn.rankin.cmsweb.service.product.MerchantProductService;
+import cn.rankin.cmsweb.service.product.TagService;
 import cn.rankin.cmsweb.service.user.UserTagProductRelationServiceInterface;
 import cn.rankin.cmsweb.service.user.UserTagServiceInterface;
 import cn.rankin.common.utils.api.model.APICode;
@@ -10,6 +11,7 @@ import cn.rankin.common.utils.api.model.APIResult;
 import cn.rankin.common.utils.api.page.Page;
 import cn.rankin.common.utils.util.BeanUtil;
 import cn.rankin.data.api.product.entity.MerchantProduct;
+import cn.rankin.data.api.product.vo.TagVo;
 import cn.rankin.data.api.user.dto.UserTagDTO;
 import cn.rankin.data.api.user.dto.UserTagSearchDTO;
 import cn.rankin.data.api.user.entity.UserTag;
@@ -29,6 +31,9 @@ import java.util.List;
 public class UserTagController {
 
     @Autowired
+    private TagService tagService;
+
+    @Autowired
     private UserTagServiceInterface userTagService;
 
     @Autowired
@@ -114,4 +119,29 @@ public class UserTagController {
             return APIResult.error(APICode.OPERATE_ERROR);
         }
     }
+
+    @RequestMapping(value = "/copy" , method = RequestMethod.GET)
+    public APIResult<UserTag> copyTag(@RequestParam("userTagId") String userTagId,@RequestParam("tagId") String tagId) {
+        TagVo tagVo = tagService.getTagInfo(tagId);
+        if(null == tagVo){
+            log.error("{copyTag} not found Tag by id, id={}", tagId);
+            return APIResult.error(APICode.NOT_EXISTS);
+        }
+        List<MerchantProduct> productList = tagVo.getProductList();
+        List<String> productIdList = new ArrayList<>();
+
+        productList.forEach(product -> productIdList.add(product.getPid()));
+
+        UserTagDTO dto =new UserTagDTO();
+        dto.setId(userTagId);
+        dto.setProductList(productIdList);
+
+        UserTag userTag = userTagService.update(dto);
+        if (userTag != null) {
+            log.error("{copyTag}  update UserTag is error, id={}", dto.getId());
+            return APIResult.ok(userTag);
+        }else{
+            return APIResult.error(APICode.NOT_EXISTS);
+        }
+    }
 }

+ 3 - 0
rankin-cms-web/src/main/java/cn/rankin/cmsweb/service/product/TagService.java

@@ -26,4 +26,7 @@ public interface TagService {
 
     @RequestMapping(value = "/tag/{id}", method = RequestMethod.GET)
     APIResult<TagVo> getTag(@PathVariable("id") String id);
+
+    @RequestMapping(value = "/tag/v2/{id}", method = RequestMethod.GET)
+    TagVo getTagInfo(@PathVariable("id") String id);
 }

+ 3 - 0
rankin-cms-web/src/main/java/cn/rankin/cmsweb/service/product/proxy/WareServiceProxy.java

@@ -156,9 +156,12 @@ public class WareServiceProxy {
             if (resourceVo != null) {
                 resourceVoList.add(resourceVo);
             }
+
         }
+
         courseWareVo.setResourceList(resourceVoList);
 
         return courseWareVo;
     }
+
 }

+ 12 - 0
rankin-cms-web/src/main/java/cn/rankin/cmsweb/service/resource/ResourceService.java

@@ -4,6 +4,8 @@ import cn.rankin.common.utils.api.model.APIResult;
 import cn.rankin.common.utils.api.page.Page;
 import cn.rankin.common.utils.dto.resource.ResourceDTO;
 import cn.rankin.common.utils.vo.resource.ResourceVo;
+import cn.rankin.data.api.resource.dto.AudioImgDTO;
+import cn.rankin.data.api.resource.entity.AudioImg;
 import cn.rankin.data.api.resource.vo.OSSSignature;
 import org.springframework.cloud.netflix.feign.FeignClient;
 import org.springframework.web.bind.annotation.*;
@@ -28,5 +30,15 @@ public interface ResourceService {
 
     @RequestMapping(value = "/resource/{id}", method = RequestMethod.PUT)
     APIResult<ResourceVo> update(@PathVariable("id") String id, @RequestBody ResourceDTO resourceDTO);
+
+    //有声读物
+    @RequestMapping(value = "/resource/audioImg", method = RequestMethod.POST)
+    AudioImg createAudioImg(@RequestBody AudioImgDTO dto);
+
+    @RequestMapping(value = "/resource/audioImg", method = RequestMethod.PUT)
+    AudioImg updateAudioImg(@RequestBody AudioImgDTO dto);
+
+    @RequestMapping(value = "/resource/audioImg/batch", method = RequestMethod.GET)
+    Map<String, ResourceVo> getAudioImgBatch(@RequestParam("ids") List<String> ids);
 }
 

+ 2 - 0
rankin-common-utils/src/main/java/cn/rankin/common/utils/constant/ResourceType.java

@@ -9,4 +9,6 @@ public class ResourceType {
     public final static int LIVE = 2;
 
     public final static int IMG = 3;
+
+    public final static int AUDIO_IMG = 4;
 }

+ 38 - 0
rankin-common-utils/src/main/java/cn/rankin/common/utils/vo/resource/Resource.java

@@ -0,0 +1,38 @@
+package cn.rankin.common.utils.vo.resource;
+
+import cn.rankin.common.utils.enums.BaseStatusEnum;
+import lombok.Data;
+import lombok.ToString;
+
+import java.io.Serializable;
+import java.util.Date;
+
+@Data
+@ToString
+public class Resource implements Serializable {
+
+    private String id;
+
+    private String code;
+
+    private String name;
+
+    private Integer type;
+
+    private String format;
+
+    private String quality;
+
+    private Long size;
+
+    private String path;
+
+    private BaseStatusEnum status;
+
+    private Date gmtCreated;
+
+    private Date gmtModified;
+
+    private String url;
+
+}

+ 4 - 0
rankin-common-utils/src/main/java/cn/rankin/common/utils/vo/resource/ResourceVo.java

@@ -35,4 +35,8 @@ public class ResourceVo implements Serializable {
 
     private String url;
 
+    private Resource img;
+
+    private Resource audio;
+
 }

+ 6 - 0
rankin-data-api/src/main/java/cn/rankin/data/api/app/vo/ResourceItemVo.java

@@ -1,5 +1,6 @@
 package cn.rankin.data.api.app.vo;
 
+import cn.rankin.common.utils.vo.resource.Resource;
 import lombok.Data;
 import lombok.ToString;
 
@@ -14,4 +15,9 @@ public class ResourceItemVo implements Serializable {
     private Integer type;
 
     private String url;
+
+    private Resource img;
+
+    private Resource audio;
+
 }

+ 56 - 0
rankin-data-api/src/main/java/cn/rankin/data/api/resource/dto/AudioImgDTO.java

@@ -0,0 +1,56 @@
+package cn.rankin.data.api.resource.dto;
+
+import cn.rankin.common.utils.enums.BaseStatusEnum;
+import cn.rankin.data.api.resource.entity.Resource;
+import lombok.Data;
+import lombok.ToString;
+import org.hibernate.annotations.DynamicInsert;
+import org.hibernate.annotations.DynamicUpdate;
+
+import javax.persistence.*;
+import java.io.Serializable;
+import java.util.Date;
+
+@Data
+@ToString
+public class AudioImgDTO implements Serializable {
+
+    private String id;
+
+    private String code;
+
+    private String name;
+
+    private Integer type;       //type,{4}, 表示{有声读物}
+
+    private BaseStatusEnum status;
+
+    private Resource img;
+
+    private String imgPath;
+
+    private String imgFormat;
+
+    private String imgQuality;
+
+    private Long imgSize;
+
+    private String imgUrl;
+
+
+    private Resource audio;
+
+    private String audioPath;
+
+    private String audioFormat;
+
+    private String audioQuality;
+
+    private Long audioSize;
+
+    private String audioUrl;
+
+
+
+
+}

+ 51 - 0
rankin-data-api/src/main/java/cn/rankin/data/api/resource/entity/AudioImg.java

@@ -0,0 +1,51 @@
+package cn.rankin.data.api.resource.entity;
+
+import cn.rankin.common.utils.enums.BaseStatusEnum;
+import lombok.Data;
+import lombok.ToString;
+import org.hibernate.annotations.DynamicInsert;
+import org.hibernate.annotations.DynamicUpdate;
+
+import javax.persistence.*;
+import java.io.Serializable;
+import java.util.Date;
+
+@Data
+@ToString
+@Entity
+@Table(name = "r_audio_img")
+@DynamicInsert
+@DynamicUpdate
+public class AudioImg implements Serializable {
+
+    @Id
+    private String id;
+
+    @Column
+    private String code;
+
+    @Column
+    private String name;
+
+    @Column
+    private Integer type;       //type,{4}, 表示{有声读物}
+
+    @Column(name = "img_id")
+    private String imgId;
+
+    @Column(name = "audio_id")
+    private String audioId;
+
+    @Column
+    @Enumerated(EnumType.ORDINAL)
+    private BaseStatusEnum status;
+
+    @Column(name = "gmt_created", updatable = false, insertable = false, columnDefinition = "timestamp NULL DEFAULT CURRENT_TIMESTAMP")
+    @Temporal(TemporalType.TIMESTAMP)
+    private Date gmtCreated;
+
+    @Column(name = "gmt_modified", updatable = false, insertable = false, columnDefinition = "timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP")
+    @Temporal(TemporalType.TIMESTAMP)
+    private Date gmtModified;
+
+}

+ 6 - 0
rankin-data-api/src/main/java/cn/rankin/data/api/resource/entity/Resource.java

@@ -58,4 +58,10 @@ public class Resource implements Serializable {
 
     @Transient
     private String url;
+
+    @Transient
+    private Resource img;
+
+    @Transient
+    private Resource audio;
 }

+ 5 - 6
rankin-product-service/src/main/java/cn/rankin/productservice/controller/app/ItemControllerV0.java

@@ -10,6 +10,11 @@ import org.springframework.web.bind.annotation.*;
 
 import java.util.List;
 
+/**
+ * 已弃用,
+ *
+ * 以 cn.rankin.productservice.controller.ItemController 替代
+ */
 @RestController
 @RequestMapping(value = "/v0/app/item")
 public class ItemControllerV0 {
@@ -33,10 +38,4 @@ public class ItemControllerV0 {
         return itemService.findPageByTagIdAndPids(merchantId, tagId, productIdList, pageNo, pageSize);
     }
 
-    @RequestMapping(value = "/pids", method = RequestMethod.POST)
-    public List<ItemVo> findItemByPids(@RequestBody List<String> productIdList, @RequestParam("merchantId") String merchantId) {
-        List<ItemVo> itemVoList = itemService.findByIds(merchantId,productIdList);
-        return itemVoList;
-    }
-
 }

+ 5 - 0
rankin-product-service/src/main/java/cn/rankin/productservice/controller/cms/TagController.java

@@ -57,4 +57,9 @@ public class TagController {
         return tagService.delete(tagId);
     }
 
+    @RequestMapping(value = "/v2/{tagId}", method = RequestMethod.GET)
+    public Tag getTagInfo(@PathVariable("tagId") String tagId) {
+        return tagService.getTagInfo(tagId);
+    }
+
 }

+ 9 - 0
rankin-product-service/src/main/java/cn/rankin/productservice/service/TagService.java

@@ -217,4 +217,13 @@ public class TagService {
             tag.setSort(index);
         }
     }
+
+    public Tag getTagInfo(String tagId) {
+        Tag tag = tagRepository.find(tagId);
+        String merchantId = tag.getMerchantId();
+
+        List<MerchantProduct> merchantProductList = getMerchantProductList(tagId, merchantId);
+        tag.setProductList(merchantProductList);
+        return tag;
+    }
 }

+ 173 - 1
rankin-resource-service/src/main/java/cn/rankin/resourceservice/controller/ResourceController.java

@@ -5,14 +5,21 @@ import cn.rankin.common.utils.api.model.APIResult;
 import cn.rankin.common.utils.api.page.Page;
 import cn.rankin.common.utils.constant.ResourceType;
 import cn.rankin.common.utils.dto.resource.ResourceSearchDTO;
+import cn.rankin.common.utils.util.DateUtil;
+import cn.rankin.data.api.resource.dto.AudioImgDTO;
+import cn.rankin.data.api.resource.entity.AudioImg;
 import cn.rankin.data.api.resource.entity.Resource;
+import cn.rankin.resourceservice.service.AudioImgService;
 import cn.rankin.resourceservice.service.ResourceService;
 import com.alibaba.fastjson.JSON;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.util.CollectionUtils;
 import org.springframework.web.bind.annotation.*;
 
+import java.util.ArrayList;
+import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
@@ -24,6 +31,9 @@ public class ResourceController {
     @Autowired
     private ResourceService resourceService;
 
+    @Autowired
+    private AudioImgService audioImgService;
+
     public static String HTTP_VIDEO_DOMAIN = "http://efunvideo.ai160.com";
     public static String LJ_VIDEO_DOMAIN = "http://ljvideo.ai160.com";
 
@@ -39,10 +49,11 @@ public class ResourceController {
         }
 
         Integer type = resourceSearchDTO.getType();
-        if (type.intValue() == ResourceType.IMG) {
+        if (type.intValue() == ResourceType.IMG || type.intValue() == ResourceType.AUDIO) {
             // 图片本地取
             Resource resource = new Resource();
 
+            resource.setType(type);
             String code = resourceSearchDTO.getCode();
             if (!StringUtils.isEmpty(code)) {
                 resource.setCode("%" + code.trim() + "%");
@@ -53,6 +64,41 @@ public class ResourceController {
                 resource.setName("%" + name.trim() + "%");
             }
             return resourceService.search(resource, resourceSearchDTO.getPageNo(), resourceSearchDTO.getPageSize());
+        }else if(type.intValue() == ResourceType.AUDIO_IMG){
+            // 本地取
+            AudioImg audioImg = new AudioImg();
+
+            String code = resourceSearchDTO.getCode();
+            if (!StringUtils.isEmpty(code)) {
+                audioImg.setCode("%" + code.trim() + "%");
+            }
+
+            String name = resourceSearchDTO.getName();
+            if (!StringUtils.isEmpty(name)) {
+                audioImg.setName("%" + name.trim() + "%");
+            }
+            Page<AudioImg> audioImgPage = audioImgService.search(audioImg, resourceSearchDTO.getPageNo(), resourceSearchDTO.getPageSize());
+
+            //创建一个默认为0
+            Page<Resource> page = new Page(0L, resourceSearchDTO.getPageNo(), resourceSearchDTO.getPageSize());
+
+            if(audioImgPage.getPageSize() > 0 ){
+                List<AudioImg> audioImgList = audioImgPage.getList();
+
+                if(!CollectionUtils.isEmpty(audioImgList)){
+                    List<Resource> resourceList = new ArrayList<>();
+                    page.setTotalSize(audioImgList.size());
+
+                    //有声读物   转  资源
+                    audioImgList.forEach(ai -> {
+                        Resource resource = resourceService.audioImgToResource(ai);
+                        resourceList.add(resource);
+                    });
+                    page.setList(resourceList);
+                }
+            }
+            return APIResult.ok(page);
+
         }else {
             // 其他去云平台
             if (resourceSearchDTO.getCode() != null) {
@@ -63,6 +109,8 @@ public class ResourceController {
         }
     }
 
+
+
     @RequestMapping(method = RequestMethod.POST)
     public APIResult<Resource> create(@RequestBody Resource resource) {
 
@@ -102,4 +150,128 @@ public class ResourceController {
 
         return APIResult.ok();
     }
+
+    /* ------------ 有声读物  audioImg    ---------------------start---------------------------------*/
+    @RequestMapping(value = "/audioImg/batch", method = RequestMethod.GET)
+    public Map<String, Resource> getAudioImgBatch(@RequestParam("ids") List<String> ids) {
+        Map<String, Resource> audioImgMap= new HashMap<>();
+        List<AudioImg> audioImgs = audioImgService.findMixByIds(ids);
+        if(CollectionUtils.isEmpty(audioImgs)){
+            return audioImgMap;
+        }
+
+        audioImgs.forEach(ai -> {
+            Resource resource = resourceService.audioImgToResource(ai);
+            audioImgMap.put(ai.getId(),resource);
+
+        });
+
+        return audioImgMap;
+    }
+
+    @RequestMapping(value="/audioImg",method = RequestMethod.POST)
+    public AudioImg createAudioImg(@RequestBody AudioImgDTO dto) {
+        if (audioImgService.exists(dto.getCode())) {
+            log.error("audioImg code Is exist");
+            return null;
+        }
+
+        Resource a = dto.getAudio();
+        Resource i = dto.getImg();
+
+        //设置code  name
+        setCodeName(a, dto);
+        setCodeName(i, dto);
+
+        Resource img = saveOrUpdateResource(i);
+        Resource audio = saveOrUpdateResource(a);
+
+        if(null != audio && null != img){
+            AudioImg ai = new AudioImg();
+            ai.setStatus(dto.getStatus());
+            ai.setName(dto.getName());
+            ai.setCode(dto.getCode());
+            ai.setType(ResourceType.AUDIO_IMG);
+
+            //audio  info
+            ai.setAudioId(audio.getId());
+
+            //img  info
+            ai.setImgId(img.getId());
+
+            AudioImg audioImg = audioImgService.save(ai);
+
+            return audioImg;
+        }else{
+            log.error("create AudioImg is error,audio={},img={}",audio, img);
+            return null;
+        }
+    }
+
+    @RequestMapping(value="/audioImg",method = RequestMethod.PUT)
+    public AudioImg updateAudioImg(@RequestBody AudioImgDTO dto) {
+        if(StringUtils.isBlank(dto.getCode())){
+            return null;
+        }
+        Resource a = dto.getAudio();
+        Resource i = dto.getImg();
+        setCodeName(a, dto);
+        setCodeName(i, dto);
+
+        Resource img = saveOrUpdateResource(i);
+        Resource audio = saveOrUpdateResource(a);
+
+        if(null != audio && null != img){
+            AudioImg ai = audioImgService.get(dto.getId());
+            ai.setStatus(dto.getStatus());
+            ai.setName(dto.getName());
+            ai.setCode(dto.getCode());
+
+            //audio  info
+            ai.setAudioId(audio.getId());
+            //img  info
+            ai.setImgId(img.getId());
+
+            AudioImg audioImg = audioImgService.update(ai);
+
+            return audioImg;
+        }else{
+            return null;
+        }
+    }
+
+    private void setCodeName(Resource resource, AudioImgDTO dto) {
+        resource.setCode(dto.getCode()+"_"+ resource.getType() + DateUtil.getTimeStamp());
+        resource.setName(dto.getName()+"_"+ resource.getType() + DateUtil.getTimeStamp());
+    }
+
+    /**
+     * 更新/存储资源
+     * @param resource
+     * @return
+     */
+    private Resource saveOrUpdateResource(Resource resource) {
+
+        if (StringUtils.isEmpty(resource.getCode()) || StringUtils.isEmpty(resource.getPath())) {
+            return null;
+        }
+
+        Resource result = null;
+        if(StringUtils.isBlank(resource.getId())){
+            if (resourceService.exists(resource.getCode())) {
+                log.error("resource code Is exist");
+                return null;
+            }
+            resource.setId(null);
+            //图片,音频类型  存本地
+            result = resourceService.save(resource);
+        }else{
+            //图片,音频类型  存本地
+            result = resourceService.updateResource(resource);
+        }
+
+        return result;
+    }
+
+    /* ------------ 有声读物  audioImg    ---------------------start---------------------------------*/
 }

+ 1 - 1
rankin-resource-service/src/main/java/cn/rankin/resourceservice/dto/ResourceRemote.java

@@ -61,7 +61,7 @@ public class ResourceRemote implements Serializable {
         List<Resource> resourceList = new ArrayList<>();
         videos.forEach(v -> {
             Resource resource = new Resource();
-            resource.setId(v.getRid());
+            resource.setId(v.getId());
             resource.setCode(no);
             resource.setName(title);
             resource.setType(type);

+ 20 - 0
rankin-resource-service/src/main/java/cn/rankin/resourceservice/repository/AudioImgRepository.java

@@ -0,0 +1,20 @@
+package cn.rankin.resourceservice.repository;
+
+import cn.rankin.common.utils.jpa.BasicJpaRepository;
+import cn.rankin.data.api.resource.entity.AudioImg;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+@Repository
+public interface AudioImgRepository extends BasicJpaRepository<AudioImg, String> {
+
+    Long countByCode(String code);
+
+    /**
+     * find resource by code
+      * @param code
+     * @return
+     */
+    List<AudioImg> findByCode(String code);
+}

+ 77 - 0
rankin-resource-service/src/main/java/cn/rankin/resourceservice/service/AudioImgService.java

@@ -0,0 +1,77 @@
+package cn.rankin.resourceservice.service;
+
+import cn.rankin.common.utils.api.model.APIResult;
+import cn.rankin.common.utils.api.page.Page;
+import cn.rankin.common.utils.exception.DuplicateValueException;
+import cn.rankin.common.utils.exception.NotFoundException;
+import cn.rankin.common.utils.exception.UnsupportedOperationException;
+import cn.rankin.data.api.resource.entity.AudioImg;
+import cn.rankin.data.api.resource.entity.Resource;
+import cn.rankin.resourceservice.dto.ResourceDetail;
+import cn.rankin.resourceservice.repository.AudioImgRepository;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.domain.Sort;
+import org.springframework.stereotype.Service;
+
+import java.util.*;
+
+
+@Slf4j
+@Service
+public class AudioImgService {
+
+    @Autowired
+    private AudioImgRepository audioImgRepository;
+
+    public boolean exists(String code) {
+        Long count = audioImgRepository.countByCode(code);
+        return count > 0L;
+    }
+
+    public AudioImg get(String id) {
+        return audioImgRepository.find(id);
+    }
+
+    public AudioImg save(AudioImg audioImg) {
+        return audioImgRepository.save(audioImg);
+    }
+
+    public Page<AudioImg> search(AudioImg ai, Integer pageNo, Integer pageSize) {
+        Long count = audioImgRepository.count(ai);
+        Page<AudioImg> page = new Page(count, pageNo, pageSize);
+
+        if (count == 0) {
+            return page;
+        }
+
+        List<AudioImg> audioImgList = audioImgRepository.find(ai, page.getStart(), pageSize, new Sort(Sort.Direction.DESC, "gmtModified"));
+        page.setList(audioImgList);
+
+        return page;
+    }
+
+    /**
+     *
+      * @param audioImg
+     * @throws DuplicateValueException
+     * @throws NotFoundException
+     */
+    public AudioImg update(AudioImg audioImg) throws DuplicateValueException, NotFoundException, UnsupportedOperationException {
+        if (null == audioImg){
+            log.error("audioImg is null");
+            return null;
+        }
+
+        AudioImg result = audioImgRepository.update(audioImg);
+        return result;
+    }
+
+    public List<AudioImg>  findMixByIds(List<String> ids) {
+
+        // 取本地
+        List<AudioImg> audioImgs = audioImgRepository.findByIds(ids);
+        return audioImgs;
+    }
+}
+

+ 95 - 28
rankin-resource-service/src/main/java/cn/rankin/resourceservice/service/ResourceService.java

@@ -9,11 +9,13 @@ import cn.rankin.common.utils.enums.BaseOrderEnum;
 import cn.rankin.common.utils.exception.DuplicateValueException;
 import cn.rankin.common.utils.exception.NotFoundException;
 import cn.rankin.common.utils.exception.UnsupportedOperationException;
+import cn.rankin.data.api.resource.entity.AudioImg;
 import cn.rankin.data.api.resource.entity.Resource;
 import cn.rankin.resourceservice.dto.ResourceDetail;
 import cn.rankin.resourceservice.dto.ResourceRemote;
 import cn.rankin.resourceservice.dto.ResourceVideo;
 import cn.rankin.resourceservice.proxy.RemoteResourceProxy;
+import cn.rankin.resourceservice.repository.AudioImgRepository;
 import cn.rankin.resourceservice.repository.ResourceRepository;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -30,6 +32,9 @@ import java.util.*;
 public class ResourceService {
 
     @Autowired
+    private AudioImgRepository audioImgRepository;
+
+    @Autowired
     private ResourceRepository resourceRepository;
 
     @Autowired
@@ -38,6 +43,9 @@ public class ResourceService {
     @Value("${resource.img.domain}")
     private String imgDomain;
 
+    @Value("${resource.audio.domain}")
+    private String audioDomain;
+
     @Value("${resource.video.domain}")
     private String videoDomain;
 
@@ -46,6 +54,10 @@ public class ResourceService {
         return count > 0L;
     }
 
+    public Resource get(String id) {
+        return resourceRepository.find(id);
+    }
+
     public Resource save(Resource resource) {
         return resourceRepository.save(resource);
     }
@@ -78,6 +90,19 @@ public class ResourceService {
             resourceMap.put(resource.getId(), resource);
         });
 
+        // 本地基础资源取够了不取了
+        if (nativeResourceList.size() == ids.size() && nativeResourceList.size() > 0) {
+            return APIResult.ok(resourceMap);
+        }
+
+        // 取本地,有声读物资源
+        List<AudioImg> audioImgList = audioImgRepository.findByIds(ids);
+        audioImgList.forEach(ai -> {
+            Resource resource = audioImgToResource(ai);
+            resourceMap.put(resource.getId(), resource);
+        });
+
+
         // 本地取够了不取了
         if (nativeResourceList.size() == ids.size() && nativeResourceList.size() > 0) {
             return APIResult.ok(resourceMap);
@@ -159,6 +184,8 @@ public class ResourceService {
         String path = resource.getPath();
         if (ResourceType.VIDEO == resource.getType()) {
             resource.setUrl(concatUrl(videoDomain, path));
+        }else if (ResourceType.AUDIO == resource.getType()) {
+            resource.setUrl(concatUrl(audioDomain, path));
         }else if (ResourceType.IMG == resource.getType()) {
             resource.setUrl(concatUrl(imgDomain, path).replace(" ", ""));
         }
@@ -183,14 +210,14 @@ public class ResourceService {
      * @throws DuplicateValueException
      * @throws NotFoundException
      */
-    public void update(Resource resource) throws DuplicateValueException, NotFoundException, UnsupportedOperationException {
+    public Resource update(Resource resource) throws DuplicateValueException, NotFoundException, UnsupportedOperationException {
         if (null == resource){
             log.error("Resource is null");
-            return;
+            return null;
         }
 
-        if (ResourceType.IMG == resource.getType()){
-            updateImg(resource);
+        if (ResourceType.IMG == resource.getType() || ResourceType.AUDIO == resource.getType() ){
+            return updateResource(resource);
         }
         else{
             log.error("Not-Supported-Resource-Type, id={}, type={}", resource.getId(), resource.getType());
@@ -237,38 +264,50 @@ public class ResourceService {
     }
 
     /**
-     * saveRemoteResource
-     * type 0 video , 1 audio
+     * update Img,audio
      * @param resource
-     * @return
+     * @throws DuplicateValueException
+     * @throws NotFoundException
      */
-    public APIResult<Resource> saveRemoteResource(Resource resource) {
+    public Resource updateResource(Resource resource) throws DuplicateValueException, NotFoundException {
 
-/*        List<Map<String, Object>> videos = new ArrayList<>();
-        Map<String, Object> video = new HashMap<>();
-        video.put("bucket","efunbox");
-        video.put("path",resource.getPath());
-        video.put("format",resource.getFormat());
-        video.put("quality",resource.getQuality());
-        video.put("size",resource.getSize());
+        if (ResourceType.IMG != resource.getType() && ResourceType.AUDIO!= resource.getType()){
+            log.error("Not-Img/audio -Resource");
+            return null;
+        }
 
-        videos.add(video);
+        //find target resource
+        Resource targetResouce = resourceRepository.find(resource.getId());
 
+        if(null == targetResouce){
+            log.error("Cannot Find Resource, id={}", resource.getId());
+            throw new NotFoundException("Resource-Not-Found");
+        }
 
-        APIResult<ResourceDetail> apiResult = resourceProxy.saveResources(new HashMap<String, Object>(){
-            {
-                this.put("no", resource.getCode());
-                this.put("title", resource.getName());
-                this.put("type", resource.getType());
-                this.put("videos", videos);
+        //only support code,title,path
+        //first, make sure code is not duplicated
+        List<Resource> foundedResource = resourceRepository.findByCode(resource.getCode());
+        foundedResource.forEach( (each) -> {
+            if ( !resource.getId().equals(each.getId()) ){
+                log.error("Code-Already-Exist, code={}", resource.getCode());
+                throw new DuplicateValueException("Code-Already-Exist");
             }
         });
 
+        //set and save
+        targetResouce.setCode(resource.getCode());
+        targetResouce.setName(resource.getName());
+        targetResouce.setPath(resource.getPath());
+        return resourceRepository.save(targetResouce);
+    }
 
-
-
-
-        */
+    /**
+     * saveRemoteResource
+     * type 0 video , 1 audio
+     * @param resource
+     * @return
+     */
+    public APIResult<Resource> saveRemoteResource(Resource resource) {
 
         Set<ResourceVideo> videos = new HashSet<>();
         ResourceVideo video = new ResourceVideo();
@@ -287,8 +326,6 @@ public class ResourceService {
         resourceRemote.setVideos(videos);
 
 
-
-
         APIResult<ResourceDetail> apiResult = resourceProxy.saveResources(resourceRemote);
         if (!apiResult.getSuccess()) {
             return errorResourceAPIResult(apiResult);
@@ -344,5 +381,35 @@ public class ResourceService {
         return errResult;
     }
 
+    /**
+     * 有声读物 转  资源
+     * @param ai
+     * @return
+     */
+    public Resource audioImgToResource(AudioImg ai) {
+        String audioId = ai.getAudioId();
+        Resource audio = resourceRepository.find(audioId);
+        initResourceUrl(audio);
+        String imgId = ai.getImgId();
+        Resource img = resourceRepository.find(imgId);
+        initResourceUrl(img);
+
+        Resource resource = new Resource();
+        //有声读物info
+        resource.setType(ai.getType());
+        resource.setId(ai.getId());
+        resource.setCode(ai.getCode());
+        resource.setName(ai.getName());
+        resource.setStatus(ai.getStatus());
+        resource.setGmtCreated(ai.getGmtCreated());
+        resource.setGmtModified(ai.getGmtModified());
+
+        //图片info
+        resource.setImg(img);
+        //音频info
+        resource.setAudio(audio);
+        return resource;
+    }
+
 }