Browse Source

fix

release_toaliyun_real
winter 1 year ago
parent
commit
b77f8b509b
2 changed files with 6 additions and 6 deletions
  1. +2
    -0
      mallinkService/src/main/java/com/iformall/domain/po/WxFinancePrintTemplate.java
  2. +4
    -6
      mallinkService/src/main/java/com/iformall/service/impl/WxFinancePrintServiceImpl.java

+ 2
- 0
mallinkService/src/main/java/com/iformall/domain/po/WxFinancePrintTemplate.java View File

@@ -54,6 +54,8 @@ public class WxFinancePrintTemplate extends TenantEntity {
return null; return null;
} }
@TableField(exist = false) @TableField(exist = false)
private JSONObject contentJsonUpdate;
@TableField(exist = false)
private List tempItems; private List tempItems;
} }

+ 4
- 6
mallinkService/src/main/java/com/iformall/service/impl/WxFinancePrintServiceImpl.java View File

@@ -86,21 +86,19 @@ public class WxFinancePrintServiceImpl implements WxFinancePrintService {
public void update(WxFinancePrintTemplate record) { public void update(WxFinancePrintTemplate record) {
WxFinancePrintTemplate t = getTemplateById(record.getId()); WxFinancePrintTemplate t = getTemplateById(record.getId());
Map map = new HashMap(); Map map = new HashMap();
if (null == record.getContentJson()) {
if (null == record.getContentJsonUpdate()) {
map.put("width", 770); map.put("width", 770);
map.put("height", 500); map.put("height", 500);
map.put("pageWidth", 215); map.put("pageWidth", 215);
map.put("pageHeight", 140); map.put("pageHeight", 140);
map.put("id", String.valueOf(t.getId())); map.put("id", String.valueOf(t.getId()));
map.put("title", record.getName());
map.put("title", record.getTitle());
map.put("type", t.getType()); map.put("type", t.getType());
map.put("tempItems", record.getTempItems());
record.setContent(JSON.toJSONString(map)); record.setContent(JSON.toJSONString(map));
} }
Date date = new Date(); Date date = new Date();
JSONObject o = record.getContentJson();
o.put("title", record.getName());
o.put("tempItems", record.getTempItems());
JSONObject o = record.getContentJsonUpdate();
o.put("title", record.getTitle());
record.setContent(JSON.toJSONString(o)); record.setContent(JSON.toJSONString(o));
record.setName(record.getTitle()); record.setName(record.getTitle());
record.setUpdateTime(date); record.setUpdateTime(date);


Loading…
Cancel
Save