java110
2021-09-13 d5f038b1dc96e289758a9dfa4cd258e50bf0202f
优化 部分查询失败问题
21个文件已修改
6个文件已添加
875 ■■■■ 已修改文件
java110-bean/src/main/java/com/java110/po/user/UserPo.java 176 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-db/src/main/resources/mapper/user/UserV1ServiceDaoImplMapper.xml 165 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-generator/src/main/resources/newBack/template_1.json 48 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-generator/src/main/resources/newTemplate/DeleteCmd.txt 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-generator/src/main/resources/newTemplate/IInnerServiceSMO.txt 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-generator/src/main/resources/newTemplate/ListCmd.txt 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-generator/src/main/resources/newTemplate/SaveCmd.txt 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-generator/src/main/resources/newTemplate/UpdateCmd.txt 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-interface/src/main/java/com/java110/intf/user/IUserV1InnerServiceSMO.java 68 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-api/src/main/java/com/java110/api/components/activities/AddActivitiesViewComponent.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-api/src/main/java/com/java110/api/components/community/AuditCommunityManageComponent.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-api/src/main/java/com/java110/api/components/community/AuditEnterCommunityManageComponent.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-api/src/main/java/com/java110/api/components/floor/BatchAddFloorComponent.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-api/src/main/java/com/java110/api/components/machine/MachineRecordManageComponent.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-api/src/main/java/com/java110/api/components/machine/MachineVistorPhotoManageComponent.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-api/src/main/java/com/java110/api/components/notice/AddNoticeViewComponent.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-api/src/main/java/com/java110/api/components/org/AddOrgComponent.java 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-api/src/main/java/com/java110/api/components/org/EditOrgComponent.java 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-api/src/main/java/com/java110/api/controller/app/AdminController.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-api/src/main/java/com/java110/api/controller/app/ComplaintController.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-api/src/main/java/com/java110/api/controller/app/PaymentController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-api/src/main/java/com/java110/api/smo/AppAbstractComponentSMO.java 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-api/src/main/java/com/java110/api/smo/DefaultAbstractComponentSMO.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-user/src/main/java/com/java110/user/cmd/register/UserRegisterServiceCmd.java 55 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-user/src/main/java/com/java110/user/dao/IUserV1ServiceDao.java 77 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-user/src/main/java/com/java110/user/dao/impl/UserV1ServiceDaoImpl.java 112 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-user/src/main/java/com/java110/user/smo/impl/UserV1InnerServiceSMOImpl.java 89 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-bean/src/main/java/com/java110/po/user/UserPo.java
@@ -1,61 +1,45 @@
/*
 * Copyright 2017-2020 吴学文 and java110 team.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.java110.po.user;
import java.io.Serializable;
/**
 * @ClassName UserPo
 * @Description TODO
 * @Author wuxw
 * @Date 2020/5/30 13:03
 * @Version 1.0
 * add by wuxw 2020/5/30
 **/
 * 类表述: Po 数据模型实体对象 基本保持与数据库模型一直 用于 增加修改删除 等时的数据载体
 * add by 吴学文 at 2021-09-13 08:40:33 mail: 928255095@qq.com
 * open source address: https://gitee.com/wuxw7/MicroCommunity
 * 官网:http://www.homecommunity.cn
 * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
 * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
 */
public class UserPo implements Serializable {
    private String id;
    private String userId;
    private String name;
    private String email;
    private String address;
    private String password;
    private String locationCd;
    private String age;
    private String sex;
    private String tel;
    private String levelCd;
    private String statusCd = "0";
    private String userId;
    private String levelCd;
    private String locationCd;
    private String score;
    public String getId() {
        return id;
    }
    public void setId(String id) {
        this.id = id;
    }
    public String getUserId() {
        return userId;
    }
    public void setUserId(String userId) {
        this.userId = userId;
    }
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public String getEmail() {
        return email;
    }
    public void setEmail(String email) {
        this.email = email;
    }
    private String password;
    private String name;
    private String tel;
    private String email;
    private String age;
    private String bId;
    public String getAddress() {
        return address;
@@ -63,30 +47,6 @@
    public void setAddress(String address) {
        this.address = address;
    }
    public String getPassword() {
        return password;
    }
    public void setPassword(String password) {
        this.password = password;
    }
    public String getLocationCd() {
        return locationCd;
    }
    public void setLocationCd(String locationCd) {
        this.locationCd = locationCd;
    }
    public String getAge() {
        return age;
    }
    public void setAge(String age) {
        this.age = age;
    }
    public String getSex() {
@@ -97,12 +57,20 @@
        this.sex = sex;
    }
    public String getTel() {
        return tel;
    public String getStatusCd() {
        return statusCd;
    }
    public void setTel(String tel) {
        this.tel = tel;
    public void setStatusCd(String statusCd) {
        this.statusCd = statusCd;
    }
    public String getUserId() {
        return userId;
    }
    public void setUserId(String userId) {
        this.userId = userId;
    }
    public String getLevelCd() {
@@ -113,12 +81,12 @@
        this.levelCd = levelCd;
    }
    public String getStatusCd() {
        return statusCd;
    public String getLocationCd() {
        return locationCd;
    }
    public void setStatusCd(String statusCd) {
        this.statusCd = statusCd;
    public void setLocationCd(String locationCd) {
        this.locationCd = locationCd;
    }
    public String getScore() {
@@ -128,4 +96,52 @@
    public void setScore(String score) {
        this.score = score;
    }
    public String getPassword() {
        return password;
    }
    public void setPassword(String password) {
        this.password = password;
    }
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public String getTel() {
        return tel;
    }
    public void setTel(String tel) {
        this.tel = tel;
    }
    public String getEmail() {
        return email;
    }
    public void setEmail(String email) {
        this.email = email;
    }
    public String getAge() {
        return age;
    }
    public void setAge(String age) {
        this.age = age;
    }
    public String getbId() {
        return bId;
    }
    public void setbId(String bId) {
        this.bId = bId;
    }
}
java110-db/src/main/resources/mapper/user/UserV1ServiceDaoImplMapper.xml
New file
@@ -0,0 +1,165 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="userV1ServiceDaoImpl">
    <!-- 保存用户信息 add by wuxw 2018-07-03 -->
    <insert id="saveUserInfo" parameterType="Map">
        insert into u_user(
        address,sex,user_id,level_cd,location_cd,score,password,name,tel,b_id,email,age
        ) values (
        #{address},#{sex},#{userId},#{levelCd},#{locationCd},#{score},#{password},#{name},#{tel},#{bId},#{email},#{age}
        )
    </insert>
    <!-- 查询用户信息 add by wuxw 2018-07-03 -->
    <select id="getUserInfo" parameterType="Map" resultType="Map">
        select t.address,t.sex,t.status_cd,t.status_cd statusCd,t.user_id,t.user_id userId,t.level_cd,t.level_cd
        levelCd,t.location_cd,t.location_cd locationCd,t.score,t.password,t.name,t.tel,t.b_id,t.b_id bId,t.email,t.age
        from u_user t
        where 1 =1
        <if test="address !=null and address != ''">
            and t.address= #{address}
        </if>
        <if test="sex !=null and sex != ''">
            and t.sex= #{sex}
        </if>
        <if test="statusCd !=null and statusCd != ''">
            and t.status_cd= #{statusCd}
        </if>
        <if test="userId !=null and userId != ''">
            and t.user_id= #{userId}
        </if>
        <if test="levelCd !=null and levelCd != ''">
            and t.level_cd= #{levelCd}
        </if>
        <if test="locationCd !=null and locationCd != ''">
            and t.location_cd= #{locationCd}
        </if>
        <if test="score !=null and score != ''">
            and t.score= #{score}
        </if>
        <if test="password !=null and password != ''">
            and t.password= #{password}
        </if>
        <if test="name !=null and name != ''">
            and t.name= #{name}
        </if>
        <if test="tel !=null and tel != ''">
            and t.tel= #{tel}
        </if>
        <if test="bId !=null and bId != ''">
            and t.b_id= #{bId}
        </if>
        <if test="email !=null and email != ''">
            and t.email= #{email}
        </if>
        <if test="age !=null and age != ''">
            and t.age= #{age}
        </if>
        order by t.create_time desc
        <if test="page != -1 and page != null ">
            limit #{page}, #{row}
        </if>
    </select>
    <!-- 修改用户信息 add by wuxw 2018-07-03 -->
    <update id="updateUserInfo" parameterType="Map">
        update u_user t set t.status_cd = #{statusCd}
        <if test="newBId != null and newBId != ''">
            ,t.b_id = #{newBId}
        </if>
        <if test="address !=null and address != ''">
            , t.address= #{address}
        </if>
        <if test="sex !=null and sex != ''">
            , t.sex= #{sex}
        </if>
        <if test="levelCd !=null and levelCd != ''">
            , t.level_cd= #{levelCd}
        </if>
        <if test="locationCd !=null and locationCd != ''">
            , t.location_cd= #{locationCd}
        </if>
        <if test="score !=null and score != ''">
            , t.score= #{score}
        </if>
        <if test="password !=null and password != ''">
            , t.password= #{password}
        </if>
        <if test="name !=null and name != ''">
            , t.name= #{name}
        </if>
        <if test="tel !=null and tel != ''">
            , t.tel= #{tel}
        </if>
        <if test="email !=null and email != ''">
            , t.email= #{email}
        </if>
        <if test="age !=null and age != ''">
            , t.age= #{age}
        </if>
        where 1=1
        <if test="userId !=null and userId != ''">
            and t.user_id= #{userId}
        </if>
        <if test="bId !=null and bId != ''">
            and t.b_id= #{bId}
        </if>
    </update>
    <!-- 查询用户数量 add by wuxw 2018-07-03 -->
    <select id="queryUsersCount" parameterType="Map" resultType="Map">
        select count(1) count
        from u_user t
        where 1 =1
        <if test="address !=null and address != ''">
            and t.address= #{address}
        </if>
        <if test="sex !=null and sex != ''">
            and t.sex= #{sex}
        </if>
        <if test="statusCd !=null and statusCd != ''">
            and t.status_cd= #{statusCd}
        </if>
        <if test="userId !=null and userId != ''">
            and t.user_id= #{userId}
        </if>
        <if test="levelCd !=null and levelCd != ''">
            and t.level_cd= #{levelCd}
        </if>
        <if test="locationCd !=null and locationCd != ''">
            and t.location_cd= #{locationCd}
        </if>
        <if test="score !=null and score != ''">
            and t.score= #{score}
        </if>
        <if test="password !=null and password != ''">
            and t.password= #{password}
        </if>
        <if test="name !=null and name != ''">
            and t.name= #{name}
        </if>
        <if test="tel !=null and tel != ''">
            and t.tel= #{tel}
        </if>
        <if test="bId !=null and bId != ''">
            and t.b_id= #{bId}
        </if>
        <if test="email !=null and email != ''">
            and t.email= #{email}
        </if>
        <if test="age !=null and age != ''">
            and t.age= #{age}
        </if>
    </select>
</mapper>
java110-generator/src/main/resources/newBack/template_1.json
@@ -1,37 +1,39 @@
{
  "autoMove": true,
  "id": "hisId",
  "name": "businessTableHis",
  "desc": "订单轨迹",
  "shareParam": "hisId",
  "shareColumn": "his_id",
  "shareName": "dev",
  "tableName": "c_business_table_his",
  "id": "userId",
  "name": "user",
  "desc": "用户",
  "shareParam": "userId",
  "shareColumn": "user_id",
  "shareName": "user",
  "tableName": "u_user",
  "param": {
    "hisId": "his_id",
    "action": "action",
    "actionObj": "action_obj",
    "actionObjHis": "action_obj_his",
    "businessTypeCd": "business_type_cd",
    "remark": "remark",
    "userId": "user_id",
    "name": "name",
    "email": "email",
    "address": "address",
    "password": "password",
    "locationCd": "location_cd",
    "age": "age",
    "sex": "sex",
    "tel": "tel",
    "levelCd": "level_cd",
    "bId": "b_id",
    "score": "score",
    "statusCd": "status_cd"
  },
  "required": [
    {
      "code": "action",
      "msg": "动作不能为空"
      "code": "name",
      "msg": "用户名称不能为空"
    },
    {
      "code": "actionObj",
      "msg": "动作对象不能为空"
      "code": "password",
      "msg": "密码不能为空"
    },
    {
      "code": "actionObjHis",
      "msg": "轨迹表不能为空"
    },
    {
      "code": "businessTypeCd",
      "msg": "业务编码"
      "code": "tel",
      "msg": "手机号不能为空"
    }
  ]
}
java110-generator/src/main/resources/newTemplate/DeleteCmd.txt
@@ -22,8 +22,8 @@
import com.java110.core.event.cmd.AbstractServiceCmdListener;
import com.java110.core.event.cmd.CmdEvent;
import com.java110.core.factory.GenerateCodeFactory;
import com.java110.intf.dev.IBusinessTableHisV1InnerServiceSMO;
import com.java110.po.businessTableHis.BusinessTableHisPo;
import com.java110.intf.dev.I@@TemplateCode@@V1InnerServiceSMO;
import com.java110.po.@@templateCode@@.@@TemplateCode@@Po;
import com.java110.utils.exception.CmdException;
import com.java110.utils.util.Assert;
import com.java110.utils.util.BeanConvertUtil;
java110-generator/src/main/resources/newTemplate/IInnerServiceSMO.txt
@@ -34,7 +34,7 @@
 * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
 */
@FeignClient(name = "@@shareName@@-service", configuration = {FeignConfiguration.class})
@RequestMapping("/storeApi")
@RequestMapping("/storeV1Api")
public interface IStoreV1InnerServiceSMO {
java110-generator/src/main/resources/newTemplate/ListCmd.txt
@@ -22,8 +22,8 @@
import com.java110.core.event.cmd.AbstractServiceCmdListener;
import com.java110.core.event.cmd.CmdEvent;
import com.java110.core.factory.GenerateCodeFactory;
import com.java110.intf.dev.IBusinessTableHisV1InnerServiceSMO;
import com.java110.po.businessTableHis.BusinessTableHisPo;
import com.java110.intf.dev.I@@TemplateCode@@V1InnerServiceSMO;
import com.java110.po.@@templateCode@@.@@TemplateCode@@Po;
import com.java110.utils.exception.CmdException;
import com.java110.utils.util.Assert;
import com.java110.utils.util.BeanConvertUtil;
java110-generator/src/main/resources/newTemplate/SaveCmd.txt
@@ -22,8 +22,8 @@
import com.java110.core.event.cmd.AbstractServiceCmdListener;
import com.java110.core.event.cmd.CmdEvent;
import com.java110.core.factory.GenerateCodeFactory;
import com.java110.intf.dev.IBusinessTableHisV1InnerServiceSMO;
import com.java110.po.businessTableHis.BusinessTableHisPo;
import com.java110.intf.dev.I@@TemplateCode@@V1InnerServiceSMO;
import com.java110.po.@@templateCode@@.@@TemplateCode@@Po;
import com.java110.utils.exception.CmdException;
import com.java110.utils.util.Assert;
import com.java110.utils.util.BeanConvertUtil;
java110-generator/src/main/resources/newTemplate/UpdateCmd.txt
@@ -22,8 +22,8 @@
import com.java110.core.event.cmd.AbstractServiceCmdListener;
import com.java110.core.event.cmd.CmdEvent;
import com.java110.core.factory.GenerateCodeFactory;
import com.java110.intf.dev.IBusinessTableHisV1InnerServiceSMO;
import com.java110.po.businessTableHis.BusinessTableHisPo;
import com.java110.intf.dev.I@@TemplateCode@@V1InnerServiceSMO;
import com.java110.po.@@templateCode@@.@@TemplateCode@@Po;
import com.java110.utils.exception.CmdException;
import com.java110.utils.util.Assert;
import com.java110.utils.util.BeanConvertUtil;
java110-interface/src/main/java/com/java110/intf/user/IUserV1InnerServiceSMO.java
New file
@@ -0,0 +1,68 @@
/*
 * Copyright 2017-2020 吴学文 and java110 team.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.java110.intf.user;
import com.java110.config.feign.FeignConfiguration;
import com.java110.dto.user.UserDto;
import com.java110.po.user.UserPo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import java.util.List;
/**
 * 类表述: 服务之前调用的接口类,不对外提供接口能力 只用于接口建调用
 * add by 吴学文 at 2021-09-13 08:40:33 mail: 928255095@qq.com
 * open source address: https://gitee.com/wuxw7/MicroCommunity
 * 官网:http://www.homecommunity.cn
 * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
 * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
 */
@FeignClient(name = "user-service", configuration = {FeignConfiguration.class})
@RequestMapping("/userV1Api")
public interface IUserV1InnerServiceSMO {
    @RequestMapping(value = "/saveUser", method = RequestMethod.POST)
    public int saveUser(@RequestBody  UserPo userPo);
    @RequestMapping(value = "/updateUser", method = RequestMethod.POST)
    public int updateUser(@RequestBody  UserPo userPo);
    @RequestMapping(value = "/deleteUser", method = RequestMethod.POST)
    public int deleteUser(@RequestBody  UserPo userPo);
    /**
     * <p>查询小区楼信息</p>
     *
     *
     * @param userDto 数据对象分享
     * @return UserDto 对象数据
     */
    @RequestMapping(value = "/queryUsers", method = RequestMethod.POST)
    List<UserDto> queryUsers(@RequestBody UserDto userDto);
    /**
     * 查询<p>小区楼</p>总记录数
     *
     * @param userDto 数据对象分享
     * @return 小区下的小区楼记录数
     */
    @RequestMapping(value = "/queryUsersCount", method = RequestMethod.POST)
    int queryUsersCount(@RequestBody UserDto userDto);
}
service-api/src/main/java/com/java110/api/components/activities/AddActivitiesViewComponent.java
@@ -42,7 +42,8 @@
    public ResponseEntity<String> uploadImage(IPageData pd, MultipartFile uploadFile) throws Exception {
        JSONObject paramIn = JSONObject.parseObject(pd.getReqData());
        paramIn.put("suffix", "jpeg");
        IPageData newPd = PageData.newInstance().builder(pd.getUserId(), pd.getUserName(),pd.getToken(), paramIn.toJSONString(), pd.getComponentCode(), pd.getComponentMethod(), "", pd.getSessionId(),pd.getAppId());
        IPageData newPd = PageData.newInstance().builder(pd.getUserId(), pd.getUserName(),pd.getToken(), paramIn.toJSONString(), pd.getComponentCode(), pd.getComponentMethod(), "",
                pd.getSessionId(),pd.getAppId(),pd.getHeaders());
        return addFileSMOImpl.saveFile(newPd, uploadFile);
    }
service-api/src/main/java/com/java110/api/components/community/AuditCommunityManageComponent.java
@@ -40,7 +40,7 @@
        reqParam.put("state", StateConstant.NO_AUDIT);
        IPageData newPd = PageData.newInstance().builder(pd.getUserId(), pd.getUserName(), pd.getToken(),
                reqParam.toJSONString(), pd.getComponentCode(), pd.getComponentMethod(), "", pd.getSessionId(),pd.getAppId());
                reqParam.toJSONString(), pd.getComponentCode(), pd.getComponentMethod(), "", pd.getSessionId(),pd.getAppId(),pd.getHeaders());
        return listCommunitysSMOImpl.listCommunitys(newPd);
    }
service-api/src/main/java/com/java110/api/components/community/AuditEnterCommunityManageComponent.java
@@ -39,7 +39,8 @@
        //reqParam.put("auditStatusCd", StateConstant.NO_AUDIT);
        IPageData newPd = PageData.newInstance().builder(pd.getUserId(), pd.getUserName(), pd.getToken(),
                reqParam.toJSONString(), pd.getComponentCode(), pd.getComponentMethod(), "", pd.getSessionId(),pd.getAppId());
                reqParam.toJSONString(), pd.getComponentCode(), pd.getComponentMethod(),
                "", pd.getSessionId(),pd.getAppId(),pd.getHeaders());
        return listAuditEnterCommunitysSMOImpl.listAuditEnterCommunitys(newPd);
    }
service-api/src/main/java/com/java110/api/components/floor/BatchAddFloorComponent.java
@@ -77,7 +77,7 @@
                        pd.getToken(),
                        needReqParam.toJSONString(),
                        pd.getComponentCode(),
                        pd.getComponentMethod(), "", pd.getSessionId(),pd.getAppId());
                        pd.getComponentMethod(), "", pd.getSessionId(),pd.getAppId(),pd.getHeaders());
                floorEntity = floorServiceSMOImpl.saveFloor(newPd);
                if (floorEntity.getStatusCode() == HttpStatus.OK) {
service-api/src/main/java/com/java110/api/components/machine/MachineRecordManageComponent.java
@@ -33,7 +33,8 @@
        reqParam.put("recordTypeCd", "8888");
        IPageData newPd = PageData.newInstance().builder(pd.getUserId(),pd.getUserName(), pd.getToken(),
                reqParam.toJSONString(), pd.getComponentCode(), pd.getComponentMethod(), "", pd.getSessionId(),pd.getAppId());
                reqParam.toJSONString(), pd.getComponentCode(), pd.getComponentMethod(),
                "", pd.getSessionId(),pd.getAppId(),pd.getHeaders());
        return listMachineRecordsSMOImpl.listMachineRecords(newPd);
    }
service-api/src/main/java/com/java110/api/components/machine/MachineVistorPhotoManageComponent.java
@@ -33,7 +33,8 @@
        reqParam.put("recordTypeCd", "6666");
        IPageData newPd = PageData.newInstance().builder(pd.getUserId(),pd.getUserName(), pd.getToken(),
                reqParam.toJSONString(), pd.getComponentCode(), pd.getComponentMethod(), "", pd.getSessionId(),pd.getAppId());
                reqParam.toJSONString(), pd.getComponentCode(), pd.getComponentMethod(),
                "", pd.getSessionId(),pd.getAppId(),pd.getHeaders());
        return listMachineRecordsSMOImpl.listMachineRecords(newPd);
service-api/src/main/java/com/java110/api/components/notice/AddNoticeViewComponent.java
@@ -41,7 +41,8 @@
    public ResponseEntity<String> uploadImage(IPageData pd, MultipartFile uploadFile) throws Exception {
        JSONObject paramIn = JSONObject.parseObject(pd.getReqData());
        paramIn.put("suffix", "jpeg");
        IPageData newPd = PageData.newInstance().builder(pd.getUserId(), pd.getUserName(),pd.getToken(), paramIn.toJSONString(), pd.getComponentCode(), pd.getComponentMethod(), "", pd.getSessionId(),pd.getAppId());
        IPageData newPd = PageData.newInstance().builder(pd.getUserId(), pd.getUserName(),pd.getToken(), paramIn.toJSONString(), pd.getComponentCode(), pd.getComponentMethod(),
                "", pd.getSessionId(),pd.getAppId(),pd.getHeaders());
        return addFileSMOImpl.saveFile(newPd, uploadFile);
    }
service-api/src/main/java/com/java110/api/components/org/AddOrgComponent.java
@@ -48,7 +48,9 @@
                pd.getUserName(), pd.getToken(),
                paramIn.toJSONString(), pd.getComponentCode(),
                pd.getComponentMethod(), "",
                pd.getAppId());
                pd.getSessionId(),
                pd.getAppId(),
                pd.getHeaders());
        return communityServiceSMOImpl.listMyCommunity(newPd);
service-api/src/main/java/com/java110/api/components/org/EditOrgComponent.java
@@ -43,7 +43,9 @@
                pd.getUserName(), pd.getToken(),
                paramIn.toJSONString(), pd.getComponentCode(),
                pd.getComponentMethod(), "",
                pd.getAppId());
                pd.getSessionId(),
                pd.getAppId(),
                pd.getHeaders());
        return communityServiceSMOImpl.listMyCommunity(newPd);
service-api/src/main/java/com/java110/api/controller/app/AdminController.java
@@ -52,7 +52,8 @@
        IPageData newPd = PageData.newInstance().builder(pd.getUserId(), pd.getUserName(), pd.getToken(), pd.getReqData(),
                "login", "", "", pd.getSessionId(),
                pd.getAppId());
                pd.getAppId(),
                pd.getHeaders());
        ResponseEntity<String> responseEntity = adminLoginPropertyAccountServiceSMOImpl.doLogin(newPd);
        request.setAttribute(CommonConstant.CONTEXT_PAGE_DATA, newPd);
        return responseEntity;
service-api/src/main/java/com/java110/api/controller/app/ComplaintController.java
@@ -63,7 +63,8 @@
        }
        IPageData newPd = PageData.newInstance().builder(pd.getUserId(), pd.getUserName(),pd.getToken(), postInfo,
                "", "", "", pd.getSessionId(),
                appId);
                appId,
                pd.getHeaders());
        return saveComplaintSMOImpl.save(newPd);
    }
service-api/src/main/java/com/java110/api/controller/app/PaymentController.java
@@ -111,7 +111,7 @@
        IPageData newPd = PageData.newInstance().builder(pd.getUserId(), pd.getUserName(), pd.getToken(), postInfo,
                "", "", "", pd.getSessionId(),
                appId);
                appId,pd.getHeaders());
        return toPayOweFeeSMOImpl.toPay(newPd);
    }
service-api/src/main/java/com/java110/api/smo/AppAbstractComponentSMO.java
@@ -69,8 +69,18 @@
        if (!headers.containsKey(CommonConstant.HTTP_USER_ID)) {
            headers.put(CommonConstant.HTTP_USER_ID, StringUtil.isEmpty(pd.getUserId()) ? "-1" : pd.getUserId());
        }
        headers.put(CommonConstant.USER_ID, StringUtil.isEmpty(pd.getUserId()) ? "-1" : pd.getUserId());
        if (!headers.containsKey(CommonConstant.HTTP_APP_ID)) {
            headers.put(CommonConstant.HTTP_APP_ID, pd.getAppId());
        }
        if (!headers.containsKey(CommonConstant.HTTP_TRANSACTION_ID)) {
            headers.put(CommonConstant.HTTP_TRANSACTION_ID, pd.getTransactionId());
        }
        if (!headers.containsKey(CommonConstant.HTTP_REQ_TIME)) {
            headers.put(CommonConstant.HTTP_REQ_TIME, pd.getRequestTime());
        }
        if (!headers.containsKey(CommonConstant.HTTP_SIGN)) {
            headers.put(CommonConstant.HTTP_SIGN, "");
        }
        if (url.indexOf("?") > -1) {
            url = url.substring(0, url.indexOf("?"));
service-api/src/main/java/com/java110/api/smo/DefaultAbstractComponentSMO.java
@@ -5,6 +5,7 @@
import com.java110.api.properties.WechatAuthProperties;
import com.java110.core.component.AbstractComponentSMO;
import com.java110.core.context.IPageData;
import com.java110.core.factory.GenerateCodeFactory;
import com.java110.dto.basePrivilege.BasePrivilegeDto;
import com.java110.entity.component.ComponentValidateResult;
import com.java110.utils.cache.PrivilegeCache;
@@ -14,6 +15,7 @@
import com.java110.utils.constant.ServiceConstant;
import com.java110.utils.exception.SMOException;
import com.java110.utils.util.Assert;
import com.java110.utils.util.DateUtil;
import com.java110.utils.util.StringUtil;
import com.java110.utils.util.UrlParamToJsonUtil;
import com.java110.vo.ResultVo;
@@ -83,6 +85,22 @@
        headers.put(CommonConstant.USER_ID, StringUtil.isEmpty(pd.getUserId()) ? "-1" : pd.getUserId());
        if (!headers.containsKey(CommonConstant.HTTP_USER_ID)) {
            headers.put(CommonConstant.HTTP_USER_ID, StringUtil.isEmpty(pd.getUserId()) ? "-1" : pd.getUserId());
        }
        if (!headers.containsKey(CommonConstant.HTTP_APP_ID)) {
            headers.put(CommonConstant.HTTP_APP_ID, pd.getAppId());
        }
        if (!headers.containsKey(CommonConstant.HTTP_TRANSACTION_ID)) {
            headers.put(CommonConstant.HTTP_TRANSACTION_ID, GenerateCodeFactory.getUUID());
        }
        if (!headers.containsKey(CommonConstant.HTTP_REQ_TIME)) {
            headers.put(CommonConstant.HTTP_REQ_TIME, DateUtil.getNowDefault());
        }
        if (!headers.containsKey(CommonConstant.HTTP_SIGN)) {
            headers.put(CommonConstant.HTTP_SIGN, "");
        }
        if (url.indexOf("?") > -1) {
            url = url.substring(0, url.indexOf("?"));
        }
service-user/src/main/java/com/java110/user/cmd/register/UserRegisterServiceCmd.java
New file
@@ -0,0 +1,55 @@
package com.java110.user.cmd.register;
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.store.IStoreInnerServiceSMO;
import com.java110.intf.user.IUserInnerServiceSMO;
import com.java110.intf.user.IUserV1InnerServiceSMO;
import com.java110.po.user.UserPo;
import com.java110.utils.constant.UserLevelConstant;
import com.java110.utils.exception.CmdException;
import com.java110.utils.util.BeanConvertUtil;
import com.java110.vo.ResultVo;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
/**
 * 服务注册功能迁移
 */
@Java110Cmd(serviceCode = "user.service.register")
public class UserRegisterServiceCmd extends AbstractServiceCmdListener {
    private final static Logger logger = LoggerFactory.getLogger(UserRegisterServiceCmd.class);
    @Autowired
    private IUserV1InnerServiceSMO userV1InnerServiceSMOImpl;
    @Autowired
    private IStoreInnerServiceSMO storeInnerServiceSMOImpl;
    @Autowired
    private IUserInnerServiceSMO userInnerServiceSMOImpl;
    @Override
    protected void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
    }
    @Override
    protected void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
        reqJson.put("userId", "-1");
        reqJson.put("levelCd", UserLevelConstant.USER_LEVEL_ADMIN);
        UserPo userPo = BeanConvertUtil.covertBean(reqJson, UserPo.class);
        userPo.setbId("-1");
        int flag = userV1InnerServiceSMOImpl.saveUser(userPo);
        if (flag < 1) {
            throw new CmdException("注册失败");
        }
        cmdDataFlowContext.setResponseEntity(ResultVo.success());
    }
}
service-user/src/main/java/com/java110/user/dao/IUserV1ServiceDao.java
New file
@@ -0,0 +1,77 @@
/*
 * Copyright 2017-2020 吴学文 and java110 team.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.java110.user.dao;
import com.java110.utils.exception.DAOException;
import com.java110.entity.merchant.BoMerchant;
import com.java110.entity.merchant.BoMerchantAttr;
import com.java110.entity.merchant.Merchant;
import com.java110.entity.merchant.MerchantAttr;
import java.util.List;
import java.util.Map;
/**
 * 类表述:
 * add by 吴学文 at 2021-09-13 08:40:33 mail: 928255095@qq.com
 * open source address: https://gitee.com/wuxw7/MicroCommunity
 * 官网:http://www.homecommunity.cn
 * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
 * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
 */
