记得上下班打卡 | git大法好,push需谨慎

Commit 080622ce authored by 胡佳晨's avatar 胡佳晨

Merge remote-tracking branch 'origin/dev_goblin' into dev_goblin

parents 19ed7855 1b0bc5d4
...@@ -153,7 +153,7 @@ ...@@ -153,7 +153,7 @@
</div> </div>
<div class="function_area"> <div class="function_area">
<iframe src="http://172.16.3.82:8080/#/goods/home?place=admin" width="375" height="1190" frameborder="0"></iframe> <iframe id="iframe" src="http://172.16.3.82:8080/#/goods/home?place=admin" width="375" height="1190" frameborder="0"></iframe>
</div> </div>
</div> </div>
</div> </div>
...@@ -171,6 +171,14 @@ ...@@ -171,6 +171,14 @@
let updateTime = ''; let updateTime = '';
$(function() { $(function() {
// addItem (1); // addItem (1);
let url = window.location.hostname;
if (url.includes('test')) {
$("#iframe").attr('src', 'https://testm.zhengzai.tv/#/goods/home?place=admin');
} else if (!url.includes('test') && url.includes('admin')) {
$("#iframe").attr('src', 'https://m.zhengzai.tv/#/goods/home?place=admin');
} else {
}
promiseMethods('/goblin-front-cube/list', 'post').then(res => { promiseMethods('/goblin-front-cube/list', 'post').then(res => {
let { data } = res; let { data } = res;
if (data && data.length > 0) { if (data && data.length > 0) {
......
...@@ -168,7 +168,7 @@ ...@@ -168,7 +168,7 @@
</div> </div>
<div class="function_area"> <div class="function_area">
<iframe src="http://172.16.3.82:8080/#/goods/home?place=admin" width="375" height="1190" frameborder="0"></iframe> <iframe id="iframe" src="http://172.16.3.82:8080/#/goods/home?place=admin" width="375" height="1190" frameborder="0"></iframe>
</div> </div>
</div> </div>
</div> </div>
...@@ -184,6 +184,14 @@ ...@@ -184,6 +184,14 @@
let selectGoodsId = ''; let selectGoodsId = '';
let updateTime = ''; let updateTime = '';
$(function() { $(function() {
let url = window.location.hostname;
if (url.includes('test')) {
$("#iframe").attr('src', 'https://testm.zhengzai.tv/#/goods/home?place=admin');
} else if (!url.includes('test') && url.includes('admin')) {
$("#iframe").attr('src', 'https://m.zhengzai.tv/#/goods/home?place=admin');
} else {
}
promiseMethods('/selectGoods/getList', 'post').then(res => { promiseMethods('/selectGoods/getList', 'post').then(res => {
console.log(res, 121212) console.log(res, 121212)
let { data } = res; let { data } = res;
......
...@@ -138,7 +138,7 @@ ...@@ -138,7 +138,7 @@
<div class="huDongBanner" onclick="goArea(2)"> <div class="huDongBanner" onclick="goArea(2)">
<span class="huDongBannerSp" onclick="delSp(2)">X</span> <span class="huDongBannerSp" onclick="delSp(2)">X</span>
</div> </div>
<iframe src="http://172.16.3.82:8080/#/goods/home?place=admin" width="375" height="1190" frameborder="0"></iframe> <iframe id="iframe" src="http://172.16.3.82:8080/#/goods/home?place=admin" width="375" height="1190" frameborder="0"></iframe>
</div> </div>
</div> </div>
...@@ -147,7 +147,14 @@ ...@@ -147,7 +147,14 @@
<script th:inline="javascript"> <script th:inline="javascript">
var prefix2 = ctx + "local"; var prefix2 = ctx + "local";
$(function() { $(function() {
console.log(window.location, ctx,window.location.hostname, 'ctx') let url = window.location.hostname;
if (url.includes('test')) {
$("#iframe").attr('src', 'https://testm.zhengzai.tv/#/goods/home?place=admin');
} else if (!url.includes('test') && url.includes('admin')) {
$("#iframe").attr('src', 'https://m.zhengzai.tv/#/goods/home?place=admin');
} else {
}
modalPx() modalPx()
}) })
function goArea (num) { function goArea (num) {
......
...@@ -145,7 +145,7 @@ ...@@ -145,7 +145,7 @@
</div> </div>
<div class="function_area"> <div class="function_area">
<iframe src="http://172.16.3.82:8080/#/goods/home?place=admin" width="375" height="1190" frameborder="0"></iframe> <iframe id="iframe" src="http://172.16.3.82:8080/#/goods/home?place=admin" width="375" height="1190" frameborder="0"></iframe>
</div> </div>
</div> </div>
</div> </div>
...@@ -159,7 +159,14 @@ ...@@ -159,7 +159,14 @@
let jumpType = 1; let jumpType = 1;
let hang = 1; let hang = 1;
$(function() { $(function() {
let url = window.location.hostname;
if (url.includes('test')) {
$("#iframe").attr('src', 'https://testm.zhengzai.tv/#/goods/home?place=admin');
} else if (!url.includes('test') && url.includes('admin')) {
$("#iframe").attr('src', 'https://m.zhengzai.tv/#/goods/home?place=admin');
} else {
}
promiseMethods('/navigation/list', 'post').then(res => { promiseMethods('/navigation/list', 'post').then(res => {
let { data } = res; let { data } = res;
if (data&&data.length>0) { if (data&&data.length>0) {
......
...@@ -114,7 +114,7 @@ ...@@ -114,7 +114,7 @@
</div> </div>
<div class="function_area"> <div class="function_area">
<iframe src="http://172.16.3.82:8080/#/goods/home?place=admin" width="375" height="1190" frameborder="0"></iframe> <iframe id="iframe" src="http://172.16.3.82:8080/#/goods/home?place=admin" width="375" height="1190" frameborder="0"></iframe>
</div> </div>
</div> </div>
</div> </div>
...@@ -128,6 +128,14 @@ ...@@ -128,6 +128,14 @@
let hotWordId = ''; let hotWordId = '';
let updateTime = ''; let updateTime = '';
$(function(){ $(function(){
let url = window.location.hostname;
if (url.includes('test')) {
$("#iframe").attr('src', 'https://testm.zhengzai.tv/#/goods/home?place=admin');
} else if (!url.includes('test') && url.includes('admin')) {
$("#iframe").attr('src', 'https://m.zhengzai.tv/#/goods/home?place=admin');
} else {
}
promiseMethods('/hotWord/list', 'post').then(res => { promiseMethods('/hotWord/list', 'post').then(res => {
let data = res.data[0]; let data = res.data[0];
mid = data.mid; mid = data.mid;
......
...@@ -150,7 +150,7 @@ ...@@ -150,7 +150,7 @@
</div> </div>
<div class="function_area"> <div class="function_area">
<iframe src="http://172.16.3.82:8080/#/goods/home?place=admin" width="375" height="1190" frameborder="0"></iframe> <iframe id="iframe" src="http://172.16.3.82:8080/#/goods/home?place=admin" width="375" height="1190" frameborder="0"></iframe>
</div> </div>
</div> </div>
</div> </div>
...@@ -163,6 +163,14 @@ ...@@ -163,6 +163,14 @@
let num = 0; let num = 0;
let type = 0; let type = 0;
$(function(){ $(function(){
let url = window.location.hostname;
if (url.includes('test')) {
$("#iframe").attr('src', 'https://testm.zhengzai.tv/#/goods/home?place=admin');
} else if (!url.includes('test') && url.includes('admin')) {
$("#iframe").attr('src', 'https://m.zhengzai.tv/#/goods/home?place=admin');
} else {
}
let name = 'id'; let name = 'id';
var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)"); var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
var r = window.location.search.substr(1).match(reg); var r = window.location.search.substr(1).match(reg);
......
...@@ -16,6 +16,7 @@ import org.springframework.web.bind.annotation.RestController; ...@@ -16,6 +16,7 @@ import org.springframework.web.bind.annotation.RestController;
import java.text.ParseException; import java.text.ParseException;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List;
/** /**
* @author zhangfuxin * @author zhangfuxin
...@@ -99,6 +100,23 @@ public class GoblinFrontController { ...@@ -99,6 +100,23 @@ public class GoblinFrontController {
return ResponseDto.success( goblinFrontService.getCategory(categoryId)); return ResponseDto.success( goblinFrontService.getCategory(categoryId));
} }
@GetMapping("getStore")
@ApiOperation("获得店铺详情")
public ResponseDto<GoblinStoreInfoVo> getStore(@RequestParam(name = "storeId", required = true)String storeId) throws ParseException {
return ResponseDto.success( goblinFrontService.getStore(storeId));
}
@GetMapping("getStoreCategory")
@ApiOperation("获得店铺分类")
public ResponseDto<List<GoblinStoreGoodsCategoryVo>> getStoreCategory(@RequestParam(name = "storeId", required = true)String storeId) throws ParseException {
return ResponseDto.success( goblinFrontService.getStoreCategory(storeId));
}
@GetMapping("getStoreGoodes")
@ApiOperation("获得店铺分类")
public ResponseDto<List<GoblinStoreGoodsCategoryVo>> getStoreGoodes(@RequestParam(name = "storeId", required = true)String storeId) throws ParseException {
return ResponseDto.success( goblinFrontService.getStoreCategory(storeId));
}
......
...@@ -45,6 +45,9 @@ public class GoblinFrontServiceImpl implements GoblinFrontService { ...@@ -45,6 +45,9 @@ public class GoblinFrontServiceImpl implements GoblinFrontService {
@Override @Override
public ArrayList<GoblinFrontBannerVo> getListBanner() { public ArrayList<GoblinFrontBannerVo> getListBanner() {
if(!redisUtil.hasKey(GoblinRedisConst.FRONT_TOP_BANNER)){
return null;
}
List<GoblinFrontBanner> list= (List<GoblinFrontBanner>) redisUtil.get(GoblinRedisConst.FRONT_TOP_BANNER); List<GoblinFrontBanner> list= (List<GoblinFrontBanner>) redisUtil.get(GoblinRedisConst.FRONT_TOP_BANNER);
LocalDateTime nowTime= LocalDateTime.now(); LocalDateTime nowTime= LocalDateTime.now();
ArrayList<GoblinFrontBanner> goblinFrontBannerArrayList= ObjectUtil.getGoblinFrontBannerArrayList(); ArrayList<GoblinFrontBanner> goblinFrontBannerArrayList= ObjectUtil.getGoblinFrontBannerArrayList();
...@@ -66,6 +69,9 @@ public class GoblinFrontServiceImpl implements GoblinFrontService { ...@@ -66,6 +69,9 @@ public class GoblinFrontServiceImpl implements GoblinFrontService {
return list1; return list1;
} }
public ArrayList<GoblinFrontBannerVo> getMiddleBanner() { public ArrayList<GoblinFrontBannerVo> getMiddleBanner() {
if(!redisUtil.hasKey(GoblinRedisConst.FRONT_MIDDLE_BANNER)){
return null;
}
List<GoblinFrontBanner> list= (List<GoblinFrontBanner>) redisUtil.get(GoblinRedisConst.FRONT_MIDDLE_BANNER); List<GoblinFrontBanner> list= (List<GoblinFrontBanner>) redisUtil.get(GoblinRedisConst.FRONT_MIDDLE_BANNER);
LocalDateTime nowTime= LocalDateTime.now(); LocalDateTime nowTime= LocalDateTime.now();
ArrayList<GoblinFrontBanner> goblinFrontBannerArrayList= ObjectUtil.getGoblinFrontBannerArrayList(); ArrayList<GoblinFrontBanner> goblinFrontBannerArrayList= ObjectUtil.getGoblinFrontBannerArrayList();
...@@ -89,6 +95,9 @@ public class GoblinFrontServiceImpl implements GoblinFrontService { ...@@ -89,6 +95,9 @@ public class GoblinFrontServiceImpl implements GoblinFrontService {
@Override @Override
public GoblinFrontHotWord getHotWord() { public GoblinFrontHotWord getHotWord() {
if(!redisUtil.hasKey(GoblinRedisConst.FRONT_HOTWORD)){
return null;
}
// int index= (int) redisUtil.get(GoblinRedisConst.FRONT_HOTWORD_INDEX); // int index= (int) redisUtil.get(GoblinRedisConst.FRONT_HOTWORD_INDEX);
//获得value //获得value
List<GoblinFrontHotWord> list= (List<GoblinFrontHotWord>) redisUtil.get(GoblinRedisConst.FRONT_HOTWORD); List<GoblinFrontHotWord> list= (List<GoblinFrontHotWord>) redisUtil.get(GoblinRedisConst.FRONT_HOTWORD);
...@@ -109,6 +118,9 @@ public class GoblinFrontServiceImpl implements GoblinFrontService { ...@@ -109,6 +118,9 @@ public class GoblinFrontServiceImpl implements GoblinFrontService {
@Override @Override
public GoblinFrontNavigationVoo getNavigation() { public GoblinFrontNavigationVoo getNavigation() {
if(!redisUtil.hasKey(GoblinRedisConst.FRONT_NAVIGATION)){
return null;
}
GoblinFrontNavigationVoo goblinFrontNavigationVoo=GoblinFrontNavigationVoo.getNew(); GoblinFrontNavigationVoo goblinFrontNavigationVoo=GoblinFrontNavigationVoo.getNew();
List<GoblinFrontNavigation> list = (List<GoblinFrontNavigation>) redisUtil.get(GoblinRedisConst.FRONT_NAVIGATION); List<GoblinFrontNavigation> list = (List<GoblinFrontNavigation>) redisUtil.get(GoblinRedisConst.FRONT_NAVIGATION);
ArrayList<GoblinFrontNavigationVo> list1=ObjectUtil.getgoblinFrontNavigationVoArrayList(); ArrayList<GoblinFrontNavigationVo> list1=ObjectUtil.getgoblinFrontNavigationVoArrayList();
...@@ -257,6 +269,9 @@ public class GoblinFrontServiceImpl implements GoblinFrontService { ...@@ -257,6 +269,9 @@ public class GoblinFrontServiceImpl implements GoblinFrontService {
* 获得商品详情 * 获得商品详情
*/ */
public List getMoudleIndex(){ public List getMoudleIndex(){
if(!redisUtil.hasKey(GoblinRedisConst.MOUDLE_INDEX)){
return null;
}
//GoblinGoodsInfoVo goblinGoodsInfoVo=goblinRedisUtils.get(spuId); //GoblinGoodsInfoVo goblinGoodsInfoVo=goblinRedisUtils.get(spuId);
List<GoblinFrontMoudleIndex> list= (List<GoblinFrontMoudleIndex>) redisUtil.get(GoblinRedisConst.MOUDLE_INDEX); List<GoblinFrontMoudleIndex> list= (List<GoblinFrontMoudleIndex>) redisUtil.get(GoblinRedisConst.MOUDLE_INDEX);
return list; return list;
...@@ -269,6 +284,9 @@ public class GoblinFrontServiceImpl implements GoblinFrontService { ...@@ -269,6 +284,9 @@ public class GoblinFrontServiceImpl implements GoblinFrontService {
public GoblinFrontCubeVo getCube(){ public GoblinFrontCubeVo getCube(){
GoblinFrontCubeVo goblinFrontCubeVo=GoblinFrontCubeVo.getNew(); GoblinFrontCubeVo goblinFrontCubeVo=GoblinFrontCubeVo.getNew();
ArrayList<GoblinGoodsInfoVo> goblinGoodsInfoVoArrayList= ObjectUtil.getGoblinGoodsInfoVos(); ArrayList<GoblinGoodsInfoVo> goblinGoodsInfoVoArrayList= ObjectUtil.getGoblinGoodsInfoVos();
if(!redisUtil.hasKey(GoblinRedisConst.FRONT_GOBLINFRONTCUBE)){
return null;
}
List<GoblinFrontCube> list= (List<GoblinFrontCube>) redisUtil.get(GoblinRedisConst.FRONT_GOBLINFRONTCUBE); List<GoblinFrontCube> list= (List<GoblinFrontCube>) redisUtil.get(GoblinRedisConst.FRONT_GOBLINFRONTCUBE);
if(list.size()>0){ if(list.size()>0){
BeanUtils.copyProperties(list.get(0),goblinFrontCubeVo); BeanUtils.copyProperties(list.get(0),goblinFrontCubeVo);
...@@ -285,7 +303,19 @@ public class GoblinFrontServiceImpl implements GoblinFrontService { ...@@ -285,7 +303,19 @@ public class GoblinFrontServiceImpl implements GoblinFrontService {
} }
return goblinFrontCubeVo; return goblinFrontCubeVo;
} }
public GoblinStoreInfoVo getStore(String storId){
return goblinRedisUtils.getStoreInfoVo(storId);
}
/***
* @author zhangfuxin
* @Description:获得商铺分类
* @date 2022/1/18 下午1:44
*/
public List<GoblinStoreGoodsCategoryVo> getStoreCategory(String storId){
//店铺分类数据源
List<GoblinStoreGoodsCategoryVo> list=goblinRedisUtils.getStoreGoodsCategoryVos(storId);
return list;
}
/** /**
* 找到分类 * 找到分类
*/ */
...@@ -315,6 +345,36 @@ public class GoblinFrontServiceImpl implements GoblinFrontService { ...@@ -315,6 +345,36 @@ public class GoblinFrontServiceImpl implements GoblinFrontService {
return goblinCategoryzfVo; return goblinCategoryzfVo;
} }
public List<GoblinGoodsInfoVo> getStoreGoodes(String storeId,String categoryId){
//
Query query = new Query();
query.addCriteria(Criteria.where("storeId").is(storeId));
if(StringUtil.isNotBlank(categoryId)){
query.addCriteria(new Criteria().orOperator(
Criteria.where("cateFid").is(categoryId),
Criteria.where("cateSid").is(categoryId),
Criteria.where("cateTid").is(categoryId)
));
}
// 查询总数
List<GoblinGoodsInfoVo> list = mongoTemplate.find(query, GoblinGoodsInfoVo.class, GoblinGoodsInfoVo.class.getSimpleName());
if(list.size()>0){
//找到 销量
for(GoblinGoodsInfoVo goblinGoodsInfoVo:list){
Integer counts=goblinRedisUtils.getSpuSaleCount(goblinGoodsInfoVo.getSpuId());
if(counts==null){
goblinGoodsInfoVo.setCount(0);
}else{
goblinGoodsInfoVo.setCount(counts);
}
}
Collections.sort(list, new Comparator<GoblinGoodsInfoVo>() {
public int compare(GoblinGoodsInfoVo arg0, GoblinGoodsInfoVo arg1) {
return -(arg0.getCount().compareTo(arg1.getCount()));
}});
}
return list;
}
/** /**
*音乐人列表 *音乐人列表
...@@ -428,6 +488,9 @@ public class GoblinFrontServiceImpl implements GoblinFrontService { ...@@ -428,6 +488,9 @@ public class GoblinFrontServiceImpl implements GoblinFrontService {
*/ */
@Override @Override
public GoblinFrontSelectGoodVo getSelectGoods(int page, int pageSize) { public GoblinFrontSelectGoodVo getSelectGoods(int page, int pageSize) {
if(!redisUtil.hasKey(GoblinRedisConst.SELECT_GOODS)){
return null;
}
//redis 取出精选商品列表 //redis 取出精选商品列表
List<GoblinFrontSelectGoods> list= (List<GoblinFrontSelectGoods>) redisUtil.get(GoblinRedisConst.SELECT_GOODS); List<GoblinFrontSelectGoods> list= (List<GoblinFrontSelectGoods>) redisUtil.get(GoblinRedisConst.SELECT_GOODS);
if(null!=list&&list.size()==1){ if(null!=list&&list.size()==1){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment