diff --git a/jsowell-admin/src/main/java/com/jsowell/api/uniapp/AuthCardController.java b/jsowell-admin/src/main/java/com/jsowell/api/uniapp/AuthCardController.java index 79dbf20b2..f75689710 100644 --- a/jsowell-admin/src/main/java/com/jsowell/api/uniapp/AuthCardController.java +++ b/jsowell-admin/src/main/java/com/jsowell/api/uniapp/AuthCardController.java @@ -8,7 +8,7 @@ import com.jsowell.common.exception.BusinessException; import com.jsowell.common.response.RestApiResponse; import com.jsowell.pile.dto.MemberRegisterAndLoginDTO; import com.jsowell.pile.dto.PileAuthCardDTO; -import com.jsowell.pile.service.IPileAuthCardService; +import com.jsowell.pile.service.PileAuthCardService; import com.jsowell.pile.vo.uniapp.AuthCardVO; import com.jsowell.service.MemberService; import org.springframework.beans.factory.annotation.Autowired; @@ -29,7 +29,7 @@ import java.util.List; public class AuthCardController extends BaseController { @Autowired - private IPileAuthCardService pileAuthCardService; + private PileAuthCardService pileAuthCardService; @Autowired private MemberService memberService; diff --git a/jsowell-admin/src/main/java/com/jsowell/service/MemberService.java b/jsowell-admin/src/main/java/com/jsowell/service/MemberService.java index 273f23295..37affa5f7 100644 --- a/jsowell-admin/src/main/java/com/jsowell/service/MemberService.java +++ b/jsowell-admin/src/main/java/com/jsowell/service/MemberService.java @@ -78,7 +78,7 @@ public class MemberService { private IMemberPlateNumberRelationService memberPlateNumberRelationService; @Autowired - private IPileAuthCardService pileAuthCardService; + private PileAuthCardService pileAuthCardService; @Autowired private IMemberInvoiceTitleService memberInvoiceTitleService; diff --git a/jsowell-admin/src/main/java/com/jsowell/web/controller/pile/PileAuthCardController.java b/jsowell-admin/src/main/java/com/jsowell/web/controller/pile/PileAuthCardController.java index 20625ad04..cfdded757 100644 --- a/jsowell-admin/src/main/java/com/jsowell/web/controller/pile/PileAuthCardController.java +++ b/jsowell-admin/src/main/java/com/jsowell/web/controller/pile/PileAuthCardController.java @@ -10,7 +10,7 @@ import com.jsowell.common.exception.BusinessException; import com.jsowell.common.util.poi.ExcelUtil; import com.jsowell.pile.domain.PileAuthCard; import com.jsowell.pile.dto.PileAuthCardDTO; -import com.jsowell.pile.service.IPileAuthCardService; +import com.jsowell.pile.service.PileAuthCardService; import com.jsowell.pile.vo.web.PileAuthCardVO; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.access.prepost.PreAuthorize; @@ -29,7 +29,7 @@ import java.util.List; @RequestMapping("/pile/card") public class PileAuthCardController extends BaseController { @Autowired - private IPileAuthCardService pileAuthCardService; + private PileAuthCardService pileAuthCardService; /** * 查询充电站鉴权卡列表 diff --git a/jsowell-admin/src/test/java/SpringBootTestController.java b/jsowell-admin/src/test/java/SpringBootTestController.java index 750ca9c11..36f3f6af4 100644 --- a/jsowell-admin/src/test/java/SpringBootTestController.java +++ b/jsowell-admin/src/test/java/SpringBootTestController.java @@ -101,6 +101,7 @@ import java.nio.charset.StandardCharsets; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.*; +import java.util.stream.Collectors; @ActiveProfiles("dev") @SpringBootTest(classes = JsowellApplication.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) @@ -180,14 +181,11 @@ public class SpringBootTestController { private RedisCache redisCache; @Autowired - private IPileAuthCardService pileAuthCardService; + private PileAuthCardService pileAuthCardService; @Autowired private LianLianService lianLianService; - @Autowired - private IMemberTransactionRecordService memberTransactionRecordService; - @Autowired private IMemberPlateNumberRelationService memberPlateNumberRelationService; @@ -1258,7 +1256,7 @@ public class SpringBootTestController { public void testQueryCorpMember() { List accountList = adapayMemberAccountService.selectAdapayMemberAccountList(new AdapayMemberAccount()); if (CollectionUtils.isNotEmpty(accountList)) { - Long[] ids = accountList.stream().map(AdapayMemberAccount::getId).toArray(Long[]::new); + List ids = accountList.stream().map(x -> x.getId() + "").collect(Collectors.toList()); adapayMemberAccountService.deleteAdapayMemberAccountByIds(ids); } diff --git a/jsowell-netty/src/main/java/com/jsowell/netty/handler/ConfirmStartChargingRequestHandler.java b/jsowell-netty/src/main/java/com/jsowell/netty/handler/ConfirmStartChargingRequestHandler.java index bd5aa56a2..a8787f5a1 100644 --- a/jsowell-netty/src/main/java/com/jsowell/netty/handler/ConfirmStartChargingRequestHandler.java +++ b/jsowell-netty/src/main/java/com/jsowell/netty/handler/ConfirmStartChargingRequestHandler.java @@ -19,8 +19,8 @@ import com.jsowell.pile.domain.PileAuthCard; import com.jsowell.pile.dto.GenerateOrderDTO; import com.jsowell.pile.service.IMemberPlateNumberRelationService; import com.jsowell.pile.service.IOrderBasicInfoService; -import com.jsowell.pile.service.IPileAuthCardService; import com.jsowell.pile.service.IPileMsgRecordService; +import com.jsowell.pile.service.PileAuthCardService; import io.netty.channel.Channel; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; @@ -41,7 +41,7 @@ public class ConfirmStartChargingRequestHandler extends AbstractHandler{ private final String type = YKCUtils.frameType2Str(YKCFrameTypeCode.REQUEST_START_CHARGING_CODE.getBytes()); @Autowired - private IPileAuthCardService pileAuthCardService; + private PileAuthCardService pileAuthCardService; @Autowired private IOrderBasicInfoService orderBasicInfoService; diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/domain/PileAuthCard.java b/jsowell-pile/src/main/java/com/jsowell/pile/domain/PileAuthCard.java index 8aa314b32..73111e9a4 100644 --- a/jsowell-pile/src/main/java/com/jsowell/pile/domain/PileAuthCard.java +++ b/jsowell-pile/src/main/java/com/jsowell/pile/domain/PileAuthCard.java @@ -1,70 +1,76 @@ package com.jsowell.pile.domain; -import com.fasterxml.jackson.annotation.JsonFormat; -import com.jsowell.common.annotation.Excel; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; +import lombok.*; import java.util.Date; /** - * 充电站鉴权卡对象 pile_auth_card - * - * @author jsowell - * @date 2023-03-16 + * 充电站鉴权卡表 */ -@Data -@NoArgsConstructor -@AllArgsConstructor +@Getter +@Setter @Builder +@AllArgsConstructor +@NoArgsConstructor public class PileAuthCard { private static final long serialVersionUID = 1L; - /** * 主键 */ - private Long id; + private Integer id; /** * 逻辑卡号 */ - @Excel(name = "逻辑卡号") private String logicCard; /** * 物理卡号 */ - @Excel(name = "物理卡号") private String physicsCard; /** - * 卡状态 + * 卡状态(0-待激活;1-正常使用;2-启动锁定;9-停用) */ - @Excel(name = "卡状态") private String status; + /** + * 密钥 + */ private String secretKey; /** * 所属用户的会员id */ - @Excel(name = "所属用户的会员id") private String memberId; + /** + * 所属运营商id + */ + private String merchantId; + + /** + * 创建时间 + */ + private Date createTime; + + /** + * 创建人 + */ + private String createBy; + + /** + * 更新时间 + */ + private Date updateTime; + + /** + * 更新人 + */ + private String updateBy; + /** * 删除标识(0-正常;1-删除) */ private String delFlag; - - @JsonFormat( pattern="yyyy-MM-dd HH:mm:ss") - private Date createTime; - - private String createBy; - - private Date updateTime; - - private String updateBy; - -} +} \ No newline at end of file diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/dto/PileAuthCardDTO.java b/jsowell-pile/src/main/java/com/jsowell/pile/dto/PileAuthCardDTO.java index 091291fee..cd3076b08 100644 --- a/jsowell-pile/src/main/java/com/jsowell/pile/dto/PileAuthCardDTO.java +++ b/jsowell-pile/src/main/java/com/jsowell/pile/dto/PileAuthCardDTO.java @@ -12,7 +12,7 @@ import java.util.List; */ @Data public class PileAuthCardDTO { - private Long id; + private Integer id; private String logicCard; @@ -28,7 +28,14 @@ public class PileAuthCardDTO { private String verificationCode; + /** + * 运营商id + * 创建时传过来 + */ private String merchantId; + /** + * 有权限的运营商id列表 + */ private List merchantIdList; } diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/mapper/PileAuthCardMapper.java b/jsowell-pile/src/main/java/com/jsowell/pile/mapper/PileAuthCardMapper.java index f60322bef..6a9e84854 100644 --- a/jsowell-pile/src/main/java/com/jsowell/pile/mapper/PileAuthCardMapper.java +++ b/jsowell-pile/src/main/java/com/jsowell/pile/mapper/PileAuthCardMapper.java @@ -1,7 +1,5 @@ package com.jsowell.pile.mapper; -import java.util.List; - import com.jsowell.pile.domain.PileAuthCard; import com.jsowell.pile.dto.PileAuthCardDTO; import com.jsowell.pile.vo.uniapp.AuthCardVO; @@ -9,14 +7,66 @@ import com.jsowell.pile.vo.web.PileAuthCardVO; import org.apache.ibatis.annotations.Param; import org.springframework.stereotype.Repository; -/** - * 充电站鉴权卡Mapper接口 - * - * @author jsowell - * @date 2023-03-16 - */ +import java.util.List; + @Repository public interface PileAuthCardMapper { + /** + * delete by primary key + * + * @param id primaryKey + * @return deleteCount + */ + int deleteByPrimaryKey(Integer id); + + /** + * insert record to table + * + * @param record the record + * @return insert count + */ + int insert(PileAuthCard record); + + int insertOrUpdate(PileAuthCard record); + + int insertOrUpdateSelective(PileAuthCard record); + + /** + * insert record to table selective + * + * @param record the record + * @return insert count + */ + int insertSelective(PileAuthCard record); + + /** + * select by primary key + * + * @param id primary key + * @return object by primary key + */ + PileAuthCard selectByPrimaryKey(Integer id); + + /** + * update record selective + * + * @param record the updated record + * @return update count + */ + int updateByPrimaryKeySelective(PileAuthCard record); + + /** + * update record + * + * @param record the updated record + * @return update count + */ + int updateByPrimaryKey(PileAuthCard record); + + int updateBatch(List list); + + int batchInsert(@Param("list") List list); + /** * 查询充电站鉴权卡 * @@ -26,12 +76,14 @@ public interface PileAuthCardMapper { // public PileAuthCard selectPileAuthCardById(Long id); PileAuthCardVO getCardInfoById(Long id); + /** * 查询充电站鉴权卡信息 + * * @param pileAuthCard * @return */ - PileAuthCard selectPileAuthCardInfo (PileAuthCard pileAuthCard); + PileAuthCard selectPileAuthCardInfo(PileAuthCard pileAuthCard); /** * 查询充电站鉴权卡列表 @@ -39,7 +91,7 @@ public interface PileAuthCardMapper { * @param pileAuthCard 充电站鉴权卡 * @return 充电站鉴权卡集合 */ - public List selectPileAuthCardList(PileAuthCard pileAuthCard); + List selectPileAuthCardList(PileAuthCard pileAuthCard); /** * 查询充电站鉴权卡列表 @@ -47,7 +99,7 @@ public interface PileAuthCardMapper { * @param dto 充电站鉴权卡 * @return 充电站鉴权卡集合 */ - public List getPileAuthCardInfoList(PileAuthCardDTO dto); + List getPileAuthCardInfoList(PileAuthCardDTO dto); /** * 新增充电站鉴权卡 @@ -55,7 +107,7 @@ public interface PileAuthCardMapper { * @param pileAuthCard 充电站鉴权卡 * @return 结果 */ - public int insertPileAuthCard(PileAuthCard pileAuthCard); + int insertPileAuthCard(PileAuthCard pileAuthCard); /** * 修改充电站鉴权卡 @@ -63,7 +115,7 @@ public interface PileAuthCardMapper { * @param pileAuthCard 充电站鉴权卡 * @return 结果 */ - public int updatePileAuthCard(PileAuthCard pileAuthCard); + int updatePileAuthCard(PileAuthCard pileAuthCard); /** * 删除充电站鉴权卡 @@ -71,10 +123,11 @@ public interface PileAuthCardMapper { * @param id 充电站鉴权卡主键 * @return 结果 */ - public int deletePileAuthCardById(Long id); + int deletePileAuthCardById(Long id); /** * 停用某张卡 + * * @param id * @return */ @@ -86,12 +139,13 @@ public interface PileAuthCardMapper { * @param ids 需要删除的数据主键集合 * @return 结果 */ - public int deletePileAuthCardByIds(Long[] ids); + int deletePileAuthCardByIds(Long[] ids); int unBindingCard(PileAuthCard pileAuthCard); /** * 根据逻辑卡号查询某状态的鉴权卡信息 + * * @param status * @param logicCard * @return @@ -100,8 +154,9 @@ public interface PileAuthCardMapper { /** * 通过memberId查询鉴权卡列表 (小程序用) + * * @param memberId * @return */ List getAuthCardListByMemberId(@Param("memberId") String memberId); -} +} \ No newline at end of file diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/service/IPileAuthCardService.java b/jsowell-pile/src/main/java/com/jsowell/pile/service/PileAuthCardService.java similarity index 85% rename from jsowell-pile/src/main/java/com/jsowell/pile/service/IPileAuthCardService.java rename to jsowell-pile/src/main/java/com/jsowell/pile/service/PileAuthCardService.java index 72d1158d9..f03f01814 100644 --- a/jsowell-pile/src/main/java/com/jsowell/pile/service/IPileAuthCardService.java +++ b/jsowell-pile/src/main/java/com/jsowell/pile/service/PileAuthCardService.java @@ -1,19 +1,34 @@ package com.jsowell.pile.service; -import java.util.List; - import com.jsowell.pile.domain.PileAuthCard; import com.jsowell.pile.dto.PileAuthCardDTO; import com.jsowell.pile.vo.uniapp.AuthCardVO; import com.jsowell.pile.vo.web.PileAuthCardVO; -/** - * 充电站鉴权卡Service接口 - * - * @author jsowell - * @date 2023-03-16 - */ -public interface IPileAuthCardService { +import java.util.List; + +public interface PileAuthCardService{ + + int deleteByPrimaryKey(Integer id); + + int insert(PileAuthCard record); + + int insertOrUpdate(PileAuthCard record); + + int insertOrUpdateSelective(PileAuthCard record); + + int insertSelective(PileAuthCard record); + + PileAuthCard selectByPrimaryKey(Integer id); + + int updateByPrimaryKeySelective(PileAuthCard record); + + int updateByPrimaryKey(PileAuthCard record); + + int updateBatch(List list); + + int batchInsert(List list); + /** * 查询充电站鉴权卡 * @@ -132,4 +147,5 @@ public interface IPileAuthCardService { * @return */ int unbindAuthCard(PileAuthCardDTO dto); + } diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/AdapayMemberAccountServiceImpl.java b/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/AdapayMemberAccountServiceImpl.java index d78df6ff4..a30a33fbe 100644 --- a/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/AdapayMemberAccountServiceImpl.java +++ b/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/AdapayMemberAccountServiceImpl.java @@ -97,8 +97,6 @@ public class AdapayMemberAccountServiceImpl implements AdapayMemberAccountServic return adapayMemberAccountMapper.deleteAdapayMemberAccountByIds(ids); } - - @Override public AdapayMemberAccount selectByMerchantId(String merchantId) { if (StringUtils.isBlank(merchantId)) { diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/OrderBasicInfoServiceImpl.java b/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/OrderBasicInfoServiceImpl.java index 8e51dc99c..f58ebb72e 100644 --- a/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/OrderBasicInfoServiceImpl.java +++ b/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/OrderBasicInfoServiceImpl.java @@ -132,7 +132,7 @@ public class OrderBasicInfoServiceImpl implements IOrderBasicInfoService { private IPileBillingTemplateService pileBillingTemplateService; @Autowired - private IPileAuthCardService pileAuthCardService; + private PileAuthCardService pileAuthCardService; @Autowired private OrderMonitorDataService orderMonitorDataService; diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/PileAuthCardServiceImpl.java b/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/PileAuthCardServiceImpl.java index 6136df0fb..df276c4c2 100644 --- a/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/PileAuthCardServiceImpl.java +++ b/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/PileAuthCardServiceImpl.java @@ -9,7 +9,7 @@ import com.jsowell.pile.domain.PileAuthCard; import com.jsowell.pile.dto.PileAuthCardDTO; import com.jsowell.pile.mapper.PileAuthCardMapper; import com.jsowell.pile.service.IMemberBasicInfoService; -import com.jsowell.pile.service.IPileAuthCardService; +import com.jsowell.pile.service.PileAuthCardService; import com.jsowell.pile.util.UserUtils; import com.jsowell.pile.vo.base.LoginUserDetailVO; import com.jsowell.pile.vo.base.MerchantInfoVO; @@ -31,7 +31,7 @@ import java.util.stream.Collectors; * @date 2023-03-16 */ @Service -public class PileAuthCardServiceImpl implements IPileAuthCardService { +public class PileAuthCardServiceImpl implements PileAuthCardService { @Autowired private PileAuthCardMapper pileAuthCardMapper; @@ -48,7 +48,6 @@ public class PileAuthCardServiceImpl implements IPileAuthCardService { // public PileAuthCard selectPileAuthCardById(Long id) { // return pileAuthCardMapper.selectPileAuthCardById(id); // } - @Override public PileAuthCardVO getCardInfoById(Long id) { return pileAuthCardMapper.getCardInfoById(id); @@ -56,6 +55,7 @@ public class PileAuthCardServiceImpl implements IPileAuthCardService { /** * 查询充电站鉴权卡信息 + * * @param pileAuthCard * @return */ @@ -112,7 +112,7 @@ public class PileAuthCardServiceImpl implements IPileAuthCardService { String logicCard = dto.getLogicCard(); // 根据卡号查询数据库 PileAuthCard cardInfo = pileAuthCardMapper.selectSomeStatusCardInfo(null, logicCard); - if(cardInfo != null) { + if (cardInfo != null) { // 不为空说明此卡已存在 throw new BusinessException(ReturnCodeEnum.CODE_AUTH_CARD_CODE_EXIST); } @@ -136,10 +136,11 @@ public class PileAuthCardServiceImpl implements IPileAuthCardService { PileAuthCard pileAuthCard = PileAuthCard.builder() .logicCard(logicCard) .memberId(memberId) + .merchantId(dto.getMerchantId()) .status(status) .secretKey(secretKey) .build(); - return pileAuthCardMapper.insertPileAuthCard(pileAuthCard); + return pileAuthCardMapper.insertSelective(pileAuthCard); } /** @@ -167,7 +168,7 @@ public class PileAuthCardServiceImpl implements IPileAuthCardService { .memberId(memberBasicInfo.getMemberId()) .status("1") .build(); - return pileAuthCardMapper.updatePileAuthCard(pileAuthCard); + return pileAuthCardMapper.updateByPrimaryKeySelective(pileAuthCard); } /** @@ -204,6 +205,7 @@ public class PileAuthCardServiceImpl implements IPileAuthCardService { /** * 根据逻辑卡号查询某状态的鉴权卡信息 + * * @param status * @param logicCard * @return @@ -215,6 +217,7 @@ public class PileAuthCardServiceImpl implements IPileAuthCardService { /** * 通过逻辑卡号查询卡信息 + * * @param logicCard * @return */ @@ -225,6 +228,7 @@ public class PileAuthCardServiceImpl implements IPileAuthCardService { /** * 通过memberId查询鉴权卡列表 (小程序用) + * * @param memberId * @return */ @@ -239,6 +243,7 @@ public class PileAuthCardServiceImpl implements IPileAuthCardService { /** * 用户绑定鉴权卡 + * * @param dto */ @Override @@ -266,6 +271,7 @@ public class PileAuthCardServiceImpl implements IPileAuthCardService { /** * 用户解绑鉴权卡 + * * @param dto * @return */ @@ -287,4 +293,55 @@ public class PileAuthCardServiceImpl implements IPileAuthCardService { pileAuthCard.setSecretKey(secretKey); return updatePileAuthCard(pileAuthCard); } + + @Override + public int deleteByPrimaryKey(Integer id) { + return pileAuthCardMapper.deleteByPrimaryKey(id); + } + + @Override + public int insert(PileAuthCard record) { + return pileAuthCardMapper.insert(record); + } + + @Override + public int insertOrUpdate(PileAuthCard record) { + return pileAuthCardMapper.insertOrUpdate(record); + } + + @Override + public int insertOrUpdateSelective(PileAuthCard record) { + return pileAuthCardMapper.insertOrUpdateSelective(record); + } + + @Override + public int insertSelective(PileAuthCard record) { + return pileAuthCardMapper.insertSelective(record); + } + + @Override + public PileAuthCard selectByPrimaryKey(Integer id) { + return pileAuthCardMapper.selectByPrimaryKey(id); + } + + @Override + public int updateByPrimaryKeySelective(PileAuthCard record) { + return pileAuthCardMapper.updateByPrimaryKeySelective(record); + } + + @Override + public int updateByPrimaryKey(PileAuthCard record) { + return pileAuthCardMapper.updateByPrimaryKey(record); + } + + @Override + public int updateBatch(List list) { + return pileAuthCardMapper.updateBatch(list); + } + + @Override + public int batchInsert(List list) { + return pileAuthCardMapper.batchInsert(list); + } } + diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/service/orderlogic/AbstractOrderLogic.java b/jsowell-pile/src/main/java/com/jsowell/pile/service/orderlogic/AbstractOrderLogic.java index 9b280a509..fe24ec745 100644 --- a/jsowell-pile/src/main/java/com/jsowell/pile/service/orderlogic/AbstractOrderLogic.java +++ b/jsowell-pile/src/main/java/com/jsowell/pile/service/orderlogic/AbstractOrderLogic.java @@ -88,7 +88,7 @@ public abstract class AbstractOrderLogic implements InitializingBean { protected AdapayCallbackRecordService adapayCallbackRecordService; @Autowired - protected IPileAuthCardService pileAuthCardService; + protected PileAuthCardService pileAuthCardService; @Autowired protected IMemberPlateNumberRelationService memberPlateNumberRelationService; diff --git a/jsowell-pile/src/main/resources/mapper/pile/PileAuthCardMapper.xml b/jsowell-pile/src/main/resources/mapper/pile/PileAuthCardMapper.xml index fe72fc64e..b2b7f1f97 100644 --- a/jsowell-pile/src/main/resources/mapper/pile/PileAuthCardMapper.xml +++ b/jsowell-pile/src/main/resources/mapper/pile/PileAuthCardMapper.xml @@ -1,33 +1,457 @@ - - + + + + + + + + + + + + + + + + + + + + + id, logic_card, physics_card, `status`, secret_key, member_id, merchant_id, create_time, + create_by, update_time, update_by, del_flag + + + + + delete from pile_auth_card + where id = #{id,jdbcType=INTEGER} + + + + insert into pile_auth_card (logic_card, physics_card, `status`, + secret_key, member_id, merchant_id, + create_time, create_by, update_time, + update_by, del_flag) + values (#{logicCard,jdbcType=VARCHAR}, #{physicsCard,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, + #{secretKey,jdbcType=VARCHAR}, #{memberId,jdbcType=VARCHAR}, #{merchantId,jdbcType=VARCHAR}, + #{createTime,jdbcType=TIMESTAMP}, #{createBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, + #{updateBy,jdbcType=VARCHAR}, #{delFlag,jdbcType=VARCHAR}) + + + + insert into pile_auth_card + + + logic_card, + + + physics_card, + + + `status`, + + + secret_key, + + + member_id, + + + merchant_id, + + + create_time, + + + create_by, + + + update_time, + + + update_by, + + + del_flag, + + + + + #{logicCard,jdbcType=VARCHAR}, + + + #{physicsCard,jdbcType=VARCHAR}, + + + #{status,jdbcType=VARCHAR}, + + + #{secretKey,jdbcType=VARCHAR}, + + + #{memberId,jdbcType=VARCHAR}, + + + #{merchantId,jdbcType=VARCHAR}, + + + #{createTime,jdbcType=TIMESTAMP}, + + + #{createBy,jdbcType=VARCHAR}, + + + #{updateTime,jdbcType=TIMESTAMP}, + + + #{updateBy,jdbcType=VARCHAR}, + + + #{delFlag,jdbcType=VARCHAR}, + + + + + + update pile_auth_card + + + logic_card = #{logicCard,jdbcType=VARCHAR}, + + + physics_card = #{physicsCard,jdbcType=VARCHAR}, + + + `status` = #{status,jdbcType=VARCHAR}, + + + secret_key = #{secretKey,jdbcType=VARCHAR}, + + + member_id = #{memberId,jdbcType=VARCHAR}, + + + merchant_id = #{merchantId,jdbcType=VARCHAR}, + + + create_time = #{createTime,jdbcType=TIMESTAMP}, + + + create_by = #{createBy,jdbcType=VARCHAR}, + + + update_time = #{updateTime,jdbcType=TIMESTAMP}, + + + update_by = #{updateBy,jdbcType=VARCHAR}, + + + del_flag = #{delFlag,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=INTEGER} + + + + update pile_auth_card + set logic_card = #{logicCard,jdbcType=VARCHAR}, + physics_card = #{physicsCard,jdbcType=VARCHAR}, + `status` = #{status,jdbcType=VARCHAR}, + secret_key = #{secretKey,jdbcType=VARCHAR}, + member_id = #{memberId,jdbcType=VARCHAR}, + merchant_id = #{merchantId,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=TIMESTAMP}, + create_by = #{createBy,jdbcType=VARCHAR}, + update_time = #{updateTime,jdbcType=TIMESTAMP}, + update_by = #{updateBy,jdbcType=VARCHAR}, + del_flag = #{delFlag,jdbcType=VARCHAR} + where id = #{id,jdbcType=INTEGER} + + + + update pile_auth_card + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.logicCard,jdbcType=VARCHAR} + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.physicsCard,jdbcType=VARCHAR} + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.status,jdbcType=VARCHAR} + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.secretKey,jdbcType=VARCHAR} + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.memberId,jdbcType=VARCHAR} + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.merchantId,jdbcType=VARCHAR} + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.createTime,jdbcType=TIMESTAMP} + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.createBy,jdbcType=VARCHAR} + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.updateTime,jdbcType=TIMESTAMP} + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.updateBy,jdbcType=VARCHAR} + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.delFlag,jdbcType=VARCHAR} + + + + where id in + + #{item.id,jdbcType=INTEGER} + + + + + insert into pile_auth_card + (logic_card, physics_card, `status`, secret_key, member_id, merchant_id, create_time, + create_by, update_time, update_by, del_flag) + values + + (#{item.logicCard,jdbcType=VARCHAR}, #{item.physicsCard,jdbcType=VARCHAR}, #{item.status,jdbcType=VARCHAR}, + #{item.secretKey,jdbcType=VARCHAR}, #{item.memberId,jdbcType=VARCHAR}, #{item.merchantId,jdbcType=VARCHAR}, + #{item.createTime,jdbcType=TIMESTAMP}, #{item.createBy,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP}, + #{item.updateBy,jdbcType=VARCHAR}, #{item.delFlag,jdbcType=VARCHAR}) + + + + + insert into pile_auth_card + + + id, + + logic_card, + physics_card, + `status`, + secret_key, + member_id, + merchant_id, + create_time, + create_by, + update_time, + update_by, + del_flag, + + values + + + #{id,jdbcType=INTEGER}, + + #{logicCard,jdbcType=VARCHAR}, + #{physicsCard,jdbcType=VARCHAR}, + #{status,jdbcType=VARCHAR}, + #{secretKey,jdbcType=VARCHAR}, + #{memberId,jdbcType=VARCHAR}, + #{merchantId,jdbcType=VARCHAR}, + #{createTime,jdbcType=TIMESTAMP}, + #{createBy,jdbcType=VARCHAR}, + #{updateTime,jdbcType=TIMESTAMP}, + #{updateBy,jdbcType=VARCHAR}, + #{delFlag,jdbcType=VARCHAR}, + + on duplicate key update + + + id = #{id,jdbcType=INTEGER}, + + logic_card = #{logicCard,jdbcType=VARCHAR}, + physics_card = #{physicsCard,jdbcType=VARCHAR}, + `status` = #{status,jdbcType=VARCHAR}, + secret_key = #{secretKey,jdbcType=VARCHAR}, + member_id = #{memberId,jdbcType=VARCHAR}, + merchant_id = #{merchantId,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=TIMESTAMP}, + create_by = #{createBy,jdbcType=VARCHAR}, + update_time = #{updateTime,jdbcType=TIMESTAMP}, + update_by = #{updateBy,jdbcType=VARCHAR}, + del_flag = #{delFlag,jdbcType=VARCHAR}, + + + + + insert into pile_auth_card + + + id, + + + logic_card, + + + physics_card, + + + `status`, + + + secret_key, + + + member_id, + + + merchant_id, + + + create_time, + + + create_by, + + + update_time, + + + update_by, + + + del_flag, + + + values + + + #{id,jdbcType=INTEGER}, + + + #{logicCard,jdbcType=VARCHAR}, + + + #{physicsCard,jdbcType=VARCHAR}, + + + #{status,jdbcType=VARCHAR}, + + + #{secretKey,jdbcType=VARCHAR}, + + + #{memberId,jdbcType=VARCHAR}, + + + #{merchantId,jdbcType=VARCHAR}, + + + #{createTime,jdbcType=TIMESTAMP}, + + + #{createBy,jdbcType=VARCHAR}, + + + #{updateTime,jdbcType=TIMESTAMP}, + + + #{updateBy,jdbcType=VARCHAR}, + + + #{delFlag,jdbcType=VARCHAR}, + + + on duplicate key update + + + id = #{id,jdbcType=INTEGER}, + + + logic_card = #{logicCard,jdbcType=VARCHAR}, + + + physics_card = #{physicsCard,jdbcType=VARCHAR}, + + + `status` = #{status,jdbcType=VARCHAR}, + + + secret_key = #{secretKey,jdbcType=VARCHAR}, + + + member_id = #{memberId,jdbcType=VARCHAR}, + + + merchant_id = #{merchantId,jdbcType=VARCHAR}, + + + create_time = #{createTime,jdbcType=TIMESTAMP}, + + + create_by = #{createBy,jdbcType=VARCHAR}, + + + update_time = #{updateTime,jdbcType=TIMESTAMP}, + + + update_by = #{updateBy,jdbcType=VARCHAR}, + + + del_flag = #{delFlag,jdbcType=VARCHAR}, + + + - - - - - - - - - - - - + + + + + + + + + + + + select id, logic_card, physics_card, status, secret_key, member_id, create_time, create_by, update_time, update_by, del_flag from pile_auth_card - + id, logic_card, physics_card, status, secret_key, member_id, create_time, create_by, update_time, update_by, del_flag - - + + - + - + insert into pile_auth_card logic_card, @@ -116,14 +540,14 @@ delete from pile_auth_card where id in - + #{id} select - + from pile_auth_card where del_flag = '0' @@ -180,7 +604,7 @@ and t1.member_id = #{memberId} and t1.merchant_id in - + #{merchantId,jdbcType=VARCHAR}