记得上下班打卡 | git大法好,push需谨慎
Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liquidnet-bus-v1
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
董敬伟
liquidnet-bus-v1
Commits
f704455d
Commit
f704455d
authored
Dec 30, 2021
by
胡佳晨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交 脚本
parent
aa76553e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
4 deletions
+19
-4
GoblinStorePurchasingServiceImpl.java
...service/impl/manage/GoblinStorePurchasingServiceImpl.java
+19
-4
No files found.
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/service/impl/manage/GoblinStorePurchasingServiceImpl.java
View file @
f704455d
...
...
@@ -4,6 +4,8 @@ import com.github.pagehelper.PageInfo;
import
com.liquidnet.commons.lang.util.DateUtil
;
import
com.liquidnet.commons.lang.util.IDGenerator
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.base.SqlMapping
;
import
com.liquidnet.service.base.constant.MQConst
;
import
com.liquidnet.service.goblin.dto.manage.GoblinStorePurchaseItemParam
;
import
com.liquidnet.service.goblin.dto.vo.GoblinStoreMarketVo
;
import
com.liquidnet.service.goblin.entity.GoblinStoreMarketPurchasing
;
...
...
@@ -11,6 +13,7 @@ import com.liquidnet.service.goblin.entity.GoblinStoreMarketing;
import
com.liquidnet.service.goblin.service.manage.IGoblinStorePurchasingService
;
import
com.liquidnet.service.goblin.util.GoblinMongoUtils
;
import
com.liquidnet.service.goblin.util.GoblinRedisUtils
;
import
com.liquidnet.service.goblin.util.QueueUtils
;
import
me.chanjar.weixin.common.util.DataUtils
;
import
org.apache.commons.lang.time.DateUtils
;
import
org.springframework.beans.BeanUtils
;
...
...
@@ -30,6 +33,8 @@ public class GoblinStorePurchasingServiceImpl implements IGoblinStorePurchasingS
GoblinRedisUtils
goblinRedisUtils
;
@Autowired
GoblinMongoUtils
goblinMongoUtils
;
@Autowired
QueueUtils
queueUtils
;
@Override
public
ResponseDto
<
PageInfo
<
GoblinStoreMarketVo
>>
purchasingList
(
int
page
,
String
purchaseName
,
int
status
,
String
st
,
String
et
,
String
ct
)
{
...
...
@@ -75,7 +80,9 @@ public class GoblinStorePurchasingServiceImpl implements IGoblinStorePurchasingS
goblinRedisUtils
.
delGoblinStoreMarketVo
(
marketId
,
storeId
);
break
;
}
//mysql todo
//mysql
queueUtils
.
sendMsgByRedis
(
MQConst
.
GoblinQueue
.
GOBLIN_STORE_MARKET
.
getKey
(),
SqlMapping
.
get
(
"goblin.store.market.status"
,
bean
.
getStatus
(),
bean
.
getDelFlag
(),
marketId
,
storeId
));
return
ResponseDto
.
success
();
}
...
...
@@ -95,6 +102,8 @@ public class GoblinStorePurchasingServiceImpl implements IGoblinStorePurchasingS
bean
.
setIsPre
(
isPre
);
if
(
isPre
==
1
)
{
bean
.
setPreTime
(
LocalDateTime
.
parse
(
preTime
,
DTF_YMD_HMS
));
}
else
{
bean
.
setPreTime
(
null
);
}
bean
.
setCreatedAt
(
LocalDateTime
.
now
());
...
...
@@ -108,7 +117,9 @@ public class GoblinStorePurchasingServiceImpl implements IGoblinStorePurchasingS
goblinMongoUtils
.
insertStoreMarket
(
vo
);
//redis
goblinRedisUtils
.
setGoblinStoreMarketVo
(
storeMarketId
,
storeId
,
vo
);
//mysql todo
//mysql
queueUtils
.
sendMsgByRedis
(
MQConst
.
GoblinQueue
.
GOBLIN_STORE_MARKET
.
getKey
(),
SqlMapping
.
get
(
"goblin.store.market.insert"
,
bean
.
getStoreMarketId
(),
bean
.
getName
(),
bean
.
getType
(),
bean
.
getStatus
(),
bean
.
getStoreId
(),
bean
.
getStartTime
(),
bean
.
getEndTime
(),
bean
.
getDelFlag
(),
bean
.
getIsPre
(),
bean
.
getPreTime
(),
bean
.
getCreatedAt
()));
return
ResponseDto
.
success
();
}
...
...
@@ -126,7 +137,7 @@ public class GoblinStorePurchasingServiceImpl implements IGoblinStorePurchasingS
bean
.
setIsPre
(
isPre
);
if
(
isPre
==
1
)
{
bean
.
setPreTime
(
LocalDateTime
.
parse
(
preTime
,
DTF_YMD_HMS
));
}
else
{
}
else
{
bean
.
setPreTime
(
null
);
}
bean
.
setUpdatedAt
(
LocalDateTime
.
now
());
...
...
@@ -137,7 +148,9 @@ public class GoblinStorePurchasingServiceImpl implements IGoblinStorePurchasingS
goblinMongoUtils
.
updateStoreMarket
(
marketId
,
storeId
,
vo
);
//redis
goblinRedisUtils
.
setGoblinStoreMarketVo
(
marketId
,
storeId
,
vo
);
//mysql todo
//mysql
queueUtils
.
sendMsgByRedis
(
MQConst
.
GoblinQueue
.
GOBLIN_STORE_MARKET
.
getKey
(),
SqlMapping
.
get
(
"goblin.store.market.update"
,
bean
.
getName
(),
bean
.
getType
(),
bean
.
getStatus
(),
bean
.
getStoreId
(),
bean
.
getDescribes
(),
bean
.
getStartTime
(),
bean
.
getEndTime
(),
bean
.
getDelFlag
(),
bean
.
getIsPre
(),
bean
.
getPreTime
(),
bean
.
getUpdatedAt
(),
bean
.
getStoreMarketId
(),
bean
.
getStoreId
()));
return
ResponseDto
.
success
();
}
...
...
@@ -169,6 +182,8 @@ public class GoblinStorePurchasingServiceImpl implements IGoblinStorePurchasingS
bean
.
setDelFlag
(
0
);
bean
.
setCreatedAt
(
now
);
//mongo
goblinRedisUtils
.
getGoodsInfoVo
(
item
.
getSpuId
());
goblinRedisUtils
.
getGoodsSkuInfoVo
(
item
.
getSkuId
());
//redis
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment