Commit 88c892ef authored by 赵啸非's avatar 赵啸非

添加样表皮肤管理

parent 42c1de5f
......@@ -2834,31 +2834,31 @@ size|Integer|否|每页条数,值为-1,查询所有记录
```
**响应参数:**
参数名称|参数类型|描述
:---|:---|:------
code|Integer|结果码(-1.失败,1.成功)
msg|String|消息
data|object|数据对象
 per_page|Integer|每页条数
 total|Integer|总条数
 last_page|Integer|总页数
 current_page|Integer|当前页
 data|array|结果集列表|数组
  id|Long|序号,主键,自增长
  categoryId|Long|所属种类,来源种类
  productId|Long|产品id
  productName|String|产品名称
  cssFilePath|String|css模板合成后文件地址
  name|String|产品皮肤名称,唯一且不为空
  imageResolution|String|分辨率 (1.1920*1080,2.1080*1920,3.1280*1280)
  previewImagePath|String|预览图片
  sortNum|Integer|排序编号
  used|Integer|是否使用
  createTime|Date|创建时间
  createUserId|Long|创建用户
  updateTime|Date|修改时间
dict|object|字典对象
 imageResolution|object|字典属性对象,详见附录
| 参数名称 | 参数类型 | 描述 |
|:-----------------------------|:--------|:------------------------------------------|
| code | Integer | 结果码(-1.失败,1.成功) |
| msg | String | 消息 |
| data | object | 数据对象 |
|  per_page | Integer | 每页条数 |
|  total | Integer | 总条数 |
|  last_page | Integer | 总页数 |
|  current_page | Integer | 当前页 |
|  data | array | 结果集列表 |数组
|   id | Long | 序号,主键,自增长 |
|   categoryId | Long | 所属种类,来源种类 |
|   productId | Long | 产品id |
|   productName | String | 产品名称 |
|   cssFilePath | String | css模板合成后文件地址 |
|   name | String | 产品皮肤名称,唯一且不为空 |
|   imageResolution | String | 分辨率 (1.1920*1080,2.1080*1920,3.1280*1280) |
|   previewImagePath | String | 预览图片 |
|   sortNum | Integer | 排序编号 |
|   used | Integer | 是否使用 |
|   createTime | Date | 创建时间 |
|   createUserId | Long | 创建用户 |
|   updateTime | Date | 修改时间 |
| dict | object | 字典对象 |
|  imageResolution | object | 字典属性对象,详见附录 |
**响应消息样例:**
```
......@@ -2891,26 +2891,26 @@ id|Long|是|ID
```
**响应参数:**
参数名称 |参数类型|描述
:---|:---|:-------
code|Integer|结果码(-1.失败,1.成功)
msg|String|消息
data|object|数据对象
 id|Long|序号,主键,自增长
 categoryId|Long|所属种类,来源种类
 productId|Long|产品id
 productName|String|产品名称
 cssFilePath|String|css模板合成后文件地址
 name|String|产品皮肤名称,唯一且不为空
 imageResolution|String|分辨率 (1.1920*1080,2.1080*1920,3.1280*1280)
 previewImagePath|String|预览图片
 sortNum|Integer|排序编号
 used|Integer|是否使用
 createTime|Date|创建时间
 createUserId|Long|创建用户
 updateTime|Date|修改时间
dict|object|字典对象
 imageResolution|object|字典属性对象,详见附录
| 参数名称 | 参数类型 | 描述 |
|:-----------------------|:--------|:------------------------------------------|
| code | Integer | 结果码(-1.失败,1.成功) |
| msg | String | 消息 |
| data | object | 数据对象 |
|  id | Long | 序号,主键,自增长 |
|  categoryId | Long | 所属种类,来源种类 |
|  productId | Long | 产品id |
|  productName | String | 产品名称 |
|  cssFilePath | String | css模板合成后文件地址 |
|  name | String | 产品皮肤名称,唯一且不为空 |
|  imageResolution | String | 分辨率 (1.1920*1080,2.1080*1920,3.1280*1280) |
|  previewImagePath | String | 预览图片 |
|  sortNum | Integer | 排序编号 |
|  used | Integer | 是否使用 |
|  createTime | Date | 创建时间 |
|  createUserId | Long | 创建用户 |
|  updateTime | Date | 修改时间 |
| dict | object | 字典对象 |
|  imageResolution | object | 字典属性对象,详见附录 |
**响应消息样例:**
```
......@@ -2946,11 +2946,11 @@ dict|object|字典对象
**请求参数:**
参数名称|类型| 必填 |描述
:---|:---|:----|:-------
id|Long| 是 |皮肤id
siteId|Long| 是 |站点id
used|Integer| 是 |是否使用(0.否,1.是)
| 参数名称 | 类型 | 必填 | 描述 |
|:-------|:--------|:----|:--------------|
| id | Long | 是 | 皮肤id |
| siteId | Long | 是 | 站点id |
| used | Integer | 是 | 是否使用(0.否,1.是) |
**请求样例:**
```
......
......@@ -30,11 +30,28 @@ public class SkinServiceImpl extends AbstractCRUDServiceImpl<SkinDao, SkinEntity
private IDeviceMessageFeign deviceMessageFeign;
@Override
protected void updateBefore(SkinEntity entity, Context context) throws AppException {
super.updateBefore(entity, context);
if(YesNoEnum.YES.getValue()==entity.getUsed()){
//修改非当前皮肤都未未使用
SkinEntity skinEntity = new SkinEntity();
skinEntity.setUsed(YesNoEnum.NO.getValue());
SkinEntity condition = new SkinEntity();
condition.setUsed(YesNoEnum.YES.getValue());
this.updateBatch(skinEntity,condition,context);
}
}
@Override
protected void updateAfter(SkinEntity entity, Context context) throws AppException {
super.updateAfter(entity, context);
if(YesNoEnum.YES.getValue()==entity.getUsed()){
//推送皮肤更新消息
DeviceMsgReqPdu deviceMsgReqPdu = new DeviceMsgReqPdu();
deviceMsgReqPdu.setSiteid(entity.getSiteId());
......@@ -45,5 +62,4 @@ public class SkinServiceImpl extends AbstractCRUDServiceImpl<SkinDao, SkinEntity
Rest<String> rest = deviceMessageFeign.callbackByProduct(deviceMsgReqPdu);
log.info("send device message==>{}", JSON.toJSONString(rest));
}
}
}
\ No newline at end of file
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