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

添加样表皮肤管理

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