java110 hace 3 años
padre
commit
aece5260b0

+ 6 - 10
java110-db/src/main/java/com/java110/db/Java110MybatisInterceptor.java

@@ -282,7 +282,11 @@ public class Java110MybatisInterceptor implements Interceptor {
                     String propertyName = parameterMapping.getProperty();
                     if (metaObject.hasGetter(propertyName)) {
                         Object obj = metaObject.getValue(propertyName);
-                        sql = sql.replaceFirst("\\?", getParameterValue(obj));
+                        String value = getParameterValue(obj);
+                        if(value.contains("${")){
+                            value = value.replace("${","\\${");
+                        }
+                        sql = sql.replaceFirst("\\?", value);
                         values.add(getParameterValue(obj));
                     } else if (boundSql.hasAdditionalParameter(propertyName)) {
                         Object obj = boundSql.getAdditionalParameter(propertyName);
@@ -370,13 +374,5 @@ public class Java110MybatisInterceptor implements Interceptor {
     }
 
 
-    public static void main(String[] args) {
-        String tmpTable = "" +
-                "        id_card,open_id,link,remark,user_id,app_type,app_user_name,nickname,headimgurl,community_name,state,app_user_id,community_id,app_type_cd,member_id\n" +
-                "        ";
-        String[] a = tmpTable.split(",");
-        for(String a1:a){
-            System.out.println(a1);
-        }
-    }
+
 }

+ 9 - 0
java110-db/src/main/resources/mapper/common/WorkflowStepStaffV1ServiceDaoImplMapper.xml

@@ -14,6 +14,15 @@
         )
     </insert>
 
+    <!-- 保存工作流节点信息 add by wuxw 2018-07-03 -->
+    <insert id="saveBusinessWorkflowStepStaffInfo" parameterType="Map">
+        insert into business_workflow_step_staff(
+        wss_id,operate,step_id,staff_name,b_id,community_id,staff_id,staff_role,flow_type
+        ) values (
+        #{wssId},#{operate},#{stepId},#{staffName},#{bId},#{communityId},#{staffId},#{staffRole},#{flowType}
+        )
+    </insert>
+
 
     <!-- 查询流程步骤信息 add by wuxw 2018-07-03 -->
     <select id="getWorkflowStepStaffInfo" parameterType="Map" resultType="Map">

+ 40 - 0
service-acct/src/main/java/com/java110/acct/cmd/account/DeleteAccountCmd.java

@@ -0,0 +1,40 @@
+package com.java110.acct.cmd.account;
+
+import com.alibaba.fastjson.JSONObject;
+import com.java110.core.annotation.Java110Cmd;
+import com.java110.core.context.ICmdDataFlowContext;
+import com.java110.core.event.cmd.AbstractServiceCmdListener;
+import com.java110.core.event.cmd.CmdEvent;
+import com.java110.intf.acct.IAccountInnerServiceSMO;
+import com.java110.po.account.AccountPo;
+import com.java110.utils.exception.CmdException;
+import com.java110.utils.util.Assert;
+import com.java110.utils.util.BeanConvertUtil;
+import com.java110.vo.ResultVo;
+import net.sf.ehcache.search.parser.InteractiveCmd;
+import org.springframework.beans.factory.annotation.Autowired;
+
+@Java110Cmd(serviceCode = "account.deleteAccount")
+public class DeleteAccountCmd  extends AbstractServiceCmdListener {
+
+    @Autowired
+    private IAccountInnerServiceSMO accountInnerServiceSMOImpl;
+    @Override
+    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
+
+        Assert.hasKeyAndValue(reqJson, "acctId", "acctId不能为空");
+    }
+
+    @Override
+    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
+
+        AccountPo accountPo = BeanConvertUtil.covertBean(reqJson, AccountPo.class);
+        int flag = accountInnerServiceSMOImpl.updateAccount(accountPo);
+
+        if(flag < 1){
+            throw new CmdException("更新失败");
+        }
+
+        cmdDataFlowContext.setResponseEntity(ResultVo.success());
+    }
+}

+ 0 - 49
service-api/src/main/java/com/java110/api/listener/account/DeleteAccountListener.java

@@ -1,49 +0,0 @@
-package com.java110.api.listener.account;
-
-import com.alibaba.fastjson.JSONObject;
-import com.java110.api.bmo.account.IAccountBMO;
-import com.java110.api.listener.AbstractServiceApiPlusListener;
-import com.java110.core.annotation.Java110Listener;
-import com.java110.core.context.DataFlowContext;
-import com.java110.core.event.service.api.ServiceDataFlowEvent;
-import com.java110.utils.constant.ServiceCodeAccountConstant;
-import com.java110.utils.util.Assert;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.http.HttpMethod;
-
-
-/**
- * 保存小区侦听
- * add by wuxw 2019-06-30
- */
-@Java110Listener("deleteAccountListener")
-public class DeleteAccountListener extends AbstractServiceApiPlusListener {
-
-    @Autowired
-    private IAccountBMO accountBMOImpl;
-
-    @Override
-    protected void validate(ServiceDataFlowEvent event, JSONObject reqJson) {
-        //Assert.hasKeyAndValue(reqJson, "xxx", "xxx");
-
-        Assert.hasKeyAndValue(reqJson, "acctId", "acctId不能为空");
-
-    }
-
-    @Override
-    protected void doSoService(ServiceDataFlowEvent event, DataFlowContext context, JSONObject reqJson) {
-
-        accountBMOImpl.deleteAccount(reqJson, context);
-    }
-
-    @Override
-    public String getServiceCode() {
-        return ServiceCodeAccountConstant.DELETE_ACCOUNT;
-    }
-
-    @Override
-    public HttpMethod getHttpMethod() {
-        return HttpMethod.POST;
-    }
-
-}

+ 1 - 1
service-api/src/main/java/com/java110/api/listener/system/CmdListener.java

@@ -70,7 +70,7 @@ public class CmdListener extends AbstractServiceApiListener {
         serviceCode = serviceCode.startsWith("/") ? serviceCode : ("/" + serviceCode);
 
         String requestUrl = service.getUrl() + "/cmd" + serviceCode;
-
+        //
         ResponseEntity responseEntity = null;
         if (!StringUtil.isNullOrNone(orgRequestUrl)) {
             String param = orgRequestUrl.contains("?") ? orgRequestUrl.substring(orgRequestUrl.indexOf("?") + 1, orgRequestUrl.length()) : "";

+ 2 - 1
service-common/src/main/java/com/java110/common/package-info.java

@@ -31,4 +31,5 @@
  * <p>
  * 文档参考 : http://www.homecommunity.cn/
  */
-package com.java110.common;
+package com.java110.common;
+

+ 8 - 0
service-common/src/main/java/com/java110/common/thread/UpdateApplicationKeyPwd.java

@@ -132,4 +132,12 @@ public class UpdateApplicationKeyPwd implements Runnable {
         return calendar.get(Calendar.DAY_OF_MONTH) == 1;
     }
 
+    public static void main(String[]args){
+        String a="?";
+        String value = "'${nextUserId}'";
+        if(value.contains("${")){
+            value = value.replace("${","\\${");
+        }
+        System.out.println(a.replaceFirst("\\?",value));
+    }
 }

+ 2 - 0
service-store/src/main/java/com/java110/store/cmd/contract/QueryContractCmd.java

@@ -18,6 +18,7 @@ import com.java110.vo.ResultVo;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.HttpStatus;
 import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.RestController;
 
 import java.util.ArrayList;
 import java.util.List;
@@ -44,6 +45,7 @@ public class QueryContractCmd extends AbstractServiceCmdListener {
 
     @Override
     public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
+
         ContractDto contractDto = BeanConvertUtil.covertBean(reqJson, ContractDto.class);
         //如果是到期合同
         if ("1".equals(reqJson.getString("expiration"))) {