|
@ -66,13 +66,15 @@ public class IotDeviceSimService extends BaseJpaService<IotDeviceSimDO, IotDevi
|
|
|
* @param remainingBalance
|
|
|
* @param status
|
|
|
*/
|
|
|
public void editSIM(String id,String advancePayment,String payment,String remainingBalance,Integer status ) {
|
|
|
public void editSIM(String id,String simId,String advancePayment,String payment,String remainingBalance,Integer status ) {
|
|
|
|
|
|
IotDeviceSimDO simDO = iotDeviceSimDao.findOne(id);
|
|
|
simDO.setSim(simId);
|
|
|
simDO.setAdvancePayment(Float.parseFloat(advancePayment));
|
|
|
simDO.setPayment(Float.parseFloat(payment));
|
|
|
simDO.setRemainingBalance(Float.parseFloat(remainingBalance));
|
|
|
simDO.setStatus(status);
|
|
|
simDO.setDel("0");
|
|
|
iotDeviceSimDao.save(simDO);
|
|
|
}
|
|
|
|
|
@ -119,8 +121,8 @@ public class IotDeviceSimService extends BaseJpaService<IotDeviceSimDO, IotDevi
|
|
|
*/
|
|
|
|
|
|
public MixEnvelop<IotDeviceSimDO, IotDeviceSimDO> conditionQueryPage(Integer page, Integer size, String status, String sim, String sn){
|
|
|
StringBuffer sql = new StringBuffer("SELECT c.* from iot_device_sim c WHERE 1=1 ");
|
|
|
StringBuffer sqlCount = new StringBuffer("SELECT COUNT(c.id) count from iot_device_sim c WHERE 1=1 ");
|
|
|
StringBuffer sql = new StringBuffer("SELECT c.* from iot_device_sim c WHERE del=0 ");
|
|
|
StringBuffer sqlCount = new StringBuffer("SELECT COUNT(c.id) count from iot_device_sim c WHERE del=0 ");
|
|
|
List<Object> args = new ArrayList<>();
|
|
|
if(StringUtils.isNotBlank(status)){
|
|
|
sql.append(" and c.status=? ");
|
|
@ -154,7 +156,7 @@ public class IotDeviceSimService extends BaseJpaService<IotDeviceSimDO, IotDevi
|
|
|
*/
|
|
|
public MixEnvelop<IotDeviceSimDO, IotDeviceSimDO> findAllSim(Integer page, Integer size) {
|
|
|
|
|
|
StringBuffer sql= new StringBuffer("SELECT DISTINCT * FROM iot_device_sim ");
|
|
|
StringBuffer sql= new StringBuffer("SELECT DISTINCT * FROM iot_device_sim WHERE del=0 ");
|
|
|
|
|
|
sql.append(" limit ").append((page-1)*size).append(",").append(size);
|
|
|
|
|
@ -195,7 +197,7 @@ public class IotDeviceSimService extends BaseJpaService<IotDeviceSimDO, IotDevi
|
|
|
*/
|
|
|
public List<IotDeviceSimDO> findAllRemindSim(String time, String code) {
|
|
|
|
|
|
StringBuffer sql = new StringBuffer("SELECT a.* FROM iot_device_sim a WHERE 1=1");
|
|
|
StringBuffer sql = new StringBuffer("SELECT a.* FROM iot_device_sim a WHERE del=0");
|
|
|
|
|
|
List<Object> args = new ArrayList<>();
|
|
|
if (StringUtils.isNotBlank(time)){
|