public interface IUserV1ServiceDao {
    /**
     * 保存 用户信息
     * @param info
     * @throws DAOException DAO异常
     */
    int saveUserInfo(Map info) throws DAOException;
    /**
     * 查询用户信息(instance过程)
     * 根据bId 查询用户信息
     * @param info bId 信息
     * @return 用户信息
     * @throws DAOException DAO异常
     */
    List<Map> getUserInfo(Map info) throws DAOException;
    /**
     * 修改用户信息
     * @param info 修改信息
     * @throws DAOException DAO异常
     */
    int updateUserInfo(Map info) throws DAOException;
    /**
     * 查询用户总数
     *
     * @param info 用户信息
     * @return 用户数量
     */
    int queryUsersCount(Map info);
}
service-user/src/main/java/com/java110/user/dao/impl/UserV1ServiceDaoImpl.java
New file
@@ -0,0 +1,112 @@
/*
 * Copyright 2017-2020 吴学文 and java110 team.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.java110.user.dao.impl;
import com.alibaba.fastjson.JSONObject;
import com.java110.utils.constant.ResponseConstant;
import com.java110.utils.exception.DAOException;
import com.java110.utils.util.DateUtil;
import com.java110.core.base.dao.BaseServiceDao;
import com.java110.user.dao.IUserV1ServiceDao;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
import java.util.Map;
/**
 * 类表述:
 * add by 吴学文 at 2021-09-13 08:40:33 mail: 928255095@qq.com
 * open source address: https://gitee.com/wuxw7/MicroCommunity
 * 官网:http://www.homecommunity.cn
 * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
 * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
 */
@Service("userV1ServiceDaoImpl")
public class UserV1ServiceDaoImpl extends BaseServiceDao implements IUserV1ServiceDao {
    private static Logger logger = LoggerFactory.getLogger(UserV1ServiceDaoImpl.class);
    /**
     * 保存用户信息 到 instance
     * @param info   bId 信息
     * @throws DAOException DAO异常
     */
    @Override
    public int saveUserInfo(Map info) throws DAOException {
        logger.debug("保存 saveUserInfo 入参 info : {}",info);
        int saveFlag = sqlSessionTemplate.insert("userV1ServiceDaoImpl.saveUserInfo",info);
        return saveFlag;
    }
    /**
     * 查询用户信息(instance)
     * @param info bId 信息
     * @return List<Map>
     * @throws DAOException DAO异常
     */
    @Override
    public List<Map> getUserInfo(Map info) throws DAOException {
        logger.debug("查询 getUserInfo 入参 info : {}",info);
        List<Map> businessUserInfos = sqlSessionTemplate.selectList("userV1ServiceDaoImpl.getUserInfo",info);
        return businessUserInfos;
    }
    /**
     * 修改用户信息
     * @param info 修改信息
     * @throws DAOException DAO异常
     */
    @Override
    public int updateUserInfo(Map info) throws DAOException {
        logger.debug("修改 updateUserInfo 入参 info : {}",info);
        int saveFlag = sqlSessionTemplate.update("userV1ServiceDaoImpl.updateUserInfo",info);
        return saveFlag;
    }
     /**
     * 查询用户数量
     * @param info 用户信息
     * @return 用户数量
     */
    @Override
    public int queryUsersCount(Map info) {
        logger.debug("查询 queryUsersCount 入参 info : {}",info);
        List<Map> businessUserInfos = sqlSessionTemplate.selectList("userV1ServiceDaoImpl.queryUsersCount", info);
        if (businessUserInfos.size() < 1) {
            return 0;
        }
        return Integer.parseInt(businessUserInfos.get(0).get("count").toString());
    }
}
service-user/src/main/java/com/java110/user/smo/impl/UserV1InnerServiceSMOImpl.java
New file
@@ -0,0 +1,89 @@
/*
 * Copyright 2017-2020 吴学文 and java110 team.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.java110.user.smo.impl;
import com.java110.user.dao.IUserV1ServiceDao;
import com.java110.intf.user.IUserV1InnerServiceSMO;
import com.java110.dto.user.UserDto;
import com.java110.po.user.UserPo;
import com.java110.utils.util.BeanConvertUtil;
import com.java110.core.base.smo.BaseServiceSMO;
import com.java110.dto.user.UserDto;
import com.java110.dto.PageDto;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import java.util.ArrayList;
import java.util.List;
/**
 * 类表述: 服务之前调用的接口实现类,不对外提供接口能力 只用于接口建调用
 * add by 吴学文 at 2021-09-13 08:40:33 mail: 928255095@qq.com
 * open source address: https://gitee.com/wuxw7/MicroCommunity
 * 官网:http://www.homecommunity.cn
 * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
 * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
 */
