Commit 24e0834c authored by 赵啸非's avatar 赵啸非

添加产品匹配

parent bacae242
package com.mortals.xhx.feign.skin;
import com.mortals.xhx.common.pdu.RespData;
import com.mortals.xhx.common.pdu.skin.SkinBasePdu;
import com.alibaba.fastjson.JSON;
import com.mortals.framework.common.Rest;
import com.mortals.xhx.feign.IFeign;
import feign.hystrix.FallbackFactory;
import lombok.extern.slf4j.Slf4j;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* 系统基础皮肤 Feign接口
* @author zxfei
* @date 2022-08-01
*/
@FeignClient(name = "base-manager", path = "/base", fallbackFactory = SkinBaseFeignFallbackFactory.class)
public interface ISkinBaseFeign extends IFeign {
/**
* 查看系统基础皮肤列表
*
* @param skinBasePdu
* @return
*/
@PostMapping(value = "/skin/base/list")
Rest<RespData<List<SkinBasePdu>>> list(@RequestBody SkinBasePdu skinBasePdu);
/**
* 查看系统基础皮肤
*
* @param id
* @return
*/
@GetMapping(value = "/skin/base/info")
Rest<SkinBasePdu> info(@RequestParam(value = "id") Long id);
/**
* 删除系统基础皮肤
*
* @param ids
* @return
*/
@GetMapping(value = "/skin/base/delete")
Rest<Void> delete(Long[] ids,@RequestHeader("Authorization") String authorization);
/**
* 系统基础皮肤保存更新
*
* @param skinBasePdu
* @return
*/
@PostMapping(value = "/skin/base/save")
Rest<RespData<SkinBasePdu>> save(@RequestBody SkinBasePdu skinBasePdu,@RequestHeader("Authorization") String authorization);
}
@Slf4j
@Component
class SkinBaseFeignFallbackFactory implements FallbackFactory<ISkinBaseFeign> {
@Override
public ISkinBaseFeign create(Throwable t) {
return new ISkinBaseFeign() {
@Override
public Rest<RespData<List<SkinBasePdu>>> list(SkinBasePdu skinBasePdu) {
return Rest.fail("暂时无法获取系统基础皮肤列表,请稍后再试!");
}
@Override
public Rest<SkinBasePdu> info(Long id) {
return Rest.fail("暂时无法获取系统基础皮肤详细,请稍后再试!");
}
@Override
public Rest<Void> delete(Long[] ids, String authorization) {
return Rest.fail("暂时无法删除系统基础皮肤,请稍后再试!");
}
@Override
public Rest<RespData<SkinBasePdu>> save(SkinBasePdu skinBasePdu, String authorization) {
return Rest.fail("暂时无法保存系统基础皮肤,请稍后再试!");
}
};
}
}
ALTER TABLE mortals_xhx_device ADD COLUMN `skinId` bigint (20) COMMENT '皮肤id' AFTER productName;
ALTER TABLE mortals_xhx_device ADD COLUMN `skinName` varchar (512) COMMENT '皮肤名称' AFTER skinId;
ALTER TABLE mortals_xhx_device ADD COLUMN `homeUrl` varchar (512) COMMENT '首页地址' AFTER skinName;
ALTER TABLE mortals_xhx_product ADD COLUMN `skinId` bigint (20) COMMENT '皮肤id' AFTER productCode;
ALTER TABLE mortals_xhx_product ADD COLUMN `skinName` varchar (512) COMMENT '皮肤名称' AFTER skinId;
\ No newline at end of file
......@@ -202,6 +202,10 @@ ins,a {
}
}
.is-active{
background-color: red;
}
.mobile-table-card{
margin: 10px auto;
padding: 10px;
......
......@@ -56,6 +56,7 @@
<div class="layout-submenu">
<ul class="submenu-list flex">
<li v-for='item in submenu.children' :key='item.id'>
<a :href="item.path" target="blank" v-if='item.isOut'>{{item.name}}</a>
<router-link :to="item.path" :active='group === item.path' v-else>{{item.name}}</router-link>
</li>
......
......@@ -42,8 +42,6 @@ const router = new Router({
builder('sitestat/maplist', 'sitestat/maplist'),//地图站点
builder('sitestat/mapDetail', 'sitestat/mapDetail'),//地图设备
...restBuilder('platform', 'platform'),//平台
...restBuilder('product', 'product'),//产品
...restBuilder('device', 'device'),//设备
......
......@@ -71,6 +71,16 @@
v-model="form.lati"
placeholder="请输入纬度"
/> -->
<Field
label="默认首页"
prop="skinId"
v-model="form.skinId"
@change="skinSelect"
:enumData="dict.skinProductCodeMap[form.productCode]"
type="select"
placeholder="选择首页"
/>
<Field
label="所属楼栋"
prop="deviceInBuilding"
......@@ -185,6 +195,7 @@ export default {
"enabled",
"deviceFirmId",
"source",
"skinId",
],
toDate: ["defectsLiabilityPeriod"],
......@@ -206,6 +217,10 @@ export default {
},
methods: {
skinSelect(val) {
this.form.skinName =
this.dict.skinProductCodeMap[this.form.productCode][val];
},
/** 编辑 */
edit(row) {
this.reset();
......@@ -225,7 +240,7 @@ export default {
this.form.siteId = row.siteId;
this.siteName = row.siteName;
this.siteCode = row.siteCode;
console.log("row",row)
console.log("row", row);
this.getData();
this.title = "新增设备";
},
......@@ -246,8 +261,7 @@ export default {
afterRender(data) {
this.open = true;
if (this.pageInfo.type == "add"||this.pageInfo.type == "edit") {
if (this.pageInfo.type == "add" || this.pageInfo.type == "edit") {
this.form.siteName = this.siteName;
this.form.siteCode = this.siteCode;
}
......
......@@ -12,7 +12,10 @@
<Field :span="22" label="产品名称" prop="productName" v-model="form.productName" placeholder="请输入产品名称,名称唯一"/>
<Field :span="22" label="产品编码" prop="productCode" v-model="form.productCode" placeholder="请输入产品编码"/>
<Field :span="22" label="首页地址" prop="homeUrl" v-model="form.homeUrl" placeholder="请输入首页地址"/>
<Field :span="22" label="默认首页" prop="skinId" v-model="form.skinId" @change="skinSelect" :enumData="dict.skinProductCodeMap[form.productCode]" type="select" placeholder="请输入产品名称,名称唯一"/>
<!-- <Field :span="22" label="首页地址" prop="homeUrl" v-model="form.homeUrl" placeholder="请输入首页地址"/> -->
<Field :span="22" label="备注" prop="productRemark" v-model="form.productRemark" type="textarea" placeholder="请输入备注"/>
</el-row>
......@@ -43,7 +46,7 @@
// 是否显示弹出层
open: false,
direction:"rtl",
toString:['platformId'
toString:['platformId','skinId'
],
toDate:[
],
......@@ -66,6 +69,12 @@
},
methods: {
skinSelect(val){
console.log("val:"+val)
console.log("label:"+this.dict.skinProductCodeMap[this.form.productCode][val])
this.form.skinName=this.dict.skinProductCodeMap[this.form.productCode][val]
},
/** 编辑 */
edit(row) {
this.reset()
......
......@@ -2,25 +2,21 @@
<div class="page">
<LayoutTable :data="tableData" notDel notSearch :config="tableConfig">
</LayoutTable>
<drawer-show ref="drawerform" @ok="getData" />
</div>
</template>
<script>
/** 表单弹出框模式需引入 */
import drawerShow from "./drawershow";
import table from "@/assets/mixins/table";
export default {
/** 表单弹出框模式需引入 */
import drawerShow from "./drawershow";
import table from "@/assets/mixins/table";
export default {
name: "ProductList",
components: {
drawerShow
},
mixins: [table],
created() {
drawerShow,
},
mixins: [table],
created() {},
methods: {
/** 重写新增方法 */
toAdd(row) {
......@@ -34,36 +30,44 @@
toView(row) {
this.$refs.drawerform.view(row);
},
},
// beforeRouteEnter(to, from, next) {next(vm => {
// // 通过 `vm` 访问组件实例
// console.log(vm)
// })},
data() {
return {
config: {
search: [
],
search: [],
columns: [
// {type: "selection", width: 60},
{type: "index",label: "序号",width: 50},
{ type: "index", label: "序号", width: 50 },
{label: "关联平台", prop: "platformId", formatter: this.formatter},
{ label: "关联平台", prop: "platformId", formatter: this.formatter },
{label: "产品名称", prop: "productName"},
{ label: "产品名称", prop: "productName" },
{label: "产品编码", prop: "productCode"},
{ label: "产品编码", prop: "productCode" },
{label: "备注", prop: "productRemark"},
{ label: "备注", prop: "productRemark" },
{
label: "操作",
width: 240,
formatter: row => {
formatter: (row) => {
return (
<table-buttons noAdd row={row} onEdit={this.toEdit} onView={this.toView} onDel={this.toDel} />
<table-buttons
noAdd
row={row}
onEdit={this.toEdit}
onView={this.toView}
onDel={this.toDel}
/>
);
}
}
]
}
};
}
},
},
],
},
};
},
};
</script>
\ No newline at end of file
......@@ -2,6 +2,7 @@ package com.mortals.xhx.busiz.web;
import cn.hutool.core.date.DateUnit;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.net.url.UrlBuilder;
import cn.hutool.core.util.IdUtil;
import cn.hutool.extra.servlet.ServletUtil;
import com.alibaba.fastjson.JSON;
......@@ -65,8 +66,7 @@ import java.util.List;
import java.util.stream.Collectors;
import static com.mortals.framework.ap.SysConstains.PROP_PLATFORM_MARK;
import static com.mortals.xhx.common.key.Constant.DES_STR;
import static com.mortals.xhx.common.key.Constant.ENCRYPT_STR;
import static com.mortals.xhx.common.key.Constant.*;
import static com.mortals.xhx.common.key.ErrorCode.*;
import static com.mortals.xhx.common.key.RedisKey.KEY_TOKEN_API_CACHE;
......@@ -165,7 +165,9 @@ public class DeviceApiController {
RegisterResp registerResp = new RegisterResp();
registerResp.setRabbmitInfo(authInfo);
ServerInfo serverInfo = new ServerInfo();
serverInfo.setHomeUrl(productEntity.getHomeUrl() == null ? "" : productEntity.getHomeUrl());
//判断设备是否设置了url 如果设置了,则用设备的 否则用产品的
buildHomeUrl(deviceEntity, productEntity, serverInfo);
serverInfo.setServerUrl(platformEntity.getSendUrl());
registerResp.setServiceInfo(serverInfo);
DeviceInfo deviceInfo = new DeviceInfo();
......@@ -200,6 +202,20 @@ public class DeviceApiController {
return JSON.toJSONString(rsp);
}
private void buildHomeUrl(DeviceEntity deviceEntity, ProductEntity productEntity, ServerInfo serverInfo) {
String homeUrl="";
if(!ObjectUtils.isEmpty(productEntity.getHomeUrl())){
homeUrl= productEntity.getHomeUrl();
}
if(!ObjectUtils.isEmpty(deviceEntity.getHomeUrl())){
homeUrl= deviceEntity.getHomeUrl();
}
String domain = GlobalSysInfo.getParamValue(PARAM_SERVER_HTTP_URL, "http://192.168.0.98:11091");
serverInfo.setHomeUrl(UrlBuilder.of(domain).addPath(homeUrl).toString());
}
/**
* 获取Token
*
......@@ -370,7 +386,7 @@ public class DeviceApiController {
registerResp.setRabbmitInfo(authInfo);
ServerInfo serverInfo = new ServerInfo();
serverInfo.setHomeUrl(productEntity.getHomeUrl());
buildHomeUrl(deviceEntity, productEntity, serverInfo);
serverInfo.setServerUrl(platformEntity.getSendUrl());
registerResp.setServiceInfo(serverInfo);
......
......@@ -52,6 +52,12 @@ public final class Constant {
public static final String HEARTBEAT_TIMEOUT = "heartbeat_timeout";
/**
* 设备首页基础path
*/
public static final String DEVICE_BASEHOME_PATH = "/homeDeviceUrl";
/**
* 基础服务平台鉴权token
*/
......@@ -75,8 +81,6 @@ public final class Constant {
*/
public final static String PARAM_SERVER_HTTP_URL = "server_http_url";
/**
* rabbmit exchange分隔符
*/
......
......@@ -165,6 +165,19 @@ public class DeviceEntity extends DeviceVo {
*/
private Integer source;
/**
* 皮肤id
*/
private Long skinId;
/**
* 皮肤名称
*/
private String skinName;
/**
* 首页地址
*/
private String homeUrl;
public DeviceEntity(){}
......@@ -660,7 +673,29 @@ public class DeviceEntity extends DeviceVo {
}
public Long getSkinId() {
return skinId;
}
public void setSkinId(Long skinId) {
this.skinId = skinId;
}
public String getSkinName() {
return skinName;
}
public void setSkinName(String skinName) {
this.skinName = skinName;
}
public String getHomeUrl() {
return homeUrl;
}
public void setHomeUrl(String homeUrl) {
this.homeUrl = homeUrl;
}
@Override
public int hashCode() {
......@@ -789,5 +824,11 @@ public class DeviceEntity extends DeviceVo {
this.deleted = 0;
this.source = 1;
this.skinId = null;
this.skinName = "";
this.homeUrl = "";
}
}
\ No newline at end of file
......@@ -7,7 +7,7 @@ import com.mortals.xhx.module.device.model.DeviceEntity;
* 设备查询对象
*
* @author zxfei
* @date 2022-07-11
* @date 2022-08-01
*/
public class DeviceQuery extends DeviceEntity {
/** 开始 主键ID,主键,自增长 */
......@@ -241,16 +241,16 @@ public class DeviceQuery extends DeviceEntity {
/** 是否删除(0.否,1.是)列表 */
private List <Integer> deletedList;
/** 开始 收不来源(0.旧设备,1.新设备) */
/** 开始 设备来源(0.旧设备,1.新设备) */
private Integer sourceStart;
/** 结束 收不来源(0.旧设备,1.新设备) */
/** 结束 设备来源(0.旧设备,1.新设备) */
private Integer sourceEnd;
/** 增加 收不来源(0.旧设备,1.新设备) */
/** 增加 设备来源(0.旧设备,1.新设备) */
private Integer sourceIncrement;
/** 收不来源(0.旧设备,1.新设备)列表 */
/** 设备来源(0.旧设备,1.新设备)列表 */
private List <Integer> sourceList;
/** 开始 创建用户 */
......@@ -289,6 +289,24 @@ public class DeviceQuery extends DeviceEntity {
/** 结束 更新时间 */
private String updateTimeEnd;
/** 开始 皮肤id */
private Long skinIdStart;
/** 结束 皮肤id */
private Long skinIdEnd;
/** 增加 皮肤id */
private Long skinIdIncrement;
/** 皮肤id列表 */
private List <Long> skinIdList;
/** 皮肤名称 */
private List<String> skinNameList;
/** 首页地址 */
private List<String> homeUrlList;
/** OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) */
private List<DeviceQuery> orConditionList;
......@@ -1511,7 +1529,7 @@ public class DeviceQuery extends DeviceEntity {
}
/**
* 获取 开始 收不来源(0.旧设备,1.新设备)
* 获取 开始 设备来源(0.旧设备,1.新设备)
* @return sourceStart
*/
public Integer getSourceStart(){
......@@ -1519,7 +1537,7 @@ public class DeviceQuery extends DeviceEntity {
}
/**
* 设置 开始 收不来源(0.旧设备,1.新设备)
* 设置 开始 设备来源(0.旧设备,1.新设备)
* @param sourceStart
*/
public void setSourceStart(Integer sourceStart){
......@@ -1527,7 +1545,7 @@ public class DeviceQuery extends DeviceEntity {
}
/**
* 获取 结束 收不来源(0.旧设备,1.新设备)
* 获取 结束 设备来源(0.旧设备,1.新设备)
* @return $sourceEnd
*/
public Integer getSourceEnd(){
......@@ -1535,7 +1553,7 @@ public class DeviceQuery extends DeviceEntity {
}
/**
* 设置 结束 收不来源(0.旧设备,1.新设备)
* 设置 结束 设备来源(0.旧设备,1.新设备)
* @param sourceEnd
*/
public void setSourceEnd(Integer sourceEnd){
......@@ -1543,7 +1561,7 @@ public class DeviceQuery extends DeviceEntity {
}
/**
* 获取 增加 收不来源(0.旧设备,1.新设备)
* 获取 增加 设备来源(0.旧设备,1.新设备)
* @return sourceIncrement
*/
public Integer getSourceIncrement(){
......@@ -1551,7 +1569,7 @@ public class DeviceQuery extends DeviceEntity {
}
/**
* 设置 增加 收不来源(0.旧设备,1.新设备)
* 设置 增加 设备来源(0.旧设备,1.新设备)
* @param sourceIncrement
*/
public void setSourceIncrement(Integer sourceIncrement){
......@@ -1559,7 +1577,7 @@ public class DeviceQuery extends DeviceEntity {
}
/**
* 获取 收不来源(0.旧设备,1.新设备)
* 获取 设备来源(0.旧设备,1.新设备)
* @return sourceList
*/
public List<Integer> getSourceList(){
......@@ -1567,7 +1585,7 @@ public class DeviceQuery extends DeviceEntity {
}
/**
* 设置 收不来源(0.旧设备,1.新设备)
* 设置 设备来源(0.旧设备,1.新设备)
* @param sourceList
*/
public void setSourceList(List<Integer> sourceList){
......@@ -1766,6 +1784,100 @@ public class DeviceQuery extends DeviceEntity {
this.updateTimeEnd = updateTimeEnd;
}
/**
* 获取 开始 皮肤id
* @return skinIdStart
*/
public Long getSkinIdStart(){
return this.skinIdStart;
}
/**
* 设置 开始 皮肤id
* @param skinIdStart
*/
public void setSkinIdStart(Long skinIdStart){
this.skinIdStart = skinIdStart;
}
/**
* 获取 结束 皮肤id
* @return $skinIdEnd
*/
public Long getSkinIdEnd(){
return this.skinIdEnd;
}
/**
* 设置 结束 皮肤id
* @param skinIdEnd
*/
public void setSkinIdEnd(Long skinIdEnd){
this.skinIdEnd = skinIdEnd;
}
/**
* 获取 增加 皮肤id
* @return skinIdIncrement
*/
public Long getSkinIdIncrement(){
return this.skinIdIncrement;
}
/**
* 设置 增加 皮肤id
* @param skinIdIncrement
*/
public void setSkinIdIncrement(Long skinIdIncrement){
this.skinIdIncrement = skinIdIncrement;
}
/**
* 获取 皮肤id
* @return skinIdList
*/
public List<Long> getSkinIdList(){
return this.skinIdList;
}
/**
* 设置 皮肤id
* @param skinIdList
*/
public void setSkinIdList(List<Long> skinIdList){
this.skinIdList = skinIdList;
}
/**
* 获取 皮肤名称
* @return skinNameList
*/
public List<String> getSkinNameList(){
return this.skinNameList;
}
/**
* 设置 皮肤名称
* @param skinNameList
*/
public void setSkinNameList(List<String> skinNameList){
this.skinNameList = skinNameList;
}
/**
* 获取 首页地址
* @return homeUrlList
*/
public List<String> getHomeUrlList(){
return this.homeUrlList;
}
/**
* 设置 首页地址
* @param homeUrlList
*/
public void setHomeUrlList(List<String> homeUrlList){
this.homeUrlList = homeUrlList;
}
/**
* 设置 主键ID,主键,自增长
* @param id
......@@ -2716,7 +2828,7 @@ public class DeviceQuery extends DeviceEntity {
}
/**
* 设置 收不来源(0.旧设备,1.新设备)
* 设置 设备来源(0.旧设备,1.新设备)
* @param source
*/
public DeviceQuery source(Integer source){
......@@ -2725,7 +2837,7 @@ public class DeviceQuery extends DeviceEntity {
}
/**
* 设置 开始 收不来源(0.旧设备,1.新设备)
* 设置 开始 设备来源(0.旧设备,1.新设备)
* @param sourceStart
*/
public DeviceQuery sourceStart(Integer sourceStart){
......@@ -2734,7 +2846,7 @@ public class DeviceQuery extends DeviceEntity {
}
/**
* 设置 结束 收不来源(0.旧设备,1.新设备)
* 设置 结束 设备来源(0.旧设备,1.新设备)
* @param sourceEnd
*/
public DeviceQuery sourceEnd(Integer sourceEnd){
......@@ -2743,7 +2855,7 @@ public class DeviceQuery extends DeviceEntity {
}
/**
* 设置 增加 收不来源(0.旧设备,1.新设备)
* 设置 增加 设备来源(0.旧设备,1.新设备)
* @param sourceIncrement
*/
public DeviceQuery sourceIncrement(Integer sourceIncrement){
......@@ -2752,7 +2864,7 @@ public class DeviceQuery extends DeviceEntity {
}
/**
* 设置 收不来源(0.旧设备,1.新设备)
* 设置 设备来源(0.旧设备,1.新设备)
* @param sourceList
*/
public DeviceQuery sourceList(List<Integer> sourceList){
......@@ -2852,6 +2964,89 @@ public class DeviceQuery extends DeviceEntity {
}
/**
* 设置 皮肤id
* @param skinId
*/
public DeviceQuery skinId(Long skinId){
setSkinId(skinId);
return this;
}
/**
* 设置 开始 皮肤id
* @param skinIdStart
*/
public DeviceQuery skinIdStart(Long skinIdStart){
this.skinIdStart = skinIdStart;
return this;
}
/**
* 设置 结束 皮肤id
* @param skinIdEnd
*/
public DeviceQuery skinIdEnd(Long skinIdEnd){
this.skinIdEnd = skinIdEnd;
return this;
}
/**
* 设置 增加 皮肤id
* @param skinIdIncrement
*/
public DeviceQuery skinIdIncrement(Long skinIdIncrement){
this.skinIdIncrement = skinIdIncrement;
return this;
}
/**
* 设置 皮肤id
* @param skinIdList
*/
public DeviceQuery skinIdList(List<Long> skinIdList){
this.skinIdList = skinIdList;
return this;
}
/**
* 设置 皮肤名称
* @param skinName
*/
public DeviceQuery skinName(String skinName){
setSkinName(skinName);
return this;
}
/**
* 设置 皮肤名称
* @param skinNameList
*/
public DeviceQuery skinNameList(List<String> skinNameList){
this.skinNameList = skinNameList;
return this;
}
/**
* 设置 首页地址
* @param homeUrl
*/
public DeviceQuery homeUrl(String homeUrl){
setHomeUrl(homeUrl);
return this;
}
/**
* 设置 首页地址
* @param homeUrlList
*/
public DeviceQuery homeUrlList(List<String> homeUrlList){
this.homeUrlList = homeUrlList;
return this;
}
/**
* 获取 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4)
* @return orConditionList
......
......@@ -2,9 +2,12 @@ package com.mortals.xhx.module.device.service.impl;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.lang.PatternPool;
import cn.hutool.core.net.url.UrlBuilder;
import cn.hutool.core.net.url.UrlPath;
import cn.hutool.core.util.StrUtil;
import cn.hutool.core.util.URLUtil;
import com.alibaba.fastjson.JSON;
import com.mortals.framework.ap.GlobalSysInfo;
import com.mortals.framework.common.Rest;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context;
......@@ -36,6 +39,7 @@ import com.mortals.xhx.module.product.model.ProductEntity;
import com.mortals.xhx.module.product.model.ProductQuery;
import com.mortals.xhx.module.product.service.ProductService;
import com.mortals.xhx.queue.*;
import com.sun.javafx.fxml.builder.URLBuilder;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -45,6 +49,7 @@ import org.springframework.util.ObjectUtils;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.nio.charset.Charset;
import java.util.*;
import java.util.stream.Collectors;
......@@ -304,7 +309,7 @@ public class DeviceServiceImpl extends AbstractCRUDCacheServiceImpl<DeviceDao, D
&& entity.getSwitchSend()) {
//http://192.168.0.98:8090/inter/device/deviceIn
if (PatternPool.URL_HTTP.matcher(platformEntity.getSendUrl()).find()) {
ApiResp<String> resp = messageService.sendThirdParty(URLUtil.completeUrl(platformEntity.getSendUrl(), thirdPartyPath), deviceReq);
ApiResp<String> resp = messageService.sendThirdParty(UrlBuilder.of(platformEntity.getSendUrl()).addPath(thirdPartyPath).build(), deviceReq);
log.info("sendThirtyis resp ==>{}", JSON.toJSONString(resp));
} else {
throw new AppException("http send url 不合法!" + platformEntity.getSendUrl());
......@@ -439,7 +444,7 @@ public class DeviceServiceImpl extends AbstractCRUDCacheServiceImpl<DeviceDao, D
DeviceMapEntity deviceMapEntity = new DeviceMapEntity();
deviceMapEntity.setProductId(item.getKey());
ProductEntity productEntity = productService.get(item.getKey());
deviceMapEntity.setProductCode(productEntity==null?"":productEntity.getProductCode());
deviceMapEntity.setProductCode(productEntity == null ? "" : productEntity.getProductCode());
if (ObjectUtils.isEmpty(item.getValue())) {
deviceMapEntity.setDeviceList(Collections.EMPTY_LIST);
} else {
......@@ -465,7 +470,7 @@ public class DeviceServiceImpl extends AbstractCRUDCacheServiceImpl<DeviceDao, D
curLati = centerlati.add(latiStep.multiply(new BigDecimal(i)));
}
for (int j = 1; j <= collect.get(i-1).getDeviceList().size(); j++) {
for (int j = 1; j <= collect.get(i - 1).getDeviceList().size(); j++) {
//偶数加,奇数减
BigDecimal curLng = new BigDecimal(longitude);
if (j % 2 == 1) {
......@@ -473,7 +478,7 @@ public class DeviceServiceImpl extends AbstractCRUDCacheServiceImpl<DeviceDao, D
} else {
curLng = centerLng.add(lngStep.multiply(new BigDecimal(j)));
}
DeviceEntity deviceEntity = collect.get(i-1).getDeviceList().get(j-1);
DeviceEntity deviceEntity = collect.get(i - 1).getDeviceList().get(j - 1);
deviceEntity.setLon(curLng.setScale(6, RoundingMode.HALF_UP).toString());
deviceEntity.setLati(curLati.setScale(6, RoundingMode.HALF_UP).toString());
}
......@@ -603,10 +608,38 @@ public class DeviceServiceImpl extends AbstractCRUDCacheServiceImpl<DeviceDao, D
}
}
//默认时,需拼接homeUrl
// if(!ObjectUtils.isEmpty(entity.getSkinName())){
//
// if (!ObjectUtils.isEmpty(entity.getProductCode())) {
//
// entity.setHomeUrl(entity.getProductCode().);
// }
// }
updateDeviceHomeUrl(entity);
super.saveBefore(entity, context);
}
@Override
protected void updateBefore(DeviceEntity entity, Context context) throws AppException {
updateDeviceHomeUrl(entity);
super.updateBefore(entity, context);
}
private void updateDeviceHomeUrl(DeviceEntity entity) {
if (!ObjectUtils.isEmpty(entity.getSkinName())) {
String path = UrlPath.of(Constant.DEVICE_BASEHOME_PATH, Charset.defaultCharset())
.add(entity.getProductCode())
.add(entity.getSkinName())
.toString();
entity.setHomeUrl(path);
}
}
public static void main(String[] args) {
BigDecimal bigDecimal = new BigDecimal("104.22241");
BigDecimal add = bigDecimal.add(new BigDecimal("0.01"));
......
......@@ -27,7 +27,9 @@ import com.mortals.xhx.common.model.DefaultTbQueueMsgHeaders;
import com.mortals.xhx.common.model.MessageHeader;
import com.mortals.xhx.common.pdu.RespData;
import com.mortals.xhx.common.pdu.site.SitePdu;
import com.mortals.xhx.common.pdu.skin.SkinBasePdu;
import com.mortals.xhx.feign.site.ISiteFeign;
import com.mortals.xhx.feign.skin.ISkinBaseFeign;
import com.mortals.xhx.module.device.model.DeviceEntity;
import com.mortals.xhx.module.device.model.DeviceMapEntity;
import com.mortals.xhx.module.device.model.DeviceQuery;
......@@ -80,6 +82,8 @@ public class DeviceController extends BaseCRUDJsonBodyMappingController<DeviceSe
private MessageService messageService;
@Autowired
private UploadService uploadService;
@Autowired
private ISkinBaseFeign skinBaseFeign;
public DeviceController() {
super.setModuleDesc("设备");
......@@ -101,7 +105,11 @@ public class DeviceController extends BaseCRUDJsonBodyMappingController<DeviceSe
//返回产品列表及其样式
//productService.find(new ProductEntity()).stream().collect(Collectors.toMap(x -> x.getId().toString(), y -> y.getProductName())).
Rest<RespData<List<SkinBasePdu>>> resp = skinBaseFeign.list(new SkinBasePdu());
if (resp.getCode() == YesNoEnum.YES.getValue()) {
Map<String, Map<String, String>> skinProductCodeMap = resp.getData().getData().stream().collect(Collectors.groupingBy(x -> x.getProductCode(), Collectors.toMap(a -> a.getImageResolution(), b -> b.getImageResolutionValue(),(o,n)->n)));
this.addDict(model, "skinProductCodeMap", skinProductCodeMap);
}
super.init(model, context);
}
......@@ -264,4 +272,12 @@ public class DeviceController extends BaseCRUDJsonBodyMappingController<DeviceSe
}
@Override
protected int editAfter(Long id, Map<String, Object> model, DeviceEntity entity, Context context) throws AppException {
if(!ObjectUtils.isEmpty(entity.getProductId())){
ProductEntity productEntity = productService.get(entity.getProductId());
entity.setProductCode(productEntity.getProductCode());
}
return super.editAfter(id, model, entity, context);
}
}
\ No newline at end of file
package com.mortals.xhx.module.product.model;
import java.util.List;
import java.util.ArrayList;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.product.model.vo.ProductVo;
/**
* 产品实体对象
*
* @author zxfei
* @date 2022-07-14
* @date 2022-08-01
*/
public class ProductEntity extends ProductVo {
......@@ -33,6 +37,15 @@ public class ProductEntity extends ProductVo {
* 备注
*/
private String productRemark;
/**
* 皮肤id
*/
private Long skinId;
/**
* 皮肤名称
*/
@Excel(name = "皮肤名称")
private String skinName;
......@@ -107,6 +120,34 @@ public class ProductEntity extends ProductVo {
public void setProductRemark(String productRemark){
this.productRemark = productRemark;
}
/**
* 获取 皮肤id
* @return Long
*/
public Long getSkinId(){
return skinId;
}
/**
* 设置 皮肤id
* @param skinId
*/
public void setSkinId(Long skinId){
this.skinId = skinId;
}
/**
* 获取 皮肤名称
* @return String
*/
public String getSkinName(){
return skinName;
}
/**
* 设置 皮肤名称
* @param skinName
*/
public void setSkinName(String skinName){
this.skinName = skinName;
}
......@@ -134,6 +175,8 @@ public class ProductEntity extends ProductVo {
sb.append(",productCode:").append(getProductCode());
sb.append(",homeUrl:").append(getHomeUrl());
sb.append(",productRemark:").append(getProductRemark());
sb.append(",skinId:").append(getSkinId());
sb.append(",skinName:").append(getSkinName());
return sb.toString();
}
......@@ -148,5 +191,9 @@ public class ProductEntity extends ProductVo {
this.homeUrl = "";
this.productRemark = "";
this.skinId = null;
this.skinName = "";
}
}
\ No newline at end of file
......@@ -6,7 +6,7 @@ import com.mortals.xhx.module.product.model.ProductEntity;
* 产品查询对象
*
* @author zxfei
* @date 2022-07-14
* @date 2022-08-01
*/
public class ProductQuery extends ProductEntity {
/** 开始 主键ID,主键,自增长 */
......@@ -81,6 +81,21 @@ public class ProductQuery extends ProductEntity {
/** 结束 更新时间 */
private String updateTimeEnd;
/** 开始 皮肤id */
private Long skinIdStart;
/** 结束 皮肤id */
private Long skinIdEnd;
/** 增加 皮肤id */
private Long skinIdIncrement;
/** 皮肤id列表 */
private List <Long> skinIdList;
/** 皮肤名称 */
private List<String> skinNameList;
/** OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) */
private List<ProductQuery> orConditionList;
......@@ -469,6 +484,85 @@ public class ProductQuery extends ProductEntity {
this.updateTimeEnd = updateTimeEnd;
}
/**
* 获取 开始 皮肤id
* @return skinIdStart
*/
public Long getSkinIdStart(){
return this.skinIdStart;
}
/**
* 设置 开始 皮肤id
* @param skinIdStart
*/
public void setSkinIdStart(Long skinIdStart){
this.skinIdStart = skinIdStart;
}
/**
* 获取 结束 皮肤id
* @return $skinIdEnd
*/
public Long getSkinIdEnd(){
return this.skinIdEnd;
}
/**
* 设置 结束 皮肤id
* @param skinIdEnd
*/
public void setSkinIdEnd(Long skinIdEnd){
this.skinIdEnd = skinIdEnd;
}
/**
* 获取 增加 皮肤id
* @return skinIdIncrement
*/
public Long getSkinIdIncrement(){
return this.skinIdIncrement;
}
/**
* 设置 增加 皮肤id
* @param skinIdIncrement
*/
public void setSkinIdIncrement(Long skinIdIncrement){
this.skinIdIncrement = skinIdIncrement;
}
/**
* 获取 皮肤id
* @return skinIdList
*/
public List<Long> getSkinIdList(){
return this.skinIdList;
}
/**
* 设置 皮肤id
* @param skinIdList
*/
public void setSkinIdList(List<Long> skinIdList){
this.skinIdList = skinIdList;
}
/**
* 获取 皮肤名称
* @return skinNameList
*/
public List<String> getSkinNameList(){
return this.skinNameList;
}
/**
* 设置 皮肤名称
* @param skinNameList
*/
public void setSkinNameList(List<String> skinNameList){
this.skinNameList = skinNameList;
}
/**
* 设置 主键ID,主键,自增长
* @param id
......@@ -727,6 +821,70 @@ public class ProductQuery extends ProductEntity {
}
/**
* 设置 皮肤id
* @param skinId
*/
public ProductQuery skinId(Long skinId){
setSkinId(skinId);
return this;
}
/**
* 设置 开始 皮肤id
* @param skinIdStart
*/
public ProductQuery skinIdStart(Long skinIdStart){
this.skinIdStart = skinIdStart;
return this;
}
/**
* 设置 结束 皮肤id
* @param skinIdEnd
*/
public ProductQuery skinIdEnd(Long skinIdEnd){
this.skinIdEnd = skinIdEnd;
return this;
}
/**
* 设置 增加 皮肤id
* @param skinIdIncrement
*/
public ProductQuery skinIdIncrement(Long skinIdIncrement){
this.skinIdIncrement = skinIdIncrement;
return this;
}
/**
* 设置 皮肤id
* @param skinIdList
*/
public ProductQuery skinIdList(List<Long> skinIdList){
this.skinIdList = skinIdList;
return this;
}
/**
* 设置 皮肤名称
* @param skinName
*/
public ProductQuery skinName(String skinName){
setSkinName(skinName);
return this;
}
/**
* 设置 皮肤名称
* @param skinNameList
*/
public ProductQuery skinNameList(List<String> skinNameList){
this.skinNameList = skinNameList;
return this;
}
/**
* 获取 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4)
* @return orConditionList
......
package com.mortals.xhx.module.product.service.impl;
import cn.hutool.core.net.url.UrlBuilder;
import cn.hutool.core.net.url.UrlPath;
import cn.hutool.core.util.URLUtil;
import com.mortals.framework.ap.GlobalSysInfo;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context;
import com.mortals.xhx.common.key.Constant;
import com.mortals.xhx.module.product.model.ProductQuery;
import com.sun.jndi.toolkit.url.UrlUtil;
import org.springframework.stereotype.Service;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.xhx.module.product.dao.ProductDao;
......@@ -9,6 +15,8 @@ import com.mortals.xhx.module.product.model.ProductEntity;
import com.mortals.xhx.module.product.service.ProductService;
import org.springframework.util.ObjectUtils;
import java.nio.charset.Charset;
/**
* ProductService
* 产品 service实现
......@@ -25,10 +33,13 @@ public class ProductServiceImpl extends AbstractCRUDServiceImpl<ProductDao, Prod
//新增产品编码不能重复
ProductEntity productEntity = this.selectOne(new ProductQuery().productCode(entity.getProductCode()));
if(!ObjectUtils.isEmpty(productEntity))throw new AppException("当前产品编码已存在!");
//默认时,需拼接homeUrl
updateDeviceHomeUrl(entity);
super.saveBefore(entity, context);
}
@Override
protected void updateBefore(ProductEntity entity, Context context) throws AppException {
ProductEntity productEntity = this.get(entity.getId());
......@@ -36,6 +47,34 @@ public class ProductServiceImpl extends AbstractCRUDServiceImpl<ProductDao, Prod
ProductEntity productEntity1 = this.selectOne(new ProductQuery().productCode(entity.getProductCode()));
if(!ObjectUtils.isEmpty(productEntity1))throw new AppException("当前产品编码已存在!");
}
updateDeviceHomeUrl(entity);
super.updateBefore(entity, context);
}
private void updateDeviceHomeUrl(ProductEntity entity) {
if (!ObjectUtils.isEmpty(entity.getSkinName())) {
String path = UrlPath.of(Constant.DEVICE_BASEHOME_PATH,Charset.defaultCharset())
.add(entity.getProductCode())
.add(entity.getSkinName())
.toString();
entity.setHomeUrl(path);
}
}
public static void main(String[] args) {
//String path = URLUtil.completeUrl("http://192.168.0.98:11091/homeDeviceUrl", "pdj");
//System.out.println("path:"+path);
String path =UrlBuilder.create().setHost("http").setHost("192.168.0.98").setPort(11091).addPath("pdj").build();
path = UrlPath.of("homeDeviceUrl", Charset.defaultCharset()).add("pdj").toString();
System.out.println("path:"+path);
}
}
\ No newline at end of file
package com.mortals.xhx.module.product.web;
import com.mortals.framework.common.Rest;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.base.system.param.service.ParamService;
import com.mortals.xhx.common.code.YesNoEnum;
import com.mortals.xhx.common.pdu.RespData;
import com.mortals.xhx.common.pdu.skin.SkinBasePdu;
import com.mortals.xhx.feign.skin.ISkinBaseFeign;
import com.mortals.xhx.module.platform.model.PlatformQuery;
import com.mortals.xhx.module.platform.service.PlatformService;
import com.mortals.xhx.module.product.model.ProductEntity;
......@@ -11,6 +17,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
......@@ -26,6 +33,8 @@ public class ProductController extends BaseCRUDJsonBodyMappingController<Product
@Autowired
private PlatformService platformService;
@Autowired
private ISkinBaseFeign skinBaseFeign;
public ProductController() {
super.setModuleDesc("产品");
......@@ -33,6 +42,14 @@ public class ProductController extends BaseCRUDJsonBodyMappingController<Product
@Override
protected void init(Map<String, Object> model, Context context) {
//获取所有产品皮肤 分组显示
Rest<RespData<List<SkinBasePdu>>> resp = skinBaseFeign.list(new SkinBasePdu());
if (resp.getCode() == YesNoEnum.YES.getValue()) {
Map<String, Map<String, String>> skinProductCodeMap = resp.getData().getData().stream().collect(Collectors.groupingBy(x -> x.getProductCode(), Collectors.toMap(a -> a.getImageResolution(), b -> b.getImageResolutionValue(),(o,n)->n)));
this.addDict(model, "skinProductCodeMap", skinProductCodeMap);
}
this.addDict(model, "platformId", platformService.find(new PlatformQuery()).stream().collect(Collectors.toMap(x -> x.getId().toString(), y -> y.getPlatformName())));
super.init(model, context);
}
......
......@@ -43,7 +43,7 @@
</rollingPolicy>
</appender>
<root level="INFO">
<root level="info">
<appender-ref ref="console"/>
<appender-ref ref="fileInfo"/>
<appender-ref ref="fileError"/>
......@@ -57,7 +57,7 @@
<!-- level 用来设置打印级别,大小写无关:TRACE, DEBUG, INFO, WARN, ERROR, ALL 和 OFF,还有一个特俗值INHERITED或者同义词NULL,代表强制执行上级的级别。如果未设置此属性,那么当前logger将会继承上级的级别-->
<!-- additivity 是否向上级logger传递打印信息。默认是true。false:表示只用当前logger的appender-ref。true:表示当前logger的appender-ref和rootLogger的appender-ref都有效。-->
<logger name="com.mortals" level="${logLevel}" additivity="false">
<logger name="com.mortals.xhx.module" level="${logLevel}" additivity="false">
<appender-ref ref="console"/>
<appender-ref ref="fileInfo"/>
<appender-ref ref="fileError"/>
......
......@@ -9,6 +9,8 @@
<id property="platformId" column="platformId" />
<result property="productName" column="productName" />
<result property="productCode" column="productCode" />
<result property="skinId" column="skinId" />
<result property="skinName" column="skinName" />
<result property="homeUrl" column="homeUrl" />
<result property="productRemark" column="productRemark" />
<result property="createUserId" column="createUserId" />
......@@ -34,6 +36,12 @@
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('productCode') or colPickMode == 1 and data.containsKey('productCode')))">
a.productCode,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('skinId') or colPickMode == 1 and data.containsKey('skinId')))">
a.skinId,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('skinName') or colPickMode == 1 and data.containsKey('skinName')))">
a.skinName,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('homeUrl') or colPickMode == 1 and data.containsKey('homeUrl')))">
a.homeUrl,
</if>
......@@ -57,18 +65,18 @@
<!-- 新增 区分主键自增加还是业务插入 -->
<insert id="insert" parameterType="ProductEntity" useGeneratedKeys="true" keyProperty="id">
insert into mortals_xhx_product
(platformId,productName,productCode,homeUrl,productRemark,createUserId,createTime,updateUserId,updateTime)
(platformId,productName,productCode,skinId,skinName,homeUrl,productRemark,createUserId,createTime,updateUserId,updateTime)
VALUES
(#{platformId},#{productName},#{productCode},#{homeUrl},#{productRemark},#{createUserId},#{createTime},#{updateUserId},#{updateTime})
(#{platformId},#{productName},#{productCode},#{skinId},#{skinName},#{homeUrl},#{productRemark},#{createUserId},#{createTime},#{updateUserId},#{updateTime})
</insert>
<!-- 批量新增 -->
<insert id="insertBatch" parameterType="paramDto">
insert into mortals_xhx_product
(platformId,productName,productCode,homeUrl,productRemark,createUserId,createTime,updateUserId,updateTime)
(platformId,productName,productCode,skinId,skinName,homeUrl,productRemark,createUserId,createTime,updateUserId,updateTime)
VALUES
<foreach collection="data.dataList" item="item" index="index" separator="," >
(#{item.platformId},#{item.productName},#{item.productCode},#{item.homeUrl},#{item.productRemark},#{item.createUserId},#{item.createTime},#{item.updateUserId},#{item.updateTime})
(#{item.platformId},#{item.productName},#{item.productCode},#{item.skinId},#{item.skinName},#{item.homeUrl},#{item.productRemark},#{item.createUserId},#{item.createTime},#{item.updateUserId},#{item.updateTime})
</foreach>
</insert>
......@@ -90,6 +98,15 @@
<if test="(colPickMode==0 and data.containsKey('productCode')) or (colPickMode==1 and !data.containsKey('productCode'))">
a.productCode=#{data.productCode},
</if>
<if test="(colPickMode==0 and data.containsKey('skinId')) or (colPickMode==1 and !data.containsKey('skinId'))">
a.skinId=#{data.skinId},
</if>
<if test="(colPickMode==0 and data.containsKey('skinIdIncrement')) or (colPickMode==1 and !data.containsKey('skinIdIncrement'))">
a.skinId=ifnull(a.skinId,0) + #{data.skinIdIncrement},
</if>
<if test="(colPickMode==0 and data.containsKey('skinName')) or (colPickMode==1 and !data.containsKey('skinName'))">
a.skinName=#{data.skinName},
</if>
<if test="(colPickMode==0 and data.containsKey('homeUrl')) or (colPickMode==1 and !data.containsKey('homeUrl'))">
a.homeUrl=#{data.homeUrl},
</if>
......@@ -152,6 +169,25 @@
</if>
</foreach>
</trim>
<trim prefix="skinId=(case" suffix="ELSE skinId end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('skinId')) or (colPickMode==1 and !item.containsKey('skinId'))">
when a.id=#{item.id} then #{item.skinId}
</when>
<when test="(colPickMode==0 and item.containsKey('skinIdIncrement')) or (colPickMode==1 and !item.containsKey('skinIdIncrement'))">
when a.id=#{item.id} then ifnull(a.skinId,0) + #{item.skinIdIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="skinName=(case" suffix="ELSE skinName end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('skinName')) or (colPickMode==1 and !item.containsKey('skinName'))">
when a.id=#{item.id} then #{item.skinName}
</if>
</foreach>
</trim>
<trim prefix="homeUrl=(case" suffix="ELSE homeUrl end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('homeUrl')) or (colPickMode==1 and !item.containsKey('homeUrl'))">
......@@ -377,6 +413,42 @@
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('skinId')">
<if test="conditionParamRef.skinId != null ">
${_conditionType_} a.skinId = #{${_conditionParam_}.skinId}
</if>
<if test="conditionParamRef.skinId == null">
${_conditionType_} a.skinId is null
</if>
</if>
<if test="conditionParamRef.containsKey('skinIdList')">
${_conditionType_} a.skinId in
<foreach collection="conditionParamRef.skinIdList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('skinIdStart') and conditionParamRef.skinIdStart != null">
${_conditionType_} a.skinId <![CDATA[ >= ]]> #{${_conditionParam_}.skinIdStart}
</if>
<if test="conditionParamRef.containsKey('skinIdEnd') and conditionParamRef.skinIdEnd != null">
${_conditionType_} a.skinId <![CDATA[ <= ]]> #{${_conditionParam_}.skinIdEnd}
</if>
<if test="conditionParamRef.containsKey('skinName')">
<if test="conditionParamRef.skinName != null and conditionParamRef.skinName != ''">
${_conditionType_} a.skinName like #{${_conditionParam_}.skinName}
</if>
<if test="conditionParamRef.skinName == null">
${_conditionType_} a.skinName is null
</if>
</if>
<if test="conditionParamRef.containsKey('skinNameList')">
${_conditionType_} a.skinName in
<foreach collection="conditionParamRef.skinNameList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('homeUrl')">
<if test="conditionParamRef.homeUrl != null and conditionParamRef.homeUrl != ''">
......@@ -512,6 +584,16 @@
<if test='orderCol.productCode != null and "DESC".equalsIgnoreCase(orderCol.productCode)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('skinId')">
a.skinId
<if test='orderCol.skinId != null and "DESC".equalsIgnoreCase(orderCol.skinId)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('skinName')">
a.skinName
<if test='orderCol.skinName != null and "DESC".equalsIgnoreCase(orderCol.skinName)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('homeUrl')">
a.homeUrl
<if test='orderCol.homeUrl != null and "DESC".equalsIgnoreCase(orderCol.homeUrl)'>DESC</if>
......
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