New file |
| | |
| | | package com.hx.phip.dao.mapper; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import com.hx.mybatisTool.SqlSentence; |
| | | import com.hx.phiappt.model.Consumables; |
| | | |
| | | public interface ConsumablesMapper { |
| | | /**新增,返回主键*/ |
| | | int insert(Consumables consumables); |
| | | /**查询条数*/ |
| | | int selectCount(SqlSentence sqlSentence); |
| | | /**查询条数*/ |
| | | int selectCountSql(SqlSentence sqlSentence); |
| | | /**查询列表,返回实体类的List*/ |
| | | List<Consumables> selectList(SqlSentence sqlSentence); |
| | | /**查询列表,返回Map的List*/ |
| | | List<Map<String,Object>> selectListMap(SqlSentence sqlSentence); |
| | | /**查询,返回单个实体*/ |
| | | Consumables selectOne(SqlSentence sqlSentence); |
| | | /**查询,返回单个map*/ |
| | | Map<String,Object> selectOneMap(SqlSentence sqlSentence); |
| | | /**查询,返回实体类没有大数据的*/ |
| | | Consumables selectOneByKey(Object object); |
| | | /**查询,返回实体类有大数据的*/ |
| | | Consumables selectOneByKeyBlob(Object object); |
| | | /**更新,返回更新数量*/ |
| | | int updateWhere(SqlSentence sqlSentence); |
| | | /**更新,返回更新数量*/ |
| | | int updateAll(Consumables consumables); |
| | | /**删除,返回删除数量*/ |
| | | int deleteWhere(SqlSentence sqlSentence); |
| | | /**删除,返回删除数量*/ |
| | | int deleteById(Object object); |
| | | } |
New file |
| | |
| | | package com.hx.phip.dao.mapper; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import com.hx.mybatisTool.SqlSentence; |
| | | import com.hx.phiappt.model.order.OrderDeveloper; |
| | | |
| | | public interface OrderDeveloperMapper { |
| | | /**新增,返回主键*/ |
| | | int insert(OrderDeveloper orderDeveloper); |
| | | /**查询条数*/ |
| | | int selectCount(SqlSentence sqlSentence); |
| | | /**查询条数*/ |
| | | int selectCountSql(SqlSentence sqlSentence); |
| | | /**查询列表,返回实体类的List*/ |
| | | List<OrderDeveloper> selectList(SqlSentence sqlSentence); |
| | | /**查询列表,返回Map的List*/ |
| | | List<Map<String,Object>> selectListMap(SqlSentence sqlSentence); |
| | | /**查询,返回单个实体*/ |
| | | OrderDeveloper selectOne(SqlSentence sqlSentence); |
| | | /**查询,返回单个map*/ |
| | | Map<String,Object> selectOneMap(SqlSentence sqlSentence); |
| | | /**查询,返回实体类没有大数据的*/ |
| | | OrderDeveloper selectOneByKey(Object object); |
| | | /**查询,返回实体类有大数据的*/ |
| | | OrderDeveloper selectOneByKeyBlob(Object object); |
| | | /**更新,返回更新数量*/ |
| | | int updateWhere(SqlSentence sqlSentence); |
| | | /**更新,返回更新数量*/ |
| | | int updateAll(OrderDeveloper orderDeveloper); |
| | | /**删除,返回删除数量*/ |
| | | int deleteWhere(SqlSentence sqlSentence); |
| | | /**删除,返回删除数量*/ |
| | | int deleteById(Object object); |
| | | } |
New file |
| | |
| | | package com.hx.phip.dao.mapper; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import com.hx.mybatisTool.SqlSentence; |
| | | import com.hx.phiappt.model.order.OrderItem; |
| | | |
| | | public interface OrderItemMapper { |
| | | /**新增,返回主键*/ |
| | | int insert(OrderItem orderItem); |
| | | /**查询条数*/ |
| | | int selectCount(SqlSentence sqlSentence); |
| | | /**查询条数*/ |
| | | int selectCountSql(SqlSentence sqlSentence); |
| | | /**查询列表,返回实体类的List*/ |
| | | List<OrderItem> selectList(SqlSentence sqlSentence); |
| | | /**查询列表,返回Map的List*/ |
| | | List<Map<String,Object>> selectListMap(SqlSentence sqlSentence); |
| | | /**查询,返回单个实体*/ |
| | | OrderItem selectOne(SqlSentence sqlSentence); |
| | | /**查询,返回单个map*/ |
| | | Map<String,Object> selectOneMap(SqlSentence sqlSentence); |
| | | /**查询,返回实体类没有大数据的*/ |
| | | OrderItem selectOneByKey(Object object); |
| | | /**查询,返回实体类有大数据的*/ |
| | | OrderItem selectOneByKeyBlob(Object object); |
| | | /**更新,返回更新数量*/ |
| | | int updateWhere(SqlSentence sqlSentence); |
| | | /**更新,返回更新数量*/ |
| | | int updateAll(OrderItem orderItem); |
| | | /**删除,返回删除数量*/ |
| | | int deleteWhere(SqlSentence sqlSentence); |
| | | /**删除,返回删除数量*/ |
| | | int deleteById(Object object); |
| | | } |
New file |
| | |
| | | package com.hx.phip.dao.mapper; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import com.hx.mybatisTool.SqlSentence; |
| | | import com.hx.phiappt.model.order.OrdersTotal; |
| | | |
| | | public interface OrdersTotalMapper { |
| | | /**新增,返回主键*/ |
| | | int insert(OrdersTotal ordersTotal); |
| | | /**查询条数*/ |
| | | int selectCount(SqlSentence sqlSentence); |
| | | /**查询条数*/ |
| | | int selectCountSql(SqlSentence sqlSentence); |
| | | /**查询列表,返回实体类的List*/ |
| | | List<OrdersTotal> selectList(SqlSentence sqlSentence); |
| | | /**查询列表,返回Map的List*/ |
| | | List<Map<String,Object>> selectListMap(SqlSentence sqlSentence); |
| | | /**查询,返回单个实体*/ |
| | | OrdersTotal selectOne(SqlSentence sqlSentence); |
| | | /**查询,返回单个map*/ |
| | | Map<String,Object> selectOneMap(SqlSentence sqlSentence); |
| | | /**查询,返回实体类没有大数据的*/ |
| | | OrdersTotal selectOneByKey(Object object); |
| | | /**查询,返回实体类有大数据的*/ |
| | | OrdersTotal selectOneByKeyBlob(Object object); |
| | | /**更新,返回更新数量*/ |
| | | int updateWhere(SqlSentence sqlSentence); |
| | | /**更新,返回更新数量*/ |
| | | int updateAll(OrdersTotal ordersTotal); |
| | | /**删除,返回删除数量*/ |
| | | int deleteWhere(SqlSentence sqlSentence); |
| | | /**删除,返回删除数量*/ |
| | | int deleteById(Object object); |
| | | } |
New file |
| | |
| | | package com.hx.phip.dao.mapper; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import com.hx.mybatisTool.SqlSentence; |
| | | import com.hx.phiappt.model.Project; |
| | | |
| | | public interface ProjectMapper { |
| | | /**新增,返回主键*/ |
| | | int insert(Project project); |
| | | /**查询条数*/ |
| | | int selectCount(SqlSentence sqlSentence); |
| | | /**查询条数*/ |
| | | int selectCountSql(SqlSentence sqlSentence); |
| | | /**查询列表,返回实体类的List*/ |
| | | List<Project> selectList(SqlSentence sqlSentence); |
| | | /**查询列表,返回Map的List*/ |
| | | List<Map<String,Object>> selectListMap(SqlSentence sqlSentence); |
| | | /**查询,返回单个实体*/ |
| | | Project selectOne(SqlSentence sqlSentence); |
| | | /**查询,返回单个map*/ |
| | | Map<String,Object> selectOneMap(SqlSentence sqlSentence); |
| | | /**查询,返回实体类没有大数据的*/ |
| | | Project selectOneByKey(Object object); |
| | | /**查询,返回实体类有大数据的*/ |
| | | Project selectOneByKeyBlob(Object object); |
| | | /**更新,返回更新数量*/ |
| | | int updateWhere(SqlSentence sqlSentence); |
| | | /**更新,返回更新数量*/ |
| | | int updateAll(Project project); |
| | | /**删除,返回删除数量*/ |
| | | int deleteWhere(SqlSentence sqlSentence); |
| | | /**删除,返回删除数量*/ |
| | | int deleteById(Object object); |
| | | } |
New file |
| | |
| | | package com.hx.phip.dao.mapper; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import com.hx.mybatisTool.SqlSentence; |
| | | import com.hx.phiappt.model.SysAdmin; |
| | | |
| | | public interface SysAdminMapper { |
| | | /**新增,返回主键*/ |
| | | int insert(SysAdmin sysAdmin); |
| | | /**查询条数*/ |
| | | int selectCount(SqlSentence sqlSentence); |
| | | /**查询条数*/ |
| | | int selectCountSql(SqlSentence sqlSentence); |
| | | /**查询列表,返回实体类的List*/ |
| | | List<SysAdmin> selectList(SqlSentence sqlSentence); |
| | | /**查询列表,返回Map的List*/ |
| | | List<Map<String,Object>> selectListMap(SqlSentence sqlSentence); |
| | | /**查询,返回单个实体*/ |
| | | SysAdmin selectOne(SqlSentence sqlSentence); |
| | | /**查询,返回单个map*/ |
| | | Map<String,Object> selectOneMap(SqlSentence sqlSentence); |
| | | /**查询,返回实体类没有大数据的*/ |
| | | SysAdmin selectOneByKey(Object object); |
| | | /**查询,返回实体类有大数据的*/ |
| | | SysAdmin selectOneByKeyBlob(Object object); |
| | | /**更新,返回更新数量*/ |
| | | int updateWhere(SqlSentence sqlSentence); |
| | | /**更新,返回更新数量*/ |
| | | int updateAll(SysAdmin sysAdmin); |
| | | /**删除,返回删除数量*/ |
| | | int deleteWhere(SqlSentence sqlSentence); |
| | | /**删除,返回删除数量*/ |
| | | int deleteById(Object object); |
| | | } |
New file |
| | |
| | | package com.hx.phip.dao.mapper; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import com.hx.mybatisTool.SqlSentence; |
| | | import com.hx.phiappt.model.SystemParameter; |
| | | |
| | | public interface SystemParameterMapper { |
| | | /**新增,返回主键*/ |
| | | int insert(SystemParameter systemParameter); |
| | | /**查询条数*/ |
| | | int selectCount(SqlSentence sqlSentence); |
| | | /**查询条数*/ |
| | | int selectCountSql(SqlSentence sqlSentence); |
| | | /**查询列表,返回实体类的List*/ |
| | | List<SystemParameter> selectList(SqlSentence sqlSentence); |
| | | /**查询列表,返回Map的List*/ |
| | | List<Map<String,Object>> selectListMap(SqlSentence sqlSentence); |
| | | /**查询,返回单个实体*/ |
| | | SystemParameter selectOne(SqlSentence sqlSentence); |
| | | /**查询,返回单个map*/ |
| | | Map<String,Object> selectOneMap(SqlSentence sqlSentence); |
| | | /**查询,返回实体类没有大数据的*/ |
| | | SystemParameter selectOneByKey(Object object); |
| | | /**查询,返回实体类有大数据的*/ |
| | | SystemParameter selectOneByKeyBlob(Object object); |
| | | /**更新,返回更新数量*/ |
| | | int updateWhere(SqlSentence sqlSentence); |
| | | /**更新,返回更新数量*/ |
| | | int updateAll(SystemParameter systemParameter); |
| | | /**删除,返回删除数量*/ |
| | | int deleteWhere(SqlSentence sqlSentence); |
| | | /**删除,返回删除数量*/ |
| | | int deleteById(Object object); |
| | | } |
New file |
| | |
| | | package com.hx.phip.dao.mapper; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import com.hx.mybatisTool.SqlSentence; |
| | | import com.hx.phiappt.model.User; |
| | | |
| | | public interface UserMapper { |
| | | /**新增,返回主键*/ |
| | | int insert(User user); |
| | | /**查询条数*/ |
| | | int selectCount(SqlSentence sqlSentence); |
| | | /**查询条数*/ |
| | | int selectCountSql(SqlSentence sqlSentence); |
| | | /**查询列表,返回实体类的List*/ |
| | | List<User> selectList(SqlSentence sqlSentence); |
| | | /**查询列表,返回Map的List*/ |
| | | List<Map<String,Object>> selectListMap(SqlSentence sqlSentence); |
| | | /**查询,返回单个实体*/ |
| | | User selectOne(SqlSentence sqlSentence); |
| | | /**查询,返回单个map*/ |
| | | Map<String,Object> selectOneMap(SqlSentence sqlSentence); |
| | | /**查询,返回实体类没有大数据的*/ |
| | | User selectOneByKey(Object object); |
| | | /**查询,返回实体类有大数据的*/ |
| | | User selectOneByKeyBlob(Object object); |
| | | /**更新,返回更新数量*/ |
| | | int updateWhere(SqlSentence sqlSentence); |
| | | /**更新,返回更新数量*/ |
| | | int updateAll(User user); |
| | | /**删除,返回删除数量*/ |
| | | int deleteWhere(SqlSentence sqlSentence); |
| | | /**删除,返回删除数量*/ |
| | | int deleteById(Object object); |
| | | } |
New file |
| | |
| | | package com.hx.phip.tool; |
| | | |
| | | import com.hx.common.service.CommonService; |
| | | import com.hx.mybatisTool.SqlSentence; |
| | | import com.hx.phiappt.model.SystemParameter; |
| | | import com.hx.phip.dao.mapper.SystemParameterMapper; |
| | | import com.hx.util.DateUtil; |
| | | import com.hx.util.SimpleTool; |
| | | |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | import java.util.Random; |
| | | |
| | | public class CreateNo { |
| | | |
| | | private static final String[] COLOR_ARR = new String[]{"0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F"}; |
| | | |
| | | /** |
| | | * 创建随机16位进制字符 |
| | | * @param num |
| | | * @return |
| | | */ |
| | | public static String createHex(int num) |
| | | { |
| | | String str = ""; |
| | | Random random = new Random(); |
| | | for(int i = 0;i < num;i ++) |
| | | { |
| | | str += COLOR_ARR[random.nextInt(16)]; |
| | | } |
| | | |
| | | return str; |
| | | } |
| | | |
| | | /**创建含时间的订单号 |
| | | * |
| | | * @param service SystemParameterService |
| | | * @param key 唯一前缀 |
| | | * @param length 数字长度 |
| | | * @param format 时间格式 |
| | | * @return yyyy |
| | | */ |
| | | public static synchronized String createTimeNo(CommonService commonService, String key, |
| | | int length, String format) { |
| | | if (!SimpleTool.checkNotNull(key)) { |
| | | throw new RuntimeException("no keyNo"); |
| | | } |
| | | if(!SimpleTool.checkNotNull(length)){ |
| | | length = 7; |
| | | } |
| | | if(!SimpleTool.checkNotNull(format)){ |
| | | format = "yyyyMMddHHmmSS"; |
| | | } |
| | | |
| | | SqlSentence sqlSentence = new SqlSentence(); |
| | | Map<String,Object> map = new HashMap<>(); |
| | | map.put("paramName",key); |
| | | sqlSentence.sqlSentence("SELECT * FROM system_parameter WHERE paramName = #{m.paramName}",map); |
| | | // SystemParameter parameter = service.selectOne(sqlSentence); |
| | | SystemParameter parameter = commonService.selectOne(SystemParameterMapper.class,sqlSentence); |
| | | if (parameter == null) { |
| | | parameter = new SystemParameter(); |
| | | parameter.setParamName(key); |
| | | parameter.setParamValue(key); |
| | | parameter.setParamValue1("1"); |
| | | // service.insert(parameter); |
| | | commonService.insert(SystemParameterMapper.class,parameter); |
| | | } |
| | | |
| | | String value = parameter.getParamValue1(); |
| | | |
| | | //判断位数 |
| | | int no; |
| | | no = Integer.parseInt(value); |
| | | if(value.length()>length){ |
| | | value = "1"; |
| | | no = 1; |
| | | }else{ |
| | | no += 1; |
| | | } |
| | | |
| | | StringBuilder s = new StringBuilder(); |
| | | for (int i = value.length(); i < length; i++) { |
| | | s.append("0"); |
| | | } |
| | | s.append(value); |
| | | |
| | | parameter.setParamValue1(Integer.toString(no)); |
| | | // service.updateAll(parameter); |
| | | commonService.updateAll(SystemParameterMapper.class,parameter); |
| | | |
| | | String prefix = DateUtil.dateFormat(new Date(),format); |
| | | return parameter.getParamValue()+prefix+s; |
| | | } |
| | | |
| | | /**创建含时间的订单号 |
| | | * |
| | | * @param mapper mapper |
| | | * @param key 唯一前缀 |
| | | * @param length 数字长度 |
| | | * @param format 时间格式 |
| | | * @return yyyy |
| | | */ |
| | | public static synchronized String createTimeNo(SystemParameterMapper mapper, String key, |
| | | int length, String format) { |
| | | if (!SimpleTool.checkNotNull(key)) { |
| | | throw new RuntimeException("no keyNo"); |
| | | } |
| | | if(!SimpleTool.checkNotNull(length)){ |
| | | length = 7; |
| | | } |
| | | if(!SimpleTool.checkNotNull(format)){ |
| | | format = "yyyyMMddHHmmSS"; |
| | | } |
| | | |
| | | SqlSentence sqlSentence = new SqlSentence(); |
| | | Map<String,Object> map = new HashMap<>(); |
| | | map.put("paramName",key); |
| | | sqlSentence.sqlSentence("SELECT * FROM system_parameter WHERE paramName = #{m.paramName}",map); |
| | | SystemParameter parameter = mapper.selectOne(sqlSentence); |
| | | if (parameter == null) { |
| | | parameter = new SystemParameter(); |
| | | parameter.setParamName(key); |
| | | parameter.setParamValue(key); |
| | | parameter.setParamValue1("1"); |
| | | mapper.insert(parameter); |
| | | } |
| | | |
| | | String value = parameter.getParamValue1(); |
| | | |
| | | //判断位数 |
| | | int no; |
| | | no = Integer.parseInt(value); |
| | | if(value.length()>length){ |
| | | value = "1"; |
| | | no = 1; |
| | | }else{ |
| | | no += 1; |
| | | } |
| | | |
| | | StringBuilder s = new StringBuilder(); |
| | | for (int i = value.length(); i < length; i++) { |
| | | s.append("0"); |
| | | } |
| | | s.append(value); |
| | | |
| | | parameter.setParamValue1(Integer.toString(no)); |
| | | mapper.updateAll(parameter); |
| | | |
| | | String prefix = DateUtil.dateFormat(new Date(),format); |
| | | return parameter.getParamValue()+prefix+s; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | <?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"> |
| | | <!-- namespace:该mapper.xml映射文件的 唯一标识 --> |
| | | <mapper namespace="com.hx.phip.dao.mapper.ConsumablesMapper"> |
| | | |
| | | <!-- 整个实体类修改,表字段=实体类字段--> |
| | | <sql id="Update_Column_All"> |
| | | <trim prefixOverrides=","> |
| | | ,serialNumber = #{serialNumber},name = #{name},englishName = #{englishName},abbreviation = #{abbreviation},englishAbbreviation = #{englishAbbreviation},consumablesTypeId = #{consumablesTypeId},consumablesTypeName = #{consumablesTypeName},spec = #{spec},unitIdCode = #{unitIdCode},unitName = #{unitName},price = #{price},isUp = #{isUp},buyPrice = #{buyPrice},manufacturer = #{manufacturer},registerNum = #{registerNum},approvalNum = #{approvalNum},recordNum = #{recordNum},isBaseMedicine = #{isBaseMedicine},priceTagCode = #{priceTagCode},priceTagName = #{priceTagName},brand = #{brand},origin = #{origin},minimumOrderQuantity = #{minimumOrderQuantity},manufacturerBarcode = #{manufacturerBarcode},internalBarcode = #{internalBarcode},purchaseTypeCode = #{purchaseTypeCode},purchaseTypeName = #{purchaseTypeName},incomeIncludedCode = #{incomeIncludedCode},incomeIncludedName = #{incomeIncludedName},incomeSubjectCode = #{incomeSubjectCode},incomeSubjectName = #{incomeSubjectName},enable = #{enable},usageCode = #{usageCode},usageName = #{usageName},tag = #{tag},isImplantMaterial = #{isImplantMaterial},isHighValue = #{isHighValue},HomeMade = #{HomeMade},isBatchNumber = #{isBatchNumber},isGiftPoints = #{isGiftPoints},isAvailableForSale = #{isAvailableForSale},isMakeADeal = #{isMakeADeal},departmentName = #{departmentName},familiesRoomCode = #{familiesRoomCode},searchPinyin = #{searchPinyin},standardCode = #{standardCode},standardName = #{standardName},format = #{format},remark = #{remark},hisId = #{hisId},typeCode = #{typeCode},typeName = #{typeName},priceMax = #{priceMax},priceMin = #{priceMin},isDel = #{isDel},createTime = #{createTime} |
| | | </trim> |
| | | </sql> |
| | | |
| | | <!-- 后续通过 namespace.id--> |
| | | <!--parameterType:输入参数的类型 |
| | | resultType:查询返回结果值的类型 ,返回类型 --> |
| | | <insert id="insert" parameterType="com.hx.phiappt.model.Consumables"> |
| | | <selectKey keyProperty="id" resultType="String" order="BEFORE"> |
| | | select replace(uuid(),'-','') from dual |
| | | </selectKey> |
| | | insert into consumables (id,serialNumber,name,englishName,abbreviation,englishAbbreviation,consumablesTypeId,consumablesTypeName,spec,unitIdCode,unitName,price,isUp,buyPrice,manufacturer,registerNum,approvalNum,recordNum,isBaseMedicine,priceTagCode,priceTagName,brand,origin,minimumOrderQuantity,manufacturerBarcode,internalBarcode,purchaseTypeCode,purchaseTypeName,incomeIncludedCode,incomeIncludedName,incomeSubjectCode,incomeSubjectName,enable,usageCode,usageName,tag,isImplantMaterial,isHighValue,HomeMade,isBatchNumber,isGiftPoints,isAvailableForSale,isMakeADeal,departmentName,familiesRoomCode,searchPinyin,standardCode,standardName,format,remark,hisId,typeCode,typeName,priceMax,priceMin,isDel,createTime) values (#{id},#{serialNumber},#{name},#{englishName},#{abbreviation},#{englishAbbreviation},#{consumablesTypeId},#{consumablesTypeName},#{spec},#{unitIdCode},#{unitName},#{price},#{isUp},#{buyPrice},#{manufacturer},#{registerNum},#{approvalNum},#{recordNum},#{isBaseMedicine},#{priceTagCode},#{priceTagName},#{brand},#{origin},#{minimumOrderQuantity},#{manufacturerBarcode},#{internalBarcode},#{purchaseTypeCode},#{purchaseTypeName},#{incomeIncludedCode},#{incomeIncludedName},#{incomeSubjectCode},#{incomeSubjectName},#{enable},#{usageCode},#{usageName},#{tag},#{isImplantMaterial},#{isHighValue},#{HomeMade},#{isBatchNumber},#{isGiftPoints},#{isAvailableForSale},#{isMakeADeal},#{departmentName},#{familiesRoomCode},#{searchPinyin},#{standardCode},#{standardName},#{format},#{remark},#{hisId},#{typeCode},#{typeName},#{priceMax},#{priceMin},#{isDel},#{createTime}) |
| | | </insert> |
| | | |
| | | <select id="selectList" resultType="com.hx.phiappt.model.Consumables" parameterType="com.hx.mybatisTool.SqlSentence" > |
| | | ${sqlSentence} |
| | | </select> |
| | | |
| | | <select id="selectListMap" resultType="java.util.Map" parameterType="com.hx.mybatisTool.SqlSentence" > |
| | | ${sqlSentence} |
| | | </select> |
| | | |
| | | <select id="selectOne" resultType="com.hx.phiappt.model.Consumables" parameterType="com.hx.mybatisTool.SqlSentence" > |
| | | ${sqlSentence} |
| | | </select> |
| | | |
| | | <select id="selectOneMap" resultType="java.util.Map" parameterType="com.hx.mybatisTool.SqlSentence" > |
| | | ${sqlSentence} |
| | | </select> |
| | | |
| | | <select id="selectCount" resultType="int" parameterType="com.hx.mybatisTool.SqlSentence" > |
| | | select |
| | | COUNT(*) |
| | | from consumables |
| | | WHERE ${sqlSentence} |
| | | </select> |
| | | |
| | | <select id="selectCountSql" resultType="int" parameterType="com.hx.mybatisTool.SqlSentence" > |
| | | ${sqlSentence} |
| | | </select> |
| | | |
| | | <select id="selectOneByKey" resultType="com.hx.phiappt.model.Consumables" parameterType="java.lang.Object" > |
| | | select |
| | | id,serialNumber,name,englishName,abbreviation,englishAbbreviation,consumablesTypeId,consumablesTypeName,spec,unitIdCode,unitName,price,isUp,buyPrice,manufacturer,registerNum,approvalNum,recordNum,isBaseMedicine,priceTagCode,priceTagName,brand,origin,minimumOrderQuantity,manufacturerBarcode,internalBarcode,purchaseTypeCode,purchaseTypeName,incomeIncludedCode,incomeIncludedName,incomeSubjectCode,incomeSubjectName,enable,usageCode,usageName,tag,isImplantMaterial,isHighValue,HomeMade,isBatchNumber,isGiftPoints,isAvailableForSale,isMakeADeal,departmentName,familiesRoomCode,searchPinyin,standardCode,standardName,format,remark,hisId,typeCode,typeName,priceMax,priceMin,isDel,createTime |
| | | from consumables |
| | | WHERE id = #{value} |
| | | </select> |
| | | |
| | | <select id="selectOneByKeyBlob" resultType="com.hx.phiappt.model.Consumables" parameterType="java.lang.Object" > |
| | | select |
| | | id,serialNumber,name,englishName,abbreviation,englishAbbreviation,consumablesTypeId,consumablesTypeName,spec,unitIdCode,unitName,price,isUp,buyPrice,manufacturer,registerNum,approvalNum,recordNum,isBaseMedicine,priceTagCode,priceTagName,brand,origin,minimumOrderQuantity,manufacturerBarcode,internalBarcode,purchaseTypeCode,purchaseTypeName,incomeIncludedCode,incomeIncludedName,incomeSubjectCode,incomeSubjectName,enable,usageCode,usageName,tag,isImplantMaterial,isHighValue,HomeMade,isBatchNumber,isGiftPoints,isAvailableForSale,isMakeADeal,departmentName,familiesRoomCode,searchPinyin,standardCode,standardName,format,remark,hisId,typeCode,typeName,priceMax,priceMin,isDel,createTime |
| | | from consumables |
| | | WHERE id = #{value} |
| | | </select> |
| | | |
| | | <update id="updateWhere" parameterType="com.hx.mybatisTool.SqlSentence"> |
| | | update |
| | | consumables |
| | | SET ${sqlSentence} |
| | | </update> |
| | | |
| | | <update id="updateAll" parameterType="com.hx.phiappt.model.Consumables"> |
| | | update consumables |
| | | SET <include refid="Update_Column_All"/> |
| | | WHERE id = #{id} |
| | | </update> |
| | | |
| | | <delete id="deleteWhere" parameterType="com.hx.mybatisTool.SqlSentence"> |
| | | delete from consumables WHERE ${sqlSentence} |
| | | </delete> |
| | | |
| | | <delete id="deleteById" parameterType="java.lang.Object"> |
| | | delete from consumables WHERE id = #{value} |
| | | </delete> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?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"> |
| | | <!-- namespace:该mapper.xml映射文件的 唯一标识 --> |
| | | <mapper namespace="com.hx.phip.dao.mapper.OrderDeveloperMapper"> |
| | | |
| | | <!-- 整个实体类修改,表字段=实体类字段--> |
| | | <sql id="Update_Column_All"> |
| | | <trim prefixOverrides=","> |
| | | ,orderId = #{orderId},shopId = #{shopId},shopName = #{shopName},employeeId = #{employeeId},employeeName = #{employeeName},isDel = #{isDel},createTime = #{createTime} |
| | | </trim> |
| | | </sql> |
| | | |
| | | <!-- 后续通过 namespace.id--> |
| | | <!--parameterType:输入参数的类型 |
| | | resultType:查询返回结果值的类型 ,返回类型 --> |
| | | <insert id="insert" parameterType="com.hx.phiappt.model.order.OrderDeveloper"> |
| | | <selectKey keyProperty="id" resultType="String" order="BEFORE"> |
| | | select replace(uuid(),'-','') from dual |
| | | </selectKey> |
| | | insert into orders_developer (id,orderId,shopId,shopName,employeeId,employeeName,isDel,createTime) values (#{id},#{orderId},#{shopId},#{shopName},#{employeeId},#{employeeName},#{isDel},#{createTime}) |
| | | </insert> |
| | | |
| | | <select id="selectList" resultType="com.hx.phiappt.model.order.OrderDeveloper" parameterType="com.hx.mybatisTool.SqlSentence" > |
| | | ${sqlSentence} |
| | | </select> |
| | | |
| | | <select id="selectListMap" resultType="java.util.Map" parameterType="com.hx.mybatisTool.SqlSentence" > |
| | | ${sqlSentence} |
| | | </select> |
| | | |
| | | <select id="selectOne" resultType="com.hx.phiappt.model.order.OrderDeveloper" parameterType="com.hx.mybatisTool.SqlSentence" > |
| | | ${sqlSentence} |
| | | </select> |
| | | |
| | | <select id="selectOneMap" resultType="java.util.Map" parameterType="com.hx.mybatisTool.SqlSentence" > |
| | | ${sqlSentence} |
| | | </select> |
| | | |
| | | <select id="selectCount" resultType="int" parameterType="com.hx.mybatisTool.SqlSentence" > |
| | | select |
| | | COUNT(*) |
| | | from orders_developer |
| | | WHERE ${sqlSentence} |
| | | </select> |
| | | |
| | | <select id="selectCountSql" resultType="int" parameterType="com.hx.mybatisTool.SqlSentence" > |
| | | ${sqlSentence} |
| | | </select> |
| | | |
| | | <select id="selectOneByKey" resultType="com.hx.phiappt.model.order.OrderDeveloper" parameterType="java.lang.Object" > |
| | | select |
| | | id,orderId,shopId,shopName,employeeId,employeeName,isDel,createTime |
| | | from orders_developer |
| | | WHERE id = #{value} |
| | | </select> |
| | | |
| | | <select id="selectOneByKeyBlob" resultType="com.hx.phiappt.model.order.OrderDeveloper" parameterType="java.lang.Object" > |
| | | select |
| | | id,orderId,shopId,shopName,employeeId,employeeName,isDel,createTime |
| | | from orders_developer |
| | | WHERE id = #{value} |
| | | </select> |
| | | |
| | | <update id="updateWhere" parameterType="com.hx.mybatisTool.SqlSentence"> |
| | | update |
| | | orders_developer |
| | | SET ${sqlSentence} |
| | | </update> |
| | | |
| | | <update id="updateAll" parameterType="com.hx.phiappt.model.order.OrderDeveloper"> |
| | | update orders_developer |
| | | SET <include refid="Update_Column_All"/> |
| | | WHERE id = #{id} |
| | | </update> |
| | | |
| | | <delete id="deleteWhere" parameterType="com.hx.mybatisTool.SqlSentence"> |
| | | delete from orders_developer WHERE ${sqlSentence} |
| | | </delete> |
| | | |
| | | <delete id="deleteById" parameterType="java.lang.Object"> |
| | | delete from orders_developer WHERE id = #{value} |
| | | </delete> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?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"> |
| | | <!-- namespace:该mapper.xml映射文件的 唯一标识 --> |
| | | <mapper namespace="com.hx.phip.dao.mapper.OrderItemMapper"> |
| | | |
| | | <!-- 整个实体类修改,表字段=实体类字段--> |
| | | <sql id="Update_Column_All"> |
| | | <trim prefixOverrides=","> |
| | | ,orderNo = #{orderNo},type = #{type},goodsNo = #{goodsNo},goodsName = #{goodsName},goodsImage = #{goodsImage},specs = #{specs},total = #{total},actualTotal = #{actualTotal},oriPrice = #{oriPrice},curPrice = #{curPrice},single = #{single},discount = #{discount},usedTotal = #{usedTotal},buyNum = #{buyNum},commonId = #{commonId},orderId = #{orderId},isDel = #{isDel},createTime = #{createTime} |
| | | </trim> |
| | | </sql> |
| | | |
| | | <!-- 后续通过 namespace.id--> |
| | | <!--parameterType:输入参数的类型 |
| | | resultType:查询返回结果值的类型 ,返回类型 --> |
| | | <insert id="insert" parameterType="com.hx.phiappt.model.order.OrderItem"> |
| | | <selectKey keyProperty="id" resultType="String" order="BEFORE"> |
| | | select replace(uuid(),'-','') from dual |
| | | </selectKey> |
| | | insert into order_item (id,orderNo,type,goodsNo,goodsName,goodsImage,specs,total,actualTotal,oriPrice,curPrice,single,discount,usedTotal,buyNum,commonId,orderId,isDel,createTime) values (#{id},#{orderNo},#{type},#{goodsNo},#{goodsName},#{goodsImage},#{specs},#{total},#{actualTotal},#{oriPrice},#{curPrice},#{single},#{discount},#{usedTotal},#{buyNum},#{commonId},#{orderId},#{isDel},#{createTime}) |
| | | </insert> |
| | | |
| | | <select id="selectList" resultType="com.hx.phiappt.model.order.OrderItem" parameterType="com.hx.mybatisTool.SqlSentence" > |
| | | ${sqlSentence} |
| | | </select> |
| | | |
| | | <select id="selectListMap" resultType="java.util.Map" parameterType="com.hx.mybatisTool.SqlSentence" > |
| | | ${sqlSentence} |
| | | </select> |
| | | |
| | | <select id="selectOne" resultType="com.hx.phiappt.model.order.OrderItem" parameterType="com.hx.mybatisTool.SqlSentence" > |
| | | ${sqlSentence} |
| | | </select> |
| | | |
| | | <select id="selectOneMap" resultType="java.util.Map" parameterType="com.hx.mybatisTool.SqlSentence" > |
| | | ${sqlSentence} |
| | | </select> |
| | | |
| | | <select id="selectCount" resultType="int" parameterType="com.hx.mybatisTool.SqlSentence" > |
| | | select |
| | | COUNT(*) |
| | | from order_item |
| | | WHERE ${sqlSentence} |
| | | </select> |
| | | |
| | | <select id="selectCountSql" resultType="int" parameterType="com.hx.mybatisTool.SqlSentence" > |
| | | ${sqlSentence} |
| | | </select> |
| | | |
| | | <select id="selectOneByKey" resultType="com.hx.phiappt.model.order.OrderItem" parameterType="java.lang.Object" > |
| | | select |
| | | id,orderNo,type,goodsNo,goodsName,goodsImage,specs,total,actualTotal,oriPrice,curPrice,single,discount,usedTotal,buyNum,commonId,orderId,isDel,createTime |
| | | from order_item |
| | | WHERE id = #{value} |
| | | </select> |
| | | |
| | | <select id="selectOneByKeyBlob" resultType="com.hx.phiappt.model.order.OrderItem" parameterType="java.lang.Object" > |
| | | select |
| | | id,orderNo,type,goodsNo,goodsName,goodsImage,specs,total,actualTotal,oriPrice,curPrice,single,discount,usedTotal,buyNum,commonId,orderId,isDel,createTime |
| | | from order_item |
| | | WHERE id = #{value} |
| | | </select> |
| | | |
| | | <update id="updateWhere" parameterType="com.hx.mybatisTool.SqlSentence"> |
| | | update |
| | | order_item |
| | | SET ${sqlSentence} |
| | | </update> |
| | | |
| | | <update id="updateAll" parameterType="com.hx.phiappt.model.order.OrderItem"> |
| | | update order_item |
| | | SET <include refid="Update_Column_All"/> |
| | | WHERE id = #{id} |
| | | </update> |
| | | |
| | | <delete id="deleteWhere" parameterType="com.hx.mybatisTool.SqlSentence"> |
| | | delete from order_item WHERE ${sqlSentence} |
| | | </delete> |
| | | |
| | | <delete id="deleteById" parameterType="java.lang.Object"> |
| | | delete from order_item WHERE id = #{value} |
| | | </delete> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?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"> |
| | | <!-- namespace:该mapper.xml映射文件的 唯一标识 --> |
| | | <mapper namespace="com.hx.phip.dao.mapper.OrdersTotalMapper"> |
| | | |
| | | <!-- 整个实体类修改,表字段=实体类字段--> |
| | | <sql id="Update_Column_All"> |
| | | <trim prefixOverrides=","> |
| | | ,orderNo = #{orderNo},type = #{type},status = #{status},payStatus = #{payStatus},payTime = #{payTime},refundStatus = #{refundStatus},cancelTime = #{cancelTime},total = #{total},actualTotal = #{actualTotal},payTotal = #{payTotal},payRecharge = #{payRecharge},payIncrement = #{payIncrement},discountTotal = #{discountTotal},shopId = #{shopId},shopName = #{shopName},operatorType = #{operatorType},operatorId = #{operatorId},operatorName = #{operatorName},developerShopId = #{developerShopId},developerShopName = #{developerShopName},sourceType = #{sourceType},appId = #{appId},sourceCode = #{sourceCode},sourceName = #{sourceName},sourceOrderNo = #{sourceOrderNo},hisSynStatus = #{hisSynStatus},hisOrderId = #{hisOrderId},remarks = #{remarks},userId = #{userId},isDel = #{isDel},createTime = #{createTime} |
| | | </trim> |
| | | </sql> |
| | | |
| | | <!-- 后续通过 namespace.id--> |
| | | <!--parameterType:输入参数的类型 |
| | | resultType:查询返回结果值的类型 ,返回类型 --> |
| | | <insert id="insert" parameterType="com.hx.phiappt.model.order.OrdersTotal"> |
| | | <selectKey keyProperty="id" resultType="String" order="BEFORE"> |
| | | select replace(uuid(),'-','') from dual |
| | | </selectKey> |
| | | insert into orders_total (id,orderNo,type,status,payStatus,payTime,refundStatus,cancelTime,total,actualTotal,payTotal,payRecharge,payIncrement,discountTotal,shopId,shopName,operatorType,operatorId,operatorName,developerShopId,developerShopName,sourceType,appId,sourceCode,sourceName,sourceOrderNo,hisSynStatus,hisOrderId,remarks,userId,isDel,createTime) values (#{id},#{orderNo},#{type},#{status},#{payStatus},#{payTime},#{refundStatus},#{cancelTime},#{total},#{actualTotal},#{payTotal},#{payRecharge},#{payIncrement},#{discountTotal},#{shopId},#{shopName},#{operatorType},#{operatorId},#{operatorName},#{developerShopId},#{developerShopName},#{sourceType},#{appId},#{sourceCode},#{sourceName},#{sourceOrderNo},#{hisSynStatus},#{hisOrderId},#{remarks},#{userId},#{isDel},#{createTime}) |
| | | </insert> |
| | | |
| | | <select id="selectList" resultType="com.hx.phiappt.model.order.OrdersTotal" parameterType="com.hx.mybatisTool.SqlSentence" > |
| | | ${sqlSentence} |
| | | </select> |
| | | |
| | | <select id="selectListMap" resultType="java.util.Map" parameterType="com.hx.mybatisTool.SqlSentence" > |
| | | ${sqlSentence} |
| | | </select> |
| | | |
| | | <select id="selectOne" resultType="com.hx.phiappt.model.order.OrdersTotal" parameterType="com.hx.mybatisTool.SqlSentence" > |
| | | ${sqlSentence} |
| | | </select> |
| | | |
| | | <select id="selectOneMap" resultType="java.util.Map" parameterType="com.hx.mybatisTool.SqlSentence" > |
| | | ${sqlSentence} |
| | | </select> |
| | | |
| | | <select id="selectCount" resultType="int" parameterType="com.hx.mybatisTool.SqlSentence" > |
| | | select |
| | | COUNT(*) |
| | | from orders_total |
| | | WHERE ${sqlSentence} |
| | | </select> |
| | | |
| | | <select id="selectCountSql" resultType="int" parameterType="com.hx.mybatisTool.SqlSentence" > |
| | | ${sqlSentence} |
| | | </select> |
| | | |
| | | <select id="selectOneByKey" resultType="com.hx.phiappt.model.order.OrdersTotal" parameterType="java.lang.Object" > |
| | | select |
| | | id,orderNo,type,status,payStatus,payTime,refundStatus,cancelTime,total,actualTotal,payTotal,payRecharge,payIncrement,discountTotal,shopId,shopName,operatorType,operatorId,operatorName,developerShopId,developerShopName,sourceType,appId,sourceCode,sourceName,sourceOrderNo,hisSynStatus,hisOrderId,remarks,userId,isDel,createTime |
| | | from orders_total |
| | | WHERE id = #{value} |
| | | </select> |
| | | |
| | | <select id="selectOneByKeyBlob" resultType="com.hx.phiappt.model.order.OrdersTotal" parameterType="java.lang.Object" > |
| | | select |
| | | id,orderNo,type,status,payStatus,payTime,refundStatus,cancelTime,total,actualTotal,payTotal,payRecharge,payIncrement,discountTotal,shopId,shopName,operatorType,operatorId,operatorName,developerShopId,developerShopName,sourceType,appId,sourceCode,sourceName,sourceOrderNo,hisSynStatus,hisOrderId,remarks,userId,isDel,createTime |
| | | from orders_total |
| | | WHERE id = #{value} |
| | | </select> |
| | | |
| | | <update id="updateWhere" parameterType="com.hx.mybatisTool.SqlSentence"> |
| | | update |
| | | orders_total |
| | | SET ${sqlSentence} |
| | | </update> |
| | | |
| | | <update id="updateAll" parameterType="com.hx.phiappt.model.order.OrdersTotal"> |
| | | update orders_total |
| | | SET <include refid="Update_Column_All"/> |
| | | WHERE id = #{id} |
| | | </update> |
| | | |
| | | <delete id="deleteWhere" parameterType="com.hx.mybatisTool.SqlSentence"> |
| | | delete from orders_total WHERE ${sqlSentence} |
| | | </delete> |
| | | |
| | | <delete id="deleteById" parameterType="java.lang.Object"> |
| | | delete from orders_total WHERE id = #{value} |
| | | </delete> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?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"> |
| | | <!-- namespace:该mapper.xml映射文件的 唯一标识 --> |
| | | <mapper namespace="com.hx.phip.dao.mapper.ProjectMapper"> |
| | | |
| | | <!-- 整个实体类修改,表字段=实体类字段--> |
| | | <sql id="Update_Column_All"> |
| | | <trim prefixOverrides=","> |
| | | ,projectTypeId = #{projectTypeId},projectTypeName = #{projectTypeName},name = #{name},useDuration = #{useDuration},intervalDuration = #{intervalDuration},isUp = #{isUp},orderNum = #{orderNum},remark = #{remark},apiId = #{apiId},apiCode = #{apiCode},specification = #{specification},hisName = #{hisName},hisSpec = #{hisSpec},readyDuration = #{readyDuration},unit = #{unit},isLifeBeauty = #{isLifeBeauty},isShow = #{isShow},palsyDuration = #{palsyDuration},isBigProject = #{isBigProject},restInterval = #{restInterval},isDevice = #{isDevice},englishName = #{englishName},executable = #{executable},price = #{price},enable = #{enable},coding = #{coding},originalPrice = #{originalPrice},searchPinyin = #{searchPinyin},standardCode = #{standardCode},standardName = #{standardName},exclusive = #{exclusive},sharingTime = #{sharingTime},isMakeADeal = #{isMakeADeal},isMedicalIitems = #{isMedicalIitems},isCombinedProject = #{isCombinedProject},isGiftPoints = #{isGiftPoints},isExecutable = #{isExecutable},isTreatmentItems = #{isTreatmentItems},treatmentItemsNum = #{treatmentItemsNum},isDefaultCommission = #{isDefaultCommission},defaultCommission = #{defaultCommission},tag = #{tag},isDel = #{isDel},createTime = #{createTime} |
| | | </trim> |
| | | </sql> |
| | | |
| | | <!-- 后续通过 namespace.id--> |
| | | <!--parameterType:输入参数的类型 |
| | | resultType:查询返回结果值的类型 ,返回类型 --> |
| | | <insert id="insert" parameterType="com.hx.phiappt.model.Project"> |
| | | <selectKey keyProperty="id" resultType="String" order="BEFORE"> |
| | | select replace(uuid(),'-','') from dual |
| | | </selectKey> |
| | | insert into project (id,projectTypeId,projectTypeName,name,useDuration,intervalDuration,isUp,orderNum,remark,apiId,apiCode,specification,hisName,hisSpec,readyDuration,unit,isLifeBeauty,isShow,palsyDuration,isBigProject,restInterval,isDevice,englishName,executable,price,enable,coding,originalPrice,searchPinyin,standardCode,standardName,exclusive,sharingTime,isMakeADeal,isMedicalIitems,isCombinedProject,isGiftPoints,isExecutable,isTreatmentItems,treatmentItemsNum,isDefaultCommission,defaultCommission,tag,isDel,createTime) values (#{id},#{projectTypeId},#{projectTypeName},#{name},#{useDuration},#{intervalDuration},#{isUp},#{orderNum},#{remark},#{apiId},#{apiCode},#{specification},#{hisName},#{hisSpec},#{readyDuration},#{unit},#{isLifeBeauty},#{isShow},#{palsyDuration},#{isBigProject},#{restInterval},#{isDevice},#{englishName},#{executable},#{price},#{enable},#{coding},#{originalPrice},#{searchPinyin},#{standardCode},#{standardName},#{exclusive},#{sharingTime},#{isMakeADeal},#{isMedicalIitems},#{isCombinedProject},#{isGiftPoints},#{isExecutable},#{isTreatmentItems},#{treatmentItemsNum},#{isDefaultCommission},#{defaultCommission},#{tag},#{isDel},#{createTime}) |
| | | </insert> |
| | | |
| | | <select id="selectList" resultType="com.hx.phiappt.model.Project" parameterType="com.hx.mybatisTool.SqlSentence" > |
| | | ${sqlSentence} |
| | | </select> |
| | | |
| | | <select id="selectListMap" resultType="java.util.Map" parameterType="com.hx.mybatisTool.SqlSentence" > |
| | | ${sqlSentence} |
| | | </select> |
| | | |
| | | <select id="selectOne" resultType="com.hx.phiappt.model.Project" parameterType="com.hx.mybatisTool.SqlSentence" > |
| | | ${sqlSentence} |
| | | </select> |
| | | |
| | | <select id="selectOneMap" resultType="java.util.Map" parameterType="com.hx.mybatisTool.SqlSentence" > |
| | | ${sqlSentence} |
| | | </select> |
| | | |
| | | <select id="selectCount" resultType="int" parameterType="com.hx.mybatisTool.SqlSentence" > |
| | | select |
| | | COUNT(*) |
| | | from project |
| | | WHERE ${sqlSentence} |
| | | </select> |
| | | |
| | | <select id="selectCountSql" resultType="int" parameterType="com.hx.mybatisTool.SqlSentence" > |
| | | ${sqlSentence} |
| | | </select> |
| | | |
| | | <select id="selectOneByKey" resultType="com.hx.phiappt.model.Project" parameterType="java.lang.Object" > |
| | | select |
| | | id,projectTypeId,projectTypeName,name,useDuration,intervalDuration,isUp,orderNum,remark,apiId,apiCode,specification,hisName,hisSpec,readyDuration,unit,isLifeBeauty,isShow,palsyDuration,isBigProject,restInterval,isDevice,englishName,executable,price,enable,coding,originalPrice,searchPinyin,standardCode,standardName,exclusive,sharingTime,isMakeADeal,isMedicalIitems,isCombinedProject,isGiftPoints,isExecutable,isTreatmentItems,treatmentItemsNum,isDefaultCommission,defaultCommission,tag,isDel,createTime |
| | | from project |
| | | WHERE id = #{value} |
| | | </select> |
| | | |
| | | <select id="selectOneByKeyBlob" resultType="com.hx.phiappt.model.Project" parameterType="java.lang.Object" > |
| | | select |
| | | id,projectTypeId,projectTypeName,name,useDuration,intervalDuration,isUp,orderNum,remark,apiId,apiCode,specification,hisName,hisSpec,readyDuration,unit,isLifeBeauty,isShow,palsyDuration,isBigProject,restInterval,isDevice,englishName,executable,price,enable,coding,originalPrice,searchPinyin,standardCode,standardName,exclusive,sharingTime,isMakeADeal,isMedicalIitems,isCombinedProject,isGiftPoints,isExecutable,isTreatmentItems,treatmentItemsNum,isDefaultCommission,defaultCommission,tag,isDel,createTime |
| | | from project |
| | | WHERE id = #{value} |
| | | </select> |
| | | |
| | | <update id="updateWhere" parameterType="com.hx.mybatisTool.SqlSentence"> |
| | | update |
| | | project |
| | | SET ${sqlSentence} |
| | | </update> |
| | | |
| | | <update id="updateAll" parameterType="com.hx.phiappt.model.Project"> |
| | | update project |
| | | SET <include refid="Update_Column_All"/> |
| | | WHERE id = #{id} |
| | | </update> |
| | | |
| | | <delete id="deleteWhere" parameterType="com.hx.mybatisTool.SqlSentence"> |
| | | delete from project WHERE ${sqlSentence} |
| | | </delete> |
| | | |
| | | <delete id="deleteById" parameterType="java.lang.Object"> |
| | | delete from project WHERE id = #{value} |
| | | </delete> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?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"> |
| | | <!-- namespace:该mapper.xml映射文件的 唯一标识 --> |
| | | <mapper namespace="com.hx.phip.dao.mapper.SysAdminMapper"> |
| | | |
| | | <!-- 整个实体类修改,表字段=实体类字段--> |
| | | <sql id="Update_Column_All"> |
| | | <trim prefixOverrides=","> |
| | | ,account = #{account},password = #{password},isUse = #{isUse},name = #{name},tel = #{tel},imgUrl = #{imgUrl},job = #{job},type = #{type},sysAdRoleId = #{sysAdRoleId},loginTime = #{loginTime},isDel = #{isDel},createTime = #{createTime} |
| | | </trim> |
| | | </sql> |
| | | |
| | | <!-- 后续通过 namespace.id--> |
| | | <!--parameterType:输入参数的类型 |
| | | resultType:查询返回结果值的类型 ,返回类型 --> |
| | | <insert id="insert" parameterType="com.hx.phiappt.model.SysAdmin"> |
| | | <selectKey keyProperty="id" resultType="String" order="BEFORE"> |
| | | select replace(uuid(),'-','') from dual |
| | | </selectKey> |
| | | insert into sys_admin (id,account,password,isUse,name,tel,imgUrl,job,type,sysAdRoleId,loginTime,isDel,createTime) values (#{id},#{account},#{password},#{isUse},#{name},#{tel},#{imgUrl},#{job},#{type},#{sysAdRoleId},#{loginTime},#{isDel},#{createTime}) |
| | | </insert> |
| | | |
| | | <select id="selectList" resultType="com.hx.phiappt.model.SysAdmin" parameterType="com.hx.mybatisTool.SqlSentence" > |
| | | ${sqlSentence} |
| | | </select> |
| | | |
| | | <select id="selectListMap" resultType="java.util.Map" parameterType="com.hx.mybatisTool.SqlSentence" > |
| | | ${sqlSentence} |
| | | </select> |
| | | |
| | | <select id="selectOne" resultType="com.hx.phiappt.model.SysAdmin" parameterType="com.hx.mybatisTool.SqlSentence" > |
| | | ${sqlSentence} |
| | | </select> |
| | | |
| | | <select id="selectOneMap" resultType="java.util.Map" parameterType="com.hx.mybatisTool.SqlSentence" > |
| | | ${sqlSentence} |
| | | </select> |
| | | |
| | | <select id="selectCount" resultType="int" parameterType="com.hx.mybatisTool.SqlSentence" > |
| | | select |
| | | COUNT(*) |
| | | from sys_admin |
| | | WHERE ${sqlSentence} |
| | | </select> |
| | | |
| | | <select id="selectCountSql" resultType="int" parameterType="com.hx.mybatisTool.SqlSentence" > |
| | | ${sqlSentence} |
| | | </select> |
| | | |
| | | <select id="selectOneByKey" resultType="com.hx.phiappt.model.SysAdmin" parameterType="java.lang.Object" > |
| | | select |
| | | id,account,password,isUse,name,tel,imgUrl,job,type,sysAdRoleId,loginTime,isDel,createTime |
| | | from sys_admin |
| | | WHERE id = #{value} |
| | | </select> |
| | | |
| | | <select id="selectOneByKeyBlob" resultType="com.hx.phiappt.model.SysAdmin" parameterType="java.lang.Object" > |
| | | select |
| | | id,account,password,isUse,name,tel,imgUrl,job,type,sysAdRoleId,loginTime,isDel,createTime |
| | | from sys_admin |
| | | WHERE id = #{value} |
| | | </select> |
| | | |
| | | <update id="updateWhere" parameterType="com.hx.mybatisTool.SqlSentence"> |
| | | update |
| | | sys_admin |
| | | SET ${sqlSentence} |
| | | </update> |
| | | |
| | | <update id="updateAll" parameterType="com.hx.phiappt.model.SysAdmin"> |
| | | update sys_admin |
| | | SET <include refid="Update_Column_All"/> |
| | | WHERE id = #{id} |
| | | </update> |
| | | |
| | | <delete id="deleteWhere" parameterType="com.hx.mybatisTool.SqlSentence"> |
| | | delete from sys_admin WHERE ${sqlSentence} |
| | | </delete> |
| | | |
| | | <delete id="deleteById" parameterType="java.lang.Object"> |
| | | delete from sys_admin WHERE id = #{value} |
| | | </delete> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?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"> |
| | | <!-- namespace:该mapper.xml映射文件的 唯一标识 --> |
| | | <mapper namespace="com.hx.phip.dao.mapper.SystemParameterMapper"> |
| | | |
| | | <!-- 整个实体类修改,表字段=实体类字段--> |
| | | <sql id="Update_Column_All"> |
| | | <trim prefixOverrides=","> |
| | | ,paramName = #{paramName},paramValue = #{paramValue},paramValue1 = #{paramValue1},isDel = #{isDel},createTime = #{createTime} |
| | | </trim> |
| | | </sql> |
| | | |
| | | <!-- 后续通过 namespace.id--> |
| | | <!--parameterType:输入参数的类型 |
| | | resultType:查询返回结果值的类型 ,返回类型 --> |
| | | <insert id="insert" parameterType="com.hx.phiappt.model.SystemParameter"> |
| | | <selectKey keyProperty="id" resultType="String" order="BEFORE"> |
| | | select replace(uuid(),'-','') from dual |
| | | </selectKey> |
| | | insert into system_parameter (id,paramName,paramValue,paramValue1,isDel,createTime) values (#{id},#{paramName},#{paramValue},#{paramValue1},#{isDel},#{createTime}) |
| | | </insert> |
| | | |
| | | <select id="selectList" resultType="com.hx.phiappt.model.SystemParameter" parameterType="com.hx.mybatisTool.SqlSentence" > |
| | | ${sqlSentence} |
| | | </select> |
| | | |
| | | <select id="selectListMap" resultType="java.util.Map" parameterType="com.hx.mybatisTool.SqlSentence" > |
| | | ${sqlSentence} |
| | | </select> |
| | | |
| | | <select id="selectOne" resultType="com.hx.phiappt.model.SystemParameter" parameterType="com.hx.mybatisTool.SqlSentence" > |
| | | ${sqlSentence} |
| | | </select> |
| | | |
| | | <select id="selectOneMap" resultType="java.util.Map" parameterType="com.hx.mybatisTool.SqlSentence" > |
| | | ${sqlSentence} |
| | | </select> |
| | | |
| | | <select id="selectCount" resultType="int" parameterType="com.hx.mybatisTool.SqlSentence" > |
| | | select |
| | | COUNT(*) |
| | | from system_parameter |
| | | WHERE ${sqlSentence} |
| | | </select> |
| | | |
| | | <select id="selectCountSql" resultType="int" parameterType="com.hx.mybatisTool.SqlSentence" > |
| | | ${sqlSentence} |
| | | </select> |
| | | |
| | | <select id="selectOneByKey" resultType="com.hx.phiappt.model.SystemParameter" parameterType="java.lang.Object" > |
| | | select |
| | | id,paramName,paramValue,paramValue1,isDel,createTime |
| | | from system_parameter |
| | | WHERE id = #{value} |
| | | </select> |
| | | |
| | | <select id="selectOneByKeyBlob" resultType="com.hx.phiappt.model.SystemParameter" parameterType="java.lang.Object" > |
| | | select |
| | | id,paramName,paramValue,paramValue1,isDel,createTime |
| | | from system_parameter |
| | | WHERE id = #{value} |
| | | </select> |
| | | |
| | | <update id="updateWhere" parameterType="com.hx.mybatisTool.SqlSentence"> |
| | | update |
| | | system_parameter |
| | | SET ${sqlSentence} |
| | | </update> |
| | | |
| | | <update id="updateAll" parameterType="com.hx.phiappt.model.SystemParameter"> |
| | | update system_parameter |
| | | SET <include refid="Update_Column_All"/> |
| | | WHERE id = #{id} |
| | | </update> |
| | | |
| | | <delete id="deleteWhere" parameterType="com.hx.mybatisTool.SqlSentence"> |
| | | delete from system_parameter WHERE ${sqlSentence} |
| | | </delete> |
| | | |
| | | <delete id="deleteById" parameterType="java.lang.Object"> |
| | | delete from system_parameter WHERE id = #{value} |
| | | </delete> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?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"> |
| | | <!-- namespace:该mapper.xml映射文件的 唯一标识 --> |
| | | <mapper namespace="com.hx.phip.dao.mapper.UserMapper"> |
| | | |
| | | <!-- 整个实体类修改,表字段=实体类字段--> |
| | | <sql id="Update_Column_All"> |
| | | <trim prefixOverrides=","> |
| | | ,name = #{name},imgUrl = #{imgUrl},userLevel = #{userLevel},tel = #{tel},starLevel = #{starLevel},userType = #{userType},channelType = #{channelType},channelType2 = #{channelType2},QQ = #{QQ},gender = #{gender},CIQ = #{CIQ},memberNO = #{memberNO},remark = #{remark},money = #{money},lastDoctorId = #{lastDoctorId},lastCorpUserId = #{lastCorpUserId},certificateType = #{certificateType},certificateNo = #{certificateNo},birthDay = #{birthDay},corpUserId = #{corpUserId},apiId = #{apiId},hisCorpUserId = #{hisCorpUserId},shopId = #{shopId},userRole = #{userRole},isDel = #{isDel},createTime = #{createTime} |
| | | </trim> |
| | | </sql> |
| | | |
| | | <!-- 后续通过 namespace.id--> |
| | | <!--parameterType:输入参数的类型 |
| | | resultType:查询返回结果值的类型 ,返回类型 --> |
| | | <insert id="insert" parameterType="com.hx.phiappt.model.User"> |
| | | <selectKey keyProperty="id" resultType="String" order="BEFORE"> |
| | | select replace(uuid(),'-','') from dual |
| | | </selectKey> |
| | | insert into user (id,name,imgUrl,userLevel,tel,starLevel,userType,channelType,channelType2,QQ,gender,CIQ,memberNO,remark,money,lastDoctorId,lastCorpUserId,certificateType,certificateNo,birthDay,corpUserId,apiId,hisCorpUserId,shopId,userRole,isDel,createTime) values (#{id},#{name},#{imgUrl},#{userLevel},#{tel},#{starLevel},#{userType},#{channelType},#{channelType2},#{QQ},#{gender},#{CIQ},#{memberNO},#{remark},#{money},#{lastDoctorId},#{lastCorpUserId},#{certificateType},#{certificateNo},#{birthDay},#{corpUserId},#{apiId},#{hisCorpUserId},#{shopId},#{userRole},#{isDel},#{createTime}) |
| | | </insert> |
| | | |
| | | <select id="selectList" resultType="com.hx.phiappt.model.User" parameterType="com.hx.mybatisTool.SqlSentence" > |
| | | ${sqlSentence} |
| | | </select> |
| | | |
| | | <select id="selectListMap" resultType="java.util.Map" parameterType="com.hx.mybatisTool.SqlSentence" > |
| | | ${sqlSentence} |
| | | </select> |
| | | |
| | | <select id="selectOne" resultType="com.hx.phiappt.model.User" parameterType="com.hx.mybatisTool.SqlSentence" > |
| | | ${sqlSentence} |
| | | </select> |
| | | |
| | | <select id="selectOneMap" resultType="java.util.Map" parameterType="com.hx.mybatisTool.SqlSentence" > |
| | | ${sqlSentence} |
| | | </select> |
| | | |
| | | <select id="selectCount" resultType="int" parameterType="com.hx.mybatisTool.SqlSentence" > |
| | | select |
| | | COUNT(*) |
| | | from user |
| | | WHERE ${sqlSentence} |
| | | </select> |
| | | |
| | | <select id="selectCountSql" resultType="int" parameterType="com.hx.mybatisTool.SqlSentence" > |
| | | ${sqlSentence} |
| | | </select> |
| | | |
| | | <select id="selectOneByKey" resultType="com.hx.phiappt.model.User" parameterType="java.lang.Object" > |
| | | select |
| | | id,name,imgUrl,userLevel,tel,starLevel,userType,channelType,channelType2,QQ,gender,CIQ,memberNO,remark,money,lastDoctorId,lastCorpUserId,certificateType,certificateNo,birthDay,corpUserId,apiId,hisCorpUserId,shopId,userRole,isDel,createTime |
| | | from user |
| | | WHERE id = #{value} |
| | | </select> |
| | | |
| | | <select id="selectOneByKeyBlob" resultType="com.hx.phiappt.model.User" parameterType="java.lang.Object" > |
| | | select |
| | | id,name,imgUrl,userLevel,tel,starLevel,userType,channelType,channelType2,QQ,gender,CIQ,memberNO,remark,money,lastDoctorId,lastCorpUserId,certificateType,certificateNo,birthDay,corpUserId,apiId,hisCorpUserId,shopId,userRole,isDel,createTime |
| | | from user |
| | | WHERE id = #{value} |
| | | </select> |
| | | |
| | | <update id="updateWhere" parameterType="com.hx.mybatisTool.SqlSentence"> |
| | | update |
| | | user |
| | | SET ${sqlSentence} |
| | | </update> |
| | | |
| | | <update id="updateAll" parameterType="com.hx.phiappt.model.User"> |
| | | update user |
| | | SET <include refid="Update_Column_All"/> |
| | | WHERE id = #{id} |
| | | </update> |
| | | |
| | | <delete id="deleteWhere" parameterType="com.hx.mybatisTool.SqlSentence"> |
| | | delete from user WHERE ${sqlSentence} |
| | | </delete> |
| | | |
| | | <delete id="deleteById" parameterType="java.lang.Object"> |
| | | delete from user WHERE id = #{value} |
| | | </delete> |
| | | |
| | | </mapper> |
New file |
| | |
| | | package com.hx.phip.model; |
| | | |
| | | import com.gitee.sunchenbin.mybatis.actable.annotation.Column; |
| | | import com.gitee.sunchenbin.mybatis.actable.annotation.Table; |
| | | import com.gitee.sunchenbin.mybatis.actable.annotation.Unique; |
| | | import com.gitee.sunchenbin.mybatis.actable.constants.MySqlTypeConstant; |
| | | import com.hx.phiappt.model.BaseEntity; |
| | | |
| | | /** |
| | | * 系统参数 |
| | | */ |
| | | @Table(name = "system_parameter") |
| | | public class SystemParameter extends BaseEntity { |
| | | |
| | | @Unique |
| | | @Column(comment = "key", length = 64, type = MySqlTypeConstant.VARCHAR) |
| | | private String paramName; |
| | | |
| | | @Column(comment = "值", type = MySqlTypeConstant.TEXT) |
| | | private String paramValue; |
| | | |
| | | @Column(comment = "辅助的值") |
| | | private String paramValue1; |
| | | |
| | | ///////////////////////////////////////////////// |
| | | /**预约编号,7位数*/ |
| | | public static final String KEY_ORDER_NO = "key_order_no"; |
| | | /**微信小程序的access_token*/ |
| | | public static final String KEY_MP_ACCESS_TOKEN = "key_mp_access_token_"; |
| | | /**版本*/ |
| | | public static final String KEY_VERSION = "key_version"; |
| | | /**是否提审*/ |
| | | public static final String KEY_IS_ARRAIGN = "key_is_arraign"; |
| | | /**API的token*/ |
| | | public static final String KEY_API_ACCESS_TOKEN = "key_api_access_token"; |
| | | /**预约自动审核通过 0人工审核1自动成功*/ |
| | | public static final String KEY_APP_AUTO_EXAMINE_SUC = "key_app_auto_examine_success"; |
| | | /** 项目版本号 */ |
| | | public static final String KEY_PROJECT_VERSION = "key_project_version"; |
| | | |
| | | /** 顾问的新增2.0使用限制:0关闭,1开启 */ |
| | | public static final String KEY_ADD_V2_USE_LIMIT = "key_add_v2_use_limit"; |
| | | /** 顾问的新增2.0接口可用顾问id,多个,隔开 */ |
| | | public static final String KEY_ADD_V2_USE_USER_ID = "key_add_v2_user_id"; |
| | | |
| | | /** 可查看所有用户的员工id配置,多个逗号分割 */ |
| | | public static final String KEY_SEE_ALL_USER_ID = "key_see_all_user_id"; |
| | | /**PoiAPI的token*/ |
| | | public static final String KEY_POIAPI_ACCESS_TOKEN = "key_poiapi_access_token"; |
| | | |
| | | public SystemParameter() |
| | | { |
| | | |
| | | } |
| | | |
| | | public SystemParameter(String paramName, String paramValue, String paramValue1) { |
| | | this.paramName = paramName; |
| | | this.paramValue = paramValue; |
| | | this.paramValue1 = paramValue1; |
| | | } |
| | | |
| | | public static String paramValueData(String paramName){ |
| | | String value = ""; |
| | | if(paramName.equals(KEY_ORDER_NO)){ |
| | | value = "G"; |
| | | } |
| | | return value; |
| | | } |
| | | |
| | | ////////////////// |
| | | |
| | | public String getParamName() { |
| | | return paramName; |
| | | } |
| | | |
| | | public void setParamName(String paramName) { |
| | | this.paramName = paramName; |
| | | } |
| | | |
| | | public String getParamValue() { |
| | | return paramValue; |
| | | } |
| | | |
| | | public void setParamValue(String paramValue) { |
| | | this.paramValue = paramValue; |
| | | } |
| | | |
| | | public String getParamValue1() { |
| | | return paramValue1; |
| | | } |
| | | |
| | | public void setParamValue1(String paramValue1) { |
| | | this.paramValue1 = paramValue1; |
| | | } |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.hx.phip.order.controller; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.hx.common.BaseController; |
| | | import com.hx.exception.TipsException; |
| | | import com.hx.phiappt.common.OrderTotalConstants; |
| | | import com.hx.phiappt.model.SysAdmin; |
| | | import com.hx.phiappt.model.order.OrderDeveloper; |
| | | import com.hx.phiappt.model.order.OrderGoodsSpecs; |
| | | import com.hx.phiappt.model.order.OrderItem; |
| | | import com.hx.phiappt.model.order.OrdersTotal; |
| | | import com.hx.phip.common.Constants; |
| | | import com.hx.phip.order.service.OrderService; |
| | | import com.hx.phip.service.SysAdminService; |
| | | import com.hx.phip.tool.CreateNo; |
| | | import com.hx.util.StringUtils; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestMethod; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 订单控制器 |
| | | * @USER: zhouxiang |
| | | * @DATE: 2021/12/03 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/order") |
| | | public class OrderController extends BaseController { |
| | | |
| | | @Resource |
| | | private OrderService orderService; |
| | | |
| | | /** |
| | | * 创建订单 |
| | | */ |
| | | @RequestMapping(value = "/add",method = RequestMethod.POST) |
| | | public void orderAdd(@RequestBody String param) { |
| | | |
| | | if(StringUtils.isEmpty(param)){ |
| | | throwParamException("请传订单参数"); |
| | | } |
| | | // SysAdmin sysAdmin = (SysAdmin) getRequestAttribute(Constants.LOGIN_ADMIN); |
| | | // if(sysAdmin==null){ |
| | | // throw new TipsException("未找到当前登录人的信息"); |
| | | // } |
| | | JSONObject object = JSONObject.parseObject(param); |
| | | |
| | | //获取总订单对象 |
| | | OrdersTotal orderTotal = JSONObject.parseObject(object.getString("orderTotal"), OrdersTotal.class); |
| | | //校验参数成功的订单 |
| | | orderTotal = checkOrderTotalParam(orderTotal); |
| | | //获取订单的子订单 |
| | | List<OrderItem> orderItem = JSONObject.parseArray(object.getString("orderItem"), OrderItem.class); |
| | | if(orderItem==null || orderItem.size()==0){ |
| | | throwParamException("订单的子订单不能为空"); |
| | | } |
| | | orderItem=checkOrderItem(orderItem); |
| | | |
| | | //获取开发人员集合 |
| | | List<OrderDeveloper> orderDeveloperList = JSONObject.parseArray(object.getString("orderDeveloper"), OrderDeveloper.class); |
| | | // if(orderDeveloperList ==null || orderDeveloperList.size()==0){ |
| | | // throwParamException("开发人员不能为空,默认是用户绑定的所属顾问"); |
| | | // } |
| | | |
| | | Integer type = object.getInteger("type");//用于判断前端点了什么按钮 |
| | | String operatorId = object.getString("operatorId");//操作人id |
| | | |
| | | orderService.add(orderTotal,orderItem,type,orderDeveloperList,operatorId); |
| | | } |
| | | |
| | | /** |
| | | * 结账 |
| | | * @param object |
| | | */ |
| | | @RequestMapping(value = "/pay",method = RequestMethod.POST) |
| | | public void orderPay(@RequestBody JSONObject object){ |
| | | |
| | | } |
| | | |
| | | private List<OrderItem> checkOrderItem(List<OrderItem> orderItem) { |
| | | orderItem.forEach(o->{ |
| | | if(StringUtils.isEmpty(o.getType())){ |
| | | throwParamException("订单的子订单商品类型为空"); |
| | | } |
| | | |
| | | if(o.getBuyNum()==null){ |
| | | throwParamException("订单的子订单购买数量为空"); |
| | | } |
| | | |
| | | if(StringUtils.isEmpty(o.getCommonId())){ |
| | | throwParamException("订单的子订单项目id/商品id为空"); |
| | | } |
| | | if(o.getDiscount()==null){ |
| | | throwParamException("折扣为空,默认:100"); |
| | | } |
| | | }); |
| | | return orderItem; |
| | | } |
| | | |
| | | private OrdersTotal checkOrderTotalParam(OrdersTotal orderTotal){ |
| | | |
| | | if(StringUtils.isEmpty(orderTotal.getType())){ |
| | | throwParamException("订单类型为空"); |
| | | } |
| | | |
| | | if(StringUtils.isEmpty(orderTotal.getSourceType())){ |
| | | orderTotal.setSourceType(OrderTotalConstants.SOURCE_TYPE_APPLICATION); |
| | | } |
| | | if(StringUtils.isEmpty(orderTotal.getAppId())){ |
| | | throwParamException("来源应用appId为空"); |
| | | } |
| | | if(StringUtils.isEmpty(orderTotal.getSourceType())){ |
| | | throwParamException("订单来源代码为空"); |
| | | } |
| | | if(StringUtils.isEmpty(orderTotal.getSourceName())){ |
| | | throwParamException("订单来源名称为空"); |
| | | } |
| | | if(StringUtils.isEmpty(orderTotal.getUserId())){ |
| | | throwParamException("用户Id为空"); |
| | | } |
| | | return orderTotal; |
| | | } |
| | | } |
New file |
| | |
| | | package com.hx.phip.order.service; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.hx.common.service.CommonService; |
| | | import com.hx.phiappt.model.SysAdmin; |
| | | import com.hx.phiappt.model.order.OrderDeveloper; |
| | | import com.hx.phiappt.model.order.OrderItem; |
| | | import com.hx.phiappt.model.order.OrdersTotal; |
| | | |
| | | import java.util.List; |
| | | |
| | | public interface OrderService { |
| | | /*创建订单*/ |
| | | void add(OrdersTotal ordersTotal, List<OrderItem> items, Integer type, List<OrderDeveloper> orderDeveloperList,String operatorId); |
| | | |
| | | } |
New file |
| | |
| | | package com.hx.phip.order.service.impl; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.hx.common.service.CommonService; |
| | | import com.hx.exception.TipsException; |
| | | import com.hx.phiappt.common.OrderItemConstants; |
| | | import com.hx.phiappt.common.OrderTotalConstants; |
| | | import com.hx.phiappt.model.*; |
| | | import com.hx.phiappt.model.order.OrderDeveloper; |
| | | import com.hx.phiappt.model.order.OrderItem; |
| | | import com.hx.phiappt.model.order.OrdersTotal; |
| | | import com.hx.phip.dao.mapper.*; |
| | | import com.hx.phip.order.service.OrderService; |
| | | import com.hx.phip.service.*; |
| | | import com.hx.phip.tool.CreateNo; |
| | | import com.hx.util.StringUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.math.BigDecimal; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | @Transactional |
| | | @Service |
| | | public class OrderServiceImpl implements OrderService { |
| | | |
| | | @Resource |
| | | private SystemParameterMapper systemParameterMapper; |
| | | @Resource |
| | | private OrdersTotalService ordersTotalService; |
| | | @Resource |
| | | private OrderItemService orderItemService; |
| | | @Resource |
| | | private ProjectService projectService; |
| | | @Resource |
| | | private ConsumablesService consumablesService; |
| | | @Resource |
| | | private UserService userService; |
| | | @Resource |
| | | private EmployeeMapper employeeMapper; |
| | | @Resource |
| | | private OrderDeveloperService orderDeveloperService; |
| | | @Resource |
| | | private SysAdminService sysAdminService; |
| | | |
| | | @Override |
| | | public void add(OrdersTotal ordersTotal, List<OrderItem> items, Integer type, List<OrderDeveloper> orderDeveloperList,String operatorId) { |
| | | SysAdmin sysAdmin = sysAdminService.selectOneByKey(operatorId); |
| | | if(sysAdmin==null){ |
| | | throw new TipsException("未找到操作人的信息"+operatorId); |
| | | } |
| | | List<String> packageTypes = Arrays.asList("meal", "card");//套餐和卡项类型集合 |
| | | //type:0:草稿 1:提交 2:结账 |
| | | if(type==0){ |
| | | ordersTotal.setStatus(OrderTotalConstants.STATUS_DRAFT);//订单状态:草稿 |
| | | } |
| | | BigDecimal totalPrice=BigDecimal.ZERO;//订单总金额 |
| | | BigDecimal actualOrderTotal=BigDecimal.ZERO;//支付总金额 |
| | | BigDecimal buyNum=BigDecimal.ZERO;//购买数量 |
| | | BigDecimal actualTotal =BigDecimal.ZERO;//子订单实付金额 |
| | | BigDecimal sonTotalPrice =BigDecimal.ZERO;//子订单订单总额 |
| | | List<String> packageIds=new ArrayList<>();//用来装套餐或者卡项的id(标识) |
| | | JSONArray jsonObject = new JSONArray();//用来封装规格json集合 |
| | | Map<String,Object> map=new HashMap<>();//用来存储规格的map |
| | | |
| | | //计算总订单金额信息,填补子订单信息 |
| | | for(OrderItem vo:items){ |
| | | buyNum=new BigDecimal(vo.getBuyNum()); |
| | | //子订单编号 |
| | | String orderNum = CreateNo.createTimeNo(systemParameterMapper, "SO", 6, "yyyyMMdd");//订单编号 |
| | | vo.setOrderNo(orderNum); |
| | | map.put("specsValue",""); |
| | | map.put("unit",""); |
| | | map.put("specsId",""); |
| | | if(vo.getType().equals(OrderItemConstants.TYPE_PROJECT)){ |
| | | Project project = projectService.selectOneByKey(vo.getCommonId()); |
| | | if(project==null){ |
| | | throw new TipsException("找不到项目:"+vo.getCommonId()); |
| | | } |
| | | //项目实付金额=项目的销售价格*购买数量*折扣 |
| | | actualTotal = project.getPrice().multiply(buyNum).multiply(vo.getDiscount().divide(new BigDecimal(100))); |
| | | //项目订单总额=项目原价*购买数量,如果项目没有原价就用现价 |
| | | sonTotalPrice=sonTotalPrice.add(project.getOriginalPrice()==null?project.getOriginalPrice().multiply(buyNum):project.getPrice().multiply(buyNum)); |
| | | vo.setSingle(project.getTreatmentItemsNum()==null?1:project.getTreatmentItemsNum());//单次疗程数量 |
| | | vo.setUsedTotal(vo.getSingle()*vo.getBuyNum()); //总次疗程次数,单次疗程次数*购买的总量 |
| | | vo.setOriPrice(project.getOriginalPrice());//原价,项目的原价 |
| | | vo.setCurPrice(project.getPrice());//现价,项目的销售单价格 |
| | | |
| | | map.put("specsTitle",project.getSpecification()); |
| | | |
| | | jsonObject.add(map); |
| | | vo.setSpecs(StringUtils.isEmpty(project.getSpecification())?"[]":jsonObject.toString());//规格 |
| | | vo.setGoodsNo(project.getCoding());//项目编号 |
| | | vo.setGoodsName(project.getName());//项目名称 |
| | | vo.setGoodsImage("");//项目主图 |
| | | }else if(vo.getType().equals(OrderItemConstants.TYPE_RETAIL)){ |
| | | Consumables consumables = consumablesService.selectOneByKey(vo.getCommonId()); |
| | | if(consumables==null){ |
| | | throw new TipsException("找不到项目:"+vo.getCommonId()); |
| | | } |
| | | //商品实付金额=商品的销售价格*购买数量*折扣 |
| | | actualTotal = consumables.getPrice().multiply(buyNum).multiply(vo.getDiscount().divide(new BigDecimal(100))); |
| | | //商品订单总额=项目销售价*购买数量 |
| | | sonTotalPrice=sonTotalPrice.add(consumables.getPrice().multiply(buyNum)); |
| | | |
| | | vo.setSingle(0);//单次疗程数量 |
| | | vo.setUsedTotal(vo.getSingle()*vo.getBuyNum());//总次疗程次数,单次疗程次数*购买的总量 |
| | | vo.setOriPrice(consumables.getPrice());//原价,项目的销售价 |
| | | vo.setCurPrice(consumables.getPrice());//现价 |
| | | |
| | | map.put("specsTitle",consumables.getSpec()); |
| | | vo.setSpecs(StringUtils.isEmpty(consumables.getSpec())?"[]":jsonObject.toString());//规格 |
| | | vo.setGoodsNo(consumables.getSerialNumber());//项目编号 |
| | | vo.setGoodsName(consumables.getName());//项目名称 |
| | | vo.setGoodsImage("");//项目主图 |
| | | }else if(vo.getType().equals(OrderItemConstants.TYPE_MEAL)){//套餐 暂定 |
| | | |
| | | }else if(vo.getType().equals(OrderItemConstants.TYPE_CARD)){//卡项 暂定 |
| | | |
| | | } |
| | | |
| | | |
| | | //子订单实付金额 |
| | | vo.setActualTotal(actualTotal); |
| | | //子订单总额 |
| | | vo.setTotal(sonTotalPrice); |
| | | |
| | | totalPrice=totalPrice.add(vo.getTotal());//订单总金额 |
| | | actualOrderTotal=actualOrderTotal.add(vo.getActualTotal());//支付总金额 |
| | | sonTotalPrice=BigDecimal.ZERO; |
| | | } |
| | | |
| | | //如果开发人集合为空,那么默认用户的所属顾问 |
| | | if(orderDeveloperList==null || orderDeveloperList.size()==0){ |
| | | User user = userService.selectOneByKey(ordersTotal.getUserId()); |
| | | String shopId=""; |
| | | String shopName=""; |
| | | if(StringUtils.noNull(user.getHisCorpUserId())){ |
| | | Employee employee = employeeMapper.selectOneByKey(user.getHisCorpUserId()); |
| | | shopId=employee.getShopId(); |
| | | shopName=employee.getShopName(); |
| | | } |
| | | //开发人门店标识(用户绑定的销售顾问) |
| | | ordersTotal.setDeveloperShopId(shopId); |
| | | //开发人门店名称 |
| | | ordersTotal.setDeveloperShopName(shopName); |
| | | } |
| | | |
| | | String orderNum = CreateNo.createTimeNo(systemParameterMapper, "S", 4, "yyyyMMdd"); |
| | | ordersTotal.setOrderNo(orderNum);//订单编号 |
| | | ordersTotal.setOperatorType(sysAdmin.getType());//操作类型(0:系统管理员,1:员工) |
| | | ordersTotal.setOperatorId(sysAdmin.getId());//下单操作人标识 |
| | | ordersTotal.setOperatorName(sysAdmin.getName());//下单操作人名称 |
| | | ordersTotal.setPayTotal(BigDecimal.ZERO);//支付现金金额 |
| | | ordersTotal.setPayRecharge(BigDecimal.ZERO);//支付储值金金额 |
| | | ordersTotal.setPayIncrement(BigDecimal.ZERO);//支付增值金金额 |
| | | ordersTotal.setTotal(totalPrice);//订单总金额 |
| | | ordersTotal.setActualTotal(actualOrderTotal);//订单支付总金额 |
| | | ordersTotal.setDiscountTotal(totalPrice.subtract(actualOrderTotal));//优惠金额,以元为存储 |
| | | Employee employee = employeeMapper.selectOneByKey(operatorId); |
| | | ordersTotal.setShopId(employee==null?"":employee.getShopId());//操作人门店标识 |
| | | ordersTotal.setShopName(employee==null?"":employee.getShopName());//操作人门店名称 |
| | | |
| | | //创建总订单 |
| | | ordersTotalService.insert(ordersTotal); |
| | | |
| | | //总订单绑定开发人 |
| | | if(orderDeveloperList !=null && orderDeveloperList.size()>0){ |
| | | for(OrderDeveloper vo:orderDeveloperList){ |
| | | vo.setOrderId(ordersTotal.getId());//总订单id |
| | | orderDeveloperService.insert(vo); |
| | | } |
| | | } |
| | | |
| | | //创建子订单 |
| | | for(OrderItem vo:items){ |
| | | vo.setOrderId(ordersTotal.getId());//总订单id |
| | | orderItemService.insert(vo);//保存订单的子订单 |
| | | |
| | | if(packageTypes.contains(vo.getType())){ |
| | | packageIds.add(vo.getCommonId());//套餐/卡项id集合 |
| | | } |
| | | } |
| | | |
| | | //暂定,查询套餐/卡项的项目/商品,并且遍历保存子订单的子项 |
| | | |
| | | } |
| | | |
| | | private void pay(){ |
| | | |
| | | } |
| | | } |
New file |
| | |
| | | package com.hx.phip.service; |
| | | |
| | | import com.hx.phiappt.model.Consumables; |
| | | import com.hx.mybatisTool.SqlSentence; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | public interface ConsumablesService { |
| | | |
| | | int selectCount(SqlSentence sqlSentence); |
| | | |
| | | void insert(Consumables consumables); |
| | | |
| | | List<Consumables> selectList(SqlSentence sqlSentence); |
| | | |
| | | List<Map<String,Object>> selectListMap(SqlSentence sqlSentence); |
| | | |
| | | Consumables selectOne(SqlSentence sqlSentence); |
| | | |
| | | Map<String,Object> selectOneMap(SqlSentence sqlSentence); |
| | | |
| | | Consumables selectOneByKey(Object object); |
| | | |
| | | Consumables selectOneByKeyBlob(Object object); |
| | | |
| | | void updateAll(Consumables consumables); |
| | | |
| | | void updateWhere(SqlSentence sqlSentence); |
| | | |
| | | void deleteOne(String delId); |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.hx.phip.service; |
| | | |
| | | import com.hx.phiappt.model.order.OrderDeveloper; |
| | | import com.hx.mybatisTool.SqlSentence; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | public interface OrderDeveloperService { |
| | | |
| | | int selectCount(SqlSentence sqlSentence); |
| | | |
| | | void insert(OrderDeveloper orderDeveloper); |
| | | |
| | | List<OrderDeveloper> selectList(SqlSentence sqlSentence); |
| | | |
| | | List<Map<String,Object>> selectListMap(SqlSentence sqlSentence); |
| | | |
| | | OrderDeveloper selectOne(SqlSentence sqlSentence); |
| | | |
| | | Map<String,Object> selectOneMap(SqlSentence sqlSentence); |
| | | |
| | | OrderDeveloper selectOneByKey(Object object); |
| | | |
| | | OrderDeveloper selectOneByKeyBlob(Object object); |
| | | |
| | | void updateAll(OrderDeveloper orderDeveloper); |
| | | |
| | | void updateWhere(SqlSentence sqlSentence); |
| | | |
| | | void deleteOne(String delId); |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.hx.phip.service; |
| | | |
| | | import com.hx.phiappt.model.order.OrderItem; |
| | | import com.hx.mybatisTool.SqlSentence; |
| | | import com.hx.phiappt.model.order.OrderItemSource; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | public interface OrderItemService { |
| | | |
| | | int selectCount(SqlSentence sqlSentence); |
| | | |
| | | void insert(OrderItem orderItem); |
| | | |
| | | List<OrderItem> selectList(SqlSentence sqlSentence); |
| | | |
| | | List<Map<String,Object>> selectListMap(SqlSentence sqlSentence); |
| | | |
| | | OrderItem selectOne(SqlSentence sqlSentence); |
| | | |
| | | Map<String,Object> selectOneMap(SqlSentence sqlSentence); |
| | | |
| | | OrderItem selectOneByKey(Object object); |
| | | |
| | | OrderItem selectOneByKeyBlob(Object object); |
| | | |
| | | void updateAll(OrderItem orderItem); |
| | | |
| | | void updateWhere(SqlSentence sqlSentence); |
| | | |
| | | void deleteOne(String delId); |
| | | |
| | | } |
New file |
| | |
| | | package com.hx.phip.service; |
| | | |
| | | import com.hx.phiappt.model.order.OrdersTotal; |
| | | import com.hx.mybatisTool.SqlSentence; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | public interface OrdersTotalService { |
| | | |
| | | int selectCount(SqlSentence sqlSentence); |
| | | |
| | | void insert(OrdersTotal ordersTotal); |
| | | |
| | | List<OrdersTotal> selectList(SqlSentence sqlSentence); |
| | | |
| | | List<Map<String,Object>> selectListMap(SqlSentence sqlSentence); |
| | | |
| | | OrdersTotal selectOne(SqlSentence sqlSentence); |
| | | |
| | | Map<String,Object> selectOneMap(SqlSentence sqlSentence); |
| | | |
| | | OrdersTotal selectOneByKey(Object object); |
| | | |
| | | OrdersTotal selectOneByKeyBlob(Object object); |
| | | |
| | | void updateAll(OrdersTotal ordersTotal); |
| | | |
| | | void updateWhere(SqlSentence sqlSentence); |
| | | |
| | | void deleteOne(String delId); |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.hx.phip.service; |
| | | |
| | | import com.hx.phiappt.model.Project; |
| | | import com.hx.mybatisTool.SqlSentence; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | public interface ProjectService { |
| | | |
| | | int selectCount(SqlSentence sqlSentence); |
| | | |
| | | void insert(Project project); |
| | | |
| | | List<Project> selectList(SqlSentence sqlSentence); |
| | | |
| | | List<Map<String,Object>> selectListMap(SqlSentence sqlSentence); |
| | | |
| | | Project selectOne(SqlSentence sqlSentence); |
| | | |
| | | Map<String,Object> selectOneMap(SqlSentence sqlSentence); |
| | | |
| | | Project selectOneByKey(Object object); |
| | | |
| | | Project selectOneByKeyBlob(Object object); |
| | | |
| | | void updateAll(Project project); |
| | | |
| | | void updateWhere(SqlSentence sqlSentence); |
| | | |
| | | void deleteOne(String delId); |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.hx.phip.service; |
| | | |
| | | import com.hx.phiappt.model.SysAdmin; |
| | | import com.hx.mybatisTool.SqlSentence; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | public interface SysAdminService { |
| | | |
| | | int selectCount(SqlSentence sqlSentence); |
| | | |
| | | void insert(SysAdmin sysAdmin); |
| | | |
| | | List<SysAdmin> selectList(SqlSentence sqlSentence); |
| | | |
| | | List<Map<String,Object>> selectListMap(SqlSentence sqlSentence); |
| | | |
| | | SysAdmin selectOne(SqlSentence sqlSentence); |
| | | |
| | | Map<String,Object> selectOneMap(SqlSentence sqlSentence); |
| | | |
| | | SysAdmin selectOneByKey(Object object); |
| | | |
| | | SysAdmin selectOneByKeyBlob(Object object); |
| | | |
| | | void updateAll(SysAdmin sysAdmin); |
| | | |
| | | void updateWhere(SqlSentence sqlSentence); |
| | | |
| | | void deleteOne(String delId); |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.hx.phip.service; |
| | | |
| | | import com.hx.phiappt.model.SystemParameter; |
| | | import com.hx.mybatisTool.SqlSentence; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | public interface SystemParameterService { |
| | | |
| | | int selectCount(SqlSentence sqlSentence); |
| | | |
| | | void insert(SystemParameter systemParameter); |
| | | |
| | | List<SystemParameter> selectList(SqlSentence sqlSentence); |
| | | |
| | | List<Map<String,Object>> selectListMap(SqlSentence sqlSentence); |
| | | |
| | | SystemParameter selectOne(SqlSentence sqlSentence); |
| | | |
| | | Map<String,Object> selectOneMap(SqlSentence sqlSentence); |
| | | |
| | | SystemParameter selectOneByKey(Object object); |
| | | |
| | | SystemParameter selectOneByKeyBlob(Object object); |
| | | |
| | | void updateAll(SystemParameter systemParameter); |
| | | |
| | | void updateWhere(SqlSentence sqlSentence); |
| | | |
| | | void deleteOne(String delId); |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.hx.phip.service; |
| | | |
| | | import com.hx.phiappt.model.User; |
| | | import com.hx.mybatisTool.SqlSentence; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | public interface UserService { |
| | | |
| | | int selectCount(SqlSentence sqlSentence); |
| | | |
| | | void insert(User user); |
| | | |
| | | List<User> selectList(SqlSentence sqlSentence); |
| | | |
| | | List<Map<String,Object>> selectListMap(SqlSentence sqlSentence); |
| | | |
| | | User selectOne(SqlSentence sqlSentence); |
| | | |
| | | Map<String,Object> selectOneMap(SqlSentence sqlSentence); |
| | | |
| | | User selectOneByKey(Object object); |
| | | |
| | | User selectOneByKeyBlob(Object object); |
| | | |
| | | void updateAll(User user); |
| | | |
| | | void updateWhere(SqlSentence sqlSentence); |
| | | |
| | | void deleteOne(String delId); |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.hx.phip.service.impl; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import com.hx.exception.TipsException; |
| | | import com.hx.phip.dao.mapper.ConsumablesMapper; |
| | | import com.hx.phiappt.model.Consumables; |
| | | import com.hx.phip.service.ConsumablesService; |
| | | import com.hx.mybatisTool.SqlSentence; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @Transactional |
| | | @Service |
| | | public class ConsumablesServiceImpl implements ConsumablesService { |
| | | |
| | | @Resource |
| | | private ConsumablesMapper consumablesMapper; |
| | | |
| | | /**查询列表*/ |
| | | @Override |
| | | public List<Consumables> selectList(SqlSentence sqlSentence) { |
| | | return consumablesMapper.selectList(sqlSentence); |
| | | } |
| | | |
| | | /**查询列表*/ |
| | | @Override |
| | | public List<Map<String,Object>> selectListMap(SqlSentence sqlSentence) { |
| | | return consumablesMapper.selectListMap(sqlSentence); |
| | | } |
| | | |
| | | /**查询单个*/ |
| | | @Override |
| | | public Consumables selectOne(SqlSentence sqlSentence) { |
| | | return consumablesMapper.selectOne(sqlSentence); |
| | | } |
| | | |
| | | /**查询单个*/ |
| | | @Override |
| | | public Map<String,Object> selectOneMap(SqlSentence sqlSentence) { |
| | | return consumablesMapper.selectOneMap(sqlSentence); |
| | | } |
| | | |
| | | /**查询单个,大数据不拿取*/ |
| | | @Override |
| | | public Consumables selectOneByKey(Object object) { |
| | | return consumablesMapper.selectOneByKey(object); |
| | | } |
| | | |
| | | /**查询单个,大数据拿取*/ |
| | | @Override |
| | | public Consumables selectOneByKeyBlob(Object object) { |
| | | return consumablesMapper.selectOneByKeyBlob(object); |
| | | } |
| | | |
| | | /**新增*/ |
| | | @Override |
| | | public void insert(Consumables consumables) { |
| | | int count = consumablesMapper.insert(consumables); |
| | | if(count != 1) { |
| | | throw new TipsException("新增失败!"); |
| | | } |
| | | } |
| | | |
| | | /**修改*/ |
| | | @Override |
| | | public void updateAll(Consumables consumables) { |
| | | int count = consumablesMapper.updateAll(consumables); |
| | | if(count!=1) { |
| | | throw new TipsException("保存失败!"); |
| | | } |
| | | } |
| | | |
| | | /**修改*/ |
| | | @Override |
| | | public void updateWhere(SqlSentence sqlSentence) { |
| | | int count = consumablesMapper.updateWhere(sqlSentence); |
| | | if(count!=1) { |
| | | throw new TipsException("保存失败!"); |
| | | } |
| | | } |
| | | |
| | | /**删除一个*/ |
| | | @Override |
| | | public void deleteOne(String delId) { |
| | | int count = consumablesMapper.deleteById(delId); |
| | | if(count!=1) { |
| | | throw new TipsException("删除失败!"); |
| | | } |
| | | } |
| | | |
| | | /**查询条数*/ |
| | | @Override |
| | | public int selectCount(SqlSentence sqlSentence) { |
| | | int count = consumablesMapper.selectCount(sqlSentence); |
| | | return count; |
| | | } |
| | | } |
New file |
| | |
| | | package com.hx.phip.service.impl; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import com.hx.exception.TipsException; |
| | | import com.hx.phip.dao.mapper.OrderDeveloperMapper; |
| | | import com.hx.phiappt.model.order.OrderDeveloper; |
| | | import com.hx.phip.service.OrderDeveloperService; |
| | | import com.hx.mybatisTool.SqlSentence; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @Transactional |
| | | @Service |
| | | public class OrderDeveloperServiceImpl implements OrderDeveloperService { |
| | | |
| | | @Resource |
| | | private OrderDeveloperMapper orderDeveloperMapper; |
| | | |
| | | /**查询列表*/ |
| | | @Override |
| | | public List<OrderDeveloper> selectList(SqlSentence sqlSentence) { |
| | | return orderDeveloperMapper.selectList(sqlSentence); |
| | | } |
| | | |
| | | /**查询列表*/ |
| | | @Override |
| | | public List<Map<String,Object>> selectListMap(SqlSentence sqlSentence) { |
| | | return orderDeveloperMapper.selectListMap(sqlSentence); |
| | | } |
| | | |
| | | /**查询单个*/ |
| | | @Override |
| | | public OrderDeveloper selectOne(SqlSentence sqlSentence) { |
| | | return orderDeveloperMapper.selectOne(sqlSentence); |
| | | } |
| | | |
| | | /**查询单个*/ |
| | | @Override |
| | | public Map<String,Object> selectOneMap(SqlSentence sqlSentence) { |
| | | return orderDeveloperMapper.selectOneMap(sqlSentence); |
| | | } |
| | | |
| | | /**查询单个,大数据不拿取*/ |
| | | @Override |
| | | public OrderDeveloper selectOneByKey(Object object) { |
| | | return orderDeveloperMapper.selectOneByKey(object); |
| | | } |
| | | |
| | | /**查询单个,大数据拿取*/ |
| | | @Override |
| | | public OrderDeveloper selectOneByKeyBlob(Object object) { |
| | | return orderDeveloperMapper.selectOneByKeyBlob(object); |
| | | } |
| | | |
| | | /**新增*/ |
| | | @Override |
| | | public void insert(OrderDeveloper orderDeveloper) { |
| | | int count = orderDeveloperMapper.insert(orderDeveloper); |
| | | if(count != 1) { |
| | | throw new TipsException("新增失败!"); |
| | | } |
| | | } |
| | | |
| | | /**修改*/ |
| | | @Override |
| | | public void updateAll(OrderDeveloper orderDeveloper) { |
| | | int count = orderDeveloperMapper.updateAll(orderDeveloper); |
| | | if(count!=1) { |
| | | throw new TipsException("保存失败!"); |
| | | } |
| | | } |
| | | |
| | | /**修改*/ |
| | | @Override |
| | | public void updateWhere(SqlSentence sqlSentence) { |
| | | int count = orderDeveloperMapper.updateWhere(sqlSentence); |
| | | if(count!=1) { |
| | | throw new TipsException("保存失败!"); |
| | | } |
| | | } |
| | | |
| | | /**删除一个*/ |
| | | @Override |
| | | public void deleteOne(String delId) { |
| | | int count = orderDeveloperMapper.deleteById(delId); |
| | | if(count!=1) { |
| | | throw new TipsException("删除失败!"); |
| | | } |
| | | } |
| | | |
| | | /**查询条数*/ |
| | | @Override |
| | | public int selectCount(SqlSentence sqlSentence) { |
| | | int count = orderDeveloperMapper.selectCount(sqlSentence); |
| | | return count; |
| | | } |
| | | } |
New file |
| | |
| | | package com.hx.phip.service.impl; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import com.hx.exception.TipsException; |
| | | import com.hx.phip.dao.mapper.OrderItemMapper; |
| | | import com.hx.phiappt.model.order.OrderItem; |
| | | import com.hx.phip.service.OrderItemService; |
| | | import com.hx.mybatisTool.SqlSentence; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @Transactional |
| | | @Service |
| | | public class OrderItemServiceImpl implements OrderItemService { |
| | | |
| | | @Resource |
| | | private OrderItemMapper orderItemMapper; |
| | | |
| | | /**查询列表*/ |
| | | @Override |
| | | public List<OrderItem> selectList(SqlSentence sqlSentence) { |
| | | return orderItemMapper.selectList(sqlSentence); |
| | | } |
| | | |
| | | /**查询列表*/ |
| | | @Override |
| | | public List<Map<String,Object>> selectListMap(SqlSentence sqlSentence) { |
| | | return orderItemMapper.selectListMap(sqlSentence); |
| | | } |
| | | |
| | | /**查询单个*/ |
| | | @Override |
| | | public OrderItem selectOne(SqlSentence sqlSentence) { |
| | | return orderItemMapper.selectOne(sqlSentence); |
| | | } |
| | | |
| | | /**查询单个*/ |
| | | @Override |
| | | public Map<String,Object> selectOneMap(SqlSentence sqlSentence) { |
| | | return orderItemMapper.selectOneMap(sqlSentence); |
| | | } |
| | | |
| | | /**查询单个,大数据不拿取*/ |
| | | @Override |
| | | public OrderItem selectOneByKey(Object object) { |
| | | return orderItemMapper.selectOneByKey(object); |
| | | } |
| | | |
| | | /**查询单个,大数据拿取*/ |
| | | @Override |
| | | public OrderItem selectOneByKeyBlob(Object object) { |
| | | return orderItemMapper.selectOneByKeyBlob(object); |
| | | } |
| | | |
| | | /**新增*/ |
| | | @Override |
| | | public void insert(OrderItem orderItem) { |
| | | int count = orderItemMapper.insert(orderItem); |
| | | if(count != 1) { |
| | | throw new TipsException("新增失败!"); |
| | | } |
| | | } |
| | | |
| | | /**修改*/ |
| | | @Override |
| | | public void updateAll(OrderItem orderItem) { |
| | | int count = orderItemMapper.updateAll(orderItem); |
| | | if(count!=1) { |
| | | throw new TipsException("保存失败!"); |
| | | } |
| | | } |
| | | |
| | | /**修改*/ |
| | | @Override |
| | | public void updateWhere(SqlSentence sqlSentence) { |
| | | int count = orderItemMapper.updateWhere(sqlSentence); |
| | | if(count!=1) { |
| | | throw new TipsException("保存失败!"); |
| | | } |
| | | } |
| | | |
| | | /**删除一个*/ |
| | | @Override |
| | | public void deleteOne(String delId) { |
| | | int count = orderItemMapper.deleteById(delId); |
| | | if(count!=1) { |
| | | throw new TipsException("删除失败!"); |
| | | } |
| | | } |
| | | |
| | | /**查询条数*/ |
| | | @Override |
| | | public int selectCount(SqlSentence sqlSentence) { |
| | | int count = orderItemMapper.selectCount(sqlSentence); |
| | | return count; |
| | | } |
| | | } |
New file |
| | |
| | | package com.hx.phip.service.impl; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import com.hx.exception.TipsException; |
| | | import com.hx.phip.dao.mapper.OrdersTotalMapper; |
| | | import com.hx.phiappt.model.order.OrdersTotal; |
| | | import com.hx.phip.service.OrdersTotalService; |
| | | import com.hx.mybatisTool.SqlSentence; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @Transactional |
| | | @Service |
| | | public class OrdersTotalServiceImpl implements OrdersTotalService { |
| | | |
| | | @Resource |
| | | private OrdersTotalMapper ordersTotalMapper; |
| | | |
| | | /**查询列表*/ |
| | | @Override |
| | | public List<OrdersTotal> selectList(SqlSentence sqlSentence) { |
| | | return ordersTotalMapper.selectList(sqlSentence); |
| | | } |
| | | |
| | | /**查询列表*/ |
| | | @Override |
| | | public List<Map<String,Object>> selectListMap(SqlSentence sqlSentence) { |
| | | return ordersTotalMapper.selectListMap(sqlSentence); |
| | | } |
| | | |
| | | /**查询单个*/ |
| | | @Override |
| | | public OrdersTotal selectOne(SqlSentence sqlSentence) { |
| | | return ordersTotalMapper.selectOne(sqlSentence); |
| | | } |
| | | |
| | | /**查询单个*/ |
| | | @Override |
| | | public Map<String,Object> selectOneMap(SqlSentence sqlSentence) { |
| | | return ordersTotalMapper.selectOneMap(sqlSentence); |
| | | } |
| | | |
| | | /**查询单个,大数据不拿取*/ |
| | | @Override |
| | | public OrdersTotal selectOneByKey(Object object) { |
| | | return ordersTotalMapper.selectOneByKey(object); |
| | | } |
| | | |
| | | /**查询单个,大数据拿取*/ |
| | | @Override |
| | | public OrdersTotal selectOneByKeyBlob(Object object) { |
| | | return ordersTotalMapper.selectOneByKeyBlob(object); |
| | | } |
| | | |
| | | /**新增*/ |
| | | @Override |
| | | public void insert(OrdersTotal ordersTotal) { |
| | | int count = ordersTotalMapper.insert(ordersTotal); |
| | | if(count != 1) { |
| | | throw new TipsException("新增失败!"); |
| | | } |
| | | } |
| | | |
| | | /**修改*/ |
| | | @Override |
| | | public void updateAll(OrdersTotal ordersTotal) { |
| | | int count = ordersTotalMapper.updateAll(ordersTotal); |
| | | if(count!=1) { |
| | | throw new TipsException("保存失败!"); |
| | | } |
| | | } |
| | | |
| | | /**修改*/ |
| | | @Override |
| | | public void updateWhere(SqlSentence sqlSentence) { |
| | | int count = ordersTotalMapper.updateWhere(sqlSentence); |
| | | if(count!=1) { |
| | | throw new TipsException("保存失败!"); |
| | | } |
| | | } |
| | | |
| | | /**删除一个*/ |
| | | @Override |
| | | public void deleteOne(String delId) { |
| | | int count = ordersTotalMapper.deleteById(delId); |
| | | if(count!=1) { |
| | | throw new TipsException("删除失败!"); |
| | | } |
| | | } |
| | | |
| | | /**查询条数*/ |
| | | @Override |
| | | public int selectCount(SqlSentence sqlSentence) { |
| | | int count = ordersTotalMapper.selectCount(sqlSentence); |
| | | return count; |
| | | } |
| | | } |
New file |
| | |
| | | package com.hx.phip.service.impl; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import com.hx.exception.TipsException; |
| | | import com.hx.phip.dao.mapper.ProjectMapper; |
| | | import com.hx.phiappt.model.Project; |
| | | import com.hx.phip.service.ProjectService; |
| | | import com.hx.mybatisTool.SqlSentence; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @Transactional |
| | | @Service |
| | | public class ProjectServiceImpl implements ProjectService { |
| | | |
| | | @Resource |
| | | private ProjectMapper projectMapper; |
| | | |
| | | /**查询列表*/ |
| | | @Override |
| | | public List<Project> selectList(SqlSentence sqlSentence) { |
| | | return projectMapper.selectList(sqlSentence); |
| | | } |
| | | |
| | | /**查询列表*/ |
| | | @Override |
| | | public List<Map<String,Object>> selectListMap(SqlSentence sqlSentence) { |
| | | return projectMapper.selectListMap(sqlSentence); |
| | | } |
| | | |
| | | /**查询单个*/ |
| | | @Override |
| | | public Project selectOne(SqlSentence sqlSentence) { |
| | | return projectMapper.selectOne(sqlSentence); |
| | | } |
| | | |
| | | /**查询单个*/ |
| | | @Override |
| | | public Map<String,Object> selectOneMap(SqlSentence sqlSentence) { |
| | | return projectMapper.selectOneMap(sqlSentence); |
| | | } |
| | | |
| | | /**查询单个,大数据不拿取*/ |
| | | @Override |
| | | public Project selectOneByKey(Object object) { |
| | | return projectMapper.selectOneByKey(object); |
| | | } |
| | | |
| | | /**查询单个,大数据拿取*/ |
| | | @Override |
| | | public Project selectOneByKeyBlob(Object object) { |
| | | return projectMapper.selectOneByKeyBlob(object); |
| | | } |
| | | |
| | | /**新增*/ |
| | | @Override |
| | | public void insert(Project project) { |
| | | int count = projectMapper.insert(project); |
| | | if(count != 1) { |
| | | throw new TipsException("新增失败!"); |
| | | } |
| | | } |
| | | |
| | | /**修改*/ |
| | | @Override |
| | | public void updateAll(Project project) { |
| | | int count = projectMapper.updateAll(project); |
| | | if(count!=1) { |
| | | throw new TipsException("保存失败!"); |
| | | } |
| | | } |
| | | |
| | | /**修改*/ |
| | | @Override |
| | | public void updateWhere(SqlSentence sqlSentence) { |
| | | int count = projectMapper.updateWhere(sqlSentence); |
| | | if(count!=1) { |
| | | throw new TipsException("保存失败!"); |
| | | } |
| | | } |
| | | |
| | | /**删除一个*/ |
| | | @Override |
| | | public void deleteOne(String delId) { |
| | | int count = projectMapper.deleteById(delId); |
| | | if(count!=1) { |
| | | throw new TipsException("删除失败!"); |
| | | } |
| | | } |
| | | |
| | | /**查询条数*/ |
| | | @Override |
| | | public int selectCount(SqlSentence sqlSentence) { |
| | | int count = projectMapper.selectCount(sqlSentence); |
| | | return count; |
| | | } |
| | | } |
New file |
| | |
| | | package com.hx.phip.service.impl; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import com.hx.exception.TipsException; |
| | | import com.hx.phip.dao.mapper.SysAdminMapper; |
| | | import com.hx.phiappt.model.SysAdmin; |
| | | import com.hx.phip.service.SysAdminService; |
| | | import com.hx.mybatisTool.SqlSentence; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @Transactional |
| | | @Service |
| | | public class SysAdminServiceImpl implements SysAdminService { |
| | | |
| | | @Resource |
| | | private SysAdminMapper sysAdminMapper; |
| | | |
| | | /**查询列表*/ |
| | | @Override |
| | | public List<SysAdmin> selectList(SqlSentence sqlSentence) { |
| | | return sysAdminMapper.selectList(sqlSentence); |
| | | } |
| | | |
| | | /**查询列表*/ |
| | | @Override |
| | | public List<Map<String,Object>> selectListMap(SqlSentence sqlSentence) { |
| | | return sysAdminMapper.selectListMap(sqlSentence); |
| | | } |
| | | |
| | | /**查询单个*/ |
| | | @Override |
| | | public SysAdmin selectOne(SqlSentence sqlSentence) { |
| | | return sysAdminMapper.selectOne(sqlSentence); |
| | | } |
| | | |
| | | /**查询单个*/ |
| | | @Override |
| | | public Map<String,Object> selectOneMap(SqlSentence sqlSentence) { |
| | | return sysAdminMapper.selectOneMap(sqlSentence); |
| | | } |
| | | |
| | | /**查询单个,大数据不拿取*/ |
| | | @Override |
| | | public SysAdmin selectOneByKey(Object object) { |
| | | return sysAdminMapper.selectOneByKey(object); |
| | | } |
| | | |
| | | /**查询单个,大数据拿取*/ |
| | | @Override |
| | | public SysAdmin selectOneByKeyBlob(Object object) { |
| | | return sysAdminMapper.selectOneByKeyBlob(object); |
| | | } |
| | | |
| | | /**新增*/ |
| | | @Override |
| | | public void insert(SysAdmin sysAdmin) { |
| | | int count = sysAdminMapper.insert(sysAdmin); |
| | | if(count != 1) { |
| | | throw new TipsException("新增失败!"); |
| | | } |
| | | } |
| | | |
| | | /**修改*/ |
| | | @Override |
| | | public void updateAll(SysAdmin sysAdmin) { |
| | | int count = sysAdminMapper.updateAll(sysAdmin); |
| | | if(count!=1) { |
| | | throw new TipsException("保存失败!"); |
| | | } |
| | | } |
| | | |
| | | /**修改*/ |
| | | @Override |
| | | public void updateWhere(SqlSentence sqlSentence) { |
| | | int count = sysAdminMapper.updateWhere(sqlSentence); |
| | | if(count!=1) { |
| | | throw new TipsException("保存失败!"); |
| | | } |
| | | } |
| | | |
| | | /**删除一个*/ |
| | | @Override |
| | | public void deleteOne(String delId) { |
| | | int count = sysAdminMapper.deleteById(delId); |
| | | if(count!=1) { |
| | | throw new TipsException("删除失败!"); |
| | | } |
| | | } |
| | | |
| | | /**查询条数*/ |
| | | @Override |
| | | public int selectCount(SqlSentence sqlSentence) { |
| | | int count = sysAdminMapper.selectCount(sqlSentence); |
| | | return count; |
| | | } |
| | | } |
New file |
| | |
| | | package com.hx.phip.service.impl; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import com.hx.exception.TipsException; |
| | | import com.hx.phip.dao.mapper.SystemParameterMapper; |
| | | import com.hx.phiappt.model.SystemParameter; |
| | | import com.hx.phip.service.SystemParameterService; |
| | | import com.hx.mybatisTool.SqlSentence; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @Transactional |
| | | @Service |
| | | public class SystemParameterServiceImpl implements SystemParameterService { |
| | | |
| | | @Resource |
| | | private SystemParameterMapper systemParameterMapper; |
| | | |
| | | /**查询列表*/ |
| | | @Override |
| | | public List<SystemParameter> selectList(SqlSentence sqlSentence) { |
| | | return systemParameterMapper.selectList(sqlSentence); |
| | | } |
| | | |
| | | /**查询列表*/ |
| | | @Override |
| | | public List<Map<String,Object>> selectListMap(SqlSentence sqlSentence) { |
| | | return systemParameterMapper.selectListMap(sqlSentence); |
| | | } |
| | | |
| | | /**查询单个*/ |
| | | @Override |
| | | public SystemParameter selectOne(SqlSentence sqlSentence) { |
| | | return systemParameterMapper.selectOne(sqlSentence); |
| | | } |
| | | |
| | | /**查询单个*/ |
| | | @Override |
| | | public Map<String,Object> selectOneMap(SqlSentence sqlSentence) { |
| | | return systemParameterMapper.selectOneMap(sqlSentence); |
| | | } |
| | | |
| | | /**查询单个,大数据不拿取*/ |
| | | @Override |
| | | public SystemParameter selectOneByKey(Object object) { |
| | | return systemParameterMapper.selectOneByKey(object); |
| | | } |
| | | |
| | | /**查询单个,大数据拿取*/ |
| | | @Override |
| | | public SystemParameter selectOneByKeyBlob(Object object) { |
| | | return systemParameterMapper.selectOneByKeyBlob(object); |
| | | } |
| | | |
| | | /**新增*/ |
| | | @Override |
| | | public void insert(SystemParameter systemParameter) { |
| | | int count = systemParameterMapper.insert(systemParameter); |
| | | if(count != 1) { |
| | | throw new TipsException("新增失败!"); |
| | | } |
| | | } |
| | | |
| | | /**修改*/ |
| | | @Override |
| | | public void updateAll(SystemParameter systemParameter) { |
| | | int count = systemParameterMapper.updateAll(systemParameter); |
| | | if(count!=1) { |
| | | throw new TipsException("保存失败!"); |
| | | } |
| | | } |
| | | |
| | | /**修改*/ |
| | | @Override |
| | | public void updateWhere(SqlSentence sqlSentence) { |
| | | int count = systemParameterMapper.updateWhere(sqlSentence); |
| | | if(count!=1) { |
| | | throw new TipsException("保存失败!"); |
| | | } |
| | | } |
| | | |
| | | /**删除一个*/ |
| | | @Override |
| | | public void deleteOne(String delId) { |
| | | int count = systemParameterMapper.deleteById(delId); |
| | | if(count!=1) { |
| | | throw new TipsException("删除失败!"); |
| | | } |
| | | } |
| | | |
| | | /**查询条数*/ |
| | | @Override |
| | | public int selectCount(SqlSentence sqlSentence) { |
| | | int count = systemParameterMapper.selectCount(sqlSentence); |
| | | return count; |
| | | } |
| | | } |
New file |
| | |
| | | package com.hx.phip.service.impl; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import com.hx.exception.TipsException; |
| | | import com.hx.phip.dao.mapper.UserMapper; |
| | | import com.hx.phiappt.model.User; |
| | | import com.hx.phip.service.UserService; |
| | | import com.hx.mybatisTool.SqlSentence; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @Transactional |
| | | @Service |
| | | public class UserServiceImpl implements UserService { |
| | | |
| | | @Resource |
| | | private UserMapper userMapper; |
| | | |
| | | /**查询列表*/ |
| | | @Override |
| | | public List<User> selectList(SqlSentence sqlSentence) { |
| | | return userMapper.selectList(sqlSentence); |
| | | } |
| | | |
| | | /**查询列表*/ |
| | | @Override |
| | | public List<Map<String,Object>> selectListMap(SqlSentence sqlSentence) { |
| | | return userMapper.selectListMap(sqlSentence); |
| | | } |
| | | |
| | | /**查询单个*/ |
| | | @Override |
| | | public User selectOne(SqlSentence sqlSentence) { |
| | | return userMapper.selectOne(sqlSentence); |
| | | } |
| | | |
| | | /**查询单个*/ |
| | | @Override |
| | | public Map<String,Object> selectOneMap(SqlSentence sqlSentence) { |
| | | return userMapper.selectOneMap(sqlSentence); |
| | | } |
| | | |
| | | /**查询单个,大数据不拿取*/ |
| | | @Override |
| | | public User selectOneByKey(Object object) { |
| | | return userMapper.selectOneByKey(object); |
| | | } |
| | | |
| | | /**查询单个,大数据拿取*/ |
| | | @Override |
| | | public User selectOneByKeyBlob(Object object) { |
| | | return userMapper.selectOneByKeyBlob(object); |
| | | } |
| | | |
| | | /**新增*/ |
| | | @Override |
| | | public void insert(User user) { |
| | | int count = userMapper.insert(user); |
| | | if(count != 1) { |
| | | throw new TipsException("新增失败!"); |
| | | } |
| | | } |
| | | |
| | | /**修改*/ |
| | | @Override |
| | | public void updateAll(User user) { |
| | | int count = userMapper.updateAll(user); |
| | | if(count!=1) { |
| | | throw new TipsException("保存失败!"); |
| | | } |
| | | } |
| | | |
| | | /**修改*/ |
| | | @Override |
| | | public void updateWhere(SqlSentence sqlSentence) { |
| | | int count = userMapper.updateWhere(sqlSentence); |
| | | if(count!=1) { |
| | | throw new TipsException("保存失败!"); |
| | | } |
| | | } |
| | | |
| | | /**删除一个*/ |
| | | @Override |
| | | public void deleteOne(String delId) { |
| | | int count = userMapper.deleteById(delId); |
| | | if(count!=1) { |
| | | throw new TipsException("删除失败!"); |
| | | } |
| | | } |
| | | |
| | | /**查询条数*/ |
| | | @Override |
| | | public int selectCount(SqlSentence sqlSentence) { |
| | | int count = userMapper.selectCount(sqlSentence); |
| | | return count; |
| | | } |
| | | } |