@RestController
public class UserV1InnerServiceSMOImpl extends BaseServiceSMO implements IUserV1InnerServiceSMO {
    @Autowired
    private IUserV1ServiceDao userV1ServiceDaoImpl;
    @Override
    public int saveUser(@RequestBody  UserPo userPo) {
        int saveFlag = userV1ServiceDaoImpl.saveUserInfo(BeanConvertUtil.beanCovertMap(userPo));
        return saveFlag;
    }
     @Override
    public int updateUser(@RequestBody  UserPo userPo) {
        int saveFlag = userV1ServiceDaoImpl.updateUserInfo(BeanConvertUtil.beanCovertMap(userPo));
        return saveFlag;
    }
     @Override
    public int deleteUser(@RequestBody  UserPo userPo) {
       userPo.setStatusCd("1");
       int saveFlag = userV1ServiceDaoImpl.updateUserInfo(BeanConvertUtil.beanCovertMap(userPo));
       return saveFlag;
    }
    @Override
    public List<UserDto> queryUsers(@RequestBody  UserDto userDto) {
        //校验是否传了 分页信息
        int page = userDto.getPage();
        if (page != PageDto.DEFAULT_PAGE) {
            userDto.setPage((page - 1) * userDto.getRow());
        }
        List<UserDto> users = BeanConvertUtil.covertBeanList(userV1ServiceDaoImpl.getUserInfo(BeanConvertUtil.beanCovertMap(userDto)), UserDto.class);
        return users;
    }
    @Override
    public int queryUsersCount(@RequestBody UserDto userDto) {
        return userV1ServiceDaoImpl.queryUsersCount(BeanConvertUtil.beanCovertMap(userDto));    }
}