浏览代码

fixed 是否自动打印订单小票信息

fushengqian 1 年之前
父节点
当前提交
e47d95dd16

+ 2 - 0
fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendPrinterController.java

@@ -174,6 +174,7 @@ public class BackendPrinterController extends BaseController {
         String name = params.get("name") == null ? "" : params.get("name").toString();
         String sn = params.get("sn") == null ? "" : params.get("sn").toString();
         String description = params.get("description") == null ? "" : params.get("description").toString();
+        String autoPrint = params.get("autoPrint") == null ? YesOrNoEnum.NO.getKey() : params.get("autoPrint").toString();
 
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
@@ -186,6 +187,7 @@ public class BackendPrinterController extends BaseController {
         mtPrinter.setStoreId(Integer.parseInt(storeId));
         mtPrinter.setName(name);
         mtPrinter.setSn(sn);
+        mtPrinter.setAutoPrint(autoPrint);
         mtPrinter.setDescription(description);
         mtPrinter.setMerchantId(accountInfo.getMerchantId());
         if (StringUtil.isNotEmpty(id)) {

+ 3 - 0
fuint-repository/src/main/java/com/fuint/repository/model/MtPrinter.java

@@ -40,6 +40,9 @@ public class MtPrinter implements Serializable {
     @ApiModelProperty("打印机名称")
     private String name;
 
+    @ApiModelProperty("是否自动打印机")
+    private String autoPrint;
+
     @ApiModelProperty("创建时间")
     private Date createTime;