parent
b3feae4fa2
commit
32abbd5ad5
|
|
@ -19,39 +19,40 @@
|
|||
<table style="text-align: center" v-loading="loading">
|
||||
<td v-for="(cast,index) in forecastWeatherData.casts" width="100px">
|
||||
<tr v-if="index===0">
|
||||
今天({{cast.week}})
|
||||
今天({{ cast.week }})
|
||||
</tr>
|
||||
<tr v-if="index===1">
|
||||
明天({{cast.week}})
|
||||
明天({{ cast.week }})
|
||||
</tr>
|
||||
<tr v-if="index===2">
|
||||
后天({{cast.week}})
|
||||
后天({{ cast.week }})
|
||||
</tr>
|
||||
<tr v-if="index===3">
|
||||
大后天({{cast.week}})
|
||||
大后天({{ cast.week }})
|
||||
</tr>
|
||||
<tr>{{cast.dayweather}}</tr>
|
||||
<tr>{{ cast.dayweather }}</tr>
|
||||
<tr>
|
||||
{{cast.nighttemp+"℃~"+cast.daytemp+"℃"}}
|
||||
{{ cast.nighttemp + "℃~" + cast.daytemp + "℃" }}
|
||||
</tr>
|
||||
|
||||
</td>
|
||||
</table>
|
||||
|
||||
<div class="right-menu-item weather" @click="getForecastWeather()" slot="reference">
|
||||
<img :src="weather" class="img">
|
||||
<span class="span1">
|
||||
<div class="right-menu-item weather" @click="getForecastWeather()" slot="reference">
|
||||
<img :src="weather" class="img">
|
||||
<span class="span1">
|
||||
{{ nowWeatherData.temperature + "℃" }}
|
||||
</span>
|
||||
<span class="span2">
|
||||
<span class="span2">
|
||||
{{ nowWeatherData.weather }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</el-popover>
|
||||
|
||||
|
||||
<!--预警-->
|
||||
<el-badge :value="warnData.count" class=" hover-effect share-button" v-hasPermi="['warning:warning:handle']">
|
||||
<el-badge :max="99" :value="warnData.count" class=" hover-effect share-button"
|
||||
v-hasPermi="['warning:warning:handle']">
|
||||
<el-popover
|
||||
placement="bottom"
|
||||
width="220"
|
||||
|
|
@ -60,11 +61,11 @@
|
|||
<div style="text-align: right; margin: 0">
|
||||
<el-button type="primary" size="mini" @click="haveRead">已读</el-button>
|
||||
</div>
|
||||
<el-button type="info" icon="el-icon-check"
|
||||
circle style="max-width: 22px;max-height: 22px;"
|
||||
@click=""
|
||||
slot="reference"
|
||||
></el-button>
|
||||
|
||||
<div slot="reference">
|
||||
<svg-icon class-name="wechat-icon" icon-class="wechat" style="height: 28px"/>
|
||||
</div>
|
||||
|
||||
</el-popover>
|
||||
</el-badge>
|
||||
|
||||
|
|
@ -145,7 +146,7 @@ export default {
|
|||
forecastWeatherData: {},
|
||||
|
||||
visible: false,
|
||||
weatherVisible:false,
|
||||
weatherVisible: false,
|
||||
|
||||
weather,
|
||||
}
|
||||
|
|
@ -238,7 +239,7 @@ export default {
|
|||
if (json.warningMessage !== undefined) {
|
||||
// this.visible = true
|
||||
return json.warningMessage
|
||||
}else {
|
||||
} else {
|
||||
return '暂无提示!!!'
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
<div class="mod-config">
|
||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
|
||||
<el-form-item>
|
||||
<el-input v-model="dataForm.key" placeholder="参数名" clearable></el-input>
|
||||
<el-input v-model="dataForm.key" placeholder="请输入组名、描述、分类id等" style="width: 300px" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button-group>
|
||||
|
|
@ -25,6 +25,7 @@
|
|||
:disabled="dataListSelections.length <= 0"
|
||||
>批量删除
|
||||
</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
||||
</el-button-group>
|
||||
|
||||
</el-form-item>
|
||||
|
|
@ -183,7 +184,19 @@ export default {
|
|||
this.getDataList();
|
||||
})
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.dataForm={}
|
||||
this.handleQuery();
|
||||
},
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.pageIndex = 1;
|
||||
this.getDataList();
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@
|
|||
<script>
|
||||
import CategoryCascader from '../../../components/mall/category-cascader'
|
||||
|
||||
import {addAttrGroup, getAttrGroup} from "@/api/mall/product/attr-group";
|
||||
import {addAttrGroup, getAttrGroup,editAttrGroup} from "@/api/mall/product/attr-group";
|
||||
import IconSelect from "@/components/IconSelect";
|
||||
|
||||
export default {
|
||||
|
|
|
|||
|
|
@ -2,11 +2,11 @@
|
|||
<div class="app-container">
|
||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
|
||||
<el-form-item>
|
||||
<el-input size="mini" v-model="dataForm.key" placeholder="参数名" clearable></el-input>
|
||||
<el-input size="mini" v-model="dataForm.key" placeholder="请输入品牌名、介绍、检索首字母等" clearable style="width: 300px"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button-group>
|
||||
<el-button size="mini" @click="getDataList()">查询</el-button>
|
||||
<el-button size="mini" @click="handleQuery()">查询</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
|
|
@ -20,6 +20,7 @@
|
|||
:disabled="dataListSelections.length <= 0"
|
||||
>批量删除
|
||||
</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-button-group>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
|
@ -232,7 +233,19 @@ export default {
|
|||
this.$modal.closeLoading()
|
||||
})
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.dataForm={}
|
||||
this.handleQuery();
|
||||
},
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.pageIndex = 1;
|
||||
this.getDataList();
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -24,6 +24,8 @@ import java.util.Map;
|
|||
*/
|
||||
public class Query<T> {
|
||||
|
||||
public static final String KEY_NAME= "key";
|
||||
|
||||
public IPage<T> getPage(Map<String, Object> params) {
|
||||
return this.getPage(params, null, false);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,10 +1,14 @@
|
|||
package com.xjs.mall.product.controller;
|
||||
|
||||
import com.ruoyi.common.log.annotation.Log;
|
||||
import com.ruoyi.common.log.enums.BusinessType;
|
||||
import com.xjs.mall.product.entity.AttrGroupEntity;
|
||||
import com.xjs.mall.product.service.AttrGroupService;
|
||||
import com.xjs.mall.product.service.CategoryService;
|
||||
import com.xjs.utils.PageUtils;
|
||||
import com.xjs.utils.R;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
|
|
@ -23,6 +27,7 @@ import java.util.stream.Collectors;
|
|||
*/
|
||||
@RestController
|
||||
@RequestMapping("product/attrgroup")
|
||||
@Api(tags = "商城-商品-属性分组")
|
||||
public class AttrGroupController {
|
||||
@Autowired
|
||||
private AttrGroupService attrGroupService;
|
||||
|
|
@ -32,7 +37,8 @@ public class AttrGroupController {
|
|||
/**
|
||||
* 列表
|
||||
*/
|
||||
@RequestMapping("/list/{catelogId}")
|
||||
@GetMapping("/list/{catelogId}")
|
||||
@ApiOperation("列表")
|
||||
public R list(@RequestParam Map<String, Object> params,Long catelogId){
|
||||
|
||||
PageUtils page =attrGroupService.queryPage(params,catelogId);
|
||||
|
|
@ -44,7 +50,8 @@ public class AttrGroupController {
|
|||
/**
|
||||
* 信息
|
||||
*/
|
||||
@RequestMapping("/info/{attrGroupId}")
|
||||
@GetMapping("/info/{attrGroupId}")
|
||||
@ApiOperation("信息")
|
||||
public R info(@PathVariable("attrGroupId") Long attrGroupId){
|
||||
AttrGroupEntity attrGroup = attrGroupService.getById(attrGroupId);
|
||||
|
||||
|
|
@ -59,7 +66,9 @@ public class AttrGroupController {
|
|||
/**
|
||||
* 保存
|
||||
*/
|
||||
@RequestMapping("/save")
|
||||
@PostMapping("/save")
|
||||
@ApiOperation("保存")
|
||||
@Log(title = "属性分组", businessType = BusinessType.INSERT)
|
||||
public R save(@RequestBody AttrGroupEntity attrGroup){
|
||||
attrGroupService.save(attrGroup);
|
||||
|
||||
|
|
@ -69,7 +78,9 @@ public class AttrGroupController {
|
|||
/**
|
||||
* 修改
|
||||
*/
|
||||
@RequestMapping("/update")
|
||||
@PutMapping("/update")
|
||||
@ApiOperation("修改")
|
||||
@Log(title = "属性分组", businessType = BusinessType.UPDATE)
|
||||
public R update(@RequestBody AttrGroupEntity attrGroup){
|
||||
attrGroupService.updateById(attrGroup);
|
||||
|
||||
|
|
@ -79,7 +90,9 @@ public class AttrGroupController {
|
|||
/**
|
||||
* 删除
|
||||
*/
|
||||
@RequestMapping("/delete")
|
||||
@DeleteMapping("/delete")
|
||||
@ApiOperation("删除")
|
||||
@Log(title = "属性分组", businessType = BusinessType.DELETE)
|
||||
public R delete(@RequestBody Long[] attrGroupIds){
|
||||
attrGroupService.removeByIds(Arrays.asList(attrGroupIds));
|
||||
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ import com.xjs.validation.group.AddGroup;
|
|||
import com.xjs.validation.group.SelectGroup;
|
||||
import com.xjs.validation.group.UpdateGroup;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
|
@ -37,6 +38,7 @@ public class BrandController {
|
|||
* 列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
@ApiOperation("列表")
|
||||
public R list(@Validated(SelectGroup.class) @RequestParam Map<String, Object> params){
|
||||
PageUtils page = brandService.queryPage(params);
|
||||
|
||||
|
|
@ -48,6 +50,7 @@ public class BrandController {
|
|||
* 信息
|
||||
*/
|
||||
@GetMapping("/info/{brandId}")
|
||||
@ApiOperation("信息")
|
||||
public R info(@PathVariable("brandId") Long brandId){
|
||||
BrandEntity brand = brandService.getById(brandId);
|
||||
|
||||
|
|
@ -58,6 +61,7 @@ public class BrandController {
|
|||
* 保存
|
||||
*/
|
||||
@PostMapping("/save")
|
||||
@ApiOperation("保存")
|
||||
@Log(title = "品牌管理", businessType = BusinessType.INSERT)
|
||||
public R save(@Validated(AddGroup.class) @RequestBody BrandEntity brand){
|
||||
brandService.save(brand);
|
||||
|
|
@ -69,6 +73,7 @@ public class BrandController {
|
|||
* 修改
|
||||
*/
|
||||
@PutMapping("/update")
|
||||
@ApiOperation("修改")
|
||||
@Log(title = "品牌管理", businessType = BusinessType.UPDATE)
|
||||
public R update(@Validated(UpdateGroup.class) @RequestBody BrandEntity brand){
|
||||
brandService.updateById(brand);
|
||||
|
|
@ -80,6 +85,7 @@ public class BrandController {
|
|||
* 删除
|
||||
*/
|
||||
@DeleteMapping("/delete")
|
||||
@ApiOperation("删除")
|
||||
@Log(title = "品牌管理", businessType = BusinessType.DELETE)
|
||||
public R delete(@RequestBody Long[] brandIds){
|
||||
brandService.removeByIds(Arrays.asList(brandIds));
|
||||
|
|
|
|||
|
|
@ -30,12 +30,14 @@ public class AttrGroupServiceImpl extends ServiceImpl<AttrGroupDao, AttrGroupEnt
|
|||
|
||||
@Override
|
||||
public PageUtils queryPage(Map<String, Object> params, Long categoryId) {
|
||||
String key = (String) params.get("key");
|
||||
//select * from pms_attr_group where catelog_id=? and (attr_group_id=key or attr_group_name like %key%)
|
||||
String key = (String) params.get(Query.KEY_NAME);
|
||||
|
||||
LambdaQueryWrapper<AttrGroupEntity> wrapper = new LambdaQueryWrapper<>();
|
||||
if(!StringUtils.isEmpty(key)){
|
||||
wrapper.and((obj)->{
|
||||
obj.eq(AttrGroupEntity::getAttrGroupId,key).or().like(AttrGroupEntity::getAttrGroupName,key);
|
||||
obj.eq(AttrGroupEntity::getAttrGroupId,key)
|
||||
.or().like(AttrGroupEntity::getDescript,key)
|
||||
.or().like(AttrGroupEntity::getAttrGroupName,key);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -53,4 +55,4 @@ public class AttrGroupServiceImpl extends ServiceImpl<AttrGroupDao, AttrGroupEnt
|
|||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,16 +1,17 @@
|
|||
package com.xjs.mall.product.service.impl;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.Map;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.xjs.utils.PageUtils;
|
||||
import com.xjs.utils.Query;
|
||||
|
||||
import com.xjs.mall.product.dao.BrandDao;
|
||||
import com.xjs.mall.product.entity.BrandEntity;
|
||||
import com.xjs.mall.product.service.BrandService;
|
||||
import com.xjs.utils.PageUtils;
|
||||
import com.xjs.utils.Query;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
@Service("brandService")
|
||||
|
|
@ -18,12 +19,21 @@ public class BrandServiceImpl extends ServiceImpl<BrandDao, BrandEntity> impleme
|
|||
|
||||
@Override
|
||||
public PageUtils queryPage(Map<String, Object> params) {
|
||||
String key = (String) params.get(Query.KEY_NAME);
|
||||
|
||||
LambdaQueryWrapper<BrandEntity> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.and(StringUtils.isNotEmpty(key), obj ->{
|
||||
obj.like(BrandEntity::getName, key)
|
||||
.or().like(BrandEntity::getDescript, key)
|
||||
.or().eq(BrandEntity::getFirstLetter, key);
|
||||
});
|
||||
|
||||
IPage<BrandEntity> page = this.page(
|
||||
new Query<BrandEntity>().getPage(params),
|
||||
new QueryWrapper<BrandEntity>()
|
||||
wrapper
|
||||
);
|
||||
|
||||
return new PageUtils(page);